让预训练模型轻松处理长文本,无需改架构也不用重训练。
ScaleFormer: Span Representation Cumulation for Long-Context Transformer
- 将长文本分块并融合前后块上下文,生成带位置感知的压缩表示。
- 在长文档摘要任务上超越多数SOTA方法,复杂度线性增长。
- 无需修改模型结构或额外检索,即插即用适合快速部署。
标准自注意力机制的二次复杂度严重限制了Transformer模型在长序列任务中的应用。尽管已有高效Transformer变体,但通常需要改变架构并从头进行昂贵的预训练。为解决这一问题,我们提出ScaleFormer(长上下文Transformer的片段表征累积框架)——一种简单高效的即插即用方案,可使现成的预训练编码器-解码器模型在不修改架构的前提下处理长序列。该方法将长输入分割为重叠块,为解码器生成压缩且上下文感知的表示。核心是新颖的无参数融合机制,使每块表示具备其在文档中的位置结构感知能力,通过在边界表示中融入所有前序和后序块的累积上下文向量实现。该策略为模型提供了强文档叙事流信号,实现线性复杂度,并使预训练模型能有效推理长文本。在长文档摘要任务上的实验表明,该方法在不依赖架构修改或外部检索机制的情况下,性能与当前最优方法相当甚至更优。
原文摘要 · Abstract (English)
The quadratic complexity of standard self-attention severely limits the application of Transformer-based models to long-context tasks. While efficient Transformer variants exist, they often require architectural changes and costly pre-training from scratch. To circumvent this, we propose ScaleFormer(Span Representation Cumulation for Long-Context Transformer) - a simple and effective plug-and-play framework that adapts off-the-shelf pre-trained encoder-decoder models to process long sequences without requiring architectural modifications. Our approach segments long inputs into overlapping chunks and generates a compressed, context-aware representation for the decoder. The core of our method is a novel, parameter-free fusion mechanism that endows each chunk's representation with structural awareness of its position within the document. It achieves this by enriching each chunk's boundary representations with cumulative context vectors from all preceding and succeeding chunks. This strategy provides the model with a strong signal of the document's narrative flow, achieves linear complexity, and enables pre-trained models to reason effectively over long-form text. Experiments on long-document summarization show that our method is highly competitive with and often outperforms state-of-the-art approaches without requiring architectural modifications or external retrieval mechanisms.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。