Reproduce “Improve Decoding Factuality by Token-wise Cross Layer Entropy of Large Language Models” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Jialiang Wu, Yi Shen, Sijia Liu, Yi Tang, Sen Song, Xiaoyi Wang, Longjun Cai
Entropy eNhanced Decoding (END) introduces a decoding method that mitigates hallucinations in Large Language Models (LLMs) by analyzing token-wise cross-layer entropy, which quantifies the distinct prediction growth trends of factual tokens across model layers. The approach consistently improved factual accuracy by 12.24% to 21.79% on the TruthfulQA benchmark and demonstrated generalizability across various LLM scales and architectures.
Key insights
- Factual tokens exhibit a sharp, low-to-high growing trend in their prediction probabilities across an LLM's higher layers, a pattern not observed for non-factual or 'easy' tokens.
- The position and trend of these prediction changes across layers are not uniform for all factual candidate tokens, necessitating a token-wise analysis rather than a fixed layer-wise approach.
- Cross-layer entropy effectively quantifies the distinctiveness of these token-wise prediction growth patterns, serving as a reliable signal for the presence of factual knowledge within the model's internal states.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.