Does Smarter Tuning Pay Off? Confopt vs Optuna’s Default on 131 Datasets
From the publisher’s feed, collected in the ZeroLabs newsroom.
Two seeds on 131 datasets looked like a tie. Five show ConfOpt ahead by 0.0016 PR AUC, at a cost in calibration and search timeAssumes you have tuned a model with Optuna.The first draft of this article said that ConfOpt and TPE tie. ConfOpt is a hyperparameter sampler that accounts for noise in the scores it sees, and TPE, the tree-structured Parzen estimator, is Optuna’s default. I had two sampler seeds of each, a gap of +0.0011 PR AUC (area under the precision-recall curve) and a 95% interval that included zero, and I read that as a tie. Then I added three more seeds. Over five seeds the gap is +0.0016, its interval excludes zero, and ConfOpt is ahead on four seeds of five. The data never said tie. It said that two seeds could not tell.The whole study is about noise. A hyperparameter search maximizes a number, and that number is a measurement. It changes when the seed changes, and the best of many such measurements is biased upward. Previously I measured this bias, and its size surprised me: on 8 large datasets, a 200-trial TPE search reported a gain of 2.75 accuracy points over its first trial, and the same winners gained 0.99 on rows the search never saw (run-noise notebook).If the score is a noisy reading, a search that accounts for the noise should choose better than a search that trusts every reading. That is the argument for ConfOpt. Its sampler, the part of a search that proposes the next configuration, fits quantile regression to the trial history. It then calibrates the result with conformal prediction, a way to give prediction intervals a stated coverage. ConfOpt’s OptunaHub page says its single-fidelity performance “in popular HPO benchmarks puts it consistently ahead of TPE and SMAC” (HPO is hyperparameter optimization; single-fidelity means every trial trains the full model). I wanted to check that claim on small data, where the noise is largest, so I put ConfOpt in place of TPE in the tuning of my small-data benchmark.The short version: LightGBM, 131 datasets, 50 trials per search, five sampler seeds each. ConfOpt scored 0.0016 PR AUC above TPE on average, with a 95% interval of [+0.0006, +0.0027]. The gap is a mean, not a typical dataset: the median is zero, and five small datasets carry two thirds of it. When the search selected on PR AUC, ConfOpt also produced worse-calibrated models, with an expected calibration error (ECE, the gap between predicted confidence and actual accuracy) of 0.077 against 0.068. Its search took about 1.8 times as long. I keep TPE as my default for now, and the last section says why.One caveat comes first: I did not tune ConfOpt the way its authors would, and I added the extra seeds and several controls after I saw the first results. Read the numbers as a test of the defaults of ConfOpt’s OptunaHub wrapper, the module that plugs ConfOpt into Optuna.A search maximizes a number that is partly luckTwo kinds of noise sit in the score that a search maximizes. The first is the seed: train the same model on the same rows with another seed, and the score changes. The second is selection bias: the best of many noisy scores is ahead of its true level, because the search picked it for being high.I measured both in October on real data. Across 40 seeds of CatBoost with default parameters, accuracy on 1,000 test rows had a standard deviation of 0.29 points (median over 9 large OpenML datasets). Selection bias was larger. After 200 TPE trials, each scored on 1,000 rows, most of the gain that the search reported did not reach 20,000 held-out rows (Figure 1).Figure 1. The gain a TPE search reports, and the gain on rows it never saw. The trial axis is not linear.Samplers that account for noiseOptuna’s default sampler, TPE, has no noise setting: its constructor takes none (checked in Optuna 4.7.0). It ranks trials by the score it observed. Other samplers deal with noise in two ways. Gaussian-process samplers treat it as a variance, which they learn from the data (Optuna’s GPSampler, BoTorch’s SingleTaskGP) or take from you (OptunaHub’s heteroscedastic_gp). SMAC3 averages the noise out by repeating evaluations over several seeds.ConfOpt does neither: it does not estimate the noise of a metric as a separate quantity. It predicts quantiles of the scores it has seen and calibrates those intervals, so the noise appears as interval width. The ConfOpt paper argues that Gaussian processes struggle with categorical hyperparameters and with data that is skewed or has non-constant variance. The method builds on a 2023 ICML paper by Salinas and colleagues, which notes that a Gaussian process makes “strong assumptions about the observation noise, which might not be warranted in practice”.I tested only ConfOpt, because its page makes a direct claim about TPE.What ConfOpt’s OptunaHub wrapper does by defaultMy test was cheap to set up: through OptunaHub only the sampler changes, and the search space, the budget, the folds and the objective stay the same as for TPE. The swap looks like this:import optunaimport optunahub# shortened: the real space has nine LightGBM parametersspace = { "learning_rate": optuna.distributions.FloatDistribution(1e-3, 0.3, log=True), "n_estimators": optuna.distributions.IntDistribution(50, 500), "class_weight": optuna.distributions.CategoricalDistribution(["balanced", "none"]),}module = optunahub.load_module("samplers/confopt_sampler", ref="180d82259844f17578f4c3d0f8472835c17ff8cb")sampler = module.ConfOptSampler(search_space=space, seed=0)study = optuna.create_study(direction="maximize", sampler=sampler)study.optimize(objective, n_trials=50) # your objective, with matching trial.suggest_* callsUnlike TPE, ConfOpt needs the search space up front, as a dict of Optuna distributions. The objective keeps its usual trial.suggest_* calls.The wrapper is not ConfOpt as its authors would run it. I read its code at registry commit 180d822, for confopt 2.0.1. The defaults are:a quantile gradient boosting surrogate (searcher="qgbm");optimistic Bayesian sampling as the acquisition function;3,000 random candidates scored per trial;10 random opening trials;conformal calibration only when more than 32 trials are finished (n_pre_conformal_trials=32).The last default matters at my budget of 50 trials. The first 10 trials are random, the next 23 are guided by the quantile model without calibration, and only the last 17 use the conformal step. About a third of the search has the part that gives the method its name. At 100 trials it is 67 of 100, which is why I ran that budget too.The test: LightGBM, 131 datasets, 50 trials, five seedsThe test runs inside SmallDataBenchmarks, my benchmark of tabular models on small classification datasets.Data: 131 datasets from UCI++, a collection of preprocessed classification datasets. The benchmark has 146 datasets; I drop 15 that repeat the same underlying data in another configuration, which leaves 131. Datasets with more than 10,000 rows are subsampled to 10,000.Model: LightGBM. The search space has nine parameters: learning rate, number of trees (50 to 500), number of leaves, minimum samples per leaf, row and column subsampling, two regularization strengths and class weighting (balanced or none).Nested cross-validation: 4 outer folds. In each one, the search works on the training part with a 4-fold inner cross-validation and picks the configuration with the best inner PR AUC (weighted average precision, one-vs-rest). That configuration is refit and scored on the outer fold. Every main search has 50 trials.Samplers: Optuna TPE and ConfOpt through the OptunaHub wrapper, each with five sampler seeds, on the same library versions and the same outer folds. TPE seed 0 is my earlier LightGBM run, repeated on the current versions. ConfOpt seed k is paired with TPE seed k by index only. ConfOpt runs with my reseeding fix, described in “Three problems inside the wrapper”.Controls: a 100-trial search on seeds 0 and 1; searches that select on log loss instead of PR AUC, with and without class weighting, also on seeds 0 and 1; and a fixed version of the wrapper on 30 datasets.Statistics: one PR AUC difference per dataset, a paired bootstrap 95% interval over the 131 datasets, and a Wilcoxon signed-rank test, with Holm correction over the five per-seed tests. Holm correction adjusts p values for running several tests. Because of the shared opening described next, I also compare the five seed means of each sampler with a Welch t-test. Calibration is scored on the 108 datasets that every model in the benchmark covers, with ECE and with the Brier score, the mean squared error of the predicted probabilities.Why five seeds? TPE and ConfOpt open with 10 random trials, and with a fixed seed these 10 configurations are the same in every study, on every dataset and fold. I checked this in the 120 studies I stored for each of three runs. My reseeding fix (below) goes further for ConfOpt: at every trial, all datasets draw the same pool of candidates. So the 131 datasets are not independent repeats of a sampler’s randomness, and the seed has to vary too.This test was not pre-registered. After a two-seed version found no difference, I added seeds 2 to 4, the log-loss searches, the fixed wrapper and the check of the opening configurations. So the five-seed result looks a second time at seeds 0 and 1, and I also report the new seeds 2 to 4 on their own.Over five seeds, ConfOpt leads by 0.0016Averaged over five sampler seeds each, ConfOpt scores 0.0016 PR AUC above TPE, with a 95% interval from +0.0006 to +0.0027. Both searches score about 0.83 on average, so the gap is about 0.2% of the score. Three other views agree: the Wilcoxon test over datasets (p = 0.04), the three seeds added later taken alone (+0.0019, p = 0.009), and a Welch test over the five seed means of each sampler (p = 0.006).Figure 2. PR AUC gap between ConfOpt and TPE per sampler seed and over the five seeds.Per seed (Figure 2), ConfOpt is ahead on four of five, and the gap is positive in 24 of the 25 seed pairings. No single seed survives Holm correction (the lowest Holm p is 0.10), so the evidence is the consistency across seeds, not any one of them. Four of ConfOpt’s five seed means (0.8317 to 0.8328) are above all five of TPE’s (0.8300 to 0.8309). The fifth, seed 1, matches TPE’s best. It is also the seed that made the two-seed version look like a tie.The typical dataset does not move: the median gap is 0.0000. Five datasets (teaching-assistant-evaluation, blogger, hill-valley-without-noise, indian-liver-patient and planning-relax, 100 to 1,212 rows) carry two thirds of the mean gap, with 0.013 to 0.033 each. Without them the gap is +0.0005 (p = 0.17). By thirds of the row count, the gap falls from +0.0026 on the smallest datasets (50 to 540 rows) to +0.0002 on the largest (2,859 to 10,000). Per dataset ConfOpt is not noisier: across seeds its PR AUC varies as much as TPE's.The gap appears inside the search and reaches the outer foldTo see where the gap appears, I re-scored every fold’s pick with the search’s own objective on three sets of rows: the inner split the pick was made on (the search split), a new inner split of the same training rows (the fresh split), and the held-out outer fold.On the search split, ConfOpt’s pick scores higher on all five seeds, +0.0015 on average [+0.0008, +0.0024]. On the outer fold the gap is +0.0016, so no detectable part of it is lost on the way, although the interval of that difference, [-0.0007, +0.0008], is wide. The datasets where ConfOpt is ahead inside the search are the ones where it is ahead on the outer fold (Spearman correlation 0.39). On the fresh split the gap is smaller, +0.0005 [-0.0007, +0.0014], mostly because of one dataset. On kr-vs-k, five of ConfOpt’s 20 picks score 0.46 to 0.72 on the fresh split and 0.85 to 0.88 on the outer fold, while no TPE pick loses more than 0.008. Without that dataset the fresh-split gap is +0.0010 [+0.0004, +0.0016].A lucky opening could produce such a gap, so I checked it. Since the 10 opening configurations depend only on the seed, I scored all of them on every fold of the 131 datasets, 52,400 fits of the inner cross-validation. The size of the opening gap does not set the size of the final one. The best opening configuration differs between ConfOpt and TPE by -0.021 to +0.010 depending on the seed, while the final gap inside the search stays between +0.0006 and +0.0022 (Figure 3). On seed 3, ConfOpt opened 0.021 behind and finished 0.0022 ahead. ConfOpt also improves on its own opening more than TPE does, on 80 datasets against 48 (p = 0.001).Figure 3. Inner PR AUC gap between ConfOpt and TPE: the best of the 10 opening configurations, and the pick after 50 trials.Within a seed the opening does carry over, partly by construction: a final score is never below its opening. On seeds 0, 2 and 4 most of the final gap sits on the datasets where ConfOpt opened ahead, so on those seeds the opening may explain all of it. On seeds 1 and 3 the gap is as large where ConfOpt opened behind.What the test cannot say is which part of ConfOpt earns the gap: the quantile surrogate, the 3,000 candidates per trial or the conformal step, which is active in only 17 of the 50 trials.Doubling the trials did not lift either meanAt 50 trials only 17 of ConfOpt’s trials use the conformal step, so I ran 100 trials on seeds 0 and 1 of each sampler. Both samplers are deterministic (ConfOpt after the reseeding fix described below), so any gain can only come from trials 51 to 100. On the outer folds the mean gain is between -0.0003 and +0.0007 for the four runs, and every interval includes zero. ConfOpt gains on more datasets than it loses (83 to 42 averaged over the two seeds, p = 0.0009), but one collapsed fold on pendigits pulls its seed 1 mean down. Inside the search the extra trials do find better scores, +0.0021 to +0.0031 on the search split. On a fresh split 40 to 68% of that gain disappears, and the rest does not show on the outer folds. This is the effect from Figure 1 on a small scale. The gap between the samplers does not grow either: on the outer folds it is +0.0024 on seed 0 and -0.0010 on seed 1.Calibration is worse under PR AUC selectionUnder PR AUC selection, calibration is where the two samplers differ. Over the 108 calibration datasets, ConfOpt’s ECE averages 0.077 against 0.068 for TPE, and it is worse on 82 of the 108 datasets. Its Brier score is 0.0075 higher. The ECE gap is uneven across seeds, as the table shows: it is clear on seeds 1 and 4 and absent on seeds 2 and 3, with seed 0 in between. With the seed as the unit, a Welch test gives p = 0.025.Table 1. ECE and Brier score per sampler seed on the 108 calibration datasets.I did not find the cause. Three suspects fail. The ECE gap does not follow the selection bias of the search, search score minus outer score (Spearman -0.05 to +0.13 per seed), so overfitting the inner split is an unlikely driver. Class weighting does not explain it across seeds: ConfOpt picks class_weight="balanced" more often than TPE on seeds 0, 1 and 3, yet seed 3 has no gap, and seed 4, where both pick it about equally often, has the largest. On the 9 datasets where no run ever picks it, ConfOpt is worse on all 9. The inert interval adaptation is not shown to be the cause either: with the fix described below, ConfOpt's ECE on 30 datasets is still above TPE's.Selecting on log loss closes most of the gap. I ran log-loss searches on seeds 0 and 1 after the results above, with balanced allowed and without class weights. With balanced allowed, ECE is 0.0424 for ConfOpt against 0.0402 for TPE on seed 0, and 0.0412 against 0.0410 on seed 1. Dropping the class weights changes nothing measurable, so the selection metric closes the gap, not the class weighting. The metric also moves each sampler far more than the choice of sampler does: against PR AUC selection, ECE falls by 0.024 to 0.042, and PR AUC drops by 0.0026 to 0.0046, more than the whole gap between the samplers. Under log loss ConfOpt’s PR AUC gap does not show on these two seeds (+0.0004 and -0.0009).The search takes about 1.8 times as longConfOpt’s sampler itself costs about 20 seconds per 50-trial study, measured on three datasets: 0.01 seconds per random trial, 0.2 for a trial guided by the quantile model alone and 0.9 for a conformal one. In my runs the reseeding lock (below) makes the four outer folds of a dataset wait for each other, so a dataset pays about 80 seconds. On the median dataset ConfOpt took 105 to 112 seconds per seed against 26 to 34 for TPE. Over the 131 datasets its search took 5.2 to 5.7 hours per seed against 2.6 to 4.0 for TPE, about 1.8 times as long over the five seeds. Without the lock the overhead would be closer to 20 seconds per dataset, but I did not measure that.Three problems inside the wrapperReading the wrapper’s code and making it reproducible turned up three things.The adaptive interval width never takes effect. ConfOpt adjusts the width of its prediction intervals online with an algorithm called DtACI, so that the intervals keep their coverage as trials arrive. In the wrapper, sample_relative fits a thread-local copy of the searcher, while after_trial calls update on the main searcher, which is never fitted. updateadapts the intervals only when conformal_estimator.fold_scores_per_alpha is set, and only fit sets it. So the adaptation is skipped on every trial. In ConfOpt’s own tuner (confopt/tuning.py), fit and update go to the same searcher object.I fixed this by sending update to the searcher that fit uses. On one fold the wrapper then adjusts its intervals in 17 of 50 trials, against none before the fix. The results barely change. On 30 datasets, seeds 0 and 1, at 50 and 100 trials, the fixed wrapper differs from the published one by at most 0.0010 in mean PR AUC and 0.006 in mean ECE (all p = 0.36 or more), and it takes the same time. So the missing adaptation does not explain the results in this article. The ECE intervals, about ±0.01, are still too wide to exclude an effect as large as the calibration gap.The randomness is global. The wrapper seeds Python’s random module and NumPy’s global generator once, in its constructor. The candidate configurations are drawn from them. With four outer folds running in parallel threads, or with a study resumed from storage, the same seed can give a different search. I reseed both generators before every trial, from the sampler seed and the number of finished trials, under one lock. A search then depends only on its stored trials.import randomimport threadingimport numpy as npConfOptSampler = module.ConfOptSampler # the module loaded aboveLOCK = threading.Lock()class Reseeded(ConfOptSampler): def __init__(self, search_space, seed): super().__init__(search_space=search_space, seed=seed) self._seed = seed def sample_relative(self, study, trial, search_space): with LOCK: draw = self._seed * 10_000 + sum(t.state.is_finished() for t in study.trials) np.random.seed(draw) random.seed(draw) return super().sample_relative(study, trial, search_space)A category cannot be None. ConfOpt’s categorical range accepts strings, numbers and booleans only. My search space has “no class weight” as a choice, so I spelled it “none” in the search and mapped it back to None when building LightGBM. If your space has None among the choices of a categorical parameter, you need the same step.ConfOpt is ahead on average, not on a typical datasetThe short version holds: when tuning LightGBM on 131 small datasets at 50 trials, the wrapper with its defaults is ahead of TPE by 0.0016 PR AUC on average. The median dataset does not move, the models are worse calibrated under PR AUC selection, and the search takes about 1.8 times as long. The gap survives to the outer fold, but on seeds 0, 2 and 4 a better opening may explain all of it, and the test does not show which part of ConfOpt earns it. So it does not prove that accounting for the noise is what helps.The second lesson is about my own reading. With two seeds per sampler the interval included zero, and I called that a tie. It was an open question. A fixed seed gives every dataset the same opening configurations, so more datasets do not replace more seeds. When you compare samplers, vary the seed, and do not read a wide interval as no difference.The limits are these:Defaults only. I did not test the other searcher (qe), the other acquisition functions (Thompson sampling, expected improvement), or ConfOpt’s own tuner.One task. LightGBM, PR AUC, 131 small classification datasets, 50 trials with a 100-trial control on two seeds. Fewer than 50 trials were not tested.One outer split. Another outer split moves a model’s mean PR AUC by up to 0.0044 on a 30-dataset subset. On that subset ConfOpt minus TPE is -0.0015 to +0.0028 across three splits, with intervals too wide to check a gap of 0.0016.Five seeds. Enough to see the mean gap. ConfOpt’s five seed means also spread more than TPE’s (standard deviation 0.0007 against 0.0003), and five seeds cannot say whether that difference is real.What I take from it for my own work: I keep TPE as my default. ConfOpt made a strong start, and I will follow it closely. For now I am not ready to pay about 1.8 times the search time for a gap of 0.0016 that the median dataset does not see. If calibration matters, the selection metric matters more than the sampler: log loss lowered ECE by 0.024 to 0.042, while the choice of sampler moved it by 0.009. The lever I measured in October acts on the noise directly: re-run the top five configurations with fresh seeds and choose on fresh rows. It costs 25 more fits per search (five configurations, five fresh seeds each). Scored by fresh re-runs, it reduced the accuracy gap to the best trial by 0.05 to 0.19 points at the median (run-noise notebook).ResourcesCode and data (state as of 15 November 2026)SmallDataBenchmarks at commit 6e8c684: the ConfOpt runs, notes and results used here.UCI++ on Zenodo: the collection that the 131 datasets come from. Each dataset keeps the terms of its original source.Findings notes, ConfOpt section: every number in this article, with its test.confopt_seeds_logloss.py and its output: the five seeds, calibration and the log-loss searches.search_inner_all.py and search_inner_all.csv: the re-scoring of every pick on the search split, a fresh split and the outer fold.confopt_startup.py and confopt_startup.csv: the scores of the opening configurations.search_trajectories.py: the trajectories and the fixed wrapper.confopt_controls.py and confopt_writeup.py: the 100-trial runs, the timings and the remaining comparisons.registry.py: the ConfOpt search definitions, the per-trial reseeding and the fixed wrapper.Run noise notebook (demo-notebooks, commit f2041a8): seed noise and search-winner inflation.Documentation and source codeConfOpt sampler on OptunaHub: the claim about TPE and SMAC, the defaults.Wrapper source at registry commit 180d822: sample_relative, after_trial and the default settings.confopt 2.0.1 on PyPI: the package version tested.Optuna TPESampler documentation: the constructor has no noise setting.Optuna GPSampler documentation: deterministic_objective.OptunaHub heteroscedastic_gp sampler: input-dependent noise through noise_func.BoTorch SingleTaskGP source: the inferred noise level and train_Yvar.SMAC3 Scenario documentation: the deterministic setting and repeated seeds.PapersDoyle, R. (2025). Enhancing Performance and Calibration in Quantile Hyperparameter Optimization. arXiv preprint. arXiv:2509.17051, DOI.Salinas, D., Golebiowski, J., Klein, A., Seeger, M., Archambeau, C. (2023). Optimizing Hyperparameters with Conformal Quantile Regression. ICML 2023, PMLR 202. Proceedings page.Does Smarter Tuning Pay Off? Confopt vs Optuna’s Default on 131 Datasets was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.