MIR-Bench: Benchmarking LLM's Long-Context Intelligence via Many-Shot In-Context Inductive Reasoning

Kai Yan, Zhan Ling, Kang Liu, Yifan Yang, Ting-Han Fan, Lingfeng Shen, Zhengyin Du, Jiecao Chen · OpenReview

Abstract

The ability to recognize patterns from examples and apply them to new ones is a primal ability for general intelligence. While many benchmarks measure this for Large Language Models (LLMs), they typically focus on few-shot settings (<10 examples) and lack evaluation for aggregating information from long contexts. Conversely, long-context benchmarks like Needle-In-A-Haystack (NIAH) often focus on simple retrieval rather than complex integration. We propose MIR-Bench, the first many-shot in-context reasoning benchmark for pattern recognition. It requires LLMs to predict outputs via input-output examples from underlying functions with diverse data formats. Based on MIR-Bench, we study many novel problems for many-shot in-context reasoning, and acquired many insightful findings including scaling effect, robustness, inductive vs. transductive reasoning, and the impact of coding for inductive reasoning.

Introduction: Beyond Simple Retrieval

As LLM context windows expand to millions of tokens, the paradigm of Many-Shot In-Context Learning (ICL) has emerged. This allows models to address new tasks using hundreds or thousands of examples without expensive fine-tuning. However, current evaluations are limited. Retrieval-heavy tasks like NIAH do not test aggregation—the ability to synthesize a rule from a vast dataset. MIR-Bench addresses this gap by testing whether LLMs can perform complex pattern recognition and inductive reasoning when provided with a "mountain" of data.

Methodology and Dataset Construction

The authors developed an automated pipeline to generate diverse reasoning problems across three main stages:

  1. Data Collection: Solution functions were gathered from introductory coding benchmarks, including HumanEval+, MBPP+, and APPS.
  2. Input-Output Generation: GPT-4o was utilized to write data generator scripts for each function, producing thousands of unique input-output pairs (strings, integers, lists, dictionaries).
  3. Dataset Curation: Two subsets were created: MIR-Extended (a broad set of 6,930 problems) and MIR-Core (a refined subset of 300 problems where many-shot learning provides a clear performance benefit).
The MIR-Bench automated pipeline for data collection, input-output generation, and dataset construction.

Key Insights and Results

The evaluation of 21 state-of-the-art models, including OpenAI's o1 series, GPT-4o, and Gemini 1.5 Pro, yielded several surprising insights:

The Saturation Phenomenon

A primary finding is the "performance ceiling." Most models hit a saturation point around 256 shots. Beyond this, accuracy often plateaus or declines. This is attributed to attention dispersion, where the model becomes "distracted" by the volume of examples, rather than a failure of retrieval.

Accuracy vs. number of shots for various LLMs on MIR-Extended and MIR-Core, illustrating the saturation phenomenon.

Inductive vs. Transductive Reasoning

Models generally perform better at transductive reasoning (directly predicting the next output) than inductive reasoning (explicitly stating the rule). Interestingly, forcing a model to use Chain-of-Thought (CoT) can actually degrade performance in pattern recognition. CoT may break the "structural coherence" of the input-output pairs, hindering the attention mechanism's ability to implicitly regress the underlying function.

Robustness and RAG

LLMs showed remarkable resilience to noise, maintaining performance even when over 50% of examples were incorrect. Furthermore, Retrieval-Augmented Generation (RAG) did not significantly outperform random selection for shot picking, suggesting that saturation is a fundamental architectural limitation in how models aggregate global information.

Conclusion and Future Directions

While OpenAI’s o1-mini and o1-preview currently lead the benchmark, no model has fully "saturated" the tasks, with top accuracies remaining below 0.7 on MIR-Core. Future work will explore multimodal pattern recognition and investigate architectural changes or supervised fine-tuning strategies to overcome the current limits of many-shot aggregation.

Summary updated

BibTeX
@inproceedings{yan2025mir,
  author = {Kai Yan and Zhan Ling and Kang Liu and Yifan Yang and Ting-Han Fan and Lingfeng Shen and Zhengyin Du and Jiecao Chen},
  title = {{MIR-Bench: Benchmarking LLM's Long-Context Intelligence via Many-Shot In-Context Inductive Reasoning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=IZHWvvmYwx},
}
Figure