{"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/a-logic-driven-framework-for-consistency-of","title":"A Logic-Driven Framework for Consistency of Neural Models","arxiv_id":"1909.00126","date":"2019-08-31","proceeding":"IJCNLP 2019 11","authors":["Tao Li","Vivek Gupta","Maitrey Mehta","Vivek Srikumar"],"abstract":"While neural models show remarkable accuracy on individual predictions, their internal beliefs can be inconsistent across examples. In this paper, we formalize such inconsistency as a generalization of prediction error. We propose a learning framework for constraining models using logic rules to regularize them away from inconsistency. Our framework can leverage both labeled and unlabeled examples and is directly compatible with off-the-shelf learning schemes without model redesign. We instantiate our framework on natural language inference, where experiments show that enforcing invariants stated in logic can help make the predictions of neural models both accurate and consistent.","url_abs":"https://arxiv.org/abs/1909.00126v4","url_pdf":"https://arxiv.org/pdf/1909.00126v4.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":"a-logic-driven-framework-for-consistency-of","repo_url":"https://github.com/utahnlp/consistency","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"natural-language-inference","task_name":"Natural Language Inference"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1909.00126","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1909.00126"}},"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/utahnlp/consistency","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_honours":1,"unverified":9},"by_repo_kind":{"official":{"samples":10,"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":"e0960afdb0d64aa7","entry":"warmup_linear","repo":"utahnlp/consistency","repo_kind":"official","path":"bert_adam.py","file_url":"https://github.com/utahnlp/consistency/blob/HEAD/bert_adam.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e0960afdb0d64aa7"}},{"code_sha256_prefix":"123846fe86b24e7f","entry":"get_confusion_matrix","repo":"utahnlp/consistency","repo_kind":"official","path":"confusion_table.py","file_url":"https://github.com/utahnlp/consistency/blob/HEAD/confusion_table.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"123846fe86b24e7f"}},{"code_sha256_prefix":"7e87c334bb7df236","entry":"get_confusion_ratio","repo":"utahnlp/consistency","repo_kind":"official","path":"confusion_table.py","file_url":"https://github.com/utahnlp/consistency/blob/HEAD/confusion_table.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7e87c334bb7df236"}},{"code_sha256_prefix":"02f680c0cdae0af1","entry":"get_glove_words","repo":"utahnlp/consistency","repo_kind":"official","path":"extra_preprocess.py","file_url":"https://github.com/utahnlp/consistency/blob/HEAD/extra_preprocess.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"02f680c0cdae0af1"}},{"code_sha256_prefix":"9cd88edf7b072d2d","entry":"load","repo":"utahnlp/consistency","repo_kind":"official","path":"confusion_table.py","file_url":"https://github.com/utahnlp/consistency/blob/HEAD/confusion_table.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9cd88edf7b072d2d"}},{"code_sha256_prefix":"34fb8d968db79ca7","entry":"load_pipeline","repo":"utahnlp/consistency","repo_kind":"official","path":"cache_bert_batch.py","file_url":"https://github.com/utahnlp/consistency/blob/HEAD/cache_bert_batch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"34fb8d968db79ca7"}},{"code_sha256_prefix":"05c8b6f42e3dc2fb","entry":"make_vocab","repo":"utahnlp/consistency","repo_kind":"official","path":"extra_preprocess.py","file_url":"https://github.com/utahnlp/consistency/blob/HEAD/extra_preprocess.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"05c8b6f42e3dc2fb"}},{"code_sha256_prefix":"da8e4408c385c601","entry":"pad","repo":"utahnlp/consistency","repo_kind":"official","path":"extra_preprocess.py","file_url":"https://github.com/utahnlp/consistency/blob/HEAD/extra_preprocess.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"da8e4408c385c601"}},{"code_sha256_prefix":"59e4e730a9dc5dc6","entry":"warmup_constant","repo":"utahnlp/consistency","repo_kind":"official","path":"bert_adam.py","file_url":"https://github.com/utahnlp/consistency/blob/HEAD/bert_adam.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"59e4e730a9dc5dc6"}},{"code_sha256_prefix":"35f7cddf90dd05d4","entry":"warmup_cosine","repo":"utahnlp/consistency","repo_kind":"official","path":"bert_adam.py","file_url":"https://github.com/utahnlp/consistency/blob/HEAD/bert_adam.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"35f7cddf90dd05d4"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}