Lune

EMNLP2021Top-tier venue

Disentangling Representations of Text by Masking Transformers

Xiongyi Zhang, Jan-Willem van de Meent, Byron C. Wallace

Abstract

Representations from large pretrained models such as BERT encode a range of features into monolithic vectors, affording strong predictive accuracy across a range of downstream tasks. In this paper we explore whether it is possible to learn disentangled representations by identifying existing subnetworks within pretrained models that encode distinct, complementary aspects. Concretely, we learn binary masks over transformer weights or hidden units to uncover subsets of features that correlate with a specific factor of variation; this eliminates the need to train a disentangled model from scratch for a particular task. We evaluate this method with respect to its ability to disentangle representations of sentiment from genre in movie reviews, toxicity from dialect in Tweets, and syntax from semantics. By combining masking with magnitude pruning we find that we can identify sparse subnetworks within BERT that strongly encode particular aspects (e.g., semantics) while only weakly encoding others (e.g., syntax). Moreover, despite only learning masks, disentanglement-via-masking performs as well as -and often better thanpreviously proposed methods based on variational autoencoders and adversarial training.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

7 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Discovering Knowledge-Critical Subnetworks in Pretrained Language Models cites Masking as an Efficient Alternative to Finetuning for Pretrained Language Models
  • Masking as an Efficient Alternative to Finetuning for Pretrained Language Models cites The Lottery Ticket Hypothesis for Pre-trained BERT Networks
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  1. Removing Spurious Concepts from Neural Network Representations via Joint Subspace EstimationFloris Holstege, Bram Wouters, Noud P. A. van Giersbergen, Cees G. H. DiksICML 2024 · 3 citations
  2. Discovering Knowledge-Critical Subnetworks in Pretrained Language ModelsDeniz Bayazit, Negar Foroutan, Zeming Chen, Gail Weiss et al.EMNLP 2024 · 3 citations
  3. Transformers learn factored representationsAdam Shai, Loren Amdahl-Culleton, Casper Christensen, Henry R Bigelow et al.ICML 2026 · 2 citations
  4. Mitigate Extrinsic Social Bias in Pre-trained Language Models via Continuous Prompts AdjustmentYiwei Dai, Hengrui Gu, Ying Wang, Xin WangEMNLP 2024 · 1 citation
  5. Mitigating Confounding in Speech-Based Dementia Detection through Weight MaskingZhecheng Sheng, Xiruo Ding, Brian Hur, Changye Li et al.ACL 2025 · 1 citation

Builds on3

  1. Learning The Difference That Makes A Difference With Counterfactually-Augmented DataDivyansh Kaushik, Eduard H. Hovy, Zachary Chase LiptonICLR 2020 · 625 citations
  2. The Lottery Ticket Hypothesis for Pre-trained BERT NetworksTianlong Chen, Jonathan Frankle, Shiyu Chang, Sijia Liu et al.NeurIPS 2020 · 428 citations
  3. Masking as an Efficient Alternative to Finetuning for Pretrained Language ModelsMengjie Zhao, Tao Lin, Fei Mi, Martin Jaggi et al.EMNLP 2020 · 61 citations

Related papers

  1. When BERT Plays the Lottery, All Tickets Are WinningSai Prasanna, Anna Rogers, Anna RumshiskyEMNLP 2020 · 114 citations
  2. From BERT's Point of View: Revealing the Prevailing Contextual DifferencesCarolin Schuster, Simon HegelichACL Findings 2022 · 4 citations
  3. A Deep Decomposable Model for Disentangling Syntax and Semantics in Sentence RepresentationDingcheng Li, Hongliang Fei, Shaogang Ren, Ping LiEMNLP Findings 2021 · 4 citations
  4. Exploring the Role of BERT Token Representations to Explain Sentence Probing ResultsHosein Mohebbi, Ali Modarressi, Mohammad Taher PilehvarEMNLP 2021 · 14 citations
  5. Input-specific Attention Subnetworks for Adversarial DetectionEmil Biju, Anirudh Sriram, Pratyush Kumar, Mitesh M. KhapraACL Findings 2022 · 5 citations
Dusk over the sea between two cliffs drawn in fine vertical lines