Skip to main content
QUICK REVIEW

[Paper Review] HiddenCut: Simple Data Augmentation for Natural Language Understanding with Better Generalization

Jiaao Chen, Dinghan Shen|arXiv (Cornell University)|May 31, 2021
Topic ModelingComputer Science57 references5 citations
TL;DR

HiddenCut is a simple yet effective data augmentation method that improves generalization in pre-trained language models by dynamically masking contiguous spans of hidden representations using an attention-based strategy. It outperforms state-of-the-art methods on GLUE benchmarks and shows superior robustness on out-of-distribution and counterfactual examples by encouraging models to rely on broader, more task-relevant features rather than spurious patterns.

ABSTRACT

Fine-tuning large pre-trained models with task-specific data has achieved great success in NLP. However, it has been demonstrated that the majority of information within the self-attention networks is redundant and not utilized effectively during the fine-tuning stage. This leads to inferior results when generalizing the obtained models to out-of-domain distributions. To this end, we propose a simple yet effective data augmentation technique, HiddenCut, to better regularize the model and encourage it to learn more generalizable features. Specifically, contiguous spans within the hidden space are dynamically and strategically dropped during training. Experiments show that our HiddenCut method outperforms the state-of-the-art augmentation methods on the GLUE benchmark, and consistently exhibits superior generalization performances on out-of-distribution and challenging counterexamples. We have publicly released our code at https://github.com/GT-SALT/HiddenCut.

Motivation & Objective

  • To address the poor generalization of fine-tuned pre-trained language models on out-of-distribution data due to overfitting on spurious patterns.
  • To improve model robustness by regularizing hidden representations during fine-tuning without relying on costly data collection or complex perturbations.
  • To develop a data augmentation technique that strategically masks contiguous spans in the hidden space, preserving linguistic coherence while reducing redundancy.
  • To demonstrate that masking structured spans in the hidden space leads to better feature learning and improved generalization compared to random or input-space dropout.
  • To provide an efficient, parameter-free regularization method that enhances model performance across diverse NLU tasks.

Proposed method

  • HiddenCut masks contiguous spans of hidden representations in the transformer's feed-forward layers after each encoding layer, rather than at the input or via random dropout.
  • It uses an attention-based mechanism to identify and prioritize informative spans for masking, ensuring strategic rather than random removal of hidden units.
  • The method dynamically selects spans based on attention scores, promoting diversity and adaptivity in the masking process.
  • A Jensen-Shannon Divergence (JSD) consistency regularization is applied between the original and augmented forward passes to preserve label consistency.
  • The masking ratio is controlled by a hyperparameter α, which determines the length of spans to drop, and a sampling ratio β, which controls the size of the candidate set.
  • The approach is applied during fine-tuning and does not require additional model parameters or training data.

Experimental results

Research questions

  • RQ1Can masking contiguous spans in the hidden space improve model generalization beyond random dropout and input-space augmentation?
  • RQ2Does an attention-based strategy for selecting spans to mask lead to better performance and robustness than random or uniform masking?
  • RQ3How does HiddenCut compare to state-of-the-art data augmentation methods on in-distribution and out-of-distribution NLU benchmarks?
  • RQ4What is the optimal trade-off between masking intensity (controlled by α) and model performance?
  • RQ5How does HiddenCut affect attention distribution and model reliance on specific tokens?

Key findings

  • HiddenCut outperforms state-of-the-art data augmentation methods on the GLUE benchmark, achieving SOTA results across 8 natural language understanding tasks.
  • On out-of-distribution and challenging counterfactual examples, HiddenCut consistently improves generalization, especially in cases where models fail due to reliance on spurious cues.
  • The best performance on MNLI was achieved with α = 0.1, indicating that moderate perturbation is optimal—higher α values degrade performance due to excessive noise.
  • On SST-2, the optimal sampling ratio β = 0.4 yielded the highest accuracy (95.76%), showing a balance between diversity and efficiency in span selection.
  • Visualization of attention weights revealed that HiddenCut leads to more uniform attention distributions, reducing over-reliance on high-attention tokens like '8 stars' or 'intriguing'.
  • The Jensen-Shannon Divergence regularization helped maintain prediction consistency between original and augmented examples, improving robustness.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.