PETS: A Principled Framework Towards Optimal Trajectory Allocation for Efficient Test-Time Self-Consistency
Abstract
Lay Summary
When using large language models to solve problems, people often sample multiple answers for the same question and select the most likely answer through methods such as majority voting. This is done to improve the self-consistency of the response, under the assumption that the sampled answers reflect the model’s internal true answer. A basic strategy is to sample the same number of responses for every question. Our question is: can we allocate different numbers of samples according to the properties of different questions? To this end, we propose PETS (Principled and Efficient Test-Time Self-Consistency), which uses a warm-up stage to quickly capture the properties of each problem through a two-dimensional parameter, and then applies constrained optimization to allocate the sampling budget. Based on this intuition, we develop both online and offline methods. The online method produces a one-shot result for questions arriving sequentially, while the offline method is given the entire set of questions at once, allowing the budget allocation to be performed globally. Experimental results show that our algorithm achieves significant improvements across various datasets.