Length conditioning improves majority voting for better large language model answers
Frustratingly Easy Majority Voting Using Length Conditioning
Computation and LanguageArtificial Intelligence
Summary
When large language models (LLMs) answer questions, they often try several explanations and pick the most common final answer to improve accuracy, a method called majority voting. The authors noticed that longer explanations tend to be less correct, so they created a new way to weigh each answer's vote based on how long the explanation is. This approach adjusts itself during testing using just the questions without needing extra training, and it improves the accuracy of majority voting across many tasks and different LLMs.
What this means in practice
- •For llm developers: Incorporate length-conditioned weighting to enhance answer correctness in large language model reasoning tasks during inference.
- •For ai service operators: Improve the reliability of AI-powered question-answering services by applying length-conditioned majority vote aggregation without retraining models.
Authors
Fiorenzo Parascandolo, Enver Sangineto, Xiaoyi Yu, Wenhui Tan, Jipei He, Ruihua Song, Rita Cucchiara
Abstract
Majority Voting (MV) is a simple and widely used strategy which improves the reasoning accuracy of Large Language Models (LLMs) by allocating additional inference-time computation. Specifically, in MV multiple Chain-of-Thoughts (CoTs) are independently sampled and the most frequent final answer is selected. In this work, we propose Length-Conditioned Majority Voting (LCMV), a Test-Time Training approach which improves MV leveraging an empirical observation that has recently been established in several studies: longer CoTs tend to be associated with a lower probability of correctness. We formulate this inductive bias as a length-conditioned prior probability, which is modeled by a simple logistic function. Moreover, we adapt this prior at test time using only unlabeled testing data and without fine-tuning the LLM. Finally, the adapted prior is used to weight the vote of each sampled answer. Extensive experiments across multiple LLMs and reasoning benchmarks show that LCMV consistently improves over both standard MV and existing length-based and confidence-based aggregation strategies, while retaining the simplicity and model-agnostic nature of MV. Our code is available at: https://github.com/aimagelab/LCMV.