arXiv:2507.19409cs.CV2025-07

提出通用长序列编码器,高效处理多模态长文本与时序数据。

Modality Agnostic Efficient Long Range Encoder

  • 融合令牌合并与注意力近似,分阶段压缩序列长度。
  • 在多模态分类任务中,精度更高且计算成本更低。
  • 适合需要长上下文理解的文本、音频、图像等场景。

近期大模型的长上下文能力依赖于注意力/模型并行及硬件优化,但核心注意力机制的二次计算与内存复杂度仍未根本解决。本文提出MAELRE(Modality Agnostic Efficient Long Range Encoder),一种适用于单设备的统一高效变压器架构,用于跨多模态的长程编码。MAELRE在内部计算块的不同阶段逐步合并令牌,并在令牌数量多时采用轻量级注意力近似,随着序列缩短逐步切换至标准点积注意力。实验表明,在涵盖文本、时间序列、音频和视觉的多种分类任务上,MAELRE在保持更高精度的同时,显著降低计算开销。

原文摘要 · Abstract (English)

The long-context capability of recent large transformer models can be surmised to rely on techniques such as attention/model parallelism, as well as hardware-level optimizations. While these strategies allow input lengths to scale to millions of tokens, they do not fundamentally mitigate the quadratic computational and memory complexity of the core attention mechanism. In this paper, we address the challenge of long-context processing on a single device using generic implementations by reducing the quadratic memory footprint and inference cost. Existing approaches to extend the context length for generic single device implementations -- such as token merging and modified attentions -- are often modality specific and attain a suboptimal tradeoff between accuracy and efficiency. To overcome these limitations, we propose MAELRE (Modality Agnostic Efficient Long Range Encoder), a unified and efficient transformer architecture designed for long-range encoding across diverse modalities. MAELRE integrates token merging with attention approximation, progressively merging tokens at different stages of internal computational blocks. It employs a lightweight attention approximation when the number of tokens is large, and switches to standard dot-product attention as the sequence becomes shorter through successive aggregation. We demonstrate that MAELRE achieves superior accuracy while reducing computational cost compared to existing long-context models on classification tasks spanning multiple modalities, including text, time series, audio, and vision.

长序列编码多模态注意力优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。