Stop Jostling: Adaptive Negative Sampling Reduces the Marginalization of Low-Resource Language Tokens by Cross-Entropy Loss
Galim Turumtaev
TL;DR
This work identifies marginalization of rare tokens as a key bottleneck for language models trained on low-resource languages and introduces adaptive negative sampling via logit thresholding to reduce harmful non-target updates. By thresholding logits after the classifier head, the method suppresses gradients from irrelevant tokens, allowing rare-token embeddings to learn more meaningful representations. The approach is enhanced by separating embeddings per token and is supported by analyses of gradient flow, long-tail dynamics, and cross-language translation-like clustering, with substantial gains on low-resource validation data. The technique offers a practical path to more balanced performance in multilingual language models, particularly for underrepresented languages, while highlighting trade-offs in perplexity and tail behavior that can be mitigated with temperature and sampling adjustments.
Abstract
Neural language models often struggle with low-resource languages due to the limited availability of training data, making tokens from these languages rare in the training set. This paper addresses a specific challenge during training: rare tokens are disproportionately affected by marginalization, which prevents them from learning effectively. We propose a thresholding technique that reduces the impact of this marginalization, allowing rare tokens to benefit from more meaningful alignment. Through experiments with a character-level language model, we demonstrate that this method significantly improves performance on low-resource language validation data. This work is the first to show how negative sampling can be applied to improve the representation of rare tokens by limiting the harmful influence of excessive marginalization, offering a new approach to enhancing language model performance for underrepresented languages.
