REVIEW 3 major objections 4 minor 19 references
Disproving Program Equivalence with LLMs
T0 review · 3 major / 4 minor · reviewed 2026-08-09 · deepseek-v4-flash
Pith's one-line read ProbeGen, a white-box, execution-guided search that asks an LLM to generate probe programs until two implementations of the same interface produce observably different results, and on the LBPP benchmark it flags an estimated 18.7% of…
desk verdict The strict counterexample rate is robust; the filtered 18.7% headline rests on a fragile LLM filter precision estimate. 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 probe: a function $p$ that takes an implementation of an interface and returns a value, so that $p(f_i) \neq p(f_j)$ for two implementations is an execution-proven disproof of their functional equivalence. Unit tests are the special case where the probe returns True or False by comparing against an expected output; generating probes is easier because the LLM only has to produce valid inputs, not predict outputs. ProbeGen is an iterative tree search: at each turn the LLM receives the source of both implementations plus the string-represented outputs of every prior probe, and samples new probes as Python generators, with type checking enforcing explicit preconditions; search strategies trade branching factor against depth, and the paper's Decreasing strategy reaches a 90% probability of finding an existing counterexample at roughly a quarter of the cost of a full uniform search. The final component is the spurious-counterexample filter, another LLM prompt that decides whether a divergence violates implicit preconditions or concerns output details the task leaves unspecified; its measured 77.1% precision is what converts the raw counterexample rate of 24.3% into the headline estimate of 18.7%.
What would settle it
Adjudicate every unit-test-passing counterexample ProbeGen produces on a fresh sample of, say, 1,000 LBPP outputs, using three independent annotators per example instead of two authors on a subset. If the agreement rate on significant differences falls well below 77.1%, or if the implied corrected hidden-divergence rate approaches zero, the claim that ProbeGen finds substantial semantic differences that unit tests miss would be falsified.
Extended reading notes
Core claim
The paper's central claim is that functional-equivalence checking between two implementations of an interface can be carried out by an LLM-driven, execution-guided search for probe programs, and that this search frequently finds counterexamples in code that passes the official unit tests. In the LBPP code-synthesis benchmark, ProbeGen finds counterexamples in 24.3% of the samples whose unit tests pass; applying the paper's LLM-based filter for spurious counterexamples, and correcting for the filter's measured 77.1% precision, brings that estimate down to 18.7%. The paper further claims that the same probe machinery, used to partition candidate implementations by observable behavior, supports a semantic form of self-consistency: choosing the largest semantic cluster raises pass@1 from 40.6% to 44.6%, a roughly 10% relative gain, while the same procedure without spurious-counterexample filtering yields no gain at all.
Load-bearing premise
The headline numbers stand or fall with the LLM filter that decides which counterexamples count as real differences: its precision is estimated at 77.1% from human annotations of a two-per-problem subset, so if that estimate is optimistic, the 18.7% figure and the 10% pass@1 improvement both shrink.
Editorial extensions
If this is right
- Running ProbeGen on unit-test-passing samples before declaring a code-generation result correct would reclassify a reported 18.7% of supposedly correct samples as behaviorally different from the ground truth.
- Where unit tests do not exist, ProbeGen can act as the equivalence oracle itself, since it needs only the implementations and a value-equality operator; it agrees with unit tests on 83.3% of the outcomes for mutually runnable samples.
- Semantic self-consistency becomes practical: choosing the largest semantic cluster of candidate implementations improves pass@1 by about 10% relative to the baseline, and this gain disappears when spurious counterexamples are not filtered.
- The recursive success-probability estimator gives a budget-planning tool: for a given LLM, the Decreasing search strategy reaches 90% probability of finding an existing counterexample at roughly a quarter of the cost of a full uniform search.
Reading between the lines
- Because the only requirements are two executable implementations, a value-equality operator, and bounded execution time, the same probe search could power change-validation tools that compare code before and after an edit — an application the paper names but does not develop.
- The headline 18.7% is as much a measurement of the LBPP test suites as of the models; rerunning ProbeGen on other benchmarks would yield a directly comparable hidden-divergence rate that quantifies how much semantic slack different test suites leave.
- The method's practical bottleneck is not finding counterexamples but deciding intent: attaching formally generated preconditions to the significance filter, which the paper cites as adjacent work, would move the pipeline toward verifiable significance instead of relying on the 77.1%-precision judge.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper introduces ProbeGen, a white-box method that uses LLMs with execution feedback to generate probes (input usages) that expose behavioral differences between code implementations, thereby disproving strict functional equivalence. On the LBPP Python benchmark, the authors report that ProbeGen disproves 24.3% of samples that pass the provided unit tests after applying an LLM-based spurious-counterexample filter, and estimate 18.7% (abstract: 18%) after correcting for the filter's measured precision of 77.1%. The paper also uses ProbeGen for semantic clustering and semantic self-consistency, reporting a pass@1 improvement from 40.6 to 44.6. The core mechanism is logically sound: a probe that produces different outputs on two implementations deterministically disproves equivalence. However, the headline quantitative claims rest on a small, non-random human-annotated sample for filter precision, with no confidence intervals and no correction for filter recall.
Significance. If the empirical claims are reliable, the paper makes a useful contribution: it provides a practical method to complement weak unit tests, a new task for LLM code understanding, and a search-strategy analysis with a generalized pass@k estimator. The strict counterexample detection is deterministic and falsifiable, and the appendix gives concrete trajectories illustrating the method. The significance is moderated, however, by the reliance on a single probe model (Gemini Flash 2.0), the subjectivity of the 'significant difference' notion (human κ=0.71), and the lack of statistical rigor in the headline estimates. The paper's central insight—that unit-test equivalence can hide detectable semantic differences—appears robust, but the magnitude of the effect is not yet established to the precision claimed.
major comments (3)
- [Sec. 4.2, Table 1, Abstract] The headline 18.7% (abstract: 18%) is computed as 24.3% × 0.771, where 0.771 is the precision of the spurious-counterexample filter estimated from a human-annotated sample described only as '2 samples per LBPP problem (if more than 2 exist)' among counterexample-positive, unit-test-passing samples. The annotation sample size is not reported, the sample is not random (problems with many counterexamples are capped and problems with a single counterexample are over-represented), no confidence interval is given, and the correction uses precision only while ignoring filter recall. Because the filter is acknowledged in Sec. 3.1 to be able to introduce false negatives, 18.7% is neither an unbiased estimate nor a bound. This is load-bearing for the paper's central quantitative claim. Please report the exact annotation sample size and selection procedure, compute a confidence interval for precision (e.g., Wilson interval), perform a sensitivity analysis of the headline rate under plausible precision and recall values, and state explicitly the recall assumption.
- [Sec. 5.1, Table 2] The semantic self-consistency improvement (pass@1 40.6 → 44.6, a 10% relative increase) is reported without any measure of uncertainty, and the effect disappears when the spurious-counterexample filter is removed (PROBE GEN w/o Filtering gives 40.6). Since this result depends on the same filter whose precision estimate is uncertain, the improvement is not yet established. Please provide confidence intervals or a significance test, and report the number of samples and a per-problem breakdown of the improvement.
- [Sec. 4.2, Human Evaluation] The inter-annotator agreement of κ=0.71, described as 'substantial', means that the ground-truth label of 'significant difference' is unstable for a nontrivial fraction of cases. The paper should quantify how this label noise affects the precision estimate—for example, by reporting per-annotator precision values or a confidence interval that accounts for annotator disagreement—and discuss how the headline rate changes under alternative annotation judgments. This is important because the filter's precision is the only quantity used to correct the central estimate.
minor comments (4)
- [Abstract / Sec. 4.2] The abstract's '18%' does not mention that this is an estimate after filtering and correcting for filter precision; the underlying strict counterexample rate (without filtering) is substantially higher (24.3% + 18.8% = 43.1% of unit-test-passing samples). Please state both the strict and the filtered rates explicitly to avoid conflating 'disproved equivalence' with 'significant semantic difference'.
- [Appendix, Fig. 6] The captions in Figure 6 are placeholder text ('Lorem ipsum') and do not describe the actual search-strategy contour plots; these must be replaced with informative captions before publication.
- [Appendix D] The sample trajectories contain several typos and formatting errors ('differneces', 'For For input', 'count_string(ßßßß)' with mismatched quotes, and an unescaped Greek sigma in the text). These should be corrected for readability.
- [Sec. 4.2] The relationship between the mutually-runnable percentages in Table 1 and the statement that unit-test-passing samples 'consist of 44.4% of all samples' is not fully explained; please clarify whether the 24.3% figure is computed over all unit-test-passing samples or only those that are also runnable by ProbeGen.
Circularity Check
No significant circularity: ProbeGen's headline rate is an empirical measurement anchored to an external benchmark and human annotation, not a construction or fitted prediction.
full rationale
The paper's central derivation chain is empirical rather than definitional. ProbeGen generates probes with an LLM, executes them against LBPP implementations, and reports the observed counterexample rate among unit-test-passing samples; the 18.7% headline is obtained by taking the observed 24.3% rate and multiplying by a filter precision of 77.1% estimated from human annotations. No equation defines the claimed rate in terms of the filter's own outputs or a fitted parameter, and the strict unfiltered counterexample rate is deterministic once the probes execute. The LLM-based spurious-filter precision estimate is a possible threat to validity, because it is based on a convenience sample and does not correct for recall, but that is an empirical calibration concern, not circularity: the human annotations are independent of the probe-generation process. The only self-citation is Chen et al. (2023a) for traditional self-consistency, which is background and not load-bearing in the derivation. The semantic self-consistency improvement is also evaluated against LBPP unit tests, an external measure, so the central claims retain independent content.
Assumptions & free parameters
free parameters (6)
- Search budget for ProbeGen evaluation (branching K, depth D) =
K=3, D=4 (max 21 LLM calls per sample)
- Number of probes NP in semantic clustering =
10
- Iterable comparison cutoff =
first 1,000 elements
- Exception equivalence convention =
All exceptions treated as equivalent
- Float and NaN equality conventions =
math.isclose defaults; NaN considered equal to NaN
- PBT timeout for Hypothesis baseline =
3 CPU-minutes per target
assumptions (5)
- domain assumption Probe execution is deterministic and side-effect-free on the supplied inputs.
- domain assumption The LBPP ground-truth implementation and unit tests are correct and define the intended semantics.
- domain assumption Type annotations are sufficient preconditions for input generation and type checking.
- domain assumption The LLM filter's precision, measured on a small annotated subset, extrapolates to all flagged counterexamples.
- ad hoc to paper Unicode lowercasing behavior (e.g., Greek sigma) is part of the intended task semantics.
Cite this review
Pith. "Pith review of Disproving Program Equivalence with LLMs." pith.science (2026). https://pith.science/paper/BHA6VFQJ
@misc{pith2026250218473,
author = {Pith},
title = {Pith review of: Disproving Program Equivalence with LLMs},
year = {2026},
howpublished = {\url{https://pith.science/paper/BHA6VFQJ}},
note = {Machine review of arXiv:2502.18473}
}
read the original abstract
To evaluate large language models (LLMs) for code, research has used manually created unit test-based benchmarks. However, these tests are often inadequate, missing corner cases and other implementation-specific oddities. This work introduces ProbeGen, a whitebox method that takes two or more executable pieces of code and searches for counterexamples to their equivalence. Comparing code semantics requires a deep understanding of code. We demonstrate that LLMs with execution feedback perform well at this task. In a common code synthesis benchmark, ProbeGen disproves 18% of samples considered equivalent to the ground truth by the benchmark-provided unit tests. Additionally, using ProbeGen, we can semantically cluster LLM samples for semantic self-consistency, improving pass@1 by 10% by unifying syntactically distinct but semantically similar samples.
Figures
Figures from the paper (3 more)
Reference graph
Works this paper leans on
-
[1]
Automated unit test improvement using large language models at M eta
Alshahwan, N., Chheda, J., Finogenova, A., Gokkaya, B., Harman, M., Harper, I., Marginean, A., Sengupta, S., and Wang, E. Automated unit test improvement using large language models at M eta. In Companion Proceedings of the 32nd ACM International Conference on the Foundations of Software Engineering, pp.\ 185--196, 2024
work page 2024
-
[2]
Code T : Code generation with generated tests
Chen, B., Zhang, F., Nguyen, A., Zan, D., Lin, Z., Lou, J.-G., and Chen, W. Code T : Code generation with generated tests. arXiv preprint arXiv:2207.10397, 2022
arXiv 2022
-
[3]
Chen, M., Tworek, J., Jun, H., Yuan, Q., Pinto, H. P. D. O., Kaplan, J., Edwards, H., Burda, Y., Joseph, N., Brockman, G., et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021
arXiv 2021
-
[4]
Universal self-consistency for large language model generation
Chen, X., Aksitov, R., Alon, U., Ren, J., Xiao, K., Yin, P., Prakash, S., Sutton, C., Wang, X., and Zhou, D. Universal self-consistency for large language model generation. arXiv preprint arXiv:2311.17311, 2023 a
arXiv 2023
-
[5]
Teaching large language models to self-debug
Chen, X., Lin, M., Sch \"a rli, N., and Zhou, D. Teaching large language models to self-debug. arXiv preprint arXiv:2304.05128, 2023 b
arXiv 2023
-
[6]
Automated testing of refactoring engines
Daniel, B., Dig, D., Garcia, K., and Marinov, D. Automated testing of refactoring engines. In Proceedings of the the 6th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineering, pp.\ 185--194, 2007
work page 2007
-
[7]
J., Kaiser, G., Yang, J., and Ray, B
Ding, Y., Peng, J., Min, M. J., Kaiser, G., Yang, J., and Ray, B. Semcoder: Training code language models with comprehensive semantics. arXiv preprint arXiv:2406.01006, 2024
arXiv 2024
-
[8]
Endres, M., Fakhoury, S., Chakraborty, S., and Lahiri, S. K. Formalizing natural language intent into program specifications via large language models. arXiv preprint arXiv:2310.01831, 2023
arXiv 2023
Show all 19 references
-
[9]
and Bishop, M
Fink, G. and Bishop, M. Property-based testing: a new approach to testing for assurance. ACM SIGSOFT Software Engineering Notes, 22 0 (4): 0 74--80, 1997
1997
-
[10]
ChangeGuard : Validating code changes via pairwise learning-guided execution
Gr \"o ninger, L., Souza, B., and Pradel, M. ChangeGuard : Validating code changes via pairwise learning-guided execution. arXiv preprint arXiv:2410.16092, 2024
2024 arXiv
-
[11]
Self-supervised learning to prove equivalence between straight-line programs via rewrite rules
Kommrusch, S., Monperrus, M., and Pouchet, L.-N. Self-supervised learning to prove equivalence between straight-line programs via rewrite rules. IEEE Transactions on Software Engineering, 49 0 (7): 0 3771--3792, 2023
2023
-
[12]
Compiler validation via equivalence modulo inputs
Le, V., Afshari, M., and Su, Z. Compiler validation via equivalence modulo inputs. ACM Sigplan Notices, 49 0 (6): 0 216--226, 2014
2014
-
[13]
P., Lahiri, S
Lemieux, C., Inala, J. P., Lahiri, S. K., and Sen, S. CodaMosa : Escaping coverage plateaus in test generation with pre-trained large language models. In 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE), pp.\ 919--931. IEEE, 2023
2023
-
[14]
S., Wang, Y., and Zhang, L
Liu, J., Xia, C. S., Wang, Y., and Zhang, L. Is your code generated by ChatGPT really correct? rigorous evaluation of large language models for code generation. Advances in Neural Information Processing Systems, 36, 2024
2024
-
[15]
On leakage of code generation evaluation datasets
Matton, A., Sherborne, T., Aumiller, D., Tommasone, E., Alizadeh, M., He, J., Ma, R., Voisin, M., Gilsenan-McMahon, E., and Gall \'e , M. On leakage of code generation evaluation datasets. arXiv preprint arXiv:2407.07565, 2024
2024 arXiv
-
[16]
User interaction models for disambiguation in programming by example
Mayer, M., Soares, G., Grechkin, M., Le, V., Marron, M., Polozov, O., Singh, R., Zorn, B., and Gulwani, S. User interaction models for disambiguation in programming by example. In Proceedings of the 28th Annual ACM Symposium on User Interface Software & Technology, pp.\ 291--301, 2015
2015
-
[17]
McKeeman, W. M. Differential testing for software. Digital Technical Journal, 10 0 (1): 0 100--107, 1998
1998
-
[18]
Self-consistency improves chain of thought reasoning in language models
Wang, X., Wei, J., Schuurmans, D., Le, Q., Chi, E., Narang, S., Chowdhery, A., and Zhou, D. Self-consistency improves chain of thought reasoning in language models. arXiv preprint arXiv:2203.11171, 2022
2022 arXiv
-
[19]
write newline
" write newline "" before.all 'output.state := FUNCTION n.dashify 't := "" t empty not t #1 #1 substring "-" = t #1 #2 substring "--" = not "--" * t #2 global.max substring 't := t #1 #1 substring "-" = "-" * t #2 global.max substring 't := while if t #1 #1 substring * t #2 gl...
Reviewed August 9, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.