Skip to content
AI-generated research idea🟠Medium🔬Significant ResearchRelated work found

Extending Reference Sliding Window Attention to Long-Horizon Translation and Speech Recognition with Global Terminology Memory

Test reference-anchored sliding window attention on long-form translation and speech recognition, adding sparse entity memory where local output windows lose global consistency.

Time

a couple of months

Compute level

Multiple GPUs

Resources

Multi-GPU machine (4-8x A800 or A100 GPUs) and public long-form benchmarks such as Earnings-22 for ASR and document-level WMT or book translation datasets.

What the paper used

8x16 (128) A800 GPUs for 4,000 training steps with a global batch size of 256, 32K maximum sequence length, and approximately 2 million document OCR samples.

Prerequisites

Speech-language models or machine translation, attention kernel modification in Transformers/FlashAttention, and long-context evaluation metrics.

Scope

Adapt the released R-SWA attention and KV-cache implementation to an open ASR or translation LLM and fine-tune.

The Gap

The authors propose R-SWA as a general-purpose long-horizon parsing attention mechanism applicable beyond OCR to ASR and translation, yet all experiments in Sections 4 and 5 evaluate exclusively on visual document OCR, where output generation is monotonic and strictly local.

“In addition, we will also transfer R-SWA to reference-based tasks such as ASR and translation.”
From the paper, Section 7, page 11. Matched against the PDF text.

Limitation

Unlike literal OCR copying, tasks such as document-level translation and multi-hour ASR require non-monotonic reordering, discourse-level coreference, and consistent terminology or speaker naming across thousands of output tokens, which a strict 128-token output window may disrupt.

Proposed Solution

Port R-SWA to an open-weight audio LLM for multi-hour ASR and a long-context LLM for book-length translation, sweeping output window widths (n = 128, 256, 512) and testing a hybrid R-SWA variant that augments the sliding decode window with a fixed-capacity entity and attention-sink buffer (e.g., 64 dynamically updated KV slots for speaker IDs, glossary terms, or discourse antecedents) while keeping total decode KV cache strictly constant.

The paper’s authors list this direction as future work, so they may already be pursuing it.

Why This Matters

Empirically testing and adapting R-SWA on ASR and translation would verify whether constant-cache reference attention generalizes beyond literal copying without degrading long-range linguistic consistency.

How to Get Started

How to test it: Test the hypothesis that pure R-SWA (n=128) matches full attention on monotonic long-form ASR WER but degrades terminology consistency and document-level BLEU on translation, and that adding a 64-slot entity/sink cache recovers consistency at under 5% memory overhead. Compare full attention, vanilla R-SWA, and sink-augmented R-SWA on Earnings-22 (WER) and a document-level translation benchmark (d-BLEU and terminology consistency), stopping if vanilla R-SWA matches full attention within 0.5 WER/BLEU.

  1. Port the R-SWA KV-cache and attention wrapper from the released Unlimited-OCR codebase to an open-weight audio LLM (e.g., Qwen2-Audio) and a long-context translation LLM.
  2. Evaluate zero-shot and fine-tuned performance of full attention versus R-SWA (n=128 and n=256) on long-form ASR (Earnings-22) and document-level translation benchmarks.
  3. Analyze error distributions specifically for cross-sentence pronoun resolution, named-entity consistency, and speaker-tag drift across 4K+ output tokens.
  4. Implement and benchmark a bounded entity and attention-sink buffer alongside the sliding decode window if global consistency drops relative to full attention.

Suggested by AI. Adapt it to your setup.

Has This Been Done?

Related work found

Studies like AudioKV: KV Cache Eviction in Efficient Large Audio Language Models and InfiniSST: Simultaneous Translation of Unbounded Speech with Large Language Model investigate memory management and attention mechanisms for audio and speech models. They do not specifically test combining reference sliding window attention with a fixed-capacity global terminology and speaker ID entity buffer for long-horizon translation and speech recognition.

We searched OpenAlex and arXiv for “sliding window attention long-form ASR document translation KV cache” and “Extending Reference Sliding Window Attention to Long-Horizon Translation and Speech Recognition with Global Terminology Memory” and an AI compared the idea with the top 10 results. A small search can miss relevant work.

Source Paper

Unlimited OCR Works

Youyang Yin, Huanhuan Liu, YY +14 more · 2026

Unlimited OCR addresses the memory and latency bottlenecks of long-horizon end-to-end document parsing, where standard LLM decoders accumulate linearly growing KV caches across dozens of pages. The authors introduce Reference Sliding Window Attention (R-SWA), enabling one-shot multi-page transcription with constant decode-side KV cache memory and generation speed while achieving state-of-the-art accuracy on OmniDocBench.

Related Ideas

Is this a good idea?

Share onXLinkedIn