Jason Wei
Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, 2021
Introduction
In Natural Language Processing (NLP), datasets are rarely perfectly balanced. Real-world applications, such as building chatbots with niche intents or news classifiers for specific topics, frequently encounter the data imbalance problem: a few classes have abundant data, while others have only a handful of examples. Deep learning models, which are notoriously data-hungry, often fail to learn effective boundaries for these low-resource categories when data is scarce.
Common mitigation strategies include upsampling (repeating existing examples) or input-level augmentation (e.g., synonym swapping). However, upsampling adds no new information, and input-level changes can distort semantic meaning. While hidden-space augmentation (adding noise to embeddings) is an alternative, it often relies on random noise that does not reflect natural linguistic variation. In Good-Enough Example Extrapolation, Jason Wei proposes GE3, a simple, hyperparameter-free method to "borrow" distribution data from well-represented classes to bolster under-represented ones.
The GE3 Method
GE3 operates in the "hidden space" of vector embeddings, such as those produced by Sentence-BERT. The core intuition is that the way examples vary around their center in one category is a "good enough" proxy for how they might vary in another.
The process follows three steps:
- Identify Centers: Calculate the mean vector (centroid) for a source class ($c_s$) and a target class ($c_t$).
- Extrapolate: To generate a new synthetic example for the target class, take an existing example from the source class, subtract the source mean (isolating the "variation"), and add the target mean.
- Formula: The synthetic embedding $\hat{x}_{c_t}$ is defined as:
$$\hat{x}_{c_t} = x^i_{c_s} - \mu(c_s) + \mu(c_t)$$
By applying this across various classes, GE3 generates a diverse set of synthetic training examples without requiring complex generative models or hyperparameter tuning.
Experimental Setup
The method was evaluated on three diverse text classification benchmarks, modified to be imbalanced by restricting half of the classes to a small number of examples ($N_{few}$):
- SNIPS: An intent classification dataset.
- HUFF: News headlines from HuffPost categorized into 41 classes.
- FEWREL: A relation classification dataset identifying relationships between tokens.
Key Results
GE3 consistently outperformed standard baselines across all datasets. It achieved an average accuracy improvement of 4.6% over standard upsampling and surpassed other hidden-space methods like Gaussian noise (+2.7% improvement) and simple interpolation.
Key findings include:
- Robustness to Scarcity: Gains were most pronounced in extreme low-resource settings (e.g., when a class had only 10 or 20 examples) but remained beneficial as more data was added.
- Diversity Benefits: An ablation study showed that performance improved when extrapolating from a larger variety of source classes, suggesting that combining different "perspectives" on linguistic variation creates a more robust synthetic distribution.
- Simplicity: Unlike many augmentation techniques that require tuning noise levels or interpolation weights, GE3 is hyperparameter-free, making it easy to implement and deploy.
Conclusion
GE3 offers a "low-hanging fruit" solution for practitioners dealing with imbalanced text data. While more complex methods like T5-based generation (Ex2) exist, GE3 provides a reliable performance boost with minimal computational overhead. It demonstrates that simple inductive biases—like sliding distributions in embedding space—can be remarkably effective for low-resource NLP tasks.
Summary updated