Model-Agnostic Meta Learning for Class Imbalance Adaptation
For NLP practitioners dealing with class imbalance, HAMR offers a flexible and generalizable method that outperforms existing approaches, though the gains are incremental.
The paper introduces HAMR, a meta-learning framework that adaptively handles class imbalance and data difficulty via bi-level optimization and neighborhood-aware resampling, achieving consistent improvements over baselines on six imbalanced NLP datasets.
Class imbalance is a widespread challenge in NLP tasks, significantly hindering robust performance across diverse domains and applications. We introduce Hardness-Aware Meta-Resample (HAMR), a unified framework that adaptively addresses both class imbalance and data difficulty. HAMR employs bi-level optimizations to dynamically estimate instance-level weights that prioritize genuinely challenging samples and minority classes, while a neighborhood-aware resampling mechanism amplifies training focus on hard examples and their semantically similar neighbors. We validate HAMR on six imbalanced datasets covering multiple tasks and spanning biomedical, disaster response, and sentiment domains. Experimental results show that HAMR achieves substantial improvements for minority classes and consistently outperforms strong baselines. Extensive ablation studies demonstrate that our proposed modules synergistically contribute to performance gains and highlight HAMR as a flexible and generalizable approach for class imbalance adaptation. Code is available at https://github.com/trust-nlp/ImbalanceLearning.