Introduction
Evaluating the quality of machine-generated text—such as summaries, dialogue, and translations—has long been a bottleneck in NLP research. Traditional metrics like BLEU and ROUGE are computationally cheap but "dumb," failing to capture semantic nuance or flow. Conversely, the modern "LLM-as-a-judge" approach (e.g., using GPT-4) provides high-quality feedback but suffers from high costs, latency, and instability due to prompt sensitivity.
RepEval introduces a novel alternative: extracting a model's "opinion" directly from its internal brain states. By bypassing text generation and focusing on hidden representations, RepEval offers a more stable, efficient, and accurate metric for text evaluation.
Methodology: Finding the Quality Axis
RepEval operates on the intuition that within an LLM's high-dimensional embedding space, there exists a specific direction that corresponds to "quality." The process involves three core stages:
- Representation Extraction: A decoder-only LLM (like Mistral-7B) is fed a prompt containing the text to be evaluated. Instead of reading the output, RepEval captures the hidden states from a specific intermediate layer and token position.
- Direction Vector Construction: To identify the "quality axis," the system uses a tiny set of "good" and "bad" text pairs (e.g., human vs. low-quality machine summaries).
- PCA Projection: Principal Component Analysis (PCA) is applied to the differences between these pairs to identify the primary direction of variation. This becomes the "Project Direction."
Crucially, the authors found that middle layers often contain more useful quality information than the final layer, which is typically specialized for next-word prediction rather than holistic understanding.
Evaluation Scenarios
RepEval is designed to handle the two primary modes of text assessment: absolute scoring and pair-wise preference.
- Absolute Evaluation: The representation of a single hypothesis is projected onto the quality vector to produce a scalar score (e.g., a fluency score of 0.9).
- Pair-wise Evaluation: When comparing two responses (A and B), the model projects both representations. The response that projects further along the quality axis is selected as the winner.
Key Results and Insights
The authors validated RepEval across 14 datasets, including SummEval and HHH Alignment. The results demonstrate that LLMs often "know" more than they can effectively "say" in a generated response:
- Outperforming GPT-4: In absolute evaluation tasks measuring fluency and coherence, RepEval (using a 7B parameter model) frequently surpassed GPT-4 in correlation with human judgment.
- Extreme Efficiency: While traditional reward models require thousands of examples, RepEval achieves near-optimal results with as few as 5 to 20 sample pairs.
- Zero Fine-Tuning: The method works out-of-the-box with general-purpose LLMs, requiring no expensive training of a "critic" model.
- High Accuracy: On the HHH Alignment dataset, RepEval achieved a remarkable 97.74% accuracy in picking the better response, exceeding the performance of Claude-3-Opus.
Limitations and Future Work
While RepEval is highly effective, it is currently limited to English text. Furthermore, because it provides a numerical projection rather than a text explanation, it lacks the "interpretability" of a generative judge. Future research will focus on cross-lingual performance and unsupervised methods for identifying quality directions without requiring human-labeled seed pairs.
Summary updated