REVIEW 3 major objections 5 minor 38 references
MIRA: Evidence-Verified Repair Memory for Text-to-SQL Correction
T0 review · 3 major / 5 minor · reviewed 2026-08-10 · deepseek-v4-flash
Pith's one-line read Historical SQL corrections are reused safely when decomposed into independently verifiable repair units and activated only on database evidence.
desk verdict Fine-grained repair memory with evidence verification gives real gains and deserves a careful referee; the main open question is whether the unvalidated semantic decomposition actually drives the improvements. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The load-bearing object is the repair memory item: one independently judgeable repair unit distilled from a historical incorrect-corrected SQL pair, carrying a semantic contract, a structural signature, and a target local check. The argument runs through three mechanisms. First, repair recovery uses generate-and-validate to produce a validated repair SQL whose execution result matches the confirmed correction, so the offline reference supplies the validation target. Second, repair unit identification separates the changes by structural dependency and accepts a group only when the historical question, execution contrast, and database facts show it corrects a required behavior. Third, at inference time evidence-verified memory activation tests whether the current task requires the recorded behavior and whether the current SQL plus bounded database probes exhibit the recorded violation, and target local adaptation binds the activated repairs to the current SQL while preserving unrelated logic.
What would settle it
Inspect the repair unit decomposition directly: for a random sample of the 261 successful repairs, take the source support of the activated memory item and check, against the gold SQL and the historical question, whether the item's semantic contract isolates exactly one required behavior. If a substantial fraction of items encodes multiple fused repairs or an incorrect contract, the decomposition claim is not doing the work attributed to it. Alternatively, permute the memory items across the same database and rerun online reuse; if execution accuracy does not collapse, the evidence-verification and adaptation stages, not the item boundaries, are carrying the result.
Extended reading notes
Core claim
The paper's central claim is that confirmed corrections from the same database become a reliable correction resource only when they are stored as independently judgeable repair units and each unit is admitted to a rewrite only after database evidence confirms its recorded error recurs in the current SQL. MIRA builds these units offline by recovering a validated repair SQL from the historical incorrect SQL, grouping AST-level changes by dependency, and accepting a group as a repair unit only when the historical question and objective database facts show the group implements a required behavior that the un-repaired form violates. Online, retrieval is only a candidate gate; activation requires both that the current question demands the recorded behavior and that the current SQL exhibits the recorded violation, optionally confirmed by a bounded read-only probe. The empirical claim is that this decomposition plus evidence gating plus local adaptation is what reconciles repair coverage with low regression: 261 successful repairs against 18 regressions, and the ablations show each component contributes distinctly to coverage or precision.
Load-bearing premise
The memory is only as sound as the LLM-based judge that decides, from the historical question, database facts, and execution contrasts, where one independent repair unit ends and another begins; the paper validates end-task accuracy but never directly audits the memory items themselves, so a systematic mislabeling of repair boundaries could still leave the aggregate numbers intact.
Editorial extensions
If this is right
- MIRA improves execution accuracy on every one of the six benchmark-and-upstream-agent combinations, with a 16.53-point gain on BIRD and an 8.78-point gain on ScienceBenchmark, without updating any model parameters.
- Decomposition into repair units is what protects correct SQL: replacing it with whole-pair records cuts repairs from 42 to 29 and raises regressions from 3 to 10 on a 371-query BIRD subset.
- Evidence-verified activation is the main regression shield: similarity-only selection keeps almost all repairs but raises regressions from 3 to 14, while the full method regresses only 18 of 1,130 initially correct queries.
- Independent memory items can be composed: 36 of the 261 successful repairs use two or three items bound to distinct locations in one rewrite.
- Training-free, memory-based correction transfers to a new benchmark: on ScienceBenchmark the two training-dependent comparators lose accuracy while MIRA gains 8.78 points.
Reading between the lines
- Editorial extension: the paper's decomposition principle should carry to other correction settings where one recorded fix bundles several independent changes, such as code repair or configuration repair, provided a database-like oracle can evaluate each candidate change in isolation.
- Editorial extension: a deployment-quality test would be to feed MIRA a stream of corrections in the order they arrive and freeze memory after each one, then measure whether early-firing items stabilize or drift; the paper's fixed 25/75 split cannot reveal this dynamic.
- Editorial extension: the paper does not report how many memory items each database yields or how often each item fires, so it remains open whether 261 repairs come from a few high-frequency units or broad coverage; adding these distributions would sharpen the memory-construction design.
- Editorial extension: because the same general-purpose correction model performs judging and rewriting, an ablation swapping the base model would separate the contribution of the MIRA scaffolding from the raw reasoning ability of the decoder.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes MIRA, a pluggable post-generation SQL corrector that reuses confirmed historical corrections from the same database. Offline, MIRA recovers a validated repair SQL for each historical correction, groups structural edits, and uses an LLM-based semantic judge to isolate independently judgeable repair units, each stored as a memory item with a semantic contract, structural signature, target local check, and provenance. Online, it retrieves candidate items semantically and structurally, verifies whether the recorded error recurs using the current question, SQL, and bounded database probes, then adapts activated items into a single rewrite that must pass mechanical validation. The evaluation covers 1,785 test queries from BIRD and ScienceBenchmark generated by CHESS, DeepEye-SQL, and OmniSQL-32B, reporting execution-accuracy gains of 16.53 and 8.78 percentage points respectively, with 261 repairs and 18 regressions, plus an ablation on one setting and an analysis of single- versus multi-item repairs.
Significance. If the claims hold, MIRA offers a practical, training-free approach to SQL correction that stores history at a finer granularity than whole-case retrieval, and the evidence-verification step is a sensible response to the regression problem that plagues experience-based correctors. The empirical pattern is consistent across six benchmark-agent settings, and the ablations in Table 3 show that each of the three main components contributes in a directionally plausible way. The clearest strength is the clean problem decomposition and the low regression count relative to comparators. However, the central mechanism---the semantic judge that decides where one repair unit ends and another begins---is never directly validated, and the empirical claims rest on a single unseeded split without confidence intervals. These gaps currently prevent the paper from fully establishing that the observed gains come from the proposed memory representation rather than from the underlying LLM's general correction ability.
major comments (3)
- [3.2.2 and Table 3] The core contribution is the decomposition of historical corrections into independently judgeable repair units by an LLM-based semantic judge, yet the manuscript never validates these unit boundaries against any gold standard. Table 3 shows that replacing decomposed items with whole-case records reduces EX by 5.39 points, but that ablation cannot distinguish a correct decomposition from a systematically wrong one that the online GPT-5 corrector happens to compensate for through direct reasoning. Please add a direct evaluation of memory-item quality: for example, compare judged repair-unit boundaries with human-annotated repair units on a sample of historical corrections, report precision/recall of accepted groups and inter-annotator agreement, and test stability when the semantic judge model is varied.
- [4.1 and Table 1] All main results come from a single, unseeded 25/75 train/test split. There are no confidence intervals, bootstrap estimates, or paired significance tests, so it is unclear whether key differences such as the 4.26-point overall EX advantage over MAGIC, or the 4.01-point deficit on ScienceBenchmark-CHESS, are stable or within noise. Because every method receives exactly the same current SQL and split, paired comparisons are natural. Please report variability across multiple splits or a bootstrap over test queries, and give paired significance tests for the main EX differences.
- [3.2.1 and 3.2.3] The paper does not report how many historical corrections actually produce a validated repair SQL and how many structural groups are accepted by the semantic judge. If many corrections are discarded because no candidate matches the reference result or because the judge rejects the group, the memory store is a highly selective subset of the confirmed corrections, and the reported gains may not reflect what would happen under realistic correction distributions. Please report per-database yield statistics: number of corrections yielding at least one item, number of accepted versus rejected groups, the distribution of memory items per correction, and the main reasons for discards.
minor comments (5)
- [Table 1] There is a formatting error in the MAGIC row for ScienceBenchmark: the CHESS and DeepEye entries appear as "57.1454.91" with no separator, which makes the table hard to read.
- [4.4] The ablation study is conducted only on the 371 BIRD-DeepEye test cases. The paper motivates all three components as general, so please justify why one setting is representative or add at least one additional setting to show that the ablation pattern is not specific to that agent and database group.
- [2.2] The formulation assumes confirmed historical corrections are clean pairs (q_i, s_i^-, s_i^+). In a real deployment, user-confirmed corrections may contain noisy or partial feedback; a short discussion of how MIRA would handle such noise would strengthen the practical framing.
- [3.2.1] The repair budget is mentioned but never specified numerically. Please state the budget (number of rounds or candidates) used in the experiments, since it directly affects both the offline cost in Table 2(b) and the yield of memory items.
- [4.1] No artifact or code link is provided. Given the number of LLM calls, prompts, and thresholds involved, releasing the exact prompts, memory items, and evaluation pipeline would be important for reproducibility.
Circularity Check
No significant circularity: the evaluated gains are measured against gold execution results on held-out test queries, and the memory store is built only from training-split corrections.
full rationale
The derivation chain is self-contained against external ground truth. MIRA's offline Repair Memory Construction consumes historical corrections (q_i, s-_i, s+_i) from the training split; the online stage consumes the current question, SQL, and database, and outputs a rewrite only if it passes mechanical validation. The evaluation metric is execution accuracy against the official benchmark evaluator (gold SQL), and Section 4.1 states that "The gold SQL s* is used only after evaluation and is never included in a correction prompt." No parameter is fitted to the test-set outcomes, and the reported Delta EX = (Nfix - Nreg)/M is defined directly from externally scored execution results, not from any quantity that MIRA's own procedure constructs. The main residual risk identified by a skeptical reading, namely that the LLM-based semantic judge may mislabel repair units during memory construction, is a question about the mechanism's empirical validity and about whether end-task accuracy is sensitive to memory quality; it is not a case where a prediction reduces by construction to an input. The only author-overlapping citation, DeepEye-SQL [16], supplies one of the upstream agents whose SQL is an input to the correction task, and it is not used to justify the method's correctness. No circular step could be quoted and reduced to an equation, so the appropriate finding is no significant circularity.
Assumptions & free parameters
free parameters (4)
- Repair-recovery generation budget =
not reported
- Retrieval context budget =
not reported
- Semantic embedding model (Enc) =
not reported
- Train/test split seed =
not reported
assumptions (4)
- domain assumption Execution equivalence on a single database instance is a valid proxy for SQL semantic correctness.
- domain assumption Confirmed corrected SQL (s+) in the historical corrections is correct ground truth.
- ad hoc to paper The LLM-based semantic judge can identify independently judgeable repair units without manual error annotations.
- domain assumption The 25% training split of each database yields historical corrections whose errors recur in the test split.
Cite this review
Pith. "Pith review of MIRA: Evidence-Verified Repair Memory for Text-to-SQL Correction." pith.science (2026). https://pith.science/paper/EHGTT7FS
@misc{pith2026260806950,
author = {Pith},
title = {Pith review of: MIRA: Evidence-Verified Repair Memory for Text-to-SQL Correction},
year = {2026},
howpublished = {\url{https://pith.science/paper/EHGTT7FS}},
note = {Machine review of arXiv:2608.06950}
}
read the original abstract
Text-to-SQL agents still produce executable yet semantically incorrect SQL. A reliable SQL corrector must repair incorrect queries without corrupting correct ones. Confirmed corrections from the same database can be reused without parameter updates. Existing methods, however, often bundle multiple errors and their repairs into a single coarse-grained experience. Applying the entire experience can introduce irrelevant edits and turn an initially correct query into an incorrect one. Reliable reuse therefore depends on three decisions: what to retain from a historical correction, when to activate the resulting memory, and how to adapt it to the current SQL. We propose MIRA (Memory-Item Reuse and Adaptation), a pluggable SQL corrector that uses database evidence to guide memory reuse. MIRA converts historical corrections into independently reusable repair memory items. For each current query, it retrieves memory items using the question and SQL. It then checks each item against database evidence and adapts the supported items to the current SQL. We evaluate 1,785 test queries generated by three Text-to-SQL agents across 14 databases from BIRD and ScienceBenchmark. MIRA improves execution accuracy by 16.53% and 8.78% on BIRD and ScienceBenchmark, respectively.
Figures
Figures from the paper (2 more)
Reference graph
Works this paper leans on
-
[1]
Shubham Agarwal, Asim Biswal, Sepanta Zeighami, Alvin Cheung, Joseph Gon- zalez, and Aditya G. Parameswaran. 2026. Arming Data Agents with Tribal Knowledge.CoRRabs/2602.13521 (2026). doi:10.48550/arXiv.2602.13521
-
[2]
Arian Askari, Christian Pölitz, and Xinye Tang. 2025. MAGIC: Generating Self-Correction Guideline for In-Context Text-to-SQL. InAAAI. 23433–23441. doi:10.1609/aaai.v39i22.34511
-
[3]
Ursin Brunner and Kurt Stockinger. 2021. ValueNet: A Natural Language-to-SQL System that Learns from Database Information. InICDE. 2177–2182
work page 2021
-
[4]
Jipeng Cen, Jiaxin Liu, Zhixu Li, and Jingjing Wang. 2025. SQLFixAgent: Towards Semantic-Accurate Text-to-SQL Parsing via Consistency-Enhanced Multi-Agent Collaboration. InAAAI. 49–57. doi:10.1609/aaai.v39i1.31979
-
[5]
Ziru Chen, Shijie Chen, Michael White, Raymond Mooney, Ali Payani, Jayanth Srinivasa, Yu Su, and Huan Sun. 2023. Text-to-SQL Error Correction with Lan- guage Models of Code. InACL (2). 1359–1372. doi:10.18653/v1/2023.acl-short.117
-
[6]
Shumo Chu, Konstantin Weitz, Alvin Cheung, and Dan Suciu. 2017. HoTTSQL: proving query rewrites with univalent SQL semantics. InPLDI. 510–524
work page 2017
-
[7]
Jean-Rémy Falleri, Floréal Morandat, Xavier Blanc, Matias Martinez, and Martin Monperrus. 2014. Fine-grained and accurate source code differencing. InASE. 313–324
work page 2014
-
[8]
Beat Fluri, Michael Würsch, Martin Pinzger, and Harald C. Gall. 2007. Change Distilling: Tree Differencing for Fine-Grained Source Code Change Extraction. IEEE Trans. Software Eng.33, 11 (2007), 725–743
work page 2007
Show all 38 references
-
[9]
Yue Gong, Chuan Lei, Xiao Qin, Kapil Vaidya, Balakrishnan Narayanaswamy, and Tim Kraska. 2025. SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQL. InNeurIPS
2025
- [10]
-
[11]
Tengjun Jin, Yoojin Choi, Yuxuan Zhu, and Daniel Kang. 2026. Pervasive An- notation Errors Break Text-to-SQL Benchmarks and Leaderboards.VLDB19, 5 (2026), 931–944. doi:10.14778/3796195.3796206
2026
-
[12]
Ryo Kamoi, Yusen Zhang, Nan Zhang, Jiawei Han, and Rui Zhang. 2024. When Can LLMs Actually Correct Their Own Mistakes? A Critical Survey of Self- Correction of LLMs.Trans. Assoc. Comput. Linguistics12 (2024), 1417–1440. doi:10.1162/tacl_a_00713
2024 doi
-
[13]
Hyeonji Kim, Byeong-Hoon So, Wook-Shin Han, and Hongrae Lee. 2020. Natural language to SQL: Where are we today?VLDB13, 10 (2020), 1737–1750
2020
-
[14]
Claire Le Goues, ThanhVu Nguyen, Stephanie Forrest, and Westley Weimer. 2012. GenProg: A Generic Method for Automatic Software Repair.IEEE Trans. Software Eng.38, 1 (2012), 54–72
2012
-
[15]
Claire Le Goues, Michael Pradel, and Abhik Roychoudhury. 2019. Automated Program Repair.Commun. ACM62, 12 (2019), 56–65
2019
-
[16]
Boyan Li, Chong Chen, Zhujun Xue, Yinan Mei, and Yuyu Luo. 2025. DeepEye-SQL: A Software-Engineering-Inspired Text-to-SQL Framework.CoRR abs/2510.17586 (2025)
2025 arXiv
-
[17]
Haoyang Li, Shang Wu, Xiaokang Zhang, Xinmei Huang, Jing Zhang, Fuxin Jiang, Shuai Wang, Tieying Zhang, Jianjun Chen, Rui Shi, Hong Chen, and Cuiping Li
-
[18]
Chang, Fei Huang, Reynold Cheng, and Yongbin Li
Jinyang Li, Binyuan Hui, Ge Qu, Jiaxi Yang, Binhua Li, Bowen Li, Bailin Wang, Bowen Qin, Ruiying Geng, Nan Huo, Xuanhe Zhou, Chenhao Ma, Guoliang Li, Kevin C.-C. Chang, Fei Huang, Reynold Cheng, and Yongbin Li. 2023. Can LLM Already Serve as A Database Interface? A BIg Bench f...
2023
-
[19]
Mohammadreza Pourreza and Davood Rafiei. 2023. DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction. InNeurIPS
2023
-
[20]
Shuofei Qiao, Honghao Gui, Chengfei Lv, Qianghuai Jia, Huajun Chen, and Ningyu Zhang. 2024. Making Language Models Better Tool Learners with Execution Feedback. InNAACL-HLT. 3550–3568
2024
-
[21]
Ge Qu, Jinyang Li, Bowen Qin, Xiaolong Li, Nan Huo, Chenhao Ma, and Reynold Cheng. 2025. SHARE: An SLM-based Hierarchical Action CorREction Assistant for Text-to-SQL. InACL (1). 11268–11292. doi:10.18653/v1/2025.acl-long.552
2025 doi
-
[22]
Torsten Scholak, Nathan Schucher, and Dzmitry Bahdanau. 2021. PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Models. InEMNLP (1). 9895–9901
2021
-
[23]
Jiawei Shen, Chengcheng Wan, Ruoyi Qiao, Jiazhen Zou, Hang Xu, Yuchen Shao, Yueling Zhang, Weikai Miao, and Geguang Pu. 2025. A Study of In-Context- Learning-Based Text-to-SQL Errors.CoRRabs/2501.09310 (2025). doi:10.48550/ arXiv.2501.09310
2025 doi
-
[24]
Ke Shen and Mayank Kejriwal. 2024. SelECT-SQL: Self-correcting Ensemble Chain-of-Thought for Text-to-SQL.CoRRabs/2409.10007 (2024)
2024 arXiv
-
[25]
Shayan Talaei, Mohammadreza Pourreza, Yu-Chen Chang, Azalia Mirhoseini, and Amin Saberi. 2024. CHESS: Contextual Harnessing for Efficient SQL Synthesis. CoRRabs/2405.16755 (2024)
2024 arXiv
- [26]
-
[27]
Matthias Urban, Jialin Ding, David Kernert, Kapil Vaidya, and Tim Kraska. 2025. Utilizing Past User Feedback for More Accurate Text-to-SQL. InHILDA@SIGMOD. 10:1–10:7
2025
-
[28]
Dingzirui Wang, Longxu Dou, Xuanliang Zhang, Qingfu Zhu, and Wanxiang Che
-
[29]
Zhongyuan Wang, Richong Zhang, Zhijie Nie, and Jaein Kim. 2025. ToolSQL: A Tool-Assisted Agent for SQL Verification and Refinement. InKDD (2). 3102–3110
2025
-
[30]
InEMNLP (Findings)
DAC: Decomposed Automation Correction for Text-to-SQL. InEMNLP (Findings). 385–402. doi:10.18653/v1/2025.findings-emnlp.22
2025 doi
-
[31]
Tao Yu, Rui Zhang, Kai Yang, Michihiro Yasunaga, Dongxu Wang, Zifan Li, James Ma, Irene Li, Qingning Yao, Shanelle Roman, Zilin Zhang, and Dragomir Radev. 2018. Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task. InEM...
2018 doi
-
[32]
Zerui Yang, Weichuan Wang, Yanwei Xu, Linqi Song, Yudai Matsuda, Wei Han, and Bo Bai. 2026. Memo-SQL: Structured Decomposition and Experience-Driven Self-Correction for Training-Free NL2SQL. InACL (Findings). 5130–5148
2026
-
[33]
Yi Zhang, Jan Deriu, George Katsogiannis-Meimarakis, Catherine Kosten, Geor- gia Koutrika, and Kurt Stockinger. 2023. ScienceBenchmark: A Complex Real- World Benchmark for Evaluating Natural Language to SQL Systems.VLDB17, 4 (2023), 685–698. doi:10.14778/3636218.3636225
2023
-
[34]
Kun Zhang, Xiexiong Lin, Yuanzhuo Wang, Xin Zhang, Fei Sun, Jianhe Cen, Hexiang Tan, Xuhui Jiang, and Huawei Shen. 2023. ReFSQL: A Retrieval- Augmentation Framework for Text-to-SQL Generation. InEMNLP (Findings). 664–673
2023
-
[35]
Navathe, William Harris, and Jinpeng Wu
Qi Zhou, Joy Arulraj, Shamkant B. Navathe, William Harris, and Jinpeng Wu
-
[36]
Ruiqi Zhong, Tao Yu, and Dan Klein. 2020. Semantic Evaluation for Text-to-SQL with Distilled Test Suites. InEMNLP (1). 396–411
2020
-
[2022]
SPES: A Symbolic Approach to Proving Query Equivalence Under Bag Semantics. InICDE. 2735–2748
-
[2025]
OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scale.VLDB18, 11 (2025), 4695–4709
2025
Reviewed August 10, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.