# Toward Faithful Retrieval-Augmented Generation with Sparse Autoencoders

Guangzhi Xiong, Zhenghao He, Bohan Liu, Sanchit Sinha, Aidong Zhang

Venue: ICLR 2026. ICLR 2026, as reported in arXiv comments.
First preprint: 2025-12-09.

## Research summary

RAGLens detects unfaithful outputs in retrieval-augmented generation using features from sparse autoencoders. It selects hallucination-related features in model activations and combines them into a lightweight detector. The method supplies interpretable explanations and supports post-hoc mitigation, reducing dependence on expensive external judges or large annotated detector-training datasets.

## Abstract

Retrieval-Augmented Generation (RAG) improves the factuality of large language models (LLMs) by grounding outputs in retrieved evidence, but faithfulness failures, where generations contradict or extend beyond the provided sources, remain a critical challenge. Existing hallucination detection methods for RAG often rely either on large-scale detector training, which requires substantial annotated data, or on querying external LLM judges, which leads to high inference costs. Although some approaches attempt to leverage internal representations of LLMs for hallucination detection, their accuracy remains limited. Motivated by recent advances in mechanistic interpretability, we employ sparse autoencoders (SAEs) to disentangle internal activations, successfully identifying features that are specifically triggered during RAG hallucinations. Building on a systematic pipeline of information-based feature selection and additive feature modeling, we introduce RAGLens, a lightweight hallucination detector that accurately flags unfaithful RAG outputs using LLM internal representations. RAGLens not only achieves superior detection performance compared to existing methods, but also provides interpretable rationales for its decisions, enabling effective post-hoc mitigation of unfaithful RAG. Finally, we justify our design choices and reveal new insights into the distribution of hallucination-related signals within LLMs. The code is available at https://github.com/Teddy-XiongGZ/RAGLens.

Topics: Retrieval-augmented generation, RAG, Faithfulness, Hallucination detection, Sparse autoencoders, SAE, Mechanistic interpretability

Canonical page: https://bohanliu.com/papers/faithful-rag-sae/
Paper: https://arxiv.org/abs/2512.08892
pdfUrl: https://arxiv.org/pdf/2512.08892
codeUrl: https://github.com/gzxiong/RAGLens
sourceUrl: https://arxiv.org/abs/2512.08892
Metadata checked: 2026-10-09

## BibTeX (preprint version when available)

@misc{raglens,
  title = {{Toward Faithful Retrieval-Augmented Generation with Sparse Autoencoders}},
  author = {Guangzhi Xiong and Zhenghao He and Bohan Liu and Sanchit Sinha and Aidong Zhang},
  year = {2025},
  eprint = {2512.08892},
  archivePrefix = {arXiv},
  doi = {10.48550/arXiv.2512.08892},
  note = {ICLR 2026: ICLR 2026, as reported in arXiv comments},
  url = {https://arxiv.org/abs/2512.08892}
}
