{"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/can-explanations-be-useful-for-calibrating","title":"Can Explanations Be Useful for Calibrating Black Box Models?","arxiv_id":"2110.07586","date":"2021-10-14","proceeding":"ACL 2022 5","authors":["Xi Ye","Greg Durrett"],"abstract":"NLP practitioners often want to take existing trained models and apply them to data from new domains. While fine-tuning or few-shot learning can be used to adapt a base model, there is no single recipe for making these techniques work; moreover, one may not have access to the original model weights if it is deployed as a black box. We study how to improve a black box model's performance on a new domain by leveraging explanations of the model's behavior. Our approach first extracts a set of features combining human intuition about the task with model attributions generated by black box interpretation techniques, then uses a simple calibrator, in the form of a classifier, to predict whether the base model was correct or not. We experiment with our method on two tasks, extractive question answering and natural language inference, covering adaptation from several pairs of domains with limited target-domain data. The experimental results across all the domain pairs show that explanations are useful for calibrating these models, boosting accuracy when predictions do not have to be returned on every example. We further show that the calibration model transfers to some extent between tasks.","url_abs":"https://arxiv.org/abs/2110.07586v2","url_pdf":"https://arxiv.org/pdf/2110.07586v2.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":"can-explanations-be-useful-for-calibrating","repo_url":"https://github.com/xiye17/interpcalib","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"can-explanations-be-useful-for-calibrating","repo_url":"https://github.com/yangalan123/amortized-interpretability","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"extractive-question-answering","task_name":"Extractive Question-Answering"},{"task_slug":"few-shot-learning","task_name":"Few-Shot Learning"},{"task_slug":"natural-language-inference","task_name":"Natural Language Inference"},{"task_slug":"question-answering","task_name":"Question Answering"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2110.07586","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2110.07586"}},"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/yangalan123/amortized-interpretability","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xiye17/interpcalib","reach":{"status":"ok"}}],"summary":{"unverified":4},"by_repo_kind":{"listed":{"samples":4,"ran":0,"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":"793595b3e8a6d5e3","entry":"GetParser","repo":"yangalan123/amortized-interpretability","repo_kind":"listed","path":"config.py","file_url":"https://github.com/yangalan123/amortized-interpretability/blob/HEAD/config.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":"793595b3e8a6d5e3"}},{"code_sha256_prefix":"96f99dd13b447c11","entry":"get_cmap","repo":"yangalan123/amortized-interpretability","repo_kind":"listed","path":"draw_feature_selection.py","file_url":"https://github.com/yangalan123/amortized-interpretability/blob/HEAD/draw_feature_selection.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":"96f99dd13b447c11"}},{"code_sha256_prefix":"c8bb475a505f31ee","entry":"running_step","repo":"yangalan123/amortized-interpretability","repo_kind":"listed","path":"export_model_output_as_thermostat.py","file_url":"https://github.com/yangalan123/amortized-interpretability/blob/HEAD/export_model_output_as_thermostat.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":"c8bb475a505f31ee"}},{"code_sha256_prefix":"cffc181b5e75225d","entry":"sort_by_file_size","repo":"yangalan123/amortized-interpretability","repo_kind":"listed","path":"cross_gt_correlation.py","file_url":"https://github.com/yangalan123/amortized-interpretability/blob/HEAD/cross_gt_correlation.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":"cffc181b5e75225d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}