SAGE:基于选择性注意力的令牌高效文档索引提取
SAGE: Selective Attention-Guided Extraction for Token-Efficient Document Indexing
AI总结:
本文提出SAGE方法,通过轻量本地LLM进行单次预填充,将语言模型注意力信号转化为查询特定的相关热图,从而在可控粒度下选择高相关单元,减少上下文并提升问答性能。
摘要:
具有长上下文窗口的大语言模型可以直接从完整学术、技术及政策文档中回答复杂问题,但传递整个文档通常成本高、速度慢且可能降低回答质量并增加数据泄露风险。本文针对在长文档上回答多种异构问题的常见场景,指出固定位置启发式和标准检索增强生成(RAG)因文档结构变化和弱查询-块语义相似性而失效,需任务和领域特定的嵌入检索器调优。我们提出选择性注意力引导提取(SAGE),一种无需训练的即插即用上下文缩减框架,利用轻量本地LLM进行单次预填充,将语言模型注意力信号转化为查询特定的相关热图。SAGE进一步引入差分注意力策略以更好地隔离问题相关证据,然后在用户定义的令牌预算下选择最高分单元,并仅将此缩减上下文转发给下游LLM进行回答生成。SAGE在多个长文档问答基准测试中超越了传统缩减技术,尤其在受限于10%上下文预算的情况下,在QuALITY-hard上取得前四名。这使得在不需模型微调或复杂校准的情况下,实现90%的令牌减少并保持竞争性准确性。
英文摘要:
Large language models with long context windows can answer complex questions directly from full-length academic, technical, and policy documents, but passing entire documents is often costly, slow, and can degrade answer quality while increasing the risk of unnecessary data leakage. This paper targets the common setting of answering many heterogeneous questions over long document(s), where fixed position heuristics and standard retrieval-augmented generation (RAG) can fail due to document structure variability and weak query-chunk semantic similarity, which often requires task- and domain-specific tuning of embedding retrievers. We propose {Selective Attention-Guided Extraction} (\ourmethod), a training-free, plug-and-play context reduction framework that uses a lightweight local LLM to perform a single prefilling pass and convert language model attention signals into a query-specific relevance heatmap at configurable granularities. \ourmethod\ further introduces \emph{differential attention} strategies to better isolate question-relevant evidence, then selects the top-scoring units under a user-defined token budget and forwards only this reduced context to a downstream LLM for answer generation. \ourmethod\ surpasses traditional reduction techniques across multiple long-document QA benchmarks, notably securing a top-4 rank on QuALITY-hard while constrained to a 10\% context budget. This enables a 90\% reduction in tokens with competitive accuracy, without the need for model fine-tuning or complex calibration.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。