verify() returns True for any two equations with no free symbols
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 50/100
Hướng nghiên cứu
Start by running the two reproduction snippets in the issue: verify(gold=parse("$3 = 4$"), target=parse("$1 = 2$")) should return False but currently returns True. The bug is in the equation fallback of verify, which solves each side over an empty symbol set and treats the resulting empty solution lists as a match. Done means symbol-free equations that are not identical no longer verify equal, and the existing tests still pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
verify reports two equations as equivalent whenever both parse to relations with no free symbols. The equation fallback solves each side over an empty symbol set, obtains two empty solution lists, and treats the empty pairwise comparison as a match, so any symbol-free pair compares equal, including outright false equations.
Reproduce (math-verify 0.9.0, current PyPI release, Python 3.12):
from math_verify import parse, verify
gold = parse("$I_{e}(0)=\\gamma I_{i}(0)$")
target = parse("$I_{i}(0) = I_{e}(0)$")
print(verify(gold=gold, target=target)) # True
print(verify(gold=parse("$3 = 4$"), target=parse("$1 = 2$"))) # True
Both parses are sympy Equality objects whose free_symbols set is empty: the terms are undefined-function applications such as I_i(0), which do not count as free symbols. verify returns True for both pairs.
Expected: an empty solution list should not satisfy the equation comparison; symbol-free relations that are not trivially identical should not verify equal.
Impact: this inflated benchmark scores in an LLM evaluation harness that grades extracted LaTeX answers through parse/verify — a candidate equation and a structurally different reference equation, both without free symbols, always received deterministic credit. Evidence and the downstream guard:
- https://github.com/marin-community/evalchemy/issues/207 — report with an OlympiadBench regrade record (
s3://marin-us-east-02a/marin/evals/ablations/olympiadbench-minimax-m3-judge-20261009-guided-choice-thinking/results/inclusionAI--Ling-lite-1.5.json, document 4, trial 6) - https://github.com/marin-community/evalchemy/pull/208 — downstream guard that skips
verifywhen both parses hold only symbol-free relations
- Ngôn ngữ chính
- Python
- Star
- 1.2k
- Fork
- 65
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của huggingface/Math-Verify
-
verify() raises ValueError comparing chained relations of different lengthCó thể đã có người làm @chetana1410 đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
huggingface/Math-Verify#93 ·
-
A period inside the math delimiters (`$\frac{1}{3}.$`) makes correct answers fail and can make wrong ones passCó thể đã có người làm @MohammadHijjawi97 đã nhận 26 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
huggingface/Math-Verify#85 ·
-
evaluate_model_outputs.py: rows whose gold cannot be extracted are dropped from the accuracy denominator, so the printed accuracy disagrees with the is_correct column the script writesCó thể đã có người làm @shaurya416 đã nhận 32 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
huggingface/Math-Verify#83 ·
-
verify() rejects a not-equal written in the other orderCó thể đã có người làm @chetana1410 đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
huggingface/Math-Verify#100 ·
-
verify() rejects an absolute-value inequality that is the same intervalCó thể đã có người làm @chetana1410 đã nhận 3 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
huggingface/Math-Verify#98 ·
Tất cả issue của huggingface/Math-Verify
Issue tương tự
-
bug P1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Toloka/tolokaforge#1947 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
SageMaker provider: streaming fails with NoStreamDataError on DJL Serving (LMI) endpointsCó thể đã có người làm @balajiaru đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
UKGovernmentBEIS/inspect_ai#6127 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
pydot/pydot#601 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
letsencrypt/cp-cps#361 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100