Adaptive Learn-then-Test: Statistically Valid and Efficient Hyperparameter Selection

Matteo Zecchin, Sangwoo Park, Osvaldo Simeone

Introduction

Adaptive Learn-then-Test (aLTT) is a novel framework for selecting hyperparameters that provides rigorous statistical guarantees on model performance while being significantly more data-efficient than previous methods. By replacing traditional p-values with "e-processes," aLTT allows researchers to test hyperparameters sequentially and stop the process early as soon as reliable candidates are found, often using only a fraction of the usual testing budget.

The Challenge of Statistical Reliability

Deploying AI in high-stakes environments—like medical imaging or autonomous control—requires more than just high average accuracy; it requires statistical reliability. Practitioners must be certain, with high probability, that a model's risk (e.g., error rate) stays below a specific safety threshold.

The existing Learn-then-Test (LTT) framework was designed to address this by treating hyperparameter selection as a Multiple Hypothesis Testing (MHT) problem. For every candidate hyperparameter, LTT tests the "null hypothesis" that the model is unreliable. However, LTT is fundamentally non-adaptive. Users must commit to a fixed amount of testing data upfront. You cannot "peek" at the results to stop early or decide which hyperparameters are worth more testing without risking "p-hacking" and invalidating the statistical guarantees. This makes LTT prohibitively expensive when testing is costly or slow.

The Adaptive Learn-then-Test (aLTT) Framework

To overcome these limitations, the authors introduce adaptive Learn-then-Test (aLTT). The core innovation of this approach is the shift from traditional p-values to e-values and e-processes.

  • E-values as Betting: Think of an e-value as a gambler’s wealth. You start with $1. If you bet on a hyperparameter being reliable and the data supports you, your wealth grows. If the data contradicts you, your wealth shrinks.
  • Anytime Validity: Unlike p-values, e-values can be multiplied over time to form an e-process. This is "anytime-valid," meaning you can stop the experiment at any moment based on the current results without breaking the underlying statistical math.
  • Adaptive Acquisition: Because they can safely peek at the results, the authors use an $\epsilon$-greedy policy to choose which hyperparameter to test next. Most of the time, they test the candidate that currently looks most promising (highest e-value), which significantly speeds up the discovery of reliable models.
  • Early Termination: The process stops as soon as a target number of reliable hyperparameters is identified, saving valuable time and compute resources.
The aLTT workflow: Pre-selecting candidates, adaptive testing via e-processes, and final selection.

Evaluation Domains

The authors evaluated aLTT across three distinct and challenging domains:

  1. Offline Reinforcement Learning: Using the Half Cheetah task (OpenAI Gym MuJoCo) to select safe control policies.
  2. Automated Prompt Engineering: Using the Instruction Induction dataset to find the best LLM prompts for tasks like movie recommendation and linguistic transformations.
  3. Wireless Resource Allocation: A simulated environment (using the Nokia Wireless Suite) to optimize power and scheduling for mobile networks.

Core Advantages

  • Peeking is Legal: The most powerful insight of aLTT is that e-processes make "peeking" at data statistically sound. This resolves the historical tension between being data-driven (adaptive) and being statistically rigorous.
  • Efficiency through Focus: By adaptively choosing which hyperparameters to test, aLTT avoids wasting data on candidates that are clearly failing.
  • Flexibility in Error Control: The framework can rigorously control both the Family-Wise Error Rate (FWER) (the probability of picking even one bad model) and the False Discovery Rate (FDR) (the expected fraction of bad models in the selected set).

Empirical Performance

The results consistently demonstrate that aLTT reaches the same "discovery power" (True Positive Rate) as LTT but in a fraction of the time.

  • Prompt Engineering: In LLM tasks, aLTT identified 50% of the reliable prompts within the first 1000 testing rounds. In contrast, the standard non-adaptive LTT identified less than 10% in the same timeframe.
  • Efficiency: The True Positive Rate (TPR) for aLTT climbs much steeper than LTT, especially when using an adaptive ($\epsilon$-greedy) acquisition policy.
  • Reliability: Despite the adaptivity, the empirical error rates (FWER and FDR) always remained below the user-specified tolerance ($\delta$), confirming the method's safety.
Discovery power over testing rounds under FDR control. The adaptive epsilon-greedy policies (colored lines) find reliable models much faster than the non-adaptive baseline (dotted line).

Future Directions

While aLTT represents a major step forward for safe AI deployment, the authors note a few areas for future exploration:

  • Distribution Shift: The current guarantees assume the testing data comes from the same distribution as the deployment data. If the environment changes, the guarantees might not hold.
  • Data Reuse: Currently, the method is most efficient when new data is used for each round. Finding ways to reuse data more aggressively while maintaining "anytime safety" remains an open challenge.
  • Simulation-to-Real: The authors suggest exploring how simulations can be used to "pre-warm" the e-processes before real-world testing begins, potentially saving even more physical testing budget.

Summary updated

BibTeX
@inproceedings{zecchin2025adaptive,
  author = {Matteo Zecchin and Sangwoo Park and Osvaldo Simeone},
  title = {{Adaptive Learn-then-Test: Statistically Valid and Efficient Hyperparameter Selection}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=JxnOZwFNcU},
}
Figure