vix.ing · top · new · best · stats

Modality Agnostic Efficient Long Range Encoder

2025/07/25 by Toufiq Parag, Ahmed Elgammal, Parag, Toufiq +1
Computer Science · #Advanced Neural Network Applications #Big Data and Digital Economy #Computational complexity theory #Computer Vision and Pattern Recognition (cs.CV) #Encoder #Encoding (memory) #FOS: Computer and information sciences #Inference #Memory footprint #Parallel Computing and Optimization Techniques #Quadratic equation #Security token #Transformer

paper · pdf · doi:10.48550/arxiv.2507.19409

published in arXiv (Cornell University) (Cornell University)

openalex publication_date 2025/07/25 · openalex created_date 2025/10/10 · openalex updated_date 2026/08/05

Abstract

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.

Citations

Related