{"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/infobert-improving-robustness-of-language-1","title":"InfoBERT: Improving Robustness of Language Models from An Information Theoretic Perspective","arxiv_id":"2010.02329","date":"2020-10-05","proceeding":"ICLR 2021 1","authors":["Boxin Wang","Shuohang Wang","Yu Cheng","Zhe Gan","Ruoxi Jia","Bo Li","Jingjing Liu"],"abstract":"Large-scale language models such as BERT have achieved state-of-the-art performance across a wide range of NLP tasks. Recent studies, however, show that such BERT-based models are vulnerable facing the threats of textual adversarial attacks. We aim to address this problem from an information-theoretic perspective, and propose InfoBERT, a novel learning framework for robust fine-tuning of pre-trained language models. InfoBERT contains two mutual-information-based regularizers for model training: (i) an Information Bottleneck regularizer, which suppresses noisy mutual information between the input and the feature representation; and (ii) a Robust Feature regularizer, which increases the mutual information between local robust features and global features. We provide a principled way to theoretically analyze and improve the robustness of representation learning for language models in both standard and adversarial training. Extensive experiments demonstrate that InfoBERT achieves state-of-the-art robust accuracy over several adversarial datasets on Natural Language Inference (NLI) and Question Answering (QA) tasks. Our code is available at https://github.com/AI-secure/InfoBERT.","url_abs":"https://arxiv.org/abs/2010.02329v4","url_pdf":"https://arxiv.org/pdf/2010.02329v4.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":"infobert-improving-robustness-of-language-1","repo_url":"https://github.com/AI-secure/InfoBERT","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"infobert-improving-robustness-of-language-1","repo_url":"https://github.com/facebookresearch/anli","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"natural-language-inference","task_name":"Natural Language Inference"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bert","method_name":"BERT"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-linear-decay","method_name":"Linear Warmup With Linear Decay"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"weight-decay","method_name":"Weight Decay"},{"method_slug":"wordpiece","method_name":"WordPiece"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/natural-language-inference-on-anli-test","task":"Natural Language Inference","dataset":"ANLI test","model":"InfoBERT (RoBERTa)","rank_in_archive_order":3,"of":25,"metrics":{"A1":"75","A2":"50.5","A3":"47.7"},"uses_additional_data":true}],"syntology":{"syntology_url":"https://syntology.ai/paper/2010.02329","atlas_url":"https://app.syntology.ai/?focus=2010.02329","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2010.02329"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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":"deterministic:regex_extraction","url":"https://github.com/AI-secure/InfoBERT","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/facebookresearch/anli","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"ran_draft_wrong":1,"ran":1,"ran_honours":2},"by_repo_kind":{"official":{"samples":4,"ran":4,"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":4,"samples":[{"code_sha256_prefix":"9df40357afea56cc","entry":"to_list","repo":"AI-secure/InfoBERT","repo_kind":"official","path":"SQuAD/run_squad.py","file_url":"https://github.com/AI-secure/InfoBERT/blob/HEAD/SQuAD/run_squad.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9df40357afea56cc"}},{"code_sha256_prefix":"0677f60187926dc2","entry":"CLUB","repo":"AI-secure/InfoBERT","repo_kind":"official","path":"ANLI/MI_estimators.py","file_url":"https://github.com/AI-secure/InfoBERT/blob/HEAD/ANLI/MI_estimators.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0677f60187926dc2"}},{"code_sha256_prefix":"8b49ab566521ed67","entry":"get_seq_len","repo":"AI-secure/InfoBERT","repo_kind":"official","path":"SQuAD/run_squad.py","file_url":"https://github.com/AI-secure/InfoBERT/blob/HEAD/SQuAD/run_squad.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8b49ab566521ed67"}},{"code_sha256_prefix":"60a6e1f74f5738cb","entry":"train_mi_upper_estimator","repo":"AI-secure/InfoBERT","repo_kind":"official","path":"SQuAD/run_squad.py","file_url":"https://github.com/AI-secure/InfoBERT/blob/HEAD/SQuAD/run_squad.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"60a6e1f74f5738cb"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}