Most current code generation benchmarks, such as HumanEval or MBPP, evaluate Large Language Models (LLMs) in a "batch-style" setting. In these tasks, the model receives all problem inputs upfront, processes the data, and outputs a final answer. However, this overlooks a critical dimension of real-world algorithmic reasoning: the ability to operate under partial observability, where key information is hidden and must be dynamically acquired.
To address this gap, researchers have introduced InteractBench, a novel benchmark designed to evaluate LLMs on interactive competitive programming problems. The study reveals a massive "interaction gap," demonstrating that even the most advanced reasoning models struggle with dynamic state tracking, protocol adherence, and query budget management.
The Challenge of Interactive Problems
Interactive programming problems function similarly to the game "20 Questions." The solver does not have the complete input at the start; instead, it must interact with a "judge" program (an interactor) by asking strategic queries (e.g., "What is the sum of elements from index 1 to 4?") to uncover a hidden array or graph structure.
This paradigm requires the model to go beyond solving the underlying mathematics. It must also:
- Plan an online strategy to gather information efficiently.
- Adhere to a strict communication protocol, which includes specific output formatting and manually flushing output buffers.
- Manage a strict query budget, ensuring the hidden information is deduced within a limited number of questions.
Historically, these problems have been excluded from standard benchmarks because they require complex infrastructure and are difficult to evaluate offline.
InteractBench: Dataset and Methodology
InteractBench comprises 322 high-quality interactive problems curated from premier competitive programming platforms, including Codeforces (220 tasks), AtCoder (17 tasks), the International Olympiad in Informatics (IOI, 24 tasks), and the International Collegiate Programming Contest (ICPC, 61 tasks). The problems span various categories—such as Graph, Search, Greedy, and Data Structures—and are tagged by difficulty (Easy, Medium, Hard).
To enable fully offline evaluation, the authors built a sophisticated construction pipeline:
- Propose-Validate-Adjudicate Loop: Frontier models (like GPT-5.2 and Gemini-3-Pro) were used to draft test case generators and the judge programs.
- Human-in-the-loop Validation: These automated judges were rigorously validated against a pool of known human submissions (both correct and incorrect) to ensure accurate verdicts.
- Offline Harness: A sandboxed Docker environment was created to run the LLM's generated code and the interactor as two isolated processes communicating via standard streams.
A Fine-Grained Failure Taxonomy
To move beyond a simple "Pass/Fail" metric, the researchers introduced a failure taxonomy to diagnose the root causes of model deficiencies:
- WA (Wrong Answer): Algorithmic logic errors.
- PE (Protocol Error): Formatting or communication violations.
- QLE (Query Limit Exceeded): Asking too many questions and breaching the budget.
- IDLE: Deadlocks or hanging runs, most commonly caused by a failure to "flush" the output buffer.
Key Findings and the "Interaction Gap"
The evaluation of frontier models on InteractBench yielded several critical insights:
- The Interaction Gap is Real: There is a steep performance drop-off when moving from batch to interactive problems. The added complexity of managing a dynamic conversation with a judge causes models to stumble, even when they understand the underlying algorithm.
- Top Performers: Gemini-3-Pro-Preview (55.4% overall pass@1) and GPT-5.2 (54.2%) lead the benchmark.
- The "Hard" Cliff: On "Hard" problems, performance plummets. The best model (Gemini-3-Pro-Preview) achieves only a 36.7% pass@1, while many smaller or non-reasoning models score 0%.
- Reasoning Models Excel, but Hit a Wall: Explicit reasoning is crucial for interactive tasks. For example, DeepSeek-V3.2-Thinking achieved a 51.3% pass@5, compared to just 26.2% for the standard DeepSeek-V3.2. However, even thinking models struggle heavily with complex hidden structures.
- Graph Problems are the Bottleneck: Reconstructing hidden tree or network structures under a strict query budget requires a level of state tracking that current LLMs find exceptionally difficult.
- Brittleness vs. Logic: While Algorithmic Logic (WA) accounts for about 60% of failures, interaction-specific errors (PE and QLE) make up 20-25% of errors for frontier models. Interestingly, many of these failures are "brittle" (e.g., forgetting to flush). Resampling (running the model multiple times) often rescues these runs, suggesting the models grasp the logic but fail on implementation details.
Limitations and Future Directions
While InteractBench provides a robust new standard for evaluating algorithmic reasoning, the authors note a few limitations. Interactive problems are naturally rarer than batch problems, limiting the dataset's scale compared to massive corpora like CodeContests. Additionally, the current study focuses on zero-shot performance. Future work will explore how few-shot prompting or iterative refinement—where the model is allowed to see and correct its own execution errors—might improve performance. Finally, to combat the constant threat of data contamination in LLM training, the authors plan semi-annual refreshes of the benchmark.
Summary updated