TL;DR
This paper introduces Selective-LAMA, a new evaluation framework for language models that goes beyond simple accuracy by incorporating confidence scores. This allows for a more robust assessment of a model's knowledge, particularly in identifying and mitigating biases learned from training data and templates.
What Problem Does This Paper Address?
Large language models (LLMs) are known to store a vast amount of factual and commonsense knowledge. Evaluating this knowledge is often done using zero-shot cloze-style QA tasks, like the LAMA probe. However, these traditional methods only measure prediction accuracy, failing to penalize models for confidently producing incorrect or "hallucinated" answers. This is problematic because LLMs can generate fluent-sounding but factually wrong statements. The paper addresses the need for an evaluation framework that considers not just what a model predicts, but also how confident it is in that prediction, enabling a more reliable assessment of its true knowledge.
Methods
The core contribution is the adaptation of the "selective prediction" framework to the LAMA probe. In selective prediction, a system decides whether to output a prediction based on a confidence score. The authors propose Selective-LAMA, which uses various confidence functions to evaluate LLMs. These functions are designed to be computed solely from the model's output (e.g., token probabilities) without requiring additional training data or external knowledge. They explore several confidence functions:
- Token (T): The log probability of the predicted token.
- Sent (S): The pseudo-log likelihood of the entire sentence.
- Gap (G): The difference in log probability between the top two predicted tokens.
- Reranking (R): A score based on the rank of a prediction after reranking.
- DropoutMean (DM) & DropoutVar (DV): Metrics leveraging dropout to estimate uncertainty.
- TemplateDiff (TD): A measure of how much the prediction changes when the subject entity is removed from the template.
The evaluation metric used is the Risk-Coverage AUC (RC-AUC), which assesses the trade-off between the risk of making a wrong prediction and the coverage of predictions made.
Datasets
The experiments were conducted using the original LAMA benchmark, which comprises four datasets:
- Google-RE: Relational facts extracted from Wikipedia.
- T-REX: Another dataset of relational facts from Wikipedia.
- ConceptNet: Commonsense knowledge extracted from ConceptNet.
- SQUAD: A question-answering dataset adapted into a cloze style.
The models used were BERT-base, BERT-large, and RoBERTa-base.
Key Insights and Ideas
- Confidence matters: Simple accuracy-based evaluation can be misleading, especially when models exhibit template-specific biases. Selective prediction, by incorporating confidence, offers a more robust evaluation.
- Template bias is a real issue: LLMs can learn biases from the templates used in cloze tasks, leading to confident but incorrect predictions. Selective-LAMA is shown to be less susceptible to overestimating performance in the presence of such biases.
- No one-size-fits-all confidence function: The effectiveness of a confidence function is highly dependent on the specific language model and the dataset being used. What works best for one might not for another.
- Confidence functions have different preferences: Even when using only model outputs, different confidence functions prioritize different relation types and predicted tokens, revealing nuanced aspects of model behavior.
Key Results
- Selective-LAMA evaluation is more robust to template-related biases than conventional accuracy-based evaluation, as indicated by weaker positive correlations with answer coverage and stronger negative correlations with prediction coverage for RC-AUC metrics compared to accuracy.
- The Token log probability is a strong baseline but not always the best choice for confidence estimation.
- DropoutVar showed a peculiar trend, while Gap and TemplateDiff performed well on Wikipedia-based datasets (Google-RE, T-REX).
- Table 5 shows that when confidence functions are used directly for prediction (instead of just confidence estimation), DropoutMean generally achieved the best performance (P@1) across models and datasets. However, there was no strong correlation between a function's effectiveness as a predictor and its effectiveness as a confidence estimator.
Limitations and Future Work
- The proposed framework is primarily evaluated on masked language models and the LAMA probe. While applicable to other LLMs, some confidence functions might require specific model architectures or dataset formats (e.g., single-token predictions, subject-relation-object triples).
- The authors suggest that future work should include a more detailed analysis of the relationships between tasks, models, and confidence scores.
- Exploring more sophisticated methods to ensure the reliability of language model predictions across various tasks is also a promising direction.
- The paper acknowledges that the selective classifier does not guarantee correctness and should be used as an aid, with final decisions made by a human user.
Summary updated