Table of Contents
Fetching ...

ModeX: Evaluator-Free Best-of-N Selection for Open-Ended Generation

Hyeong Kyu Choi, Sharon Li

TL;DR

ModeX tackles the challenge of selecting a high-quality open-ended generation without external evaluators by constructing a similarity graph over multiple outputs and applying recursive spectral clustering to isolate a dominant semantic mode. The centroid of the final cluster is taken as the modal output, providing an evaluator-free Best-of-N selection mechanism; ModeX-Lite further improves efficiency with early pruning. The approach is validated across text summarization, code generation, and mathematical reasoning, where ModeX and ModeX-Lite outperform single-path and several multi-path baselines, often matching or exceeding gold-standard Best-of-N performance while reducing compute. Theoretical analysis connects spectral clustering to modal identification and shows that weighted degree acts as a Kernel Density Estimator within the selected cluster, supporting the method's underlying rationale.

Abstract

Selecting a single high-quality output from multiple stochastic generations remains a fundamental challenge for large language models (LLMs), particularly in open-ended tasks where no canonical answer exists. While Best-of-N and self-consistency methods show that aggregating multiple generations can improve performance, existing approaches typically rely on external evaluators, reward models, or exact string-match voting, limiting their applicability and efficiency. We propose Mode Extraction (ModeX), an evaluator-free Best-of-N selection framework that generalizes majority voting to open-ended text generation by identifying the modal output representing the dominant semantic consensus among generated texts. ModeX constructs a similarity graph over candidate generations and recursively applies spectral clustering to select a representative centroid, without requiring additional inference or auxiliary models. We further instantiate this selection principle as ModeX-Lite, an improved version of ModeX with early pruning for efficiency. Across open-ended tasks -- including text summarization, code generation, and mathematical reasoning -- our approaches consistently outperform standard single- and multi-path baselines, providing a computationally efficient solution for robust open-ended text generation. Code is released in https://github.com/deeplearning-wisc/ModeX.

ModeX: Evaluator-Free Best-of-N Selection for Open-Ended Generation

TL;DR

ModeX tackles the challenge of selecting a high-quality open-ended generation without external evaluators by constructing a similarity graph over multiple outputs and applying recursive spectral clustering to isolate a dominant semantic mode. The centroid of the final cluster is taken as the modal output, providing an evaluator-free Best-of-N selection mechanism; ModeX-Lite further improves efficiency with early pruning. The approach is validated across text summarization, code generation, and mathematical reasoning, where ModeX and ModeX-Lite outperform single-path and several multi-path baselines, often matching or exceeding gold-standard Best-of-N performance while reducing compute. Theoretical analysis connects spectral clustering to modal identification and shows that weighted degree acts as a Kernel Density Estimator within the selected cluster, supporting the method's underlying rationale.

Abstract

Selecting a single high-quality output from multiple stochastic generations remains a fundamental challenge for large language models (LLMs), particularly in open-ended tasks where no canonical answer exists. While Best-of-N and self-consistency methods show that aggregating multiple generations can improve performance, existing approaches typically rely on external evaluators, reward models, or exact string-match voting, limiting their applicability and efficiency. We propose Mode Extraction (ModeX), an evaluator-free Best-of-N selection framework that generalizes majority voting to open-ended text generation by identifying the modal output representing the dominant semantic consensus among generated texts. ModeX constructs a similarity graph over candidate generations and recursively applies spectral clustering to select a representative centroid, without requiring additional inference or auxiliary models. We further instantiate this selection principle as ModeX-Lite, an improved version of ModeX with early pruning for efficiency. Across open-ended tasks -- including text summarization, code generation, and mathematical reasoning -- our approaches consistently outperform standard single- and multi-path baselines, providing a computationally efficient solution for robust open-ended text generation. Code is released in https://github.com/deeplearning-wisc/ModeX.
Paper Structure (49 sections, 17 equations, 5 figures, 3 tables)

This paper contains 49 sections, 17 equations, 5 figures, 3 tables.

Figures (5)

  • Figure 1: Single Path Generation vs. Mode Extraction (ModeX). While single-path text generation commits to a single trajectory, ModeX leverages the structural information across multiple generation paths to select a "modal" output.
  • Figure 2: Overview of the ModeX framework. In standard ModeX, (1) adjacency matrix construction and (2) spectral graph clustering are iterated recursively as long as $\phi \leq \tau$. Then (3) centroid selection is performed. In the ModeX--Lite variant, (1) $\rightarrow$ (2) is performed only once without recursion for each pruning interval.
  • Figure 3: Qualitative Examination. In the text summarization task, "rejected" samples often miss keywords, include incorrect or less precise information, and contain repetitive and verbose text, whereas samples "chosen" by our method are overall concise.
  • Figure 4: Math reasoning accuracy at various stages of text generation. Our mode selection approach consistently identifies high-quality samples early in the trajectory, maintaining high accuracy even with partial outputs.
  • Figure 5: Sensitivity analysis. ModeX--Lite shows performance consistently above the single-path baseline in all settings.