TL;DR
This paper introduces DebUnc, a framework that enhances multi-agent LLM debates by incorporating uncertainty metrics. By allowing agents to communicate their confidence, DebUnc helps prevent the spread of misinformation and leads to more accurate collective decision-making, particularly when using attention-based methods to weigh agent contributions.
What Problem Does This Paper Address?
Large Language Models (LLMs) are increasingly used in complex applications, but they suffer from "hallucinations" – generating incorrect information with high confidence. This is problematic in multi-agent systems where one LLM's confident error can mislead others, leading to a consensus on wrong answers. While multi-agent debates can improve accuracy, they don't inherently solve the hallucination problem if agents can't gauge the reliability of their peers' contributions. This paper tackles the challenge of making LLM agents more reliable communicators within a debate setting by enabling them to express and utilize uncertainty.
Methods
The core of DebUnc is the integration of uncertainty metrics into a multi-agent debate framework. After each debate round, an uncertainty metric is used to quantify an agent's confidence in its response. This confidence information is then shared with other agents in the subsequent round. The paper explores two primary methods for communicating this uncertainty:
- Confidence in Prompt: The uncertainty (or its inverse, confidence) is directly included in the textual prompt for the next round. This provides explicit information about an agent's certainty.
- Attention Scaling: This novel approach modifies the LLM's attention mechanism. Instead of treating all input tokens equally, attention weights are adjusted based on the confidence of the source agent. This means the model can dynamically focus more on contributions from more confident agents. The paper further distinguishes between "Attention-Others" (scaling attention to other agents' tokens) and "Attention-All" (scaling attention to all tokens, including the agent's own).
The paper also investigates three types of uncertainty metrics:
- Mean Token Entropy: A simple metric based on the average entropy of token probabilities.
- TokenSAR: A more advanced metric that considers the relevance of tokens to the overall meaning.
- Ground Truth Uncertainty: A simulated metric used for diagnostic purposes, assigning 0 uncertainty to correct answers and 8 to incorrect ones.
Datasets
The experiments were conducted using the following benchmarks:
- MMLU: A broad knowledge benchmark with multiple-choice questions.
- GSM8k: A dataset of grade-school math problems.
- TruthfulQA: A dataset designed to test LLMs' susceptibility to common misconceptions.
- Arithmetic: A custom-generated dataset of arithmetic problems.
The models used were Mistral-7B-Instruct-v0.2 and Llama-3-8B-Instruct. For evaluation, a subset of 100 questions was sampled from each benchmark to manage computational costs.
Key Insights and Ideas
- Uncertainty is Key to Trust: Just as humans use qualifiers like "I think" or "I'm sure," LLMs need a way to signal their confidence. This is crucial for preventing the spread of misinformation in collaborative settings.
- Attention Scaling Outperforms Prompting: The paper's most significant finding is that the attention-scaling method, particularly "Attention-All," leads to greater accuracy improvements than simply including confidence in the prompt. This suggests LLMs can leverage structured confidence signals beyond raw text.
- Attention-All is Superior: The "Attention-All" method, which scales attention to all tokens (including the agent's own), consistently outperformed "Attention-Others" and "Confidence in Prompt," indicating that a holistic adjustment of focus is most effective.
- Ground Truth is the Ideal: While not practical for real-world use, the "Ground Truth" uncertainty metric showed that better uncertainty signals directly translate to higher accuracy gains, highlighting the potential for future improvements in uncertainty estimation.
- Mean Token Entropy is a Good Baseline: Despite its simplicity, Mean Token Entropy performed well and was more computationally efficient than TokenSAR, making it a practical choice for many applications.
Key Results
- Attention-All achieved the highest average accuracy across all tested uncertainty metrics and benchmarks.
- On Mistral-7B, Attention-All with Ground Truth uncertainty achieved an average accuracy of 0.67, significantly outperforming the standard debate baseline.
- The accuracy improvement ratio was most pronounced with Attention-All, showing a slope of 0.59 as the uncertainty metric's AUROC increased, compared to 0.45 for Attention-Others and 0.17 for Confidence in Prompt.
- Mean Token Entropy generally outperformed TokenSAR in terms of average AUROC (0.627 vs. 0.617) and was less computationally demanding.
- The study demonstrated that correct answers generally exhibit lower uncertainties than incorrect ones, validating the utility of uncertainty metrics for distinguishing reliable from potentially hallucinated responses.
Limitations and Future Work
- Computational Overhead: Multi-agent debates, in general, are computationally expensive due to multiple generations per round. DebUnc adds to this overhead by requiring uncertainty metric calculations. This makes it most suitable for scenarios where accuracy is paramount and latency is acceptable.
- Open-Source LLMs Required: The attention-scaling method requires modifications to the LLM's source code, limiting its direct application to open-source models.
- Prompt Ordering Sensitivity: Attention scaling can be sensitive to the order of agent responses in the prompt, potentially leaking information.
- Future Work: The authors suggest exploring more robust uncertainty metrics and investigating how to improve the sensitivity of attention scaling to response ordering. They also encourage further exploration of attention scaling in scenarios where certain input parts should be prioritized.
Summary updated