{"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/contractnli-a-dataset-for-document-level","title":"ContractNLI: A Dataset for Document-level Natural Language Inference for Contracts","arxiv_id":"2110.01799","date":"2021-10-05","proceeding":"Findings (EMNLP) 2021 11","authors":["Yuta Koreeda","Christopher D. Manning"],"abstract":"Reviewing contracts is a time-consuming procedure that incurs large expenses to companies and social inequality to those who cannot afford it. In this work, we propose \"document-level natural language inference (NLI) for contracts\", a novel, real-world application of NLI that addresses such problems. In this task, a system is given a set of hypotheses (such as \"Some obligations of Agreement may survive termination.\") and a contract, and it is asked to classify whether each hypothesis is \"entailed by\", \"contradicting to\" or \"not mentioned by\" (neutral to) the contract as well as identifying \"evidence\" for the decision as spans in the contract. We annotated and release the largest corpus to date consisting of 607 annotated contracts. We then show that existing models fail badly on our task and introduce a strong baseline, which (1) models evidence identification as multi-label classification over spans instead of trying to predict start and end tokens, and (2) employs more sophisticated context segmentation for dealing with long documents. We also show that linguistic characteristics of contracts, such as negations by exceptions, are contributing to the difficulty of this task and that there is much room for improvement.","url_abs":"https://arxiv.org/abs/2110.01799v1","url_pdf":"https://arxiv.org/pdf/2110.01799v1.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":"contractnli-a-dataset-for-document-level","repo_url":"https://github.com/stanfordnlp/contract-nli-bert","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"multi-label-classification-2","task_name":"MUlTI-LABEL-ClASSIFICATION"},{"task_slug":"multi-label-classification","task_name":"Multi-Label Classification"},{"task_slug":"natural-language-inference","task_name":"Natural Language Inference"}],"methods":[],"datasets_introduced":[{"slug":"contractnli","name":"ContractNLI","full_name":""}],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2110.01799","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2110.01799"}},"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/stanfordnlp/contract-nli-bert","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_draft_wrong":1,"unverified":7},"by_repo_kind":{"official":{"samples":8,"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":"9df40357afea56cc","entry":"to_list","repo":"stanfordnlp/contract-nli-bert","repo_kind":"official","path":"contract_nli/predictor.py","file_url":"https://github.com/stanfordnlp/contract-nli-bert/blob/HEAD/contract_nli/predictor.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9df40357afea56cc"}},{"code_sha256_prefix":"d082a08f956f9efe","entry":"classification_converter","repo":"stanfordnlp/contract-nli-bert","repo_kind":"official","path":"contract_nli/batch_converter.py","file_url":"https://github.com/stanfordnlp/contract-nli-bert/blob/HEAD/contract_nli/batch_converter.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":"d082a08f956f9efe"}},{"code_sha256_prefix":"fdba9f2f38cf8b95","entry":"evaluate_predicted_spans","repo":"stanfordnlp/contract-nli-bert","repo_kind":"official","path":"contract_nli/evaluation.py","file_url":"https://github.com/stanfordnlp/contract-nli-bert/blob/HEAD/contract_nli/evaluation.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":"fdba9f2f38cf8b95"}},{"code_sha256_prefix":"f6fc4ca1b76f30d2","entry":"evaluate_spans","repo":"stanfordnlp/contract-nli-bert","repo_kind":"official","path":"contract_nli/evaluation.py","file_url":"https://github.com/stanfordnlp/contract-nli-bert/blob/HEAD/contract_nli/evaluation.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":"f6fc4ca1b76f30d2"}},{"code_sha256_prefix":"7b1144335117a3da","entry":"identification_classification_converter","repo":"stanfordnlp/contract-nli-bert","repo_kind":"official","path":"contract_nli/batch_converter.py","file_url":"https://github.com/stanfordnlp/contract-nli-bert/blob/HEAD/contract_nli/batch_converter.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":"7b1144335117a3da"}},{"code_sha256_prefix":"0798376f519e92a4","entry":"load_conf","repo":"stanfordnlp/contract-nli-bert","repo_kind":"official","path":"contract_nli/conf.py","file_url":"https://github.com/stanfordnlp/contract-nli-bert/blob/HEAD/contract_nli/conf.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":"0798376f519e92a4"}},{"code_sha256_prefix":"c3291c95aa178de9","entry":"precision_at_recall","repo":"stanfordnlp/contract-nli-bert","repo_kind":"official","path":"contract_nli/evaluation.py","file_url":"https://github.com/stanfordnlp/contract-nli-bert/blob/HEAD/contract_nli/evaluation.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":"c3291c95aa178de9"}},{"code_sha256_prefix":"e6cc06f761aa91b0","entry":"tokenize","repo":"stanfordnlp/contract-nli-bert","repo_kind":"official","path":"contract_nli/dataset/encoder.py","file_url":"https://github.com/stanfordnlp/contract-nli-bert/blob/HEAD/contract_nli/dataset/encoder.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":"e6cc06f761aa91b0"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}