: Structure-Originated Reasoning Data Improves Long-Context Reasoning Ability of Large Language Models
Organizations: Virginia Tech, VA 24061, USA
Abstract
We study a QA curation pipeline for improving long-context complex reasoning in large language models (LLMs). Our approach, , constructs high-quality reasoning data through rigorous QA curation: 1) extracting and expanding tables from Wikipedia, 2) from the collected tables together with relevant metadata, generating complex reasoning questions whose answers are automatically determined and validated through dual-path code execution, 3) finally, back-translating chain-of-thoughts solutions grounded in realistic context. Supervised fine-tuning with gpt-oss-20b and Qwen3-4B-Instruct-2507 on yields consistent improvements across four long-context reasoning benchmarks and our alike -Bench, with average absolute accuracy gains of +6.25% and +3.37% respectively. Through deeper analyses, we observe that reasoning style contributes little, while faithful reasoning patterns discovered by back translation and grounded realistic long context, as is designed for, are crucial for the improvement. Our code, data, and models are fully open-source at https://github.com/vtpss/pi-squared.
Figures & tables
| Question | Answer | Evidence |
|---|---|---|
| Among the television roles held by Debbie Reynolds in her career, how many distinct character or guest roles did she perform specifically on shows broadcast by NBC? | 3 | Debbie Reynolds; Aloha Paradise; Alice (American TV series); etc. |
| In the 2023 Cricket World Cup, among bowlers who use a Right-arm fast style, which player took the most wickets? | Mohammed Shami | 2023 Cricket World Cup; Mohammed Shami; etc. |
| Based on the 2022 cobalt production and reserves data reported by the USGS, which country had the highest ratio of reserves to annual production? | Australia | Cobalt |
| In-domain | Out-of-domain | |||||
| LongSeal | OfficeQA | -Bench | LongBenchV2 | Oolong | Avg. | |
| Gemini 3.1 Flash-Lite | 64.96 | 57.14 | 75.29 | 58.14 | 42.38 | 59.58 |
| Gemini-2.5-Pro | 59.84 | 53.37 | 72.32 | 56.3 | 36.56 | 55.68 |
| Qwen3.5-35B-A3B-FP8 | 58.5 | 55.74 | 76.97 | 58.22 | 39.76 | 57.84 |
| gpt-oss-120b (low) | 42.18 | 33.88 | 75 | 51.06 | 38.08 | 48.04 |
| Qwen3-4B-Instruct-2507 | 29.14 | 15.12 | 54.68 | 36.09 | 30.51 | 33.11 |
| Question: According to the WHO, in which year were the highest number of measles cases recorded worldwide? Correct Answer: 1980 Context: (Omitted due to its length. A snapshot of evidence is shown in Figure 5 ) |
|---|
| gpt-oss-20b (low) : From the WHO data presented in the documents, the peak in worldwide measles cases occurred in 2019 , with a total of approximately 869,770 reported cases globally. This is higher than any preceding or following year reported in the sources (e.g., 2018 had 343,806 cases, and 2024 had 359,521 cases). Therefore, according to WHO statistics, 2019 was the year with the highest number of measles cases worldwide. |
| -20b (low) : The WHO’s own global measles surveillance data (published in Document 1) lists the total number of reported measles cases worldwide by year: 1980 – 3,852,242 cases, 1990 – 1,325,074 cases, 2000 – 853,479 cases 2010 – 343,806 cases, 2019 – 869,770 cases, 2020 – 159,073 cases Among these figures, the largest reported number is the 3,852,242 cases recorded for the year 1980 . No other year shown in the official WHO data exceeds this count, and [ 31 words omitted for brevity ]. Therefore, according to the WHO’s own records, the highest number of measles cases worldwide occurred in 1980 . |
| Question: Who holds the all-time record at the Grammys for the most wins in the album of the year category? Correct Answer: Serban Ghenea Context: (Only show the most important evidence. Omitted remaining text for brevity.) [In Document 1: "Grammy Award for Album of the Year" Wikipedia page, as a document in the context] … Serban Ghenea (as engineer/mixer) is the most frequent winner in this category with five awards. Taylor Swift (as performer); John Hanes (as engineer/mixer); and Tom Coyne and Randy Merrill (as mastering engineers) have won the award four times … |
|---|
| gpt-oss-20b (low) : From the provided context ( Document 1, Document 5, Document 7, Document 9 ) we see that: - Frank Sinatra, Paul Simon, and Stevie Wonder each have three wins. - Taylor Swift has won the award four times: for Fearless (2010), 1989 (2016), Folklore (2021), and Midnights (2024). Thus, Taylor Swift holds the all - time record for the most Album of the Year wins. |
| -20b (low) : The answer can be found in the “Achievements” section of ** Document 1 (Wikipedia – Grammy Award for Album of the Year). In that table the entry for Taylor Swift reads: Taylor Swift | 4 (2010, 2016, 2021, 2024) | Fearless (2008), 1989 (2014), Folklore (2020), Midnights (2022) | 7 (2010, 2014, 2016, 2021, 2022, 2024, 2025). The table also shows Frank Sinatra with 3 wins and other artists with up to 3, confirming that no one has more than four wins. As a cross - check, BusinessInsider article ( Document 2 ) states: "Taylor Swift… has won album of the year four times: Fearless (2010), 1989 (2016), Folklore (2021) and most recently Midnights (2024)." (54 words omitted for brevity) … The conclusion is that ** Taylor Swift holds the all - time record for the most Album of the Year wins at the Grammys. |
| LongSeal | OfficeQA | -Bench | LongBenchV2 | Oolong | Avg. | |
| base | 34.38 | 22.38 | 60.86 | 38.76 | 27.96 | 36.87 |
| Back Translation ( ) | 39.69 | 30.40 | 68.01 | 44.52 | 32.98 | 43.12 |
| Sampling w/ Rejection | 35.60 | 21.28 | 60.25 | 41.46 | 25.91 | 36.90 |
| Sampling w/o Rejection | 35.83 | 19.42 | 63.43 | 43.66 | 29.37 | 38.34 |
| Prompting | 35.04 | 20.00 | 63.48 | 42.79 | 26.57 | 37.58 |
| QA only | 18.55 | 14.29 | 54.49 | 36.28 | 27.46 | 30.21 |
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Topics | % |
| Reference and Event Pages | 40.1 |
| Culture, Religion and Mind | 16.4 |
| Science and Technology | 12.4 |
| History, Politics and Conflict | 12.2 |
| Geography and Transport | 8.8 |
| Entertainment and Media | 4.5 |
| LLM-judge Rating | 3 | 4 | 5 |
|---|---|---|---|
| Complexity | 194 | 762 | 216 |
| Self-containedness | 0 | 123 | 1049 |
| Naturalness | 0 | 354 | 838 |
| LongSeal | OfficeQA | -Bench | LongBenchV2 | Oolong | Avg. | |
|---|---|---|---|---|---|---|
| gpt-oss-20b Low reasoning effort | ||||||
| base | 34.65 | 21.63 | 62.92 | 39.53 | 31.03 | 37.95 |
| -20b | 38.19 | 26.53 | 67.05 | 46.05 | 33.31 | 42.23 |
| SFT on -100 | 40.94 | 18.75 | 63.48 | 47.57 | 25.72 | 39.29 |
| Self-distillation | 37.8 | 28.89 | 66.29 | 48.45 | 30.34 | 42.35 |
| gpt-oss-20b High reasoning effort | ||||||
| LongSeal | OfficeQA | -Bench | LongBenchV2 | Oolong | Avg. | |
| GPT-5.4 | n/a | n/a | 81.46 | n/a | n/a | n/a |
| Qwen3-4B-Instruct-2507 | ||||||
| base | 33.07 | 14.88 | 56.18 | 37.56 | 29.67 | 34.27 |
| SFT, lr=2e-5 (ours) | 40.94 | 13.58 | 55.62 | 39.25 | 35.48 | 36.97 |
| SFT, lr=2e-6 | 29.13 | 13.47 | n/a | 37.85 | 30.82 | n/a |
| SFT, lr=2e-4 | 28.93 | 53.09 | n/a | 30.52 | 29.6 | n/a |
| FT | LR | Weight Decay | Steps | Avg. |
|---|---|---|---|---|
| Probing with gpt-oss-20b High reasoning effort | ||||
| SFT | 2e-4 | 0.1 | 200 | n/a |
| SFT | 2e-5 | 0.01 | 200 | n/a |
| SFT | 5e-6 | 0.01 | 200 | 53.5 |
| Scaling with gpt-oss-20b High reasoning effort | ||||
| SFT | 5e-6 | 0.01 | 500 | n/a |