CoTA++ reduces repetition in large language models using better caching

CoTA++: Understanding the Repeat Curse in dMLLMs from an Information Flow Perspective

Artificial Intelligence

Summary

Large language models that combine images and text use a process called denoising to generate responses. To make this process faster, they reuse some intermediate information, but this often causes the model to repeat the same word many times in a row, breaking the flow of the sentence. The authors examined why this happens and found three technical issues related to how the model pays attention to context and refreshes its memory. They created a new method, CoTA++, that fixes these issues without retraining the model, significantly reducing repetition while keeping speed advantages.

What this means in practice

  • For ai system engineers: Improve reliability and reduce repetitive errors in long text or multimodal responses generated by large language models using approximate caching.
  • For cloud service operators: Deploy large language models with faster response times by using CoTA++ to safely implement approximate caching without sacrificing output quality.

Authors

Qiyan Zhao, Xiaofeng Zhang, Xu-Yao Zhang, Shijie Han, Zhepeng Li, Shunzhi Zhu, Da-Han Wang

Abstract

Diffusion-based multimodal large language models (dMLLMs) decode by iterative denoising with bidirectional attention, which precludes the standard autoregressive key--value cache. Practical deployments therefore rely on approximate caching that reuses intermediate states across denoising steps. Such caching, however, often makes a response repeat one token at adjacent positions in a run that breaks the sentence, a failure we term the \emph{Repeat Curse}. Tracing the context-token information flow reveals three disruptions. Within a step, caching disperses the attention that anchors a position on nearby context tokens. Across steps, similarity-based refresh is not staleness-aware, so some positions are decoded against stale key--value states. Across layers, the deep-layer entropy of the context fails to converge where repetition arises. We accordingly propose CoTA++, a training-free, plug-and-play framework that counteracts each disruption where it originates: Context-Token Attention Re-anchoring re-forms the attention routing against the current context, Decode-Aware Refresh reserves part of the cache's refresh budget for the positions about to be committed, and Context-Token Entropy-Guided Voting discounts the confidence of a position by the deep-layer entropy of its context, which reorders the unmasking. The three components act at non-overlapping stages of a decoding step and compose freely with existing dMLLMs and caches. Across three dMLLMs and two caching backends, CoTA++ reduces the sample repetition rate of long responses from up to 99.6\% to at most 17.0\%, recovers most of the accuracy lost to caching on nine benchmarks, and keeps the speedup of caching at under 15\% overhead, making approximate caching reliable for dMLLMs.