TL;DR
This paper introduces "Reinforcement Learning from Knowledge Feedback" (RLKF), a novel framework to train Large Language Models (LLMs) to reliably refuse questions they don't know the answer to, thereby reducing hallucinations. By focusing on model reliability – balancing helpfulness with truthfulness – RLKF significantly improves LLM performance on tasks requiring accurate knowledge.
What Problem Does This Paper Address?
Large Language Models (LLMs) are prone to "hallucinations," generating plausible-sounding but factually incorrect or nonsensical outputs. This often happens when LLMs are asked questions beyond their knowledge scope. While much research has focused on improving LLM correctness, less attention has been paid to teaching them when to say "I don't know." This paper argues that true reliability in LLMs requires not just providing correct answers but also explicitly refusing to answer questions outside their knowledge boundaries.
Methods
The core of this work is the Reinforcement Learning from Knowledge Feedback (RLKF) framework. It builds upon Reinforcement Learning from Human Feedback (RLHF) but introduces a key innovation: knowledge feedback to automatically generate preference data.
Here's how it works:
- Reliability Goal: Instead of just aiming for helpfulness, RLKF introduces a "reliability" goal. This means the LLM should be helpful when it knows the answer and truthful by refusing when it doesn't.
- Knowledge Feedback: The system uses external knowledge (like a calculator for math problems) or internal consistency checks (for more open-ended questions) to determine if a question is within the LLM's knowledge boundary.
- Preference Data Generation: Based on this knowledge feedback, the system automatically creates preference pairs. For questions within the LLM's knowledge, correct answers are preferred over refusals. For questions outside the boundary, refusals are preferred over incorrect answers.
- Reward Model Training: A reward model is trained on this automatically generated, reliable preference data. This "Reliable Reward Model" (RelyRM) learns to distinguish between correct answers and appropriate refusals.
- Policy Optimization: Finally, the LLM policy is optimized using Proximal Policy Optimization (PPO) with the RelyRM providing the reward signal, encouraging the LLM to be reliable.
Datasets
- Arithmetic Dataset: Synthetically generated arithmetic questions (14,000 samples for training reward model, policy prompts, and testing).
- GSM8K: A dataset of mathematical reasoning problems (2,000 samples for reward model training, 1,000 for policy optimization). This is used as an out-of-domain setting.
- TriviaQA: A widely-used question-answering dataset (20,000 samples for training, 11,313 for validation) to test generalizability beyond math.
Key Insights and Ideas
- Reliability as a distinct goal: The paper convincingly argues that "reliability" (balancing helpfulness and truthfulness) is a crucial alignment goal, separate from just "helpfulness" or "honesty."
- Automated preference data generation: The core innovation of using "knowledge feedback" to automatically generate preference data for training the reward model is a significant step towards scalable and objective LLM alignment. This bypasses the need for costly and potentially biased human annotation for rejection scenarios.
- LLMs can learn to refuse: The results demonstrate that LLMs can be effectively trained to refuse questions they don't know, leading to a substantial reduction in hallucinations.
- Selective refusal is key: The RLKF method doesn't just make LLMs refuse everything; it teaches them to refuse selectively, based on their perceived knowledge boundary. This is crucial for maintaining helpfulness.
Key Results
- Significant Reliability Improvement: RLKF consistently improves reliability across various tasks, including arithmetic and question answering.
- Enhanced Precision and Truthfulness: The RLKF-trained models show marked improvements in precision (knowing when they know) and truthfulness (refusing when they don't know).
- Arithmetic Tasks: On arithmetic tasks, RLKF achieved a reliability score of 56.5 (in-domain) and 41.5 (out-of-domain), significantly outperforming baselines like "no system prompt" (40.4 and 26.2 respectively) and "prudent system prompt" (44.7 and 32.4 respectively).
- TriviaQA: On TriviaQA, RLKF achieved a reliability of 71.8, compared to 61.1 for the base LLAMA-2 with no system prompt and 59.2 for the prudent system prompt.
- Reduced Hallucinations: The method effectively reduces hallucination errors by teaching the model to reject questions outside its knowledge.
- Comparable Performance to GPT-40: While GPT-40 shows high accuracy, it exhibits significantly lower reliability than RLKF on harder tasks, suggesting that broad instruction tuning alone isn't sufficient for reliable refusal.
Limitations and Future Work
- In-domain vs. Out-of-domain: While RLKF improves reliability on both, the performance gap between in-domain and out-of-domain tasks remains, especially for more challenging out-of-domain tasks like GSM8K.
- Calibration Methods: The paper notes that calibration-based methods can be useful for analyzing uncertainty or constructing training data but are less effective at enabling explicit refusal compared to RLKF. They also often have higher inference costs and may require human-crafted rejection templates.
- Future Work: The authors suggest that further research could explore more sophisticated methods for determining the LLM's knowledge boundary and refining the RLKF framework for even greater reliability. They also highlight the need for better evaluation metrics for honesty.
Summary updated