Submitted:
02 November 2026
Posted:
04 November 2026
You are already at the latest version
Abstract
Machine-learning fraud detectors have settings (hyperparameters) that must be tuned by trial and error. We tested whether large language models (LLMs) can do this tuning. In a pre-registered study, Claude Opus 5.5 proposed settings for two gradient-boosting models, XGBoost and LightGBM, on three public fraud benchmarks. We compared it with random search and a Bayesian optimiser (TPE), testing every model on a later period than it was tuned on, with 10 repeats per condition. After 10 trials, the LLM matched what TPE reached after 40 trials on two benchmarks (all differences under 0.011 PR-AUC, p ≥ 0.07), but not on the third (0.008–0.011 lower, p ≤ 0.003). A smaller model, Claude Haiku 5.5, did as well at about 3% of the cost. Naming the dataset in the prompt did not help. When the trial scores shown to the LLM were altered, its proposals followed the altered scores (79% of cases, p<0.001). Where the tuning data held only 28 frauds, tuning scores were negatively related to later performance. Contrary to common advice, tuning on the most recent data did not select better models than tuning on a random sample, because it stopped training too early.
Keywords:
hyperparameter optimisation
; large language models
; fraud detection
; gradient boosting
; out-of-time evaluation
; pre-registration
1. Introduction
Fraud detection systems score payments and applications with machine-learning models, most often gradient-boosted decision trees: ensembles of small decision trees built one after another, each correcting the errors of the previous ones. These models have settings, called hyperparameters, that are not learned from the data, such as how fast the model learns (the learning rate), how deep each tree may grow and how strongly it is regularised. The same data can give a weak or a strong model depending on these settings, so they are tuned by trial and error. This process, hyperparameter optimisation (HPO), trains a model with a candidate setting, scores it on a held-out validation set and repeats [1]. Each trial is a full training run, so HPO is expensive, and its result is only as good as the validation score it maximises.
Standard HPO methods choose the next setting either at random (random search) or with a statistical model of which settings have scored well so far (Bayesian optimisation). A widely used Bayesian method is the tree-structured Parzen estimator (TPE), which compares the distribution of settings that scored well with that of settings that scored poorly [2,3]; it is available in the Optuna library [4]. Large language models (LLMs) offer a different kind of optimiser. They have read a great deal about machine learning, so they bring prior knowledge of which settings tend to work, and they can read the history of trials as text and propose the next setting. LLMs have been used as general optimisers [5], inside Bayesian optimisation [6] and as direct hyperparameter tuners [7], with reports of fewer trials needed, but on standard benchmarks with reliable validation scores.
Fraud detection is a harder test for three reasons. Fraud is rare, so a validation set may contain only a few dozen fraud cases and its score is noisy. Fraud patterns and rates change over time, and a model is used on a later period than the one it was tuned on, so the setting that is best on validation need not be best later [8]. Choosing the best of many noisy scores also favours settings that were lucky, so the chosen setting looks better on validation than it really is [9]. A better proposer cannot remove these problems. A further concern is memorisation: popular fraud benchmarks are widely discussed online, so an LLM might recall published settings rather than reason from the evidence, and recalled settings would not transfer to a bank’s own data [10].
This paper reports a pre-registered comparison of LLM-guided and standard HPO for fraud detectors. In a pre-registered study, the hypotheses, the rule for deciding each of them and the analysis are written down and frozen before the results are seen, so that they cannot be adjusted afterwards. We asked whether the LLM reaches a good setting in fewer trials (H1) and whether it varies less from one repeat to the next than TPE (H2). We asked whether tuning on log loss, a measure of the quality of predicted probabilities, gives better probabilities than tuning on PR-AUC, a measure of how well frauds are ranked above legitimate cases (H3). We asked whether naming the dataset in the prompt helps, which would point to memorised knowledge (H4), and whether tuning on the most recent part of the training data selects better settings than tuning on a random part (H5). Exploratory analyses ask whether the LLM’s proposals were inferred or recalled, and why H5 turned out as it did.
2. Related Work
Reviews of HPO describe random search, Bayesian optimisation and their pitfalls, including over-fitting to the validation set [1,9]. TPE models settings by their density among good and poor trials [2], and its multivariate form, which models the hyperparameters jointly rather than one at a time [3], is the default in recent versions of Optuna [4]. LLM-based optimisation has been studied as a proposer of candidates from a history of trials [5], as a warm start and surrogate model inside Bayesian optimisation [6] and as a direct tuner of machine-learning models [7]. We found no study that evaluates LLM-guided HPO on fraud data, under change over time, or with the quality of predicted probabilities as an outcome.
Gradient-boosted trees such as XGBoost (eXtreme Gradient Boosting) [11] and LightGBM (Light Gradient-Boosting Machine) [12] remain the strongest common baselines on tabular fraud data, including in studies of transformer models built for fraud [13,14]. On medium-sized tabular benchmarks, tuned tree ensembles also match or outperform deep neural networks [15,16]. Practical guidance for evaluating fraud models stresses splits by time, with the test period after the training period [8], and data leakage, including tuning a model on its test data, is a known source of inflated results in machine-learning research [10].
3. Materials and Methods
3.1. Pre-Registration
The study followed a written protocol that the first and last authors signed off before a pilot run. The protocol was frozen as version 1.0 after the pilot, and both versions are recorded in the code repository with time-stamped tags and a cryptographic hash. The pilot (two benchmarks, XGBoost only, two repeats outside the main range) measured cost, run time and how often the LLM’s answers could be parsed; no test score was computed from it, and it led to no change in the protocol. One deviation occurred after the freeze (Section 3.8). The exploratory analyses of Section 5.1 and 5.2 were declared in the repository before any test score was computed, and the analysis in Section 5.3 was added afterwards and is labelled post hoc.
3.2. Benchmarks and Splits
Three public fraud benchmarks were used. They are the most widely used public fraud datasets that include a time variable, which the study needs, and they differ in the kind of fraud, its rate and the number of frauds available for tuning. The IEEE Computational Intelligence Society Fraud Detection data (IEEE-CIS) come from a 2019 Kaggle competition with the payment company Vesta [17]; they are real card-not-present e-commerce transactions over about six months, with 3.5% fraud. The Bank Account Fraud suite (BAF, Base variant) [18] holds one million bank-account opening applications over eight months, with about 1.1% fraud; it was generated to resemble real data while protecting privacy and was designed for evaluation over time. The credit-card data released by the Machine Learning Group of the Université Libre de Bruxelles (ULB) [19] are real card transactions over two days, with 0.17% fraud and anonymised features. Together they span a 20-fold range of fraud rates and a 100-fold range in the number of frauds available for tuning (Table 1).
Each benchmark was split out of time. For IEEE-CIS and ULB, the training period holds the rows up to the 70% point of the time variable and the later rows form the test period; for BAF, the authors’ split was used, with months 0–5 for training and months 6–7 for testing. During tuning, each candidate setting was scored on a validation set taken from the end of the training period: the last 20% by time, or month 5 for BAF (about 15% of the training rows). For H5, an alternative validation set was drawn as a random 20% of the training period with the same fraud rate as the whole period. The categorical variables of IEEE-CIS and BAF were encoded by a smoothed fraud rate and a frequency, and during tuning these encodings were computed from the training rows outside the validation set only, so that no validation row was encoded with its own label.
3.3. Models and Search Spaces
XGBoost and LightGBM were chosen because they are the two most widely used gradient-boosting libraries and the most common strong baselines in fraud detection and on tabular data generally [11,12,13]. They are sensitive to their hyperparameters, so tuning matters, and they grow trees differently: XGBoost limits the depth of each tree, whereas LightGBM grows the most promising leaf first and limits the number of leaves, which gives two different search spaces. Both support early stopping, described below.
For XGBoost, eight hyperparameters were searched: the learning rate, maximum tree depth, minimum child weight, row and column subsampling, L1 and L2 penalties, and . For LightGBM, seven were searched: the learning rate, number of leaves, minimum child samples, row and column subsampling, and L1 and L2 penalties. The ranges were identical for every optimiser and were shown verbatim to the LLM. The number of trees was not searched. In each trial, trees were added until the validation score had not improved for 100 rounds (early stopping), up to 3,000 trees. The chosen setting was then retrained on the whole training period, with the number of trees scaled by 1/0.8 for the larger data, and scored once on the test period.
3.4. Optimisers
Each tuning run, called a search, had 40 trials. After k trials, the incumbent is the setting with the best validation score among those k trials; the incumbents after 5, 10, 20 and 40 trials were each retrained and scored on the test period, which shows how performance grows with the tuning budget. TPE used Optuna’s default settings, that is, the multivariate form [3,4] whose first 10 trials are random, so random search and TPE share their first 10 trials. Table 2 lists the six strategies.
3.5. LLM Settings and Prompts
The main LLM was Claude Opus 5.5 (Anthropic; model identifier claude-opus-5-5), accessed through the Claude application programming interface (API) with the official Python library at a fixed low reasoning effort. The model accepts no sampling settings and the API takes no random seed, so repeats differed through the model’s own sampling. A comparison arm used the smaller Claude Haiku 5.5 (claude-haiku-5-5) with the same settings. Each answer had to contain the proposed setting in JSON format. Out-of-range values were clipped to the range and non-integer values for integer settings were rounded, and an unusable answer or a refusal was retried once and otherwise replaced by a random setting. No data rows were ever sent to the LLM.
Two prompt versions were used. In the anonymised version, the main condition, the task was described only as binary classification on tabular data, with the fraud rate given as a band (below 1%, 1–5% or above 5%), the row counts to two significant figures and the number of features as “between 30 and 60”. The named version added the dataset’s public name and the feature names. The bands were introduced before the freeze, after a test run in which four of 40 anonymised answers identified the ULB data from its exact fraud rate and feature count; with the bands, none did. Every request and answer was logged with its token usage.
3.6. Design
Each combination of a dataset and a model, six in total, is called a cell. Every strategy was run 10 times per cell, and the repeats differed in the optimiser’s random seed, the model’s seed and the LLM’s sampling. The searches comprised random search and TPE under both tuning objectives (240 searches), the LLM proposer and warm start under both objectives with the anonymised prompt (240), the LLM proposer with the named prompt (60), TPE with the random validation set (60) and the Haiku proposer (60), together with 240 single runs for the default and zero-shot strategies. All 900 jobs ran on one workstation (Intel Core i7-14700F, NVIDIA RTX 3050), using 61.8 hours of compute, and none failed.
3.7. Measures, Hypotheses and Analysis
Ranking performance was measured by PR-AUC, the area under the precision–recall curve on the test period. It summarises how well a model ranks frauds above legitimate cases and suits rare positive classes better than accuracy, which a model can make high by never flagging fraud. The quality of predicted probabilities was measured by the test log loss, the average of −log of the probability the model gave to the true outcome on the test period, where lower values mean better probabilities, and by the calibration error in predicted fraud volume, . Here p is the sum of the model’s fraud probabilities over the test period and “frauds” the number of actual frauds, so a ratio of 1 means that the model predicts the right number of frauds, and the absolute difference from 1 is the relative error in predicted fraud volume, which matters for planning investigation capacity.
Each hypothesis has a decision rule fixed in the protocol, its pre-registered condition, stated as the number of cells in which a comparison must go the expected way (Table 3). Medians and spreads were taken over the 10 repeats of a cell. For each comparison, a 95% confidence interval (CI) was computed by bootstrapping, with 10,000 resamples of the repeats within each strategy (seed 20261103), for the difference in medians or, for H2, the ratio of standard deviations (SD). A hypothesis is called supported when the count condition holds for the point estimates, clearly supported when it also holds when the confidence interval rather than the point estimate must meet the condition, and not supported otherwise. No test was pooled across datasets. As supplementary statistics, which were not pre-registered, we report two-sided permutation p-values for the difference in medians per cell, from 10,000 random relabellings of the 20 repeats.
3.8. Deviation from the Protocol
The protocol listed the correlation between validation and test scores across all 40 trials of each search as a secondary outcome. The frozen scoring step retrained only the incumbents, and scoring all 26,400 trials would have taken about 130 hours, so the correlation (Spearman’s , a rank correlation) was computed across the incumbents after 40 trials of all relevant searches in a cell (n = 60), and the corresponding figure shows the incumbents after 5, 10, 20 and 40 trials.
4. Results
4.1. Overview
The LLMs answered reliably. All 10,322 API calls returned a normal answer and none was refused. Across the 10,320 LLM-proposed trials, two answers needed a retry (both then succeeded), 36 values were clipped into range and 308 proposals repeated an earlier setting. Table 3 summarises the verdicts. The verdicts, and the primary claims of the paper, rest on the pre-registered decision rules and bootstrap intervals; the permutation p-values reported below are supplementary, computed per cell and not corrected for multiple comparisons, and serve to indicate the strength of individual differences.
4.2. Does the LLM Need Fewer Trials? (H1)
Ten LLM-proposed trials matched forty TPE trials on BAF and ULB, but not on IEEE-CIS (Table 4, Figure 1). On BAF, the LLM proposer reached its final level within five trials, while TPE caught up only after 40. On IEEE-CIS, TPE kept improving up to 40 trials and ended 0.008–0.011 above the LLM proposer after 10 trials (p = 0.001 and p = 0.003). After 20 trials, the LLM proposer met the H1 condition in four cells with the confidence intervals as well (sensitivity analysis S2).
4.3. Does the LLM Vary as Much Between Repeats? (H2)
H2 was not supported. The ratio of standard deviations across repeats, LLM over TPE, was at least 0.8 in only three of six cells for each LLM strategy (Figure 2). The ratios ranged from 0.25 to 1.80 for the proposer and from 0.41 to 1.33 for the warm start, with wide confidence intervals, and the only clear difference was on BAF with XGBoost, where the LLM proposer was more consistent than TPE (0.25 [0.13, 0.57]). With 10 repeats, the LLM search neither systematically inherited nor removed TPE’s run-to-run variation.
4.4. Does Tuning on Log Loss Give Better Probabilities? (H3)
H3 was not supported, because the gain in probability quality came at a cost in ranking performance (Table 5, Figure 3). On IEEE-CIS, tuning TPE on log loss instead of PR-AUC clearly reduced the calibration error, by 0.091 and 0.124 ( for both), but lowered test PR-AUC by 0.017 and 0.020 ( and p = 0.001), beyond the allowed 0.01. On BAF the tuning objective made no material difference, and on ULB tuning on log loss improved test PR-AUC, by 0.010 and 0.012 (p = 0.001 and p = 0.024).
4.5. Does Naming the Dataset Help? (H4)
The named prompt gave a higher median test PR-AUC than the anonymised prompt in three of the four ULB and IEEE-CIS cells, and the gap on BAF was smaller, so the pre-registered condition was met. The gaps, however, were negligible: 0.003 on IEEE-CIS with XGBoost (p = 0.037) and between −0.0004 and +0.0014 elsewhere (p ≥ 0.30). The zero-shot comparison did not support H4, and no anonymised answer named the domain or a benchmark in any cell. Naming the benchmark therefore brought at most a negligible advantage; Section 5.1 qualifies this for ULB.
4.6. Does Tuning on the Latest Data Select Better Settings? (H5)
H5 was not supported. Tuning on the time-ordered validation set did not select settings with higher test PR-AUC than tuning on a random validation set. On IEEE-CIS the random validation set did better with both models, by 0.004 with XGBoost (p = 0.023) and by 0.012 with LightGBM (p = 0.008). On BAF there was no difference (p ≥ 0.79), and on ULB the difference pointed the same way as on IEEE-CIS without reaching significance (p ≥ 0.24). Section 5.3 examines why.
4.7. Cost, Smaller Model and the Value of Tuning
The Haiku proposer matched the Opus proposer within 0.003 PR-AUC in every cell (p ≥ 0.18) except BAF with XGBoost, where Opus was better by 0.002 (), at about 3% of the cost (Table 6). The main runs used 19.0 million input and 1.06 million output tokens with Opus (USD 97 in total) and 6.0 million and 0.89 million with Haiku (USD 1). LLM searches took longer than TPE searches because each trial waited for an API reply, for example 372 s against 187 s on BAF with XGBoost.
Tuning with TPE raised test PR-AUC over the library defaults in every cell, by 0.035 and 0.076 on IEEE-CIS, 0.043 and 0.023 on BAF, and 0.106 and 0.063 on ULB (p ≤ 0.014 in all six cells). A single zero-shot LLM proposal, made without seeing any results, recovered most of this gain. On IEEE-CIS and BAF it stayed below TPE (by 0.007–0.018, p ≤ 0.001), but on ULB with XGBoost it was better than TPE after 40 trials (0.813 against 0.803; p = 0.001). Across the incumbents, validation and test scores were positively related on IEEE-CIS ( = 0.54 and 0.44; for both) and BAF ( = 0.47, ; = 0.32, p = 0.012), but negatively on ULB ( = −0.25, p = 0.050; = −0.27, p = 0.035; Figure 4). With 28 frauds in the ULB validation set, choosing the setting with the higher validation score tended to choose a worse one. The recall of frauds at a 1% false-positive rate (the share of frauds caught when 1% of legitimate cases are flagged) and the Brier score (the mean squared error of the probabilities) moved with PR-AUC.
5. Exploratory Analyses
The analyses in Section 5.1 and 5.2 were declared in the repository before any test score was computed and use only validation scores, the LLM logs and 270 additional LLM calls (USD 3.41). The analysis in Section 5.3 was added after the test results were seen and is post hoc.
5.1. Did the LLM Reason from the Evidence or Recall Settings?
To test whether proposals follow the evidence in the prompt, 60 logged LLM-proposer prompts (from trials 10–30, 10 per cell) were sent again with their scores unchanged, shuffled across trials, or reversed in rank so that the worst trial looked best. With shuffled scores, 46 of 58 new proposals (79%) lay closer to the trial presented as best than to the trial that had truly scored best (binomial test against 50%, ), and with reversed scores, 47 of 60 did (78%, ). The LLM therefore tuned from the history it was shown. Its search was also narrow: the median distance, in the normalised search space, between a proposal and the current incumbent was 0.12 for both Opus and Haiku, against 0.45 for TPE and 1.12 for random search, and its first proposals were mostly textbook values such as a learning rate of 0.05 or 0.1 and a tree depth of 6.
A direct identification probe qualifies the H4 result. Asked which public dataset an anonymised description most likely came from, Opus named the ULB credit-card data in 20 of 20 calls and BAF in 5 of 20 (with 12 answers of “unknown”), and never gave IEEE-CIS as its first guess. During tuning no answer named a dataset, but the model could recognise ULB when asked, so on ULB both prompt versions may effectively have known the dataset, and IEEE-CIS gives the cleanest test of H4. When asked to recall strong public settings, Opus produced settings that lay as close to its anonymised proposals as to its named ones on ULB and BAF, and closer to the named ones only on IEEE-CIS, which suggests general prior knowledge rather than recall of a specific benchmark.
5.2. How the Hyperparameters Interact
In the random-search trials (400 per cell), adding pairwise interactions to a model of validation PR-AUC on the hyperparameters raised the cross-validated R2 from 0.54–0.77 to 0.60–0.86 on IEEE-CIS and BAF, and added nothing on ULB, whose validation scores were close to noise (R2 = 0.02–0.29). The strongest dependence was between the learning rate and the number of trees chosen by early stopping ( = −0.60 to −0.86 among the best quarter of trials). In the last 20 trials of each search, the Opus proposer’s pairs of settings varied together more than those of the other strategies (mean absolute correlation 0.47 against about 0.34). This is consistent with coherent joint proposals, although small correlated steps around the incumbent would leave the same signature.
5.3. Why the Random Validation Set Did Better (Post Hoc)
The two validation sets mainly changed when early stopping ended. On IEEE-CIS and ULB, settings chosen with the random validation set were retrained with 1.7 to 3.5 times as many trees (Table 7). The random set’s rows are mixed in time with the training rows, and on IEEE-CIS related to them, so its scores were inflated (0.85 on IEEE-CIS against a test level of about 0.54) and kept improving as trees were added. The time-ordered set covers a single later sub-period with a different fraud rate (4.06% on IEEE-CIS, against 3.52% in the training period and 3.46% in the test period; 0.07% on ULB, with only 28 frauds), so its score peaked earlier. Larger models did better on the test period in every cell ( = 0.49–0.71 between the logarithm of the number of trees and test PR-AUC; p ≤ 0.006). On BAF, both validation sets chose similar numbers of trees and gave similar results.
6. Discussion
The efficiency claim for LLM-guided tuning holds in a qualified form. On two of three fraud benchmarks, ten LLM proposals were as good as forty TPE trials, and a small, inexpensive model was as good as a large one. On IEEE-CIS, TPE’s systematic search kept improving while the LLM’s narrow search around its best setting did not. For practitioners whose training runs are expensive, an LLM is an attractive way to start tuning, but it is not a substitute for a longer search when the validation score is informative and the budget allows it.
The counterfactual test shows that the LLM tuned from the evidence it was given rather than from memory, and naming the benchmark made no meaningful difference, which matters for use on private data. The identification probe shows, however, that even coarse descriptions can reveal a famous benchmark, so anonymisation should be tested rather than assumed in future studies of LLM-based optimisers.
The strongest pattern in the study concerns the validation signal rather than the optimiser. Where the validation set held few frauds, validation scores were unrelated or even negatively related to test performance, a single zero-shot setting matched or beat every search, and the spread between repeats was large for every strategy. This is the selection effect known from model selection in general [9], and no optimiser can remove it, because it lies in the score being maximised. The H5 result adds a less familiar effect. A short time-ordered validation set gave honest scores but stopped training early, whereas a random validation set gave badly inflated scores that nevertheless led to larger and better models. The lesson is not to validate on random samples, whose scores here overstated performance by about 0.3 PR-AUC on IEEE-CIS, but to separate the two jobs a validation set does in boosting: recent, out-of-time data should estimate performance, while a short recent window may be a poor guide to how many trees to grow. Choosing the number of trees on a longer or cross-validated window, or scaling it to the training size, are natural next tests.
Tuning on log loss brought the predicted fraud volume closer to the actual volume on IEEE-CIS, which matters for capacity planning, but cost ranking performance. Calibration depends on how boosted models are trained and stopped [20], so the tuning objective should follow how the scores will be used. An alternative that avoids hyperparameter search altogether is Bayesian model averaging over decision trees, which samples tree structures by Markov chain Monte Carlo and gives a credible interval for each predicted probability; it has been applied to financial decision-making with missing data [21], and comparing it with LLM-guided tuning on fraud data is a natural next step.
For practitioners, the results suggest when each choice matters. An LLM proposer is most useful when each training run is expensive and only about ten trials are affordable: there it matched forty TPE trials on two of three benchmarks, and a small model was enough. When the budget allows a longer search and the validation set is large enough to be informative, as on IEEE-CIS with over 3,000 validation frauds, a systematic optimiser such as TPE kept improving and is the better choice. When the validation set holds few frauds, as on ULB with 28, no optimiser can be trusted to pick the best setting, and effort is better spent on the validation design, for example a longer validation window, repeated validation or a sensible default, than on the optimiser. In all cases, the number of boosting rounds deserves separate attention, because a short recent validation window stopped boosting too early, and the tuning objective should match how the scores will be used: ranking alerts calls for PR-AUC, estimating fraud volume for log loss or a calibration check.
This study has limitations. It covers gradient-boosted trees on three public benchmarks without account histories, and whether its conclusions about LLM-guided tuning hold for deep tabular models, or for sequence models trained on account histories such as fraud transformers [13,14], is outside its scope. Only one LLM vendor was used and hosted models change, so all prompts and answers are released. The narrow, incumbent-following search of the LLM (a median distance of 0.12 between a proposal and the current best setting) reflects how it was prompted here, with the full trial history and one proposal per call; whether it holds for other prompt styles, other tabular tasks or sequence models is untested. Such a search should favour short budgets on smooth response surfaces and may under-explore when good settings lie far from the first proposals. Ten repeats give imprecise estimates of spread, as the wide intervals for H2 show. The memorisation analysis is limited by the public nature of the benchmarks, and a definitive test needs data the model cannot have seen. The explanation of H5 is post hoc and should be tested in a new study. Finally, the p-values are supplementary, computed per cell and not corrected for multiple comparisons, and the verdicts rest on the pre-registered rules.
7. Conclusions
The pre-registered comparison supports five conclusions. First, an LLM can tune fraud detectors efficiently, but not on every benchmark: after 10 trials, the LLM proposer was within 0.005 of TPE after 40 trials, or better, on BAF and ULB (differences −0.0002 to +0.010; p ≥ 0.075), and clearly behind on IEEE-CIS (−0.008 and −0.011; p = 0.001 and 0.003). Second, a small LLM is enough: Claude Haiku 5.5 matched Claude Opus 5.5 within 0.003 PR-AUC in five of six cells (p ≥ 0.18) at about 3% of the cost (USD 0.02 against 0.51 per 40-trial search). Third, the LLM reasons from the evidence it is given: its proposals followed altered trial scores in 78–79% of cases (), and naming the dataset changed results by at most 0.003 PR-AUC. Fourth, the validation signal matters more than the optimiser: with 28 validation frauds (ULB), validation and test scores were negatively related ( = −0.25 and −0.27; p = 0.050 and 0.035), and one zero-shot setting beat 40 TPE trials with XGBoost (0.813 against 0.803; p = 0.001). Fifth, the timing of the validation set and the tuning objective have side effects: tuning on the most recent data did not select better settings than a random sample, and on IEEE-CIS selected worse ones (by 0.004 and 0.012; p = 0.023 and 0.008) because it stopped training too early, while tuning on log loss improved calibration on IEEE-CIS (calibration error lower by 0.09–0.12; ) at a cost of 0.017–0.020 PR-AUC. Practitioners should treat the validation set as part of the model design, and test LLM-based tuning on their own out-of-time data before relying on it.
Author Contributions
Conceptualization, L.J. and V.S.; methodology, V.S. and L.J.; software, C.M. and T.F.; validation, L.J.; formal analysis, C.M., T.F. and V.S.; investigation, C.M. and T.F.; data curation, L.J.; writing—original draft preparation, L.J. (Discussion), C.M. and T.F. (Methods, Results) and V.S. (Introduction); writing—review and editing, all authors; visualization, C.M. and T.F.; supervision, V.S.; project administration, L.J.; funding acquisition, V.S. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
Acknowledgments
This study builds on fraud-detection work supported by the EU Innovation Bridge programme at the University of Bedfordshire (IBS016). Claude Opus 5.5 and Claude Haiku 5.5 (Anthropic) are the objects of study, used as hyperparameter optimisers through the Claude API as described in Section 3.5. In addition, Claude (Anthropic) assisted with writing the experiment and analysis code and with drafting and editing the manuscript; the authors reviewed and verified all code, results and text and take full responsibility for the content.
Conflicts of Interest
L.J. and V.S. are Guest Editors of this Special Issue. This manuscript was handled independently of the Guest Editors, who had no role in the choice of reviewers or the editorial decision. L.J. provides data-analytics consultancy through LJ Analytics and uses its email address for correspondence; the company had no role in the design, analysis or reporting of the study. The authors declare no other conflicts of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| API | Application programming interface |
| BAF | Bank Account Fraud (dataset) |
| CI | Confidence interval |
| HPO | Hyperparameter optimisation |
| IEEE-CIS | IEEE Computational Intelligence Society Fraud Detection (dataset) |
| LLM | Large language model |
| PR-AUC | Area under the precision–recall curve |
| SD | Standard deviation |
| TPE | Tree-structured Parzen estimator |
| ULB | Université Libre de Bruxelles (credit-card dataset) |
References
- Bischl, B.; Binder, M.; Lang, M.; Pielok, T.; Richter, J.; Coors, S.; Thomas, J.; Ullmann, T.; Becker, M.; Boulesteix, A.-L.; Deng, D.; Lindauer, M. Hyperparameter optimization: Foundations, algorithms, best practices, and open challenges. WIREs Data Min. Knowl. Discov. 2023, 13, e1484. [CrossRef]
- Bergstra, J.; Bardenet, R.; Bengio, Y.; Kégl, B. Algorithms for hyper-parameter optimization. In Advances in Neural Information Processing Systems 24; 2011; pp. 2546–2554. https://proceedings.neurips.cc/paper_files/paper/2011/hash/86e8f7ab32cfd12577bc2619bc635690-Abstract.html.
- Falkner, S.; Klein, A.; Hutter, F. BOHB: Robust and efficient hyperparameter optimization at scale. In Proceedings of the 35th International Conference on Machine Learning; PMLR 80, 2018; pp. 1437–1446. https://proceedings.mlr.press/v80/falkner18a.html.
- Akiba, T.; Sano, S.; Yanase, T.; Ohta, T.; Koyama, M. Optuna: A next-generation hyperparameter optimization framework. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining; 2019; pp. 2623–2631. [CrossRef]
- Yang, C.; Wang, X.; Lu, Y.; Liu, H.; Le, Q.V.; Zhou, D.; Chen, X. Large language models as optimizers. In Proceedings of the International Conference on Learning Representations; 2024. Preprint arXiv:2309.03409.
- Liu, T.; Astorga, N.; Seedat, N.; van der Schaar, M. Large language models to enhance Bayesian optimization. In Proceedings of the International Conference on Learning Representations; 2024. Preprint arXiv:2402.03921.
- Zhang, M.R.; Desai, N.; Bae, J.; Lorraine, J.; Ba, J. Using large language models for hyperparameter optimization. Preprint arXiv:2312.04528, 2023.
- Le Borgne, Y.-A.; Siblini, W.; Lebichot, B.; Bontempi, G. Reproducible Machine Learning for Credit Card Fraud Detection—Practical Handbook; Université Libre de Bruxelles, 2022. https://fraud-detection-handbook.github.io/fraud-detection-handbook/.
- Cawley, G.C.; Talbot, N.L.C. On over-fitting in model selection and subsequent selection bias in performance evaluation. J. Mach. Learn. Res. 2010, 11, 2079–2107.
- Kapoor, S.; Narayanan, A. Leakage and the reproducibility crisis in machine-learning-based science. Patterns 2023, 4, 100804.10.1016/j.patter.2023.100804.
- Chen, T.; Guestrin, C. XGBoost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining; 2016; pp. 785–794. [CrossRef]
- Ke, G.; Meng, Q.; Finley, T.; Wang, T.; Chen, W.; Ma, W.; Ye, Q.; Liu, T.-Y. LightGBM: A highly efficient gradient boosting decision tree. In Advances in Neural Information Processing Systems 30; 2017; pp. 3146–3154. https://proceedings.neurips.cc/paper_files/paper/2017/hash/6449f44a102fde848669bdd9eb6b76fa-Abstract.html.
- Aminian, G.; Elliott, A.; Li, T.; Wong, T.C.H.; Dehon, V.C.; Szpruch, L.; Maple, C.; Read, C.; Brown, M.; Reinert, G.; Mamouei, M. FraudTransformer: Time-aware GPT for digital payment fraud detection. In 2026 IEEE Conference on Artificial Intelligence (CAI); 2026; pp. 850–856. [CrossRef]
- Zhao, Z.Y.; Zhu, Z.; Li, G.; Wang, W.; Wang, B. Generative pretraining at scale: Transformer-based encoding of transactional behavior for fraud detection. Preprint arXiv:2312.14406, 2023.
- Grinsztajn, L.; Oyallon, E.; Varoquaux, G. Why do tree-based models still outperform deep learning on typical tabular data? In Advances in Neural Information Processing Systems 35; Curran Associates, 2022; pp. 507–520. [CrossRef]
- Shwartz-Ziv, R.; Armon, A. Tabular data: Deep learning is not all you need. Inf. Fusion 2022, 81, 84–90. [CrossRef]
- IEEE Computational Intelligence Society; Vesta Corporation. IEEE-CIS Fraud Detection. Kaggle competition, 2019. https://www.kaggle.com/c/ieee-fraud-detection.
- Jesus, S.; Pombal, J.; Alves, D.; Cruz, A.; Saleiro, P.; Ribeiro, R.P.; Gama, J.; Bizarro, P. Turning the tables: Biased, imbalanced, dynamic tabular datasets for ML evaluation. In Advances in Neural Information Processing Systems 35 (Datasets and Benchmarks Track); 2022. Preprint arXiv:2211.13358.
- Dal Pozzolo, A.; Caelen, O.; Johnson, R.A.; Bontempi, G. Calibrating probability with undersampling for unbalanced classification. In 2015 IEEE Symposium Series on Computational Intelligence; 2015; pp. 159–166. Dataset: Credit Card Fraud Detection, Kaggle (ULB Machine Learning Group). [CrossRef]
- Niculescu-Mizil, A.; Caruana, R. Predicting good probabilities with supervised learning. In Proceedings of the 22nd International Conference on Machine Learning; 2005; pp. 625–632. [CrossRef]
- Schetinin, V.; Jakaite, L. Bayesian learning strategies for reducing uncertainty of decision-making in case of missing values. Mach. Learn. Knowl. Extr. 2025, 7, 106. [CrossRef]
Figure 1.
Anytime curves: test PR-AUC against the number of trials (median and interquartile range of 10 repeats) for random search, TPE, the Opus proposer, the warm start and the Haiku proposer, by dataset and model.
Figure 1.
Anytime curves: test PR-AUC against the number of trials (median and interquartile range of 10 repeats) for random search, TPE, the Opus proposer, the warm start and the Haiku proposer, by dataset and model.

Figure 2.
Test PR-AUC of the 10 repeats after 40 trials, by strategy, dataset and model (dots: repeats; bar: median).
Figure 2.
Test PR-AUC of the 10 repeats after 40 trials, by strategy, dataset and model (dots: repeats; bar: median).

Figure 3.
Calibration-in-the-large on the test period, (1 = correct predicted fraud volume), by tuning objective, for TPE and the Opus proposer.
Figure 3.
Calibration-in-the-large on the test period, (1 = correct predicted fraud volume), by tuning objective, for TPE and the Opus proposer.

Figure 4.
Validation against test PR-AUC of the incumbents after 5, 10, 20 and 40 trials, by dataset and model.
Figure 4.
Validation against test PR-AUC of the incumbents after 5, 10, 20 and 40 trials, by dataset and model.

Table 1.
Sizes of the benchmarks and splits (number of rows, with frauds in brackets).
| Dataset | Features | Training period | Validation set (end of training period) | Test period |
|---|---|---|---|---|
| IEEE-CIS | 53 | 413,378 (14,538) | 82,676 (3,358) | 177,162 (6,125) |
| BAF (Base) | 35 | 794,989 (8,151) | 119,323 (1,411) | 205,011 (2,878) |
| ULB | 31 | 199,368 (384) | 39,874 (28) | 85,439 (108) |
Table 2.
The six tuning strategies compared. Each strategy is identified by a code used in the tables and figures. A “trial” is one training run with one candidate setting; the zero-shot and default strategies use a single run.
Table 2.
The six tuning strategies compared. Each strategy is identified by a code used in the tables and figures. A “trial” is one training run with one candidate setting; the zero-shot and default strategies use a single run.
| Code | Strategy | How settings are chosen |
|---|---|---|
| O0 | Library defaults | One run with the library’s default settings |
| O0-LLM | Zero-shot LLM | The LLM proposes one setting from the task description alone, without seeing any results (“zero-shot”) |
| O1 | Random search | Settings drawn at random from the search space |
| O2 | TPE (Bayesian) | Optuna’s multivariate TPE, with 10 random start-up trials |
| O3 | LLM proposer | The LLM proposes every setting after reading the task description, the search space and the results of all earlier trials |
| O4 | LLM warm start | The LLM proposes the first five settings; TPE continues |
Table 3.
Pre-registered hypotheses, decision rules and verdicts. “Cells” are the six dataset–model combinations; the numbers give how many cells met the rule using point estimates and, in brackets, using the 95% confidence intervals.
Table 3.
Pre-registered hypotheses, decision rules and verdicts. “Cells” are the six dataset–model combinations; the numbers give how many cells met the rule using point estimates and, in brackets, using the 95% confidence intervals.
| Question and decision rule | Verdict | |
|---|---|---|
| H1 | Does the LLM need fewer trials? After 10 trials the LLM’s test PR-AUC is at least TPE’s after 40 trials minus 0.005, in at least 4 of 6 cells (separately for O3 and O4) | Supported: O3 in 4 cells (3), O4 in 5 cells (2) |
| H2 | Does the LLM vary as much between repeats as TPE? SD(LLM)/SD(TPE) ≥ 0.8 after 40 trials in at least 4 of 6 cells | Not supported: 3 cells for O3 and for O4 |
| H3 | Does tuning on log loss give better probabilities? Lower test log loss and lower calibration error, at a PR-AUC cost of at most 0.01, in at least 4 of 6 cells (TPE) | Not supported: 2 cells |
| H4 | Does naming the dataset help? Named > anonymised prompt in at least 3 of the 4 ULB and IEEE-CIS cells, with a smaller gap on BAF | Supported by the rule: 3 cells (1), but with negligible gaps |
| H5 | Does tuning on the latest data select better settings? Time-ordered > random validation set for both models in at least 2 of 3 datasets (TPE) | Not supported: 1 dataset; reversed on IEEE-CIS |
Table 4.
Test PR-AUC (median of 10 repeats) of the LLM strategies after 10 trials and of TPE after 40 trials; differences with 95% confidence intervals and permutation p-values.
Table 4.
Test PR-AUC (median of 10 repeats) of the LLM strategies after 10 trials and of TPE after 40 trials; differences with 95% confidence intervals and permutation p-values.
| Cell | LLM proposer, 10 trials | LLM warm start, 10 trials | TPE, 40 trials | Proposer − TPE [CI]; p | Warm start − TPE [CI]; p |
|---|---|---|---|---|---|
| IEEE-CIS, XGBoost | 0.536 | 0.540 | 0.544 | −0.008 [−0.015, −0.003]; 0.001 | −0.004 [−0.009, 0.000]; 0.012 |
| IEEE-CIS, LightGBM | 0.536 | 0.539 | 0.547 | −0.011 [−0.017, 0.000]; 0.003 | −0.008 [−0.015, 0.004]; 0.030 |
| BAF, XGBoost | 0.204 | 0.204 | 0.203 | 0.001 [−0.001, 0.004]; 0.14 | 0.001 [−0.001, 0.003]; 0.39 |
| BAF, LightGBM | 0.199 | 0.200 | 0.200 | 0.000 [−0.001, 0.002]; 0.68 | 0.001 [0.000, 0.002]; 0.32 |
| ULB, XGBoost | 0.810 | 0.808 | 0.803 | 0.007 [−0.002, 0.011]; 0.11 | 0.005 [−0.006, 0.011]; 0.39 |
| ULB, LightGBM | 0.808 | 0.809 | 0.797 | 0.010 [−0.007, 0.046]; 0.075 | 0.012 [−0.026, 0.047]; 0.51 |
Table 5.
Tuning on log loss minus tuning on PR-AUC (TPE, after 40 trials): medians with 95% confidence intervals and, for the calibration error and PR-AUC, permutation p-values.
Table 5.
Tuning on log loss minus tuning on PR-AUC (TPE, after 40 trials): medians with 95% confidence intervals and, for the calibration error and PR-AUC, permutation p-values.
| Cell | Test log loss | Calibration error ; p | Test PR-AUC; p |
|---|---|---|---|
| IEEE-CIS, XGBoost | −0.0040 [−0.0062, −0.0015] | −0.091 [−0.115, −0.066]; < 0.001 | −0.017 [−0.021, −0.004]; < 0.001 |
| IEEE-CIS, LightGBM | −0.0032 [−0.0079, −0.0023] | −0.124 [−0.193, −0.090]; < 0.001 | −0.020 [−0.028, −0.012]; 0.001 |
| BAF, XGBoost | 0.0002 [−0.0002, 0.0003] | 0.009 [−0.034, 0.039]; 0.49 | −0.002 [−0.003, 0.002]; 0.60 |
| BAF, LightGBM | 0.0001 [−0.0001, 0.0002] | 0.012 [0.004, 0.024]; 0.022 | −0.001 [−0.003, 0.001]; 0.51 |
| ULB, XGBoost | −0.0002 [−0.0004, 0.0000] | −0.038 [−0.119, 0.027]; 0.33 | 0.010 [0.003, 0.014]; 0.001 |
| ULB, LightGBM | −0.0006 [−0.0012, −0.0002] | −0.062 [−0.213, 0.003]; 0.045 | 0.012 [−0.005, 0.048]; 0.024 |
Table 6.
Opus against Haiku as LLM proposer (anonymised prompt, PR-AUC objective, test PR-AUC after 40 trials).
Table 6.
Opus against Haiku as LLM proposer (anonymised prompt, PR-AUC objective, test PR-AUC after 40 trials).
| Cell | Opus | Haiku | Haiku − Opus [CI]; p | Cost per search (USD), Opus / Haiku |
|---|---|---|---|---|
| IEEE-CIS, XGBoost | 0.541 | 0.542 | 0.001 [−0.002, 0.005]; 0.49 | 0.51 / 0.018 |
| IEEE-CIS, LightGBM | 0.542 | 0.544 | 0.002 [−0.003, 0.007]; 0.45 | 0.47 / 0.016 |
| BAF, XGBoost | 0.204 | 0.202 | −0.002 [−0.003, −0.001]; < 0.001 | 0.55 / 0.019 |
| BAF, LightGBM | 0.200 | 0.199 | −0.001 [−0.003, 0.001]; 0.23 | 0.48 / 0.017 |
| ULB, XGBoost | 0.810 | 0.811 | 0.001 [−0.003, 0.005]; 0.84 | 0.53 / 0.018 |
| ULB, LightGBM | 0.808 | 0.811 | 0.003 [−0.001, 0.010]; 0.18 | 0.51 / 0.017 |
Table 7.
Settings chosen by TPE with each validation set (medians over 10 repeats).
| Cell | Trees, time-ordered set | Trees, random set | Validation PR-AUC, time-ordered | Validation PR-AUC, random |
|---|---|---|---|---|
| IEEE-CIS, XGBoost | 850 | 2,688 | 0.56 | 0.85 |
| IEEE-CIS, LightGBM | 1,620 | 2,737 | 0.56 | 0.85 |
| BAF, XGBoost | 1,875 | 1,436 | 0.20 | 0.17 |
| BAF, LightGBM | 1,224 | 1,372 | 0.20 | 0.17 |
| ULB, XGBoost | 246 | 411 | 0.74 | 0.89 |
| ULB, LightGBM | 263 | 914 | 0.73 | 0.89 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.