{"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/introspective-distillation-for-robust","title":"Introspective Distillation for Robust Question Answering","arxiv_id":"2111.01026","date":"2021-11-01","proceeding":"NeurIPS 2021 12","authors":["Yulei Niu","Hanwang Zhang"],"abstract":"Question answering (QA) models are well-known to exploit data bias, e.g., the language prior in visual QA and the position bias in reading comprehension. Recent debiasing methods achieve good out-of-distribution (OOD) generalizability with a considerable sacrifice of the in-distribution (ID) performance. Therefore, they are only applicable in domains where the test distribution is known in advance. In this paper, we present a novel debiasing method called Introspective Distillation (IntroD) to make the best of both worlds for QA. Our key technical contribution is to blend the inductive bias of OOD and ID by introspecting whether a training sample fits in the factual ID world or the counterfactual OOD one. Experiments on visual QA datasets VQA v2, VQA-CP, and reading comprehension dataset SQuAD demonstrate that our proposed IntroD maintains the competitive OOD performance compared to other debiasing methods, while sacrificing little or even achieving better ID performance compared to the non-debiasing ones.","url_abs":"https://arxiv.org/abs/2111.01026v1","url_pdf":"https://arxiv.org/pdf/2111.01026v1.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":"introspective-distillation-for-robust","repo_url":"https://github.com/yuleiniu/introd","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"inductive-bias","task_name":"Inductive Bias"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"reading-comprehension","task_name":"Reading Comprehension"},{"task_slug":"visual-question-answering","task_name":"Visual Question Answering (VQA)"},{"task_slug":null,"task_name":"counterfactual"}],"methods":[{"method_slug":"test","method_name":"Test"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2111.01026","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2111.01026"}},"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/yuleiniu/introd","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_draft_wrong":3,"unverified":4},"by_repo_kind":{"official":{"samples":7,"ran":3,"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":"4bd23f3562cfbd1c","entry":"elementwise_logsumexp","repo":"yuleiniu/introd","repo_kind":"official","path":"css/vqa_debias_loss_functions.py","file_url":"https://github.com/yuleiniu/introd/blob/HEAD/css/vqa_debias_loss_functions.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":"4bd23f3562cfbd1c"}},{"code_sha256_prefix":"0e2c50fe59debfb7","entry":"convert_sigmoid_logits_to_binary_logprobs","repo":"yuleiniu/introd","repo_kind":"official","path":"css/vqa_debias_loss_functions.py","file_url":"https://github.com/yuleiniu/introd/blob/HEAD/css/vqa_debias_loss_functions.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0e2c50fe59debfb7"}},{"code_sha256_prefix":"21690a7e909f0f41","entry":"renormalize_binary_logits","repo":"yuleiniu/introd","repo_kind":"official","path":"css/vqa_debias_loss_functions.py","file_url":"https://github.com/yuleiniu/introd/blob/HEAD/css/vqa_debias_loss_functions.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"21690a7e909f0f41"}},{"code_sha256_prefix":"b0c03ea63e761316","entry":"compute_score_with_logits","repo":"yuleiniu/introd","repo_kind":"official","path":"css/train_introd.py","file_url":"https://github.com/yuleiniu/introd/blob/HEAD/css/train_introd.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":"b0c03ea63e761316"}},{"code_sha256_prefix":"0a0886422bf580b6","entry":"evaluate","repo":"yuleiniu/introd","repo_kind":"official","path":"css/train_introd.py","file_url":"https://github.com/yuleiniu/introd/blob/HEAD/css/train_introd.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":"0a0886422bf580b6"}},{"code_sha256_prefix":"8c1252eacab71602","entry":"load_folder","repo":"yuleiniu/introd","repo_kind":"official","path":"css/utils.py","file_url":"https://github.com/yuleiniu/introd/blob/HEAD/css/utils.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":"8c1252eacab71602"}},{"code_sha256_prefix":"f7c124aefa1d760f","entry":"mask_softmax","repo":"yuleiniu/introd","repo_kind":"official","path":"css/base_model_introd.py","file_url":"https://github.com/yuleiniu/introd/blob/HEAD/css/base_model_introd.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":"f7c124aefa1d760f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}