[Paper Review] Long-context LLMs Struggle with Long In-context Learning
This paper introduces LongICLBench to evaluate long in-context learning for extreme-label classification and shows that 13 long-context LLMs struggle on the hardest task, with performance often peaking around mid-length demonstrations and degrading for longer prompts; grouping/distribution of demonstrations also affects results.
Large Language Models (LLMs) have made significant strides in handling long sequences. Some models like Gemini could even to be capable of dealing with millions of tokens. However, their performance evaluation has largely been confined to metrics like perplexity and synthetic tasks, which may not fully capture their true abilities in more challenging, real-world scenarios. We introduce a benchmark (LongICLBench) for long in-context learning in extreme-label classification using six datasets with 28 to 174 classes and input lengths from 2K to 50K tokens. Our benchmark requires LLMs to comprehend the entire input to recognize the massive label spaces to make correct predictions. We evaluate on 15 long-context LLMs and find that they perform well on less challenging classification tasks with smaller label space and shorter demonstrations. However, they struggle with more challenging task like Discovery with 174 labels, suggesting a gap in their ability to process long, context-rich sequences. Further analysis reveals a bias towards labels presented later in the sequence and a need for improved reasoning over multiple pieces of information. Our study reveals that long context understanding and reasoning is still a challenging task for the existing LLMs. We believe LongICLBench could serve as a more realistic evaluation for the future long-context LLMs.
Motivation & Objective
- Motivate evaluation of long-context in-context learning beyond perplexity and synthetic tasks.
- Create LongICLBench to assess long-context ICL in extreme-label classification with large label spaces.
- Analyze how demonstration length and label distribution affect LLM performance on challenging tasks.
- Provide insights to guide future long-context model design and evaluation.
Proposed method
- Curate six long-context, extreme-label classification datasets with 28 to 174 classes and demonstrations ranging from 2K to 50K tokens.
- Evaluate 13 long-context LLMs (open-source, plus API-based models like GPT-4-turbo) on LongICLBench.
- Use one-shot to five-shot per label regimes and ensure uniform label distribution across demonstrations.
- Measure accuracy for classification tasks and F1 for entity/relation tasks across varying context lengths.
- Analyze model sensitivity to prompt instance position and to grouping vs scattering of same-label demonstrations.
Experimental results
Research questions
- RQ1Can current long-context LLMs effectively perform in-context learning over extreme-label spaces with very long demonstrations?
- RQ2How does demonstration length affect performance across datasets of varying difficulty and label size?
- RQ3Do model architectures or prompt-structure factors (like instance position) significantly impact long-context ICL ability?
- RQ4Is there a consistent degradation pattern (e.g., linear) as context length increases, and are some models more robust than others?
Key findings
- Transformers generally outperform RNN-based models but still lag behind API models like GPT-4-turbo on long-context extreme-label ICL tasks.
- Performance typically improves with longer context up to a point (around 20K tokens) but then degrades or fluctuates as prompts grow longer.
- On the hardest Discovery dataset with 174 labels, all models fail to distinguish fine-grained labels, yielding near-zero accuracy.
- Some models (e.g., Qwen, Mistral) show near-linear degradation with longer demonstrations, suggesting predictable scaling with task complexity.
- Prompt design factors, especially the distribution of demonstrations by label within the prompt, can significantly affect performance across models.
- GPT-4-turbo often provides the strongest performance but is not immune to drops caused by prompt grouping or instance distribution.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.