REVIEW 5 major objections 5 minor 1 cited by
Generalized Tree Edit Distance (GTED): A Faithful Evaluation Metric for Statement Autoformalization
T0 review · 5 major / 5 minor · reviewed 2026-08-06 · deepseek-v4-flash
Pith's one-line read GTED, a generalized tree edit distance over operator trees, claims the top accuracy and human-agreement scores for evaluating autoformalized statements on the miniF2F and ProofNet benchmarks.
desk verdict The metric is a sensible lightweight idea, but the headline comparison is built on test-set threshold selection and the exact transformation set is underspecified, so the reported superiority is not yet established. 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 operator tree (OPT), a rooted tree in which internal nodes are Lean operators with placeholder parameter slots (underscores) and leaves are variables or constants. The argument is carried by a generalized tree edit distance: a special tree transformation is a pair of trees $(T_1, T_2)$, and a generalized tree transformation collects all special transformations that are local or co-local depictions of one another; the distance is the minimum total cost of composing such transformations to convert one OPT into another. In the implementation, the allowed set $H$ includes α-conversion as a legal, cost-bearing transformation, and the raw distance is normalized by the larger tree size and thresholded to produce a binary correctness label. The classical Zhang–Shasha tree edit distance is recovered as a special case, which anchors the claim that GTED is a strict generalization rather than an ad hoc new heuristic.
What would settle it
Rescore the compiled predictions behind Table 1 with thresholds selected on only half of the human-judged miniF2F statements and then applied to the other half; if GTED's accuracy or Kappa on the held-out half is no longer the highest among the baselines, the paper's central claim of superior faithfulness is falsified.
Extended reading notes
Core claim
The central claim is that a structural edit distance computed on operator trees generalizes the classical tree edit distance into a faithful automated evaluation metric for statement autoformalization. Given a predicted formal statement and a ground-truth statement in Lean, GTED normalizes both through the Lean language server (theorem rewriting and variable expansion), parses them into operator trees, and computes the distance under a set of allowed transformations that includes α-conversion—renaming bound variables—as a semantics-preserving step. On human-judged subsets of miniF2F (205 statements) and ProofNet (93 statements), the paper reports that GTED achieves the highest accuracy (70.73%) and Kappa (0.438) on miniF2F and the joint-highest accuracy (69.89%) on ProofNet. The authors conclude that GTED offers a balanced, computationally lightweight, and more faithful alternative to string-similarity, grammar-checking, LLM-voting, and theorem-prover-based evaluations.
Load-bearing premise
The 205 and 93 human expert judgments used as gold labels are reliable and unbiased, and the decision threshold chosen on the same test sets to maximize Kappa does not inflate GTED's standing relative to the baselines.
Editorial extensions
If this is right
- GTED gives a continuous similarity score in $[0,1]$ rather than a binary verdict, so downstream systems can rank or filter autoformalizations by closeness.
- Because GTED shows a threshold-stable performance plateau, deployers do not need to locate a narrow optimal threshold as they would for BLEU.
- GTED avoids the low recall of Identity Match and the low precision of Typecheck, and it outperforms prover-based metrics that miss many valid formalizations because of limited automated theorem proving capability.
- With only the renaming half of α-conversion implemented, GTED already treats variable renaming as semantics-preserving; a fully scope-aware implementation would handle shadowed binders more accurately.
- The lightweight cost of GTED relative to LLM majority voting makes it usable for large-scale evaluation and model selection during autoformalizer training.
Reading between the lines
- A practical payoff not fully stated in the paper: because GTED's threshold curve is flat, a deployment could fix one threshold across datasets and still track human judgment, whereas BLEU would need per-dataset calibration.
- Because the tree representation keeps a placeholder for every operator slot, GTED could be paired with a theorem prover to verify equivalence of subtrees, which is far easier than proving whole-statement equivalence; this would turn the metric into a hybrid structural-plus-logical evaluator.
- The paper's own admission that GTED is semantically naive—it penalizes $x + y$ versus $y + x$—suggests that, despite the name, the metric measures syntactic-structural closeness rather than true logical equivalence; an independent user should treat the reported numbers as agreement with human judges on this test suite, not as a measure of mathematical meaning.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes GTED (Generalized Tree Edit Distance), a metric for evaluating statement autoformalization by standardizing Lean expressions into operator trees and computing a tree-edit-distance-based similarity score. The three-stage pipeline consists of syntax standardization via the Lean Language Server, operator tree construction, and a generalized tree edit distance with a thresholded similarity mapping. Experiments on miniF2F and ProofNet compare GTED against baseline metrics using a human-judged gold standard, reporting the highest accuracy and Kappa on miniF2F and joint-highest accuracy on ProofNet. The paper also discusses α-conversion as an example semantic transformation and notes limitations including incomplete scope-awareness and future semantic rewrite rules.
Significance. The idea of using operator trees and a generalized tree edit distance for autoformalization evaluation is novel and potentially useful. The paper provides code and experimental results, which supports community reuse and further study. If the methodological issues are addressed, GTED could become a lightweight, semantics-sensitive alternative to proof-based metrics. However, the current empirical validation does not establish the headline claims because continuous metrics' decision thresholds are selected on the same test set used for scoring, and the metric's transformation set and cost function are not precisely specified. The evidence is therefore insufficient to support the paper's claim that GTED is a 'faithful' evaluation metric.
major comments (5)
- [Section 4.2, Table 1] GTED and BLEU are reported at their per-metric best thresholds on the same human-judged test set; the text states 'Table 1 reports their highest Kappa scores across all thresholds.' Because θ is chosen post-hoc on the test set to maximize agreement with the gold labels, the reported accuracy and Kappa are optimistically biased, and the comparison with threshold-free baselines (Identity, Typecheck, Definitional Equality, BEq) is unfair. The central claim that GTED outperforms these baselines is therefore not established. A valid protocol must select θ on a hold-out validation set or via cross-validation before scoring the test set, or present the full threshold curves with a fixed, pre-specified threshold.
- [Section 3.3, Eq. (4) and following] The transformation set H and cost function L are never specified for the experiments. The text only says 'In practice, H is likely to include' certain transformations, without listing the actual transformations used or their costs. Since dGTED depends on H and L, the metric is under-specified and the experiments cannot be reproduced. Moreover, the statement that 'legal' transformations are chosen 'for better alignment with human intuition' suggests the metric has been tuned to the human labels, which risks circularity in the evaluation.
- [Section 3.3, Eq. (4)] The indicator function is inverted. For identical trees, dGTED = 0, so the similarity term equals 1, and for any θ < 1 the indicator returns 1, yet the text says this indicates the trees differ. This is the opposite of the intended semantics. Please correct the formula or the prose, and clarify that the threshold is applied to the similarity score with 1 meaning 'same' or 'correct' and 0 meaning 'different'.
- [Section 4.1, Human Evaluation] The gold standard uses only 205 (miniF2F) and 93 (ProofNet) judgments from four experts, but no inter-annotator agreement is reported. The paper's claim that GTED is a 'faithful' metric rests on a small, possibly noisy gold standard. Without agreement statistics or a description of how disagreements were resolved, the reliability of the human labels is unknown, and the ranking of metrics based on these labels is fragile, especially for the GTED/BLEU comparison where thresholds are chosen to maximize agreement with these labels.
- [Section 4.1, Implementation Details] The α-conversion implementation is acknowledged to be incomplete: 'Due to the time constraints of the present work, we have provisionally deferred the implementation of the scope-aware aspect.' Since α-conversion is presented as the primary semantic-preserving transformation, the implemented GTED cannot correctly rename bound variables within nested binders. This directly undercuts the claim that GTED captures semantic equivalence and means the experiments are run on a partial version of the proposed metric.
minor comments (5)
- [Section 4.1 and reference list] The model is called 'HERALD Translator' in the text but 'Herald' in the reference list (Gao et al., 2024); please standardize the capitalization.
- [Appendix B] The prompt templates contain '[UNUSED TOKEN 146]' and similar tokens without explanation; please clarify whether these are part of the model's tokenizer template or a typographical artifact.
- [Section 3.3] The prose says 'The normalization process may also fail' but does not state the conditions under which normalization fails; please add a precise description of when and why this happens.
- [Table 1] For Identity Match on ProofNet, Precision is reported as '0/0'; this is undefined and should be replaced with 'N/A' or a dash, with a note explaining the absence of true positives.
- [Figure 4] The 'Best Threshold' marker is placed at the maximum of the Kappa curve, but the curve is not labeled with numeric values; adding a small annotation with the threshold and Kappa value would improve clarity.
Assumptions & free parameters
free parameters (1)
- threshold theta per metric and dataset =
not stated numerically in text (best Kappa threshold)
assumptions (4)
- domain assumption Lean Language Server standardization preserves the semantic content of formal statements while removing syntactic variation.
- ad hoc to paper Operator tree edit distance is a meaningful proxy for semantic similarity of formal statements.
- domain assumption Human expert labels are the correct gold standard for autoformalization quality.
- standard math Zhang-Shasha tree edit distance algorithm computes the edit distance correctly for the special case used.
Cite this review
Pith. "Pith review of Generalized Tree Edit Distance (GTED): A Faithful Evaluation Metric for Statement Autoformalization." pith.science (2026). https://pith.science/paper/FKJSF4BX
@misc{pith2026250707399,
author = {Pith},
title = {Pith review of: Generalized Tree Edit Distance (GTED): A Faithful Evaluation Metric for Statement Autoformalization},
year = {2026},
howpublished = {\url{https://pith.science/paper/FKJSF4BX}},
note = {Machine review of arXiv:2507.07399}
}
read the original abstract
Statement autoformalization, the automated translation of statements from natural language into formal languages, has become a subject of extensive research, yet the development of robust automated evaluation metrics remains limited. Existing evaluation methods often lack semantic understanding, face challenges with high computational costs, and are constrained by the current progress of automated theorem proving. To address these issues, we propose GTED (Generalized Tree Edit Distance), a novel evaluation framework that first standardizes formal statements and converts them into operator trees, then determines the semantic similarity using the eponymous GTED metric. Across the miniF2F and ProofNet benchmarks, GTED consistently ranks as a top-performing metric, achieving the highest accuracy and Kappa on miniF2F and the joint-highest accuracy on ProofNet. This strong overall performance provides the community with a computationally lightweight and more faithful metric for automated evaluation. The code and experimental results are available at https://github.com/XiaoyangLiu-sjtu/GTED.
Figures
Figures from the paper (2 more)
Forward citations
Cited by 1 Pith paper
-
FormalRx: Rectify and eXamine Semantic Failures in Autoformalization
FormalRx diagnoses Lean autoformalization failures with a 28-category SCI taxonomy and an 8B model that jointly predicts alignment, error type, location, and correction.
Reference graph
Works this paper leans on
-
[1]
Towards a mathematics formalisation as- sistant using large language models
Agrawal, A., Gadgil, S., Goyal, N., Narayanan, A., and Tadipatri, A. Towards a mathematics formalisation as- sistant using large language models. arXiv preprint arXiv:2211.07524,
- [4]
-
[6]
Liu, Q., Zheng, X., Lu, X., Cao, Q., and Yan, J. Rethinking and improving autoformalization: Towards a faithful met- ric and a dependency retrieval-based approach. In The Thirteenth International Conference on Learning Repre- sentations, 2025a. Liu, X., Bao, K., Zhang, J., Liu, Y ., Chen, Y ., Liu, Y ., Jiao, Y ., and Luo, T. Atlas: Autoformalizing theo- ...
-
[10]
First experiments with neural translation of informal to formal mathematics
Wang, Q., Kaliszyk, C., and Urban, J. First experiments with neural translation of informal to formal mathematics. In Intelligent Computer Mathematics: 11th International Conference, CICM 2018, Hagenberg, Austria, August 13- 17, 2018, Proceedings 11, pp. 255–270. Springer,
work page 2018
-
[11]
Lean Workbook: A large-scale Lean problem set for- malized from natural language math problems
Ying, H., Wu, Z., Geng, Y ., Wang, J., Lin, D., and Chen, K. Lean Workbook: A large-scale Lean problem set for- malized from natural language math problems. In The Thirty-eight Conference on Neural Information Process- ing Systems Datasets and Benchmarks Track, 2024a. Ying, H., Zhang, S., Li, L., Zhou, Z., Shao, Y ., Fei, Z., Ma, Y ., Hong, J., Liu, K., W...
-
[13]
Evaluating Token-Level and Passage-Level Dense Retrieval Models for Math Information Retrieval
Zhong, W., Xie, Y ., and Lin, J. Applying structural and dense semantic matching for the arqmath lab 2022, clef. In CLEF (Working Notes), pp. 147–170, 2022a. Zhong, W., Yang, J.-H., Xie, Y ., and Lin, J. Evaluat- ing token-level and passage-level dense retrieval mod- els for math information retrieval. arXiv preprint arXiv:2203.11163, 2022b. Zhou, J. P., ...
work page Pith review arXiv 2022
-
[1989]
Consistent autofor- malization for constructing mathematical libraries
Zhang, L., Quan, X., and Freitas, A. Consistent autofor- malization for constructing mathematical libraries. In Proceedings of the 2024 Conference on Empirical Meth- ods in Natural Language Processing , pp. 4020–4033. Association for Computational Linguistics, November
work page 2024
-
[1994]
Ren, Z., Shao, Z., Song, J., Xin, H., Wang, H., Zhao, W., Zhang, L., Fu, Z., Zhu, Q., Yang, D., et al. Deepseek- prover-v2: Advancing formal mathematical reasoning via reinforcement learning for subgoal decomposition. arXiv preprint arXiv:2504.21801,
Show all 13 references
-
[1996]
Q., Li, W., and Jamnik, M
Jiang, A. Q., Li, W., and Jamnik, M. Multilingual mathemat- ical autoformalization. arXiv preprint arXiv:2311.03755,
-
[2022]
W., Radev, D., and Avigad, J
Azerbayev, Z., Piotrowski, B., Schoelkopf, H., Ayers, E. W., Radev, D., and Avigad, J. ProofNet: Autoformalizing and formally proving undergraduate-level mathematics. arXiv preprint arXiv:2302.12433,
-
[2023]
The Lean theorem prover (system description)
De Moura, L., Kong, S., Avigad, J., Van Doorn, F., and von Raumer, J. The Lean theorem prover (system description). In Automated Deduction-CADE-25: 25th International Conference on Automated Deduction, Berlin, Germany, August 1-7, 2015, Proceedings 25, pp. 378–388. Springer,
2015
-
[2024]
Deepseek-v3 technical report
Liu, A., Feng, B., Xue, B., Wang, B., Wu, B., Lu, C., Zhao, C., Deng, C., Zhang, C., Ruan, C., et al. Deepseek-v3 technical report. arXiv preprint arXiv:2412.19437,
-
[2025]
A promising path towards autoformaliza- tion and general artificial intelligence
Szegedy, C. A promising path towards autoformaliza- tion and general artificial intelligence. In Intelligent Computer Mathematics: 13th International Conference, CICM 2020, Bertinoro, Italy, July 26–31, 2020, Proceed- ings 13, pp. 3–20. Springer,
2020
Reviewed August 6, 2026 · model on record in the stance chip above.
Discussion (0). Sign in to comment.