Principled Top- Selection for Language Models with Hybrid Gradients
Abstract
Selecting the best items out of 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- 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 both a supervised component and policy gradients. We show that the selection problem becomes harder as increases, and our algorithm converges at rate , with the optimal upper bound achieved by balancing between bias and variance. Practically, we apply our method to a set of tasks involving top- selection, including synthetic regression problems, RAG, and MoE systems, showing that our method outperforms the baselines in next-token prediction perplexity and QA task accuracies.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.