{"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/quantifying-the-plausibility-of-context","title":"Quantifying the Plausibility of Context Reliance in Neural Machine Translation","arxiv_id":"2310.01188","date":"2023-10-02","proceeding":null,"authors":["Gabriele Sarti","Grzegorz Chrupała","Malvina Nissim","Arianna Bisazza"],"abstract":"Establishing whether language models can use contextual information in a human-plausible way is important to ensure their trustworthiness in real-world settings. However, the questions of when and which parts of the context affect model generations are typically tackled separately, with current plausibility evaluations being practically limited to a handful of artificial benchmarks. To address this, we introduce Plausibility Evaluation of Context Reliance (PECoRe), an end-to-end interpretability framework designed to quantify context usage in language models' generations. Our approach leverages model internals to (i) contrastively identify context-sensitive target tokens in generated texts and (ii) link them to contextual cues justifying their prediction. We use \\pecore to quantify the plausibility of context-aware machine translation models, comparing model rationales with human annotations across several discourse-level phenomena. Finally, we apply our method to unannotated model translations to identify context-mediated predictions and highlight instances of (im)plausible context usage throughout generation.","url_abs":"https://arxiv.org/abs/2310.01188v2","url_pdf":"https://arxiv.org/pdf/2310.01188v2.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":"quantifying-the-plausibility-of-context","repo_url":"https://github.com/inseq-team/inseq","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"quantifying-the-plausibility-of-context","repo_url":"https://github.com/gsarti/pecore","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"quantifying-the-plausibility-of-context","repo_url":"https://github.com/rachtibat/lrp-explains-transformers","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"quantifying-the-plausibility-of-context","repo_url":"https://github.com/rachtibat/lrp-for-transformers","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"machine-translation","task_name":"Machine Translation"},{"task_slug":"translation","task_name":"Translation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2310.01188","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.01188"}},"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/inseq-team/inseq","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/rachtibat/lrp-for-transformers","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/rachtibat/lrp-explains-transformers","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gsarti/pecore","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":9,"ran_draft_wrong":1,"unverified":3},"by_repo_kind":{"official":{"samples":11,"ran":8,"repositories":2},"listed":{"samples":2,"ran":2,"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":2,"samples":[{"code_sha256_prefix":"0ace5674b058777d","entry":"conf_bounds","repo":"gsarti/pecore","repo_kind":"official","path":"pecore/analysis_utils.py","file_url":"https://github.com/gsarti/pecore/blob/HEAD/pecore/analysis_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0ace5674b058777d"}},{"code_sha256_prefix":"4b04c5d178561f3d","entry":"conservation_check_wrap","repo":"rachtibat/lrp-explains-transformers","repo_kind":"listed","path":"lxt/explicit/functional.py","file_url":"https://github.com/rachtibat/lrp-explains-transformers/blob/HEAD/lxt/explicit/functional.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"4b04c5d178561f3d"}},{"code_sha256_prefix":"b91f1cf1920ad068","entry":"dot","repo":"gsarti/pecore","repo_kind":"official","path":"pecore/analysis_utils.py","file_url":"https://github.com/gsarti/pecore/blob/HEAD/pecore/analysis_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b91f1cf1920ad068"}},{"code_sha256_prefix":"056c5d571f8a92ac","entry":"encode_examples","repo":"gsarti/pecore","repo_kind":"official","path":"pecore/model_utils.py","file_url":"https://github.com/gsarti/pecore/blob/HEAD/pecore/model_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"056c5d571f8a92ac"}},{"code_sha256_prefix":"c6fbb96c23b6b25f","entry":"get_match_from_contrastive_pair","repo":"gsarti/pecore","repo_kind":"official","path":"pecore/alignment_utils.py","file_url":"https://github.com/gsarti/pecore/blob/HEAD/pecore/alignment_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c6fbb96c23b6b25f"}},{"code_sha256_prefix":"855db51138564171","entry":"get_model_id","repo":"gsarti/pecore","repo_kind":"official","path":"pecore/model_utils.py","file_url":"https://github.com/gsarti/pecore/blob/HEAD/pecore/model_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"855db51138564171"}},{"code_sha256_prefix":"d8eaed17dffaccf9","entry":"get_model_name","repo":"gsarti/pecore","repo_kind":"official","path":"pecore/model_utils.py","file_url":"https://github.com/gsarti/pecore/blob/HEAD/pecore/model_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d8eaed17dffaccf9"}},{"code_sha256_prefix":"4ff702e65ddf0941","entry":"mrr","repo":"gsarti/pecore","repo_kind":"official","path":"pecore/analysis_utils.py","file_url":"https://github.com/gsarti/pecore/blob/HEAD/pecore/analysis_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4ff702e65ddf0941"}},{"code_sha256_prefix":"5bacd40145b1bc65","entry":"softmax_fn","repo":"rachtibat/lrp-explains-transformers","repo_kind":"listed","path":"lxt/explicit/functional.py","file_url":"https://github.com/rachtibat/lrp-explains-transformers/blob/HEAD/lxt/explicit/functional.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"5bacd40145b1bc65"}},{"code_sha256_prefix":"2815c122de006aab","entry":"tokenize_words","repo":"gsarti/pecore","repo_kind":"official","path":"pecore/alignment_utils.py","file_url":"https://github.com/gsarti/pecore/blob/HEAD/pecore/alignment_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2815c122de006aab"}},{"code_sha256_prefix":"4dd6c5ffdb165126","entry":"check_attribute_positions","repo":"inseq-team/inseq","repo_kind":"official","path":"inseq/attr/feat/attribution_utils.py","file_url":"https://github.com/inseq-team/inseq/blob/HEAD/inseq/attr/feat/attribution_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4dd6c5ffdb165126"}},{"code_sha256_prefix":"2948f24003a1918c","entry":"get_src_ref_sentences","repo":"gsarti/pecore","repo_kind":"official","path":"pecore/data_utils.py","file_url":"https://github.com/gsarti/pecore/blob/HEAD/pecore/data_utils.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":"2948f24003a1918c"}},{"code_sha256_prefix":"01efe19adc8853c2","entry":"load_mt_dataset","repo":"gsarti/pecore","repo_kind":"official","path":"pecore/data_utils.py","file_url":"https://github.com/gsarti/pecore/blob/HEAD/pecore/data_utils.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":"01efe19adc8853c2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}