NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

$\pi^2$: Structure-Originated Reasoning Data Improves Long-Context Reasoning Ability of Large Language Models

Quyet V. Do, Thinh Pham, Nguyen Phan Nguyen, Sha Li, Pratibha Zunjare, Tu Vu

TL;DR

The $\pi^2$ paper introduces a novel data curation pipeline that uses Wikipedia tables as a structured "bridge" to generate high-quality, verifiable reasoning data for long-context Large Language Models (LLMs). By fine-tuning models on this data, the authors achieved significant accuracy gains across multiple long-context benchmarks, demonstrating that grounded, faithful reasoning patterns are more important for performance than mere reasoning "style."

What Problem Does This Paper Address?

While modern LLMs can now process contexts spanning millions of tokens, their ability to perform complex, multi-step reasoning over that data hasn't kept pace. A major bottleneck is the lack of high-quality, verifiable training data.

In structured domains like coding or mathematics, it is easy to verify if a reasoning chain is correct. However, in open-domain tasks involving long, realistic documents, verification is incredibly difficult. Existing datasets often rely on synthetic contexts or simple reasoning patterns that don't reflect the "chaos" of real-world information. The authors of $\pi^2$ seek to find the "cosmos" (order) within this chaos by using tables as an intermediate representation to ground and verify complex logic.

Methods

The $\pi^2$ (Pipeline for Generating Structure-based Question Answering and Reasoning Data over Long Documents) consists of three main stages:

  1. Table Collection and Expansion: The pipeline extracts tables from Wikipedia. To increase complexity, it often expands these tables by retrieving additional information from linked pages (e.g., adding a "Total International Caps" column to a table of rugby players by visiting each player's individual page).
  2. QA Generation and Dual-Path Verification: An LLM generates a complex natural language question and a corresponding SQL query based on the table. To ensure the answer is correct, the pipeline uses dual-path code execution: it compares the result of the SQL query against a Python script generated by a separate LLM. A sample is only kept if both computational paths reach a consensus.
  3. Reasoning Trace Back-Translation: Once an answer is verified, the pipeline uses an LLM to "back-translate" the logic into a natural language reasoning trace (Chain-of-Thought). Crucially, this trace is grounded in the original free-form text documents, not the table, teaching the model how to navigate realistic long-form context to find evidence.
The $\pi^2$ curation pipeline showing the transition from raw webpages to verified reasoning traces.

Datasets

The authors curated a training set of 922 high-quality samples. For evaluation, they utilized a mix of existing and new benchmarks:

  • In-domain: LongSeal (adversarial/noisy contexts), OfficeQA (analytical reasoning on Treasury documents), and the newly introduced $\pi^2$-Bench (228 human-validated, high-complexity samples).
  • Out-of-domain: LongBenchV2 (massive realistic contexts) and Oolong (atomic text analysis).
Examples of QA pairs generated by the $\pi^2$ pipeline covering diverse topics.

Key Insights and Ideas

  • Tables as a Reasoning Bridge: The core "aha moment" is that tables represent entities and relations that can be losslessly altered by realistic documents but remain compatible with programmatic operations like filtering and sorting. This makes them the perfect tool for generating verifiable logic.
  • Patterns Over Style: Through ablation studies, the researchers found that simply prompting a model to use a certain "reasoning style" (like Chain-of-Thought) provided negligible gains. The real improvement came from learning faithful reasoning patterns—the specific way evidence is gathered and synthesized from long contexts.
  • The "Overthinking Tax": Fine-tuning on $\pi^2$ data significantly increases the output length of models. While this leads to better accuracy, it suggests that stronger reasoning currently comes with a cost of increased verbosity, or "overthinking."

Key Results

Fine-tuning GPT-OSS-20B and Qwen3-4B-Instruct on the $\pi^2$ dataset yielded consistent improvements across all benchmarks.

  • GPT-OSS-20B: Achieved an average absolute accuracy gain of +6.25%. Notably, on the LongSeal benchmark, the fine-tuned 20B model (61.09%) actually outperformed the much larger Qwen3.5-35B model (58.50%).
  • Qwen3-4B: Achieved an average gain of +3.37%.
  • Generalization: The models showed strong performance even on out-of-domain benchmarks like LongBenchV2, proving that the skills learned from Wikipedia-based tables generalize to other types of long-form data.
Main results showing $\pi^2$ models outperforming base models across various benchmarks.

Limitations and Future Work

The authors acknowledge several areas for further exploration:

  • Context Scale: The study focused on the 128K-token range. Whether these techniques scale to the "million-token" regime remains to be seen.
  • Human Intervention: Despite the automated pipeline, about 17% of the samples for the $\pi^2$-Bench still required human revision to ensure top-tier quality, indicating room for better automatic quality control.
  • Conciseness: Future work is needed to balance the "thoroughness" of the reasoning traces with "conciseness" to avoid the overthinking tax mentioned earlier.

Summary updated

BibTeX
@inproceedings{do2026pi,
  author = {Quyet V. Do and Thinh Pham and Nguyen Phan Nguyen and Sha Li and Pratibha Zunjare and Tu Vu},
  title = {{$\textbackslash\{\}pi^2$: Structure-Originated Reasoning Data Improves Long-Context Reasoning Ability of Large Language Models}},
  booktitle = {COLM},
  year = {2026},
  url = {https://openreview.net/forum?id=4yDpwREyhm},
}
Figure