NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

SegMix: A Simple Structure-Aware Data Augmentation Method

Yuxin Pei, Pushkar Bhuse, Zhengzhong Liu, Eric P. XingarXiv 2023

Abstract

Interpolation-based Data Augmentation (DA) methods (Mixup) linearly interpolate the inputs and labels of two or more training examples. Mixup has more recently been adapted to the field of Natural Language Processing (NLP), mainly for sequence labeling tasks. However, such a simple adoption yields mixed or unstable improvements over the baseline models. We argue that the direct-adoption methods do not account for structures in NLP tasks. To this end, we propose SegMix, a collection of interpolation-based DA algorithms that can adapt to task-specific structures. SegMix poses fewer constraints on data structures, is robust to various hyperparameter settings, applies to more task settings, and adds little computational overhead. In the algorithm's core, we apply interpolation methods on task-specific meaningful segments, in contrast to applying them on sequences as in prior work. We find SegMix to be a flexible framework that combines rule-based DA methods with interpolation-based methods, creating interesting mixtures of DA techniques. We show that SegMix consistently improves performance over strong baseline models in Named Entity Recognition (NER) and Relation Extraction (RE) tasks, especially under data-scarce settings. Furthermore, this method is easy to implement and adds negligible training overhead.

Introduction: The Challenge of Structure in NLP Augmentation

Data augmentation is a cornerstone of modern machine learning, particularly in computer vision. However, its application to Natural Language Processing (NLP) remains challenging. A prominent technique, Mixup, generates new training instances by linearly interpolating the input embeddings and labels of two existing examples. While effective for images, applying Mixup to entire sentences often results in "word salad" and "label salad"—augmented data that lacks syntactic or semantic coherence.

For structured tasks like Named Entity Recognition (NER), mixing two different sentence structures produces augmented data with invalid label sequences. For instance, a token might end up with a label that is 40% "Person" and 60% "Location," or follow a sequence that violates the BIO (Beginning, Inside, Outside) tagging scheme. Previous research indicates that without stringent constraints, such noisy data can degrade model performance. SegMix addresses this by introducing "structure awareness," mixing only meaningful segments of a sentence while preserving the overall syntactic context.

Figure 1: Comparison of standard Sequence Mix vs. Mention Mix, highlighting how the former creates invalid label sequences.

Methodology: Segment-Level Interpolation

The core innovation of SegMix (Segment Mix) is performing linear interpolation exclusively on task-specific segments. Rather than mixing two full sequences, SegMix identifies a segment in a sentence (e.g., an entity mention) and replaces its representation with a mixture of itself and a similar segment from a pre-defined "Segment Pool."

The framework includes several specialized variants:

  • MentionMix (MMix): Interpolates at the entity mention level (e.g., mixing "New York City" with "Marcello Cuttitta").
  • TokenMix (TMix): Interpolates at the individual token level within the BIO labeling scheme.
  • SynonymMix (SMix): Combines rule-based and interpolation methods by finding a synonym (via WordNet) and interpolating the original token with its synonym.
  • RelationMix (RMix): Designed for Relation Extraction, it interpolates pairs of nominals representing a specific relationship.
Figure 2: Overview of SegMix variants: Mention Mix, Token Mix, and Relation Mix.

Technically, for a segment $s_a$ and a partner $s_b$ from the pool, SegMix computes a new embedding $e'$ and label $o'$ using a mixing ratio $\lambda$ sampled from a Beta distribution: $$e' = \lambda e_a + (1 - \lambda) e_b$$ $$o' = \lambda o_a + (1 - \lambda) o_b$$

Experimental Evaluation

The effectiveness of SegMix was evaluated across diverse datasets and tasks, including CoNLL-03 (English), GermEval (German), and LORELEI (Kinyarwanda and Sinhala) for NER, as well as SemEval-2010, DDI, and ChemProt for Relation Extraction.

Key Results and Insights

  1. Performance in Data-Scarce Settings: SegMix excels when training data is limited (fewer than 1000 instances). On CoNLL-03 with only 200 samples, it improved the F1 score by 2.7 points over a BERT baseline. In the low-resource Sinhala dataset, it provided a significant 5.0 F1 point boost.
  2. Soft vs. Hard Augmentation: Unlike "hard" replacement (swapping words), SegMix's "soft" interpolation acts as a superior regularizer, creating a continuous transition in the embedding space.
  3. Context Preservation: By isolating the mixing to specific segments, the surrounding context remains intact, ensuring the augmented sentences are syntactically plausible.
  4. Computational Efficiency: SegMix is implemented as a simple pre-processing step. MentionMix (MMix) generated augmented data for 200 samples in just 0.81 seconds, compared to over 138 seconds for more complex methods like SeqMix.
  5. Robustness: SegMix is less sensitive to the augmentation rate hyperparameter than standard Mixup, maintaining performance gains even at higher rates of data generation.

Conclusion

SegMix demonstrates that structure-aware interpolation is a powerful and efficient tool for NLP data augmentation, particularly for low-resource NER and RE tasks. While its benefits diminish as the base training set grows larger (beyond 2000 examples), its ease of implementation and negligible overhead make it a practical choice for many real-world applications.

Summary updated

BibTeX
@misc{pei2023segmix,
  author = {Yuxin Pei and Pushkar Bhuse and Zhengzhong Liu and Eric P. Xing},
  title = {{SegMix: A Simple Structure-Aware Data Augmentation Method}},
  year = {2023},
  eprint = {2311.09505},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.09505},
}
Figure