cs.LGOct 3, 2026

Principled Top-kk Selection for Language Models with Hybrid Gradients

Authors: Xuchen Gong, Junfei Sun, Tian Li

Organizations: University of Chicago

Abstract

Selecting the best kk items out of mm candidates is a critical component of modern large language model systems, such as document selection in Retrieval-Augmented Generation (RAG) and expert routing in Mixture-of-Experts (MoEs). However, training these selection modules remains challenging due to weak gradient signals and suboptimal exploration-exploitation tradeoffs. Furthermore, prior works often rely on heuristics, lacking principled objectives and approaches that explicitly model and solve the top-kk selection problem. In this work, we propose a principled objective for training selection modules, whose gradient naturally provides richer training signals in a hybrid form---containing a supervised-gradient component and a policy-gradient component. We show that the selection problem becomes harder as mm increases, and our algorithm converges at rate O(1/T)O(1/\sqrt{T}), with the optimal upper bound achieved by balancing between bias and variance. Practically, we apply our method to a set of tasks involving top-kk selection, including synthetic regression problems, RAG, and MoE systems, showing that our method outperforms the baselines in next-token prediction perplexity and QA accuracy.

Figures & tables

Appendix figures & tables14 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. LESSER: Post-Training Data Selection with Output-Layer Gradients

    Oct 2, 2026Lyuxin David Zhang, Eric Wong, Surbhi Goel +1Training Data SelectionData Selection for Language Model Fine-Tuning

  2. Prof-K: Probabilistic One-Pass Filtering for Efficient Top-k Selection

    Aug 12, 2026Tadeusz Dziarmaga, Witold Sikora, Łukasz Struski +2Streaming Algorithms

  3. HARP: Efficient Data Selection for Finetuning Large Language Models

    Jun 5, 2026Ning Wang, Zhengxin Zhang, Maosen Tang +3LLM Fine-TuningActive Learning