Detecting LLM Hallucinations via Attention Path Fragility
Listen to the summary
Uses a voice available on your device
Audio options
On this page 4 sections
Related concepts 6 concepts
Key Takeaways
- ASMI significantly improves confidence filtering, reducing error rates on BabiQA from 16.0% to 5.6%.
- The method is sampling-free and performs competitively against Semantic Entropy across 10 of 12 grounded benchmark settings.
- It uses a caching mechanism to avoid full model re-runs, making it more efficient than standard predictive distribution sampling.
- The approach effectively identifies grounded QA hallucinations where models fail to utilize provided context.
Summary & Methodology Analysis
The ASMI methodology addresses the problem of overconfident incorrect outputs by treating attention path fragility as a signal for uncertainty. The process begins by performing a single greedy decoding pass to generate a response, while simultaneously caching the prefix activations up to a target transformer layer. Instead of performing full model re-inference, the system generates multiple Monte Carlo subnetworks by applying random Bernoulli masks with a mask rate of 0.15 to the attention head outputs. The suffix of the model is then evaluated under each mask using the cached activations, which provides an efficient way to sample predictive distributions without repeating the entire compute chain.
The system calculates the BALD mutual information between these subnetworks to measure fragility, then applies a semantic agreement score based on cosine similarities of output projections. By weighting the token level mutual information using the inverse of this semantic agreement, the method discounts surface level variations in wording that do not reflect true uncertainty. An optional adaptive gate, known as Adapt-ASMI, can further modulate these weights based on the diversity of the stochastically sampled responses, providing an additional layer of control over the uncertainty signal.
Regarding performance and limitations, ASMI excels in grounded question answering, frequently outperforming Semantic Entropy on benchmarks like BabiQA, SQuAD, and CoQA. However, the paper reports that in parametric settings like TriviaQA, the ASMI variants perform below the baseline of Maximum Sequence Probability. The paper does not specify the exact memory footprint or inference latency increase in milliseconds, though it notes that the caching strategy serves to reduce the inference costs associated with sampling.
Interactive System Flowchart
Cross-Examination & FAQs
A deeper dive clarifying mechanics, constraints, and baseline evaluations.
Q1. What problem does this paper solve?
It addresses the issue of models being overconfident when they are actually incorrect, specifically in grounded question answering tasks where the model ignores the provided context.
Q2. Does this method require training the model?
No, the paper does not describe any training or fine-tuning process for ASMI.
Q3. Is this approach computationally expensive?
The method is sampling-free and uses a caching strategy for prefix activations to reduce inference costs, though the paper does not specify exact latency or memory usage figures.
Q4. What is the role of the Bernoulli mask in this method?
A random Bernoulli mask with a rate of 0.15 is applied to attention head outputs to generate multiple Monte Carlo subnetworks, allowing the system to measure how fragile the output is to structural perturbations.
Q5. How does ASMI compare to the Semantic Entropy baseline?
ASMI ties or outperforms Semantic Entropy on 10 out of the 12 tested grounded benchmark settings.
Q6. What happens when ASMI is applied to parametric question answering?
On parametric benchmarks like TriviaQA, ASMI variants perform at or below the level of the zero-cost Maximum Sequence Probability baseline.
Q7. What specific models were tested?
The models tested included Qwen3-4B-base, Qwen3-8B-base, Llama-2-7B, and Mistral-7B.
Q8. How is the semantic agreement score calculated?
It is computed using a semantic kernel based on the cosine similarities of output projection matrices between subnetwork predictions.
Q9. What is the function of the adaptive gate in Adapt-ASMI?
The adaptive gate modulates the token-level uncertainty weighting based on the diversity of the stochastically sampled responses.