verify() returns True for any two equations with no free symbols
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 50/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 1.2k
- Forks
- 65
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de huggingface/Math-Verify
-
verify() raises ValueError comparing chained relations of different lengthPosiblemente ocupada @chetana1410 la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
huggingface/Math-Verify#93 ·
-
A period inside the math delimiters (`$\frac{1}{3}.$`) makes correct answers fail and can make wrong ones passPosiblemente ocupada @MohammadHijjawi97 la tomó hace 25 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 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 writesPosiblemente ocupada @shaurya416 la tomó hace 30 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
huggingface/Math-Verify#83 ·
-
verify() rejects a not-equal written in the other orderPosiblemente ocupada @chetana1410 la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
huggingface/Math-Verify#100 ·
-
verify() rejects an absolute-value inequality that is the same intervalPosiblemente ocupada @chetana1410 la tomó hace 2 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
huggingface/Math-Verify#98 ·
Todos los issues de huggingface/Math-Verify
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
nansencenter/geodataset#39 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
awslabs/visual-asset-management-system#804 ·
Los mantenedores suelen responder en 1 día
-
follow-up
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
[18.0] werkzeug: AttributeErrorAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
odoo/odoo#297927 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
link-rot
Dificultad 1/5 Menos de una hora Aptitud para principiantes 67/100