{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2606-09278","title":"Internalizing Geometric Law: Learning from Solver Residuals for Precision-Critical Generation","arxiv_id":"2606.09278","date":"2026-06-08","proceeding":null,"authors":["Rafael Cabral","Pang Zixi","Ziyi Shou","Shen Xin"],"abstract":"Large Language Models frequently hallucinate in precision-critical domains such as technical diagramming and mechanical design, where outputs must satisfy strict geometric constraints. We study open-ended geometric synthesis from natural language: translating free-form descriptions into precise constructions whose entities must simultaneously satisfy dozens of interacting constraints. To make this tractable, we release PyGeoX, a programmable geometric DSL that compiles declarative constraints into a differentiable loss, and PyGeoX-Bench, a stratified suite of 300 problems with per-constraint verifiable rewards. Using PyGeoX as a verifier, we identify a failure mode we call Outlier Gradient Masking: under global-norm rewards (any scheme that aggregates residuals through a single norm, for example, $\\exp(-\\mathrm{MSE})$), a single outlier constraint can nullify the learning signal across all others. To address this, we propose Saturating Additive Rewards (SAR), which decompose the reward into bounded per-constraint terms, preserving partial progress and ensuring consistent gradients even under severe violations. Against MSE-based rewards, the natural baseline for geometry solvers, SAR improves the hard-tier solving rate by $2.3\\times$, and the resulting 8B model is competitive with much larger frontier systems on this benchmark. We release the engine, benchmark, and data at https://github.com/Huawei-AI4Math/PyGeoX.","url_abs":"https://arxiv.org/abs/2606.09278","url_pdf":"https://arxiv.org/pdf/2606.09278","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2606.09278","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2606.09278"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/Huawei-AI4Math/PyGeoX","reach":null}],"summary":{"ran":7,"unverified":2},"by_repo_kind":{"found_in_text":{"samples":9,"ran":7,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"ff16753faee15ece","entry":"create_user_prompt","repo":"Huawei-AI4Math/PyGeoX","repo_kind":"found_in_text","path":"model_testing/PyGeoX-Wild/generate.py","file_url":"https://github.com/Huawei-AI4Math/PyGeoX/blob/HEAD/model_testing/PyGeoX-Wild/generate.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ff16753faee15ece"}},{"code_sha256_prefix":"dd79b87bb42441c6","entry":"execute_code_and_check","repo":"Huawei-AI4Math/PyGeoX","repo_kind":"found_in_text","path":"model_testing/PyGeoX-Wild/generate.py","file_url":"https://github.com/Huawei-AI4Math/PyGeoX/blob/HEAD/model_testing/PyGeoX-Wild/generate.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dd79b87bb42441c6"}},{"code_sha256_prefix":"a9b5bac7fe4d7d84","entry":"extract_python_code","repo":"Huawei-AI4Math/PyGeoX","repo_kind":"found_in_text","path":"model_testing/PyGeoX-Wild/image.py","file_url":"https://github.com/Huawei-AI4Math/PyGeoX/blob/HEAD/model_testing/PyGeoX-Wild/image.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a9b5bac7fe4d7d84"}},{"code_sha256_prefix":"060eb6f4478c228b","entry":"image_to_base64_data_url","repo":"Huawei-AI4Math/PyGeoX","repo_kind":"found_in_text","path":"model_testing/PyGeoX-Wild/evaluate.py","file_url":"https://github.com/Huawei-AI4Math/PyGeoX/blob/HEAD/model_testing/PyGeoX-Wild/evaluate.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"060eb6f4478c228b"}},{"code_sha256_prefix":"04282cb4c2bc11f5","entry":"list_problems_with_images","repo":"Huawei-AI4Math/PyGeoX","repo_kind":"found_in_text","path":"model_testing/PyGeoX-Wild/evaluate.py","file_url":"https://github.com/Huawei-AI4Math/PyGeoX/blob/HEAD/model_testing/PyGeoX-Wild/evaluate.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"04282cb4c2bc11f5"}},{"code_sha256_prefix":"851d62034ffdfc5a","entry":"load_answer_output","repo":"Huawei-AI4Math/PyGeoX","repo_kind":"found_in_text","path":"model_testing/PyGeoX-Wild/evaluate.py","file_url":"https://github.com/Huawei-AI4Math/PyGeoX/blob/HEAD/model_testing/PyGeoX-Wild/evaluate.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"851d62034ffdfc5a"}},{"code_sha256_prefix":"41d45ff2bc66f254","entry":"run_python_and_get_image","repo":"Huawei-AI4Math/PyGeoX","repo_kind":"found_in_text","path":"model_testing/PyGeoX-Wild/image.py","file_url":"https://github.com/Huawei-AI4Math/PyGeoX/blob/HEAD/model_testing/PyGeoX-Wild/image.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"41d45ff2bc66f254"}},{"code_sha256_prefix":"d002d92e74366291","entry":"call_chat_api","repo":"Huawei-AI4Math/PyGeoX","repo_kind":"found_in_text","path":"model_testing/PyGeoX-Wild/generate_openrouter.py","file_url":"https://github.com/Huawei-AI4Math/PyGeoX/blob/HEAD/model_testing/PyGeoX-Wild/generate_openrouter.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d002d92e74366291"}},{"code_sha256_prefix":"10b22e52ac7138d8","entry":"extract_python_code","repo":"Huawei-AI4Math/PyGeoX","repo_kind":"found_in_text","path":"model_testing/PyGeoX-Wild/generate.py","file_url":"https://github.com/Huawei-AI4Math/PyGeoX/blob/HEAD/model_testing/PyGeoX-Wild/generate.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"10b22e52ac7138d8"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}