Same Task, More Tokens: the Impact of Input Length on the Reasoning Performance of Large Language Models

TL;DR

Introduces FLenQA dataset to analyze input length effects on LLM reasoning, showing performance drops at much shorter lengths than maximum capacity.

cs.CL 🔴 Advanced 2024-02-20 31 views
Mosh Levy Alon Jacoby Yoav Goldberg
LLMs input length reasoning performance dataset design model evaluation

Key Findings

Methodology

The study employs a novel FLenQA dataset, systematically controlling input length by embedding relevant information within irrelevant text at various positions and background types. Multiple versions of each sample are created, varying only in length, to isolate the effect of input size on reasoning. Five models, including GPT-4, GPT-3.5, Gemini Pro, Mistral Medium, and Mixtral 8x7B, are evaluated across lengths from 250 to 3000 tokens. The evaluation combines Chain-of-Thought prompting with traditional next-word prediction metrics, analyzing how performance degrades as input length increases. The approach ensures task content remains constant while only input size varies, providing clear insights into length-related limitations.

Key Results

  • All models exhibit significant performance degradation beyond 3000 tokens, with accuracy dropping from an average of 0.92 to 0.68. Even in minimal setups with only relevant information, accuracy declines at shorter lengths (~500 tokens). The negative correlation between next-word prediction accuracy and reasoning performance indicates that better predictive ability does not translate into improved reasoning in long contexts.
  • Chain-of-Thought prompts improve short-input performance but show limited mitigation of length-induced degradation, with GPT-4 being a notable exception demonstrating increased robustness. Models tend to produce biased responses, such as favoring 'False' answers, ignoring instructions, or prematurely outputting answers before reasoning steps, revealing fundamental limitations in handling extended contexts.
  • Background type and paragraph placement have minor effects compared to input length, but the consistent trend across scenarios confirms length as a primary factor. The findings highlight the challenge of maintaining reasoning accuracy as context grows, emphasizing the need for architectural and training innovations.

Significance

This research provides a systematic, controlled evaluation of how input length impacts LLM reasoning, addressing a critical gap in understanding model limitations in long-text comprehension. The insights inform both theoretical understanding and practical development, guiding future efforts to enhance model robustness and scalability. The dataset and methodology serve as valuable benchmarks for ongoing research, emphasizing the importance of input structure and size in model performance. The findings also caution against relying solely on traditional metrics like perplexity, advocating for more comprehensive evaluation strategies that reflect real-world long-text tasks.

Technical Contribution

The paper introduces a rigorous experimental framework that isolates input length as the key variable, utilizing a multi-task dataset with varied background texts and paragraph placements. It combines prompt engineering (Chain-of-Thought) with detailed performance analysis, revealing the disconnect between predictive metrics and reasoning accuracy. The approach enables precise measurement of length effects and failure modes, providing a foundation for future model improvements. Additionally, the negative correlation between perplexity and reasoning performance challenges conventional evaluation paradigms, prompting reconsideration of model training and assessment strategies.

Novelty

This is the first comprehensive study systematically controlling input length while keeping task difficulty constant, using a multi-task dataset with diverse background contexts and paragraph placements. It uniquely demonstrates that traditional next-word prediction metrics do not correlate positively with reasoning performance in long inputs. The innovative multi-version sample design allows for clear attribution of performance drops to input size, advancing understanding of the limitations of current LLMs in long-context reasoning. The findings challenge assumptions that longer inputs inherently improve model capabilities, highlighting the need for targeted architectural solutions.

Limitations

  • The experiments focus on specific tasks and models, limiting generalization to other NLP tasks or emerging architectures. The analysis of internal mechanisms remains superficial, requiring future interpretability studies.
  • The dataset, while carefully controlled, simplifies real-world long-text scenarios, which often involve more complex and noisy information. The models’ behavior in extreme cases needs further validation.
  • The study does not explore training strategies or architectural modifications explicitly designed to mitigate length effects, leaving open questions about how to effectively improve long-context reasoning.

Future Work

Future research will explore multi-modal data integration, multi-task training, and architectural innovations to enhance long-text reasoning. Deeper analysis of model internals will aim to understand failure modes at a mechanistic level. Expanding dataset diversity and scale will better simulate real-world scenarios, guiding development of more robust models. Additionally, training strategies that explicitly optimize for long-context understanding will be a focus, aiming to overcome current limitations.

AI Executive Summary

Large language models (LLMs) have revolutionized natural language processing, yet their performance on long-text reasoning remains a critical challenge. Despite their capacity to handle extended inputs, empirical evidence shows that accuracy often declines sharply as input length exceeds certain thresholds. This study introduces the Flexible LENgth Question Answering (FLenQA) dataset, designed to systematically evaluate how input length influences reasoning performance. By embedding relevant information within irrelevant background texts at various positions and controlling for task difficulty, the research isolates input length as the primary variable affecting model accuracy.

Experimental results across five state-of-the-art models, including GPT-4, GPT-3.5, Gemini Pro, Mistral Medium, and Mixtral 8x7B, reveal that all exhibit significant performance drops beyond 3000 tokens, with accuracy decreasing from approximately 92% to 68%. Notably, traditional metrics like next-word prediction (perplexity) show a negative correlation with reasoning accuracy, indicating that better predictive ability does not necessarily translate into improved reasoning in long contexts. Chain-of-Thought prompting, while effective in short inputs, offers limited mitigation in longer texts, with GPT-4 being a notable exception demonstrating increased robustness.

Further analysis uncovers common failure modes, including models ignoring instructions, prematurely answering, or exhibiting bias toward 'False' responses as input length increases. These findings highlight fundamental limitations in current architectures’ capacity to maintain reasoning fidelity over extended contexts. The study underscores the importance of designing models and training strategies explicitly aimed at long-text comprehension, moving beyond simple scaling. Overall, this work provides a valuable benchmark and insights for future research, emphasizing input structure and size as critical factors in advancing AI reasoning capabilities.

Deep Analysis

Background

Recent advances in large language models, such as GPT-4, T5, and BERT, have demonstrated remarkable capabilities across various NLP tasks. Early efforts focused on short-text understanding, but as models grew larger, the importance of long-text comprehension became evident. Prior studies (e.g., Shaham et al., 2023; Li et al., 2023) evaluated performance on extended inputs but lacked systematic control over variables like input relevance and position. Traditional metrics like perplexity were used to gauge model predictability, yet their correlation with reasoning ability remained unclear. Chain-of-Thought prompting emerged as a promising technique to improve reasoning, but its efficacy diminishes with longer inputs. The gap lies in understanding how input length, independent of task difficulty, impacts reasoning, which this study aims to address.

Core Problem

Despite models supporting longer inputs, their reasoning accuracy often declines sharply beyond certain lengths, typically around 500-1000 tokens. This performance drop hampers practical applications like multi-turn dialogue, long document analysis, and complex knowledge inference. The core challenge is isolating the effect of input size from task complexity and irrelevant information. Existing benchmarks do not adequately control for these factors, making it difficult to attribute performance degradation solely to length. Moreover, traditional evaluation metrics fail to reflect reasoning quality in extended contexts. Addressing this requires a carefully designed dataset and experimental framework that isolates input length as the key variable, enabling precise analysis of its impact on reasoning capabilities.

Innovation

The study introduces the FLenQA dataset, which systematically varies input length by embedding relevant information within irrelevant background texts at different positions and background types. This multi-task dataset includes three reasoning tasks—MonoRel, PIR, and simplified Ruletaker—each with 100 base instances expanded to lengths of 250, 500, 1000, 2000, and 3000 tokens. The design ensures task difficulty remains constant across lengths, isolating the length effect. Additionally, the study employs multiple background types (duplicate, similar, different) and paragraph placements (start, middle, end, random) to evaluate robustness. Combining this with Chain-of-Thought prompting and traditional next-word prediction metrics, the approach provides a comprehensive view of how input size influences reasoning, failure modes, and model biases.

Methodology

  • �� Construct the FLenQA dataset with three tasks, each with 100 base instances, expanded to multiple lengths (250-3000 tokens). • For each instance, embed key paragraphs within irrelevant background texts, varying background types (duplicate, similar, different). • Disperse key paragraphs at different positions (start, middle, end, random) to simulate diverse input structures. • Generate multiple versions per instance to control for length while keeping task content constant. • Evaluate five models (GPT-4, GPT-3.5, Gemini Pro, Mistral Medium, Mixtral 8x7B) using prompt engineering, including Chain-of-Thought. • Measure accuracy, bias, and failure modes across scenarios, analyzing correlations with traditional metrics. • Conduct ablation studies to understand the impact of background relevance, paragraph placement, and prompt strategies.

Experiments

The experiments involve evaluating models on the FLenQA dataset across five input lengths, with variations in background relevance and paragraph placement. Metrics include accuracy on reasoning tasks, analysis of failure modes (e.g., ignoring instructions, bias), and correlation with next-word prediction. The evaluation setup maintains consistent prompts, temperature, and sampling methods. Additional ablation studies compare the effects of different background types and paragraph positions. The experimental design ensures that observed performance changes are attributable primarily to input length, providing clear insights into the degradation patterns and failure modes in long-text reasoning. Results are statistically analyzed to confirm significance and robustness.

Results

Models show a consistent decline in reasoning accuracy as input length exceeds 3000 tokens, with average accuracy dropping from 92% to 68%. Chain-of-Thought prompts improve performance in shorter inputs but offer limited mitigation in longer texts, with GPT-4 showing some increased robustness. Traditional next-word prediction accuracy correlates negatively with reasoning performance, indicating that better predictive ability does not equate to stronger reasoning in extended contexts. Models tend to bias responses towards 'False', ignore instructions, or prematurely output answers, revealing fundamental limitations. Background relevance and paragraph placement have minor effects compared to length, confirming length as the dominant factor in performance degradation.

Applications

The findings are directly applicable to improving long-text question answering, multi-turn dialogue systems, and knowledge inference tasks. The dataset and evaluation framework can guide training strategies to enhance model robustness in real-world scenarios involving lengthy documents. Industry applications include legal document analysis, scientific literature review, and complex customer service interactions, where understanding and reasoning over extended texts are essential. The insights also inform model architecture design, emphasizing the need for mechanisms that better handle long-range dependencies and reduce bias.

Limitations & Outlook

The study focuses on specific tasks and models, limiting generalization. It does not explore training or architectural modifications to mitigate length effects. The dataset simplifies real-world long-text scenarios, which often involve noisy, unstructured data. The internal mechanisms of performance degradation remain unexplored, necessitating future interpretability research. Additionally, computational costs increase with longer inputs, posing practical challenges for deployment. Future work should address these limitations by developing scalable, interpretable, and more realistic long-text reasoning models.

Plain Language Accessible to non-experts

Imagine you’re in a giant kitchen where you need to cook a complicated dish. You have many ingredients spread across different shelves, some close by, some far away, and some hidden behind other items. To make the dish, you need to find specific ingredients, understand how they work together, and follow a recipe. If the kitchen is small, finding everything is easy. But if it’s huge, with many ingredients scattered around, it becomes much harder to keep track of what you need and how to combine them. This is similar to how large language models work when they read very long texts. When the input gets too long, the model struggles to remember and connect all the important parts, leading to mistakes. Researchers tested this by giving models longer and longer texts with the same questions, and they found that performance drops sharply. Just like in the kitchen, the bigger the task, the more likely you are to forget or get confused. So, making models smarter in handling long texts is like reorganizing the kitchen so everything is within reach and easy to find. This way, they can cook up answers more accurately, even when the input is very long and complicated.

ELI14 Explained like you're 14

Imagine you’re trying to read a really long story to answer a question. At first, it’s easy—you remember the main parts, and you can figure out the answer quickly. But as the story gets longer and longer, it’s harder to keep everything in your mind. Sometimes, you forget what happened at the beginning, or you get distracted by other parts. That’s what happens with big language models when they read very long texts—they start to make mistakes or give wrong answers because they can’t keep track of all the details. Researchers found that when they give these models longer stories, their accuracy drops a lot. Even if the models are designed to handle longer inputs, they still struggle. It’s like trying to remember all the ingredients for a huge recipe—you need a good system to organize everything. So, scientists are working on ways to help these models remember better, so they can understand and reason over long texts just like you can follow a long story and answer questions about it. This research helps us build smarter AI that can handle big, complicated information without getting lost.

Abstract

This paper explores the impact of extending input lengths on the capabilities of Large Language Models (LLMs). Despite LLMs advancements in recent times, their performance consistency across different input lengths is not well understood. We investigate this aspect by introducing a novel QA reasoning framework, specifically designed to assess the impact of input length. We isolate the effect of input length using multiple versions of the same sample, each being extended with padding of different lengths, types and locations. Our findings show a notable degradation in LLMs' reasoning performance at much shorter input lengths than their technical maximum. We show that the degradation trend appears in every version of our dataset, although at different intensities. Additionally, our study reveals that the traditional metric of next word prediction correlates negatively with performance of LLMs' on our reasoning dataset. We analyse our results and identify failure modes that can serve as useful guides for future research, potentially informing strategies to address the limitations observed in LLMs.

cs.CL cs.AI