Abstract
Neural networks often struggle with systematic compositionality, frequently memorizing long text segments rather than learning underlying grammatical rules. We present SeqMix, a sequence-level data augmentation technique that encourages compositional generalization by training on "soft" convex combinations of sentence pairs. SeqMix consistently improves performance across machine translation, semantic parsing, and compositional benchmarks, providing a simple yet effective regularizer for sequence-to-sequence models.
Introduction
In Natural Language Processing (NLP), the ability to understand novel sentences by recombining known parts—compositionality—is a hallmark of human intelligence. However, standard neural models often fail this test, frequently overfitting to specific training phrases. While "hard" data augmentation methods like word dropping or swapping provide some relief, they often introduce noise or require expensive linguistic heuristics to ensure validity.
Researchers from Harvard, MIT-IBM Watson AI Lab, and Cornell University have introduced SeqMix, a method inspired by the "MixUp" technique in computer vision. By blending word embeddings from different sentences, SeqMix forces models to rely on the composition of subparts rather than memorized sequences.
Methodology: From Hard Swaps to Soft Mixing
SeqMix operates by taking two sentence pairs from a training set and creating a synthetic example through a weighted average of their word embeddings. Unlike previous methods that perform discrete "hard" swaps (e.g., replacing one word with another), SeqMix uses a "relaxed" objective.
As shown in the comparison table, SeqMix is distinguished by its use of a "relaxed" (Y) approach. In this framework, the combination vector $m_i$ is the expected value $\mathbb{E}[m_i] = \lambda$ rather than a Bernoulli sample. This mathematical relaxation provides a smoother training signal and acts as a powerful regularizer, preventing the model from relying on long-range memorization of specific training strings.
Experimental Results
The effectiveness of SeqMix was evaluated across several challenging benchmarks, including machine translation (IWSLT, WMT), semantic parsing (SQL Queries), and the SCAN benchmark for compositional generalization.
Machine Translation
SeqMix consistently outperformed strong Transformer baselines, delivering approximately a 1.0 BLEU score improvement across five different translation datasets. Notably, these gains were maintained even on the large-scale WMT '14 English-German dataset, where many augmentation techniques fail to show significant impact.
Compositional Generalization (SCAN)
The SCAN benchmark is designed to test if models can generalize to new combinations (e.g., performing "jump twice" after seeing "jump" and "walk twice"). On the notoriously difficult "jump" split, where standard baselines typically achieve 0% accuracy, SeqMix alone reached 49%. When combined with GECA (Good-Enough Compositional Augmentation), it achieved a near-perfect 98% accuracy.
Semantic Parsing
In semantic parsing tasks (GeoQuery), SeqMix improved accuracy on the "query" split, outperforming other regularization methods like SwitchOut and WordDrop. This suggests that the "soft" mixing approach helps models better map natural language questions to structured SQL queries by focusing on constituent parts.
Discussion and Conclusion
SeqMix demonstrates that simple mathematical interpolation can be a potent tool for improving linguistic generalization. By providing a unifying theoretical framework, the authors show that many existing augmentation tricks are actually "hard" approximations of the same underlying objective that SeqMix relaxes.
While SeqMix is highly effective, it is not a complete solution for all types of reasoning, such as the "around-right" split in SCAN. Future research may explore syntax-aware mixing or applying similar "soft" relaxations to other discrete augmentation strategies. Nonetheless, SeqMix stands as an efficient, easy-to-implement method for building more robust and compositional NLP models.
Summary updated