{"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/learning-to-abstract-with-nonparametric","title":"Learning to Abstract with Nonparametric Variational Information Bottleneck","arxiv_id":"2310.17284","date":"2023-10-26","proceeding":null,"authors":["Melika Behjati","Fabio Fehr","James Henderson"],"abstract":"Learned representations at the level of characters, sub-words, words and sentences, have each contributed to advances in understanding different NLP tasks and linguistic phenomena. However, learning textual embeddings is costly as they are tokenization specific and require different models to be trained for each level of abstraction. We introduce a novel language representation model which can learn to compress to different levels of abstraction at different layers of the same model. We apply Nonparametric Variational Information Bottleneck (NVIB) to stacked Transformer self-attention layers in the encoder, which encourages an information-theoretic compression of the representations through the model. We find that the layers within the model correspond to increasing levels of abstraction and that their representations are more linguistically informed. Finally, we show that NVIB compression results in a model which is more robust to adversarial perturbations.","url_abs":"https://arxiv.org/abs/2310.17284v1","url_pdf":"https://arxiv.org/pdf/2310.17284v1.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":"learning-to-abstract-with-nonparametric","repo_url":"https://github.com/idiap/nvib","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"learning-to-abstract-with-nonparametric","repo_url":"https://github.com/idiap/nvib_selfattention","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.17284","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.17284"}},"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/idiap/nvib","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/idiap/nvib_selfattention","reach":{"status":"ok"}}],"summary":{"ran":8,"ran_draft_wrong":2,"unverified":5},"by_repo_kind":{"official":{"samples":15,"ran":10,"repositories":2}},"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":15,"samples":[{"code_sha256_prefix":"982ae125a7550202","entry":"biased_scaled_dot_product_attention","repo":"idiap/nvib_selfattention","repo_kind":"official","path":"models/biased_multihead_attention.py","file_url":"https://github.com/idiap/nvib_selfattention/blob/HEAD/models/biased_multihead_attention.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":"982ae125a7550202"}},{"code_sha256_prefix":"4a8885668b0d4d82","entry":"eye_scaled_","repo":"idiap/nvib","repo_kind":"official","path":"nvib/nvib_layer.py","file_url":"https://github.com/idiap/nvib/blob/HEAD/nvib/nvib_layer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4a8885668b0d4d82"}},{"code_sha256_prefix":"c745d49aa41976a5","entry":"group_from_indecies","repo":"idiap/nvib_selfattention","repo_kind":"official","path":"data_modules/DataCollatorForSeq2SeqWithNoise.py","file_url":"https://github.com/idiap/nvib_selfattention/blob/HEAD/data_modules/DataCollatorForSeq2SeqWithNoise.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":"c745d49aa41976a5"}},{"code_sha256_prefix":"f801d580dcf9f64b","entry":"init_vector_","repo":"idiap/nvib","repo_kind":"official","path":"nvib/nvib_layer.py","file_url":"https://github.com/idiap/nvib/blob/HEAD/nvib/nvib_layer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f801d580dcf9f64b"}},{"code_sha256_prefix":"873acdf283363ca7","entry":"load_arxiv","repo":"idiap/nvib_selfattention","repo_kind":"official","path":"data_modules/ArxivDataModule.py","file_url":"https://github.com/idiap/nvib_selfattention/blob/HEAD/data_modules/ArxivDataModule.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":"873acdf283363ca7"}},{"code_sha256_prefix":"c40d8b23f77db6be","entry":"prepare_tokenization","repo":"idiap/nvib_selfattention","repo_kind":"official","path":"data_modules/PlotReconstructionDataModule.py","file_url":"https://github.com/idiap/nvib_selfattention/blob/HEAD/data_modules/PlotReconstructionDataModule.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":"c40d8b23f77db6be"}},{"code_sha256_prefix":"e2a2369f2cb401a7","entry":"process_dataset","repo":"idiap/nvib_selfattention","repo_kind":"official","path":"data_modules/ArxivDataModule.py","file_url":"https://github.com/idiap/nvib_selfattention/blob/HEAD/data_modules/ArxivDataModule.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":"e2a2369f2cb401a7"}},{"code_sha256_prefix":"2c6d88e3f4e079ca","entry":"process_dataset","repo":"idiap/nvib_selfattention","repo_kind":"official","path":"data_modules/SentEvalDataModule.py","file_url":"https://github.com/idiap/nvib_selfattention/blob/HEAD/data_modules/SentEvalDataModule.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":"2c6d88e3f4e079ca"}},{"code_sha256_prefix":"be591d63895a1a8b","entry":"token_deletion","repo":"idiap/nvib_selfattention","repo_kind":"official","path":"data_modules/DataCollatorForSeq2SeqWithNoise.py","file_url":"https://github.com/idiap/nvib_selfattention/blob/HEAD/data_modules/DataCollatorForSeq2SeqWithNoise.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":"be591d63895a1a8b"}},{"code_sha256_prefix":"1c12dadce304c1a1","entry":"word_span_deletion","repo":"idiap/nvib_selfattention","repo_kind":"official","path":"data_modules/DataCollatorForSeq2SeqWithNoise.py","file_url":"https://github.com/idiap/nvib_selfattention/blob/HEAD/data_modules/DataCollatorForSeq2SeqWithNoise.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":"1c12dadce304c1a1"}},{"code_sha256_prefix":"564d5d41b1288adb","entry":"biased_multi_head_attention_forward","repo":"idiap/nvib_selfattention","repo_kind":"official","path":"models/biased_multihead_attention.py","file_url":"https://github.com/idiap/nvib_selfattention/blob/HEAD/models/biased_multihead_attention.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"564d5d41b1288adb"}},{"code_sha256_prefix":"e17a24d2ba03c883","entry":"load_senteval","repo":"idiap/nvib_selfattention","repo_kind":"official","path":"data_modules/SentEvalDataModule.py","file_url":"https://github.com/idiap/nvib_selfattention/blob/HEAD/data_modules/SentEvalDataModule.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e17a24d2ba03c883"}},{"code_sha256_prefix":"b8d6639f6be54aa3","entry":"prepare_tokenization","repo":"idiap/nvib_selfattention","repo_kind":"official","path":"data_modules/ArxivDataModule.py","file_url":"https://github.com/idiap/nvib_selfattention/blob/HEAD/data_modules/ArxivDataModule.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b8d6639f6be54aa3"}},{"code_sha256_prefix":"7597f9be3e9c4988","entry":"prepare_tokenization","repo":"idiap/nvib_selfattention","repo_kind":"official","path":"data_modules/ReconstructionDataModule.py","file_url":"https://github.com/idiap/nvib_selfattention/blob/HEAD/data_modules/ReconstructionDataModule.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7597f9be3e9c4988"}},{"code_sha256_prefix":"22f06b2223cfc27d","entry":"prepare_tokenization","repo":"idiap/nvib_selfattention","repo_kind":"official","path":"data_modules/SentEvalDataModule.py","file_url":"https://github.com/idiap/nvib_selfattention/blob/HEAD/data_modules/SentEvalDataModule.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"22f06b2223cfc27d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}