Large Language Model Evaluation via Matrix Entropy

Lai Wei, Zhiquan Tan, Chenghai Li, Jindong Wang, Weiran Huang

Abstract

Large Language Models (LLMs) have transformed natural language processing and extended their powerful capabilities to multi-modal domains. As LLMs continue to advance, it is crucial to develop diverse and appropriate metrics for their evaluation. In this paper, we introduce a novel rank-based metric, Diff-eRank, grounded in information theory and geometry principles. Diff-eRank assesses LLMs by analyzing their hidden representations, providing a quantitative measure of how efficiently they eliminate redundant information during training. We demonstrate the applicability of Diff-eRank in both single-modal (e.g., language) and multi-modal settings. For language models, our results show that Diff-eRank increases with model size and correlates well with conventional metrics such as loss and accuracy. In the multi-modal context, we propose an alignment evaluation method based on the eRank, and verify that contemporary multi-modal LLMs exhibit strong alignment performance based on our method.

Introduction

Traditional evaluation of Large Language Models (LLMs) primarily relies on extrinsic metrics, such as benchmark accuracy or next-token prediction loss (perplexity). While these metrics are effective for assessing performance, they offer limited insight into the internal structural changes that occur during training. This paper addresses this gap by proposing that learning is essentially a process of noise reduction. As a model trains, it discards redundant information and organizes data into a lower-dimensional, more structured space. To quantify this internal improvement, we introduce Diff-eRank, an intrinsic metric grounded in information theory and geometry.

Methodology

The core of our approach is the Effective Rank (eRank) of the covariance matrix of a model's hidden representations. Unlike standard matrix rank, eRank is a continuous measure that is less sensitive to noise and is mathematically equivalent to Von Neumann entropy.

Diff-eRank is defined as the difference in eRank between an untrained model ($M_0$) and a trained, compute-optimal model ($M_1$). A higher Diff-eRank indicates a more significant reduction in redundancy and a more organized internal representation.

For multi-modal models, such as vision-language models, we extend this framework to measure:

  • Image Reduction Ratio: Quantifies the compression of raw visual features by the connector layer.
  • Image-Text Alignment: Measures the geometric similarity between visual and textual representations within the LLM.
Multi-modal evaluation framework using eRank at various pipeline stages.

Experimental Setup

We validated Diff-eRank across several model families, including OPT (125M to 13B), Cerebras-GPT, and OpenELM. The metric was tested on diverse datasets such as Wikipedia (pre-training), OpenWebText2, Dolly-15k (instruction tuning), and HH-RLHF (preference data). Extrinsic performance was measured using standard benchmarks like OpenbookQA, PIQA, and Winogrande. For multi-modal evaluation, we utilized LLaVA-1.5 and MiniGPT-v2.

Key Results

Our experiments reveal several key findings regarding the internal structure of LLMs:

  1. Scaling Laws of Internal Structure: Diff-eRank consistently increases with model size across all tested families and datasets. This suggests that larger models are inherently better at eliminating redundant information and "squeezing out" noise.
  2. Correlation with Extrinsic Metrics: There is a strong positive correlation between Diff-eRank and traditional metrics like benchmark accuracy and reduced loss. This indicates that Diff-eRank can serve as a reliable proxy for model quality without requiring labeled ground-truth datasets.
  3. Layer-wise Sensitivity: Ablation studies show that the "noise reduction" effect is most pronounced in the last layer of the LLM. Early and middle layers remain more chaotic, suggesting the model acts as a refinement pipeline where structure emerges just before the final output.
Correlation between Diff-eRank, Reduced Loss, and Benchmark Accuracy across model sizes.

In the multi-modal domain, our alignment metric successfully distinguished between models of varying quality. For instance, LLaVA-1.5 exhibited higher alignment scores (~0.85) compared to MiniGPT-v2 (~0.70), consistent with their known performance gap on standard vision-language benchmarks.

Conclusion and Future Work

Diff-eRank provides a robust, intrinsic method for evaluating LLMs by analyzing their internal representations. By quantifying the efficiency of information organization, it offers a unique perspective on the learning process that complements traditional extrinsic metrics.

While calculating the singular value decomposition (SVD) required for eRank can be computationally intensive on large datasets, the metric's sensitivity to training stages and model scaling makes it a valuable tool. Future work includes applying Diff-eRank to optimize model pruning and quantization by identifying which internal redundancies can be safely removed without compromising performance.

Summary updated

BibTeX
@inproceedings{wei2024large,
  author = {Lai Wei and Zhiquan Tan and Chenghai Li and Jindong Wang and Weiran Huang},
  title = {{Large Language Model Evaluation via Matrix Entropy}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=nvn80cscVm},
}
Figure