Table of Contents
Fetching ...

Attention Overflow: Language Model Input Blur during Long-Context Missing Items Recommendation

Damien Sileo

TL;DR

This work investigates how LLMs struggle to identify a missing element in long, potentially repetitive inputs, a problem termed attention overflow. Formally, given a finite itemset $\mathcal{S}$ and a randomly removed element $y$, with $X=\mathcal{S}\setminus\{y\}$ scrambled in the prompt, the task is to recover $y$; the authors study this across synthetic numbers and MovieLens-based movie lists. They report that accuracy remains decent for small to moderate itemsets but degrades and repetition rises when $N$ grows beyond roughly $128$–$256$, indicating a fundamental limitation in attending to all input items simultaneously. Through zero-shot, fine-tuning, and contrastive evaluations, and with a public dataset supporting itemsets up to $8192$, they demonstrate both the practical impact on long-context conversational recommendations and the architectural challenges of current attention mechanisms, motivating caution in interpreting context lengths for generation tasks.

Abstract

Large language models (LLMs) can suggest missing elements from items listed in a prompt, which can be used for list completion or recommendations based on users' history. However, their performance degrades when presented with too many items, as they start to suggest items already included in the input list. This occurs at around 100 items for mid-2024 flagship LLMs. We evaluate this phenomenon on both synthetic problems (e.g., finding missing numbers in a given range of shuffled integers) and realistic movie recommendation scenarios. We refer to this issue as \textit{attention overflow}, as preventing repetition requires attending to all items simultaneously. Although iterative loops can mitigate this problem, their costs increase with the repetition rate, affecting the language models' ability to derive novelty from lengthy inputs.

Attention Overflow: Language Model Input Blur during Long-Context Missing Items Recommendation

TL;DR

This work investigates how LLMs struggle to identify a missing element in long, potentially repetitive inputs, a problem termed attention overflow. Formally, given a finite itemset and a randomly removed element , with scrambled in the prompt, the task is to recover ; the authors study this across synthetic numbers and MovieLens-based movie lists. They report that accuracy remains decent for small to moderate itemsets but degrades and repetition rises when grows beyond roughly , indicating a fundamental limitation in attending to all input items simultaneously. Through zero-shot, fine-tuning, and contrastive evaluations, and with a public dataset supporting itemsets up to , they demonstrate both the practical impact on long-context conversational recommendations and the architectural challenges of current attention mechanisms, motivating caution in interpreting context lengths for generation tasks.

Abstract

Large language models (LLMs) can suggest missing elements from items listed in a prompt, which can be used for list completion or recommendations based on users' history. However, their performance degrades when presented with too many items, as they start to suggest items already included in the input list. This occurs at around 100 items for mid-2024 flagship LLMs. We evaluate this phenomenon on both synthetic problems (e.g., finding missing numbers in a given range of shuffled integers) and realistic movie recommendation scenarios. We refer to this issue as \textit{attention overflow}, as preventing repetition requires attending to all items simultaneously. Although iterative loops can mitigate this problem, their costs increase with the repetition rate, affecting the language models' ability to derive novelty from lengthy inputs.
Paper Structure (17 sections, 3 figures)

This paper contains 17 sections, 3 figures.

Figures (3)

  • Figure 1: Zero-shot test accuracy and repetition rate with increasing itemset sizes.
  • Figure 2: Llama-3-8B-Instruct Accuracy on on various itemsets with increasing itemset sizes, without any fine-tuning (a) and after fine-tuning on the numebers itemset.
  • Figure 3: Zero-shot contrastive accuracy with Lllama-3-8B-Instruct on the Numbers itemset.