Reproduce “MiLe Loss: a New Entropy-Weighed Loss for Mitigating the Bias of Learning Difficulties in Large Language Models” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Zhenpeng Su, Xing Wu, Xue Bai, Zijia Lin, Hui Chen, Guiguang Ding, Wei Zhou, Songlin Hu

A new loss function, MiLe Loss, is introduced by researchers from the Chinese Academy of Sciences and collaborators to address the learning bias towards frequent tokens in large language models by dynamically weighing loss based on token learning difficulty, assessed via information entropy. The approach improves downstream performance across various benchmarks, including a 3.55% increase in 0-shot TriviaQA accuracy over Cross-Entropy Loss on a 6.7B model, by focusing training on more challenging tokens.

Key insights

  • Information entropy of the predicted probability distribution over the vocabulary provides a more robust and context-aware indicator of learning difficulty in next-token prediction than solely relying on the ground-truth token's probability.
  • Dynamically re-weighing the loss based on entropy effectively mitigates the learning bias, redirecting LLMs' attention to infrequent and difficult tokens without significantly degrading performance on easy tokens.
  • The benefits of this entropy-weighed loss function become more pronounced with increasing model scale and additional training data, suggesting its increasing relevance for future LLM scaling.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.