{"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/multi-view-reasoning-consistent-contrastive","title":"Multi-View Reasoning: Consistent Contrastive Learning for Math Word Problem","arxiv_id":"2210.11694","date":"2022-10-21","proceeding":null,"authors":["Wenqi Zhang","Yongliang Shen","Yanna Ma","Xiaoxia Cheng","Zeqi Tan","Qingpeng Nong","Weiming Lu"],"abstract":"Math word problem solver requires both precise relation reasoning about quantities in the text and reliable generation for the diverse equation. Current sequence-to-tree or relation extraction methods regard this only from a fixed view, struggling to simultaneously handle complex semantics and diverse equations. However, human solving naturally involves two consistent reasoning views: top-down and bottom-up, just as math equations also can be expressed in multiple equivalent forms: pre-order and post-order. We propose a multi-view consistent contrastive learning for a more complete semantics-to-equation mapping. The entire process is decoupled into two independent but consistent views: top-down decomposition and bottom-up construction, and the two reasoning views are aligned in multi-granularity for consistency, enhancing global generation and precise reasoning. Experiments on multiple datasets across two languages show our approach significantly outperforms the existing baselines, especially on complex problems. We also show after consistent alignment, multi-view can absorb the merits of both views and generate more diverse results consistent with the mathematical laws.","url_abs":"https://arxiv.org/abs/2210.11694v2","url_pdf":"https://arxiv.org/pdf/2210.11694v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"multi-view-reasoning-consistent-contrastive","repo_url":"https://github.com/zwq2018/multi-view-consistency-for-mwp","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"math","task_name":"Math"},{"task_slug":"math-word-problem-solving","task_name":"Math Word Problem Solving"},{"task_slug":"mathematical-reasoning","task_name":"Mathematical Reasoning"},{"task_slug":null,"task_name":"Relation"},{"task_slug":"relation-extraction","task_name":"Relation Extraction"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/math-word-problem-solving-on-mawps","task":"Math Word Problem Solving","dataset":"MAWPS","model":"Multi-view","rank_in_archive_order":4,"of":25,"metrics":{"Accuracy (%)":"92.3"},"uses_additional_data":true},{"leaderboard":"/sota/math-word-problem-solving-on-math23k","task":"Math Word Problem Solving","dataset":"Math23K","model":"Multi-view* (ours)","rank_in_archive_order":2,"of":19,"metrics":{"Accuracy (5-fold)":"85.2","Accuracy (training-test)":"87.1"},"uses_additional_data":true},{"leaderboard":"/sota/math-word-problem-solving-on-mathqa","task":"Math Word Problem Solving","dataset":"MathQA","model":"Multi-view","rank_in_archive_order":3,"of":5,"metrics":{"Answer Accuracy":"80.6"},"uses_additional_data":true}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2210.11694","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.11694"}},"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":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zwq2018/multi-view-consistency-for-mwp","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"unverified":12},"by_repo_kind":{"official":{"samples":13,"ran":1,"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":"2f69ddcd06d5421f","entry":"read_data","repo":"zwq2018/multi-view-consistency-for-mwp","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/zwq2018/multi-view-consistency-for-mwp/blob/HEAD/src/utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2f69ddcd06d5421f"}},{"code_sha256_prefix":"6cca9d6a936ecfcc","entry":"compute","repo":"zwq2018/multi-view-consistency-for-mwp","repo_kind":"official","path":"src/eval/utils.py","file_url":"https://github.com/zwq2018/multi-view-consistency-for-mwp/blob/HEAD/src/eval/utils.py","link_basis":"harvester_set","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":"6cca9d6a936ecfcc"}},{"code_sha256_prefix":"01d6defe25112d21","entry":"compute_value","repo":"zwq2018/multi-view-consistency-for-mwp","repo_kind":"official","path":"src/eval/utils.py","file_url":"https://github.com/zwq2018/multi-view-consistency-for-mwp/blob/HEAD/src/eval/utils.py","link_basis":"harvester_set","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":"01d6defe25112d21"}},{"code_sha256_prefix":"360275f90909519f","entry":"compute_value_for_incremental_equations","repo":"zwq2018/multi-view-consistency-for-mwp","repo_kind":"official","path":"src/eval/utils.py","file_url":"https://github.com/zwq2018/multi-view-consistency-for-mwp/blob/HEAD/src/eval/utils.py","link_basis":"harvester_set","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":"360275f90909519f"}},{"code_sha256_prefix":"2f2e884c6e5f1525","entry":"copy_list","repo":"zwq2018/multi-view-consistency-for-mwp","repo_kind":"official","path":"src/model/tree_decoder.py","file_url":"https://github.com/zwq2018/multi-view-consistency-for-mwp/blob/HEAD/src/model/tree_decoder.py","link_basis":"harvester_set","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":"2f2e884c6e5f1525"}},{"code_sha256_prefix":"6f6a7869a7797e21","entry":"get_batched_prediction_consider_multiple_m0","repo":"zwq2018/multi-view-consistency-for-mwp","repo_kind":"official","path":"main_math23k.py","file_url":"https://github.com/zwq2018/multi-view-consistency-for-mwp/blob/HEAD/main_math23k.py","link_basis":"harvester_set","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":"6f6a7869a7797e21"}},{"code_sha256_prefix":"dc88195e78925e47","entry":"get_combination_mask","repo":"zwq2018/multi-view-consistency-for-mwp","repo_kind":"official","path":"src/model/universal_model.py","file_url":"https://github.com/zwq2018/multi-view-consistency-for-mwp/blob/HEAD/src/model/universal_model.py","link_basis":"harvester_set","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":"dc88195e78925e47"}},{"code_sha256_prefix":"68123269a97bdff9","entry":"have_constant","repo":"zwq2018/multi-view-consistency-for-mwp","repo_kind":"official","path":"preprocess/process_math23k.py","file_url":"https://github.com/zwq2018/multi-view-consistency-for-mwp/blob/HEAD/preprocess/process_math23k.py","link_basis":"harvester_set","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":"68123269a97bdff9"}},{"code_sha256_prefix":"87b16c0cfd687a02","entry":"have_pi","repo":"zwq2018/multi-view-consistency-for-mwp","repo_kind":"official","path":"preprocess/process_math23k.py","file_url":"https://github.com/zwq2018/multi-view-consistency-for-mwp/blob/HEAD/preprocess/process_math23k.py","link_basis":"harvester_set","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":"87b16c0cfd687a02"}},{"code_sha256_prefix":"e06f898b70a977ff","entry":"have_square","repo":"zwq2018/multi-view-consistency-for-mwp","repo_kind":"official","path":"preprocess/process_math23k.py","file_url":"https://github.com/zwq2018/multi-view-consistency-for-mwp/blob/HEAD/preprocess/process_math23k.py","link_basis":"harvester_set","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":"e06f898b70a977ff"}},{"code_sha256_prefix":"80f5fed9c34adca3","entry":"masked_cross_entropy","repo":"zwq2018/multi-view-consistency-for-mwp","repo_kind":"official","path":"src/model/tree_decoder.py","file_url":"https://github.com/zwq2018/multi-view-consistency-for-mwp/blob/HEAD/src/model/tree_decoder.py","link_basis":"harvester_set","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":"80f5fed9c34adca3"}},{"code_sha256_prefix":"aa868b456e259fdc","entry":"parse_arguments","repo":"zwq2018/multi-view-consistency-for-mwp","repo_kind":"official","path":"main_math23k.py","file_url":"https://github.com/zwq2018/multi-view-consistency-for-mwp/blob/HEAD/main_math23k.py","link_basis":"harvester_set","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":"aa868b456e259fdc"}},{"code_sha256_prefix":"e966aac70ae27f8f","entry":"sequence_mask","repo":"zwq2018/multi-view-consistency-for-mwp","repo_kind":"official","path":"src/model/tree_decoder.py","file_url":"https://github.com/zwq2018/multi-view-consistency-for-mwp/blob/HEAD/src/model/tree_decoder.py","link_basis":"harvester_set","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":"e966aac70ae27f8f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}