Despite the success of Transformers, handling long contexts remains challenging due to the limited length generalization and quadratic complexity of self-attention. Thus Transformers often require post-training with a larger attention window, significantly increasing computational and memory costs. In this paper, we propose a novel attention mechanism based on dynamic context, Grouped Cross Attention (GCA), which can generalize to 1000 times the pre-training context length while maintaining the ability to access distant information with a constant attention window size. For a given input sequence, we split it into chunks and use each chunk to retrieve top-k relevant past chunks for subsequent text generation. Specifically, unlike most previous works that use an off-the-shelf retriever, our key innovation allows the retriever to learn how to retrieve past chunks that better minimize the auto-regressive loss of subsequent tokens in an end-to-end manner. Such a mechanism accommodates retrieved chunks with a fixed-size attention window to achieve long-range information access, significantly reducing computational and memory costs during training and inference. Experiments show that GCA-based models achieve near-perfect accuracy in passkey retrieval for 16M context lengths, which is 1000 times the training length.
Beyond the Parameters: A Technical Survey of Contextual Enrichment in Large Language Models: From In-Context Prompting to Causal Retrieval-Augmented Generation
CausalRAG: Integrating Causal Graphs into Retrieval-Augmented Generation
Department of Computer and Data Sciences, Case Western Reserve University(计算机与数据科学系,凯斯西储大学);Department of Design and Innovation, Case Western Reserve University(设计与创新系,凯斯西储大学)
Simulator-Grounded Large Language Models for Industrial Causal Reasoning: Tool-Use, Structured Injection, and Plant-Portable Retrieval for Wastewater Treatment Decision Support
PRCCF: A Persona-guided Retrieval and Causal-aware Cognitive Filtering Framework for Emotional Support Conversation
School of Computer Science and Engineering, Northeastern University, Shenyang, Liaoning, China(东北大学计算机科学与工程学院,沈阳,辽宁,中国);Oracle Cloud Infrastructure, Oracle, Santa Clara, CA, United States(甲骨文云基础设施,甲骨文公司,圣克拉拉,加利福尼亚州,美国)
Learning Efficient and Generalizable Graph Retriever for Knowledge-Graph Question Answering
Mohamed bin Zayed University of Artificial Intelligence(莫扎德·本·扎耶德人工智能大学);Peking university(北京大学);Georgia Institute of Technology(佐治亚理工学院);The University of Sydney(悉尼大学);Carnegie Mellon University(卡内基梅隆大学)
MODE-RAG: Manifold Outlier Diagnosis and Energy-based Retrieval-Augmented Generation Evaluation
School of Computer Science & Tech, Huazhong University of Science and Technology(华中科技大学计算机科学与技术学院);School of AI and Automation, Huazhong University of Science and Technology(华中科技大学人工智能与自动化学院)