Hyperparameter

A hyperparameter is a setting fixed before an AI model is trained or run, such as a penalty or an LLM's temperature, rather than one learned from data.

Status
Published, version 1.0.0
Last reviewed
10 Nov 2026, by Dr Darrin Baines
Report a problem
Tell us if something is wrong or out of date

Concept Architecture

Hyperparameter Settings in Machine Learning and Language Models

In machine learning, a hyperparameter is a value the analyst sets for the algorithm, whereas the ordinary parameters of the model, such as regression coefficients or network weights, are estimated from the training data. The penalty strength in a penalised regression and the temperature at which a large language model samples its answer are both hyperparameters. For HTA analysts the distinction matters because the same algorithm applied to the same records can give different screening or extraction results under different settings, and the settings rarely show in the output. NICE ECD20 (2026), the NICE framework on AI methods for evidence, names hyperparameters among the factors that can affect reproducibility and that a report should describe.

Learned parameters and chosen settings

Bergstra and Bengio describe a learning algorithm as a procedure that fits a function to training data by optimising a criterion over a set of parameters, while the algorithm itself carries further settings, the hyper-parameters, that must be chosen first. Their example is a support vector machine, where a penalty controlling the margin and the bandwidth of a Gaussian kernel must be picked before fitting starts. Probst and colleagues draw the same line between first-level model parameters, determined during training, and second-level tuning parameters set before the algorithm runs.

The vocabulary clashes with health economic usage, where a parameter input to a cost-effectiveness model is a quantity such as a transition probability, obtained by parameter estimation. A hyperparameter is instead a methods choice about how an estimate or prediction is produced.

Settings that govern learning, structure and output

The ECD20 glossary entry covers settings that act on learning, on model structure and on how a trained model answers. Some govern the learning process, such as the learning rate in gradient descent, which sets how far each update moves the weights, or the penalty in ridge regression. James and colleagues write the ridge regression criterion as

∑i=1n(yi−β0−∑j=1pβjxij)2+λ∑j=1pβj2\sum_{i=1}^{n} \left( y_i - \beta_0 - \sum_{j=1}^{p} \beta_j x_{ij} \right)^2 + \lambda \sum_{j=1}^{p} \beta_j^2

where yiy_i is the outcome for observation ii, nn is the number of observations, xijx_{ij} is the value of predictor jj for observation ii, pp is the number of predictors, β0\beta_0 is the intercept, βj\beta_j is the coefficient on predictor jj and λ\lambda is a tuning parameter, zero or greater, chosen separately from the fit. The coefficients are learned by minimising the criterion with λ\lambda held fixed. With λ=0\lambda = 0 the fit is ordinary least squares, and as λ\lambda grows the coefficients shrink towards zero, accepting a little more bias for lower variance, the bias-variance tradeoff that a penalty uses to limit overfitting.

Other settings fix the structure of the model. James and colleagues give the number of neighbours in a K-nearest neighbours classifier as a tuning parameter whose best value is not known in advance. In the random forest software benchmarked by Probst and colleagues the analyst sets the number of trees and the share of predictors tried at each split, and Bergstra and Bengio list the number of hidden units of a neural network with its learning rate and weight penalty. Such settings multiply in deep learning.

A third group acts only when a trained model is used. A language model scores every possible next token with a logit, and the temperature reshapes the resulting probabilities before one token is drawn. Holtzman and colleagues give the re-estimated softmax as

ql=exp⁡(ul/t)∑l′exp⁡(ul′/t)q_l = \frac{\exp(u_l / t)}{\sum_{l'} \exp(u_{l'} / t)}

where qlq_l is the probability of drawing token ll next, ulu_l is the model's logit for token ll, tt is the temperature and the sum in the denominator runs over every token l′l' in the vocabulary. A temperature below 1 shifts probability towards the likeliest tokens, and the authors cite earlier analyses finding that lowering the temperature improves the quality of generated text at the cost of diversity. Their nucleus sampling adds a threshold pp and draws only from the smallest set of tokens whose probabilities sum to at least pp. Neither setting changes the weights of the model.

Where hyperparameters arise in evidence work

NICE ECD20 (2026) reports that machine learning classifiers and language models have both been evaluated for title and abstract screening in a systematic review, and notes that a traditional supervised classifier needs training data specific to the review while a language model does not. A classifier trained on earlier screening decisions carries penalty and structure settings chosen by its builder, while a language model called through an Application Programming Interface carries sampling settings such as temperature. Such interfaces, according to ECD20, are mainly used to customise AI tools, including through their hyperparameters.

ECD20 keeps training, which builds a model from data, apart from tuning, which adjusts a model that already exists, by Hyperparameter Optimisation in conventional machine learning or by Fine-Tuning of a language model. Setting hyperparameters on a language model without changing its weights counts as LLM Customisation, alongside prompt engineering and retrieval-augmented generation.

In health economic evaluation, ECD20 allows AI only as support with a human closely in the loop, for example drafting code for a health economic model that a person then checks and runs. The settings of the language model used belong to the configuration ECD20 asks teams to describe.

Choosing values without contaminating the test

Probst and colleagues describe software defaults and manual choice based on the literature, experience or trial and error, and contrast both with data-driven tuning against predictive performance. For ridge regression, James and colleagues compute the cross-validation error over a grid of λ\lambda values, take the value with the smallest error and refit on all observations with that value.

How much tuning pays off, and which settings matter, varies by algorithm and dataset, and Hyperparameter Optimisation covers the search itself.

The data used to choose a setting cannot also be used to judge the result. ECD20 requires independent datasets for model selection, training, optimisation, customisation and validation, and accepts holdout and cross-validation as ways to draw them from one population. The TRIPOD+AI reporting guideline for clinical prediction models, published by Collins and colleagues, states that evaluation data should not overlap with the data used to tune hyperparameters, and asks authors to give the number of participants and outcome events used for tuning.

Worked example with temperature in abstract screening

All numbers in this example are illustrative. A review team asks a language model to answer Include, Exclude or Unsure for each abstract. For one borderline abstract the output is restricted to the three answer tokens, so the softmax runs over these three only, and their logits are 2.0, 1.0 and 0.0.

1. Temperature 1. The exponentials are 7.389, 2.718 and 1.000, which sum to 11.107. The probabilities are 7.389 / 11.107 = 0.665 for Include, 2.718 / 11.107 = 0.245 for Exclude and 1.000 / 11.107 = 0.090 for Unsure.

2. Temperature 0.5. Dividing each logit by 0.5 gives 4, 2 and 0, with exponentials 54.598, 7.389 and 1.000 summing to 62.987. The probabilities are 54.598 / 62.987 = 0.867, 7.389 / 62.987 = 0.117 and 1.000 / 62.987 = 0.016.

3. Agreement between two runs. Two independent draws for the same abstract agree with probability equal to the sum of the squared probabilities. At temperature 1 this is 0.4422 + 0.0600 + 0.0081, about 0.51, and at temperature 0.5 it is 0.7517 + 0.0137 + 0.0003, about 0.77.

4. Adding a nucleus threshold. At temperature 1 with pp = 0.9, Include alone holds 0.665, below 0.9, so Exclude is added and the pair holds 0.665 + 0.245 = 0.910. Unsure is never drawn, and the renormalised probabilities are 0.665 / 0.910 = 0.731 for Include and 0.245 / 0.910 = 0.269 for Exclude.

5. Interpretation. A lower temperature makes the answer more repeatable but not necessarily more accurate. The model ranks Include first at every temperature, so lowering the temperature only makes the top-ranked answer more likely, whether or not the abstract meets the criteria. Changing the temperature after validation changes the tool, so performance and stability should be checked at the settings that will be used. ECD20 adds that language model output varies by design and that most implementations offer no way to fix a seed.

Reporting and reproducibility

ECD20 asks reports to describe model version, settings and customisation, and to name the factors that could influence reproducibility, hyperparameters among them. For deterministic methods such as a trained random forest, ECD20 expects a rerun with the same inputs, settings and seeds to reproduce the outputs exactly, while for a stochastic language model it looks for results and conclusions that hold steady when the run is repeated. Because ECD20 also observes that model providers may update parameters, a record of every setting used, defaults included, shows whether a later difference in results comes from the evidence or the configuration.

Boundaries and common misreadings

In Bayesian analysis the word has a different meaning. Gelman and colleagues call the parameters of a prior distribution hyperparameters, and in a hierarchical model the effects of individual studies are drawn from a population distribution whose mean and standard deviation are the hyperparameters. In a Bayesian meta-analysis these are the overall mean effect and the standard deviation of study effects, which reflects between-study heterogeneity. They receive their own prior distribution and are estimated from the data, whereas the hyperparameters of a single-level prior, such as the beta prior for a binomial probability in Gelman and colleagues' example, are set by the analyst.

A tuned value belongs to the data it was tuned on. ECD20 warns that a screening tool validated only on randomised trials may perform poorly in reviews that include non-randomised evidence, and settings chosen on one kind of evidence carry the same risk.

Changing a hyperparameter differs from fine-tuning, which alters the learned weights themselves. When a result depends heavily on a setting, rerunning the analysis at other plausible values works like a sensitivity analysis and shows how far conclusions rest on that choice.

Sources

  • Bergstra J, Bengio Y. Random search for hyper-parameter optimization. Journal of Machine Learning Research. 2012;13:281-305. https://www.jmlr.org/papers/v13/bergstra12a.html
  • Collins GS, Moons KGM, Dhiman P, Riley RD, Beam AL, Van Calster B, et al. TRIPOD+AI statement: updated guidance for reporting clinical prediction models that use regression or machine learning methods. BMJ. 2024;385:e078378. https://doi.org/10.1136/bmj-2023-078378
  • Gelman A, Carlin JB, Stern HS, Dunson DB, Vehtari A, Rubin DB. Bayesian Data Analysis. 3rd ed. Boca Raton: CRC Press; 2013. Chapters 2 and 5. http://www.stat.columbia.edu/~gelman/book/
  • Holtzman A, Buys J, Du L, Forbes M, Choi Y. The curious case of neural text degeneration. International Conference on Learning Representations (ICLR 2020). 2020. https://arxiv.org/abs/1904.09751
  • James G, Witten D, Hastie T, Tibshirani R, Taylor J. An Introduction to Statistical Learning with Applications in Python. Cham: Springer; 2023. Chapters 4 and 6. https://www.statlearning.com
  • National Institute for Health and Care Excellence. AI methods for evidence framework (ECD20). NICE; published 9 November 2026. Chapters on introduction to AI in NICE decision making, principles for using AI in evidence activities, AI methods for evidence synthesis and AI methods for health economic evaluation, and Appendix A glossary. https://www.nice.org.uk/corporate/ecd20
  • Probst P, Boulesteix AL, Bischl B. Tunability: importance of hyperparameters of machine learning algorithms. Journal of Machine Learning Research. 2019;20(53):1-32. https://www.jmlr.org/papers/v20/18-444.html

Frequently Asked Questions (6)

  • What is Hyperparameter?

    A hyperparameter is a setting fixed before an AI model is trained or run, such as a penalty or an LLM's temperature, rather than one learned from data.

    Source: NICE ECD20 (2026)

  • How does a hyperparameter differ from a parameter that a machine learning model learns from data?

    A learning algorithm fits its model by optimising a training criterion over a set of parameters, such as regression coefficients or network weights, and those values come from the training data. A hyperparameter belongs to the algorithm itself and has to be chosen before fitting begins. Bergstra and Bengio give the example of a support vector machine with a Gaussian kernel, where the analyst picks a regularisation penalty that controls the margin and the bandwidth of the kernel. For a neural network the learning rate and the number of hidden units play the same role.

    Source: Bergstra & Bengio 2012

  • Why does NICE ECD20 ask teams to report hyperparameter settings when AI supports evidence synthesis or health economic evaluation?

    NICE ECD20 (2026) names hyperparameters, with prompts and data sources, among the factors that can affect whether an AI method gives the same results again, and asks reports to describe the model version, settings and customisation used. The same algorithm applied to the same records can screen or extract differently under different settings, and those settings rarely show in the output. For a deterministic method such as a trained random forest, ECD20 expects a rerun with the same inputs, settings and seeds to reproduce the outputs exactly. A record of every setting, defaults included, shows whether a later difference in results comes from the evidence or the configuration.

    Source: NICE ECD20 (2026)

  • How is a hyperparameter such as the ridge regression penalty chosen in practice?

    James and colleagues treat the ridge penalty as a tuning parameter, zero or greater, that is set separately from the fit. With a penalty of zero the fit is ordinary least squares, and larger values shrink the coefficients towards zero, trading a little more bias for lower variance in the predictions. The usual approach is to choose a grid of penalty values, compute the cross-validation error for each and keep the value with the smallest error. The model is then refitted on all available observations at that value, and the same logic applies to the number of neighbours in a K-nearest neighbours classifier.

    Source: James et al. 2023

  • What does hyperparameter mean in a Bayesian meta-analysis used for evidence synthesis?

    In Bayesian statistics the word has a different meaning from the one in machine learning. Gelman and colleagues call the parameters of a prior distribution hyperparameters. In a hierarchical model for a meta-analysis, the true effects of the individual studies are treated as draws from a population distribution, and its mean and standard deviation are the hyperparameters, giving the overall mean effect and the spread of study effects that reflects between-study heterogeneity. These quantities receive their own prior, a hyperprior, and are estimated from the data, so they are not fixed by the analyst as a machine learning setting would be.

    Source: Gelman et al. 2013

  • How does the temperature hyperparameter of a large language model affect its answers when screening abstracts for a systematic review?

    A language model scores each possible next token with a logit, and the temperature divides every logit before the softmax turns them into probabilities. A temperature below 1 moves probability towards the likeliest tokens, and Holtzman and colleagues cite earlier work finding that lower temperatures improve text quality at the cost of diversity. In abstract screening a lower temperature makes an Include or Exclude answer more repeatable between runs, but it does not necessarily make the answer more accurate, because the order of the answers stays the same and only the top-ranked answer becomes more likely, right or wrong. Performance and stability should therefore be checked at the temperature that will be used.

    Source: Holtzman et al. 2020

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 10 Nov 2026

Content version: 1.0.0

Canonical Identity

Term code
HS-HP-DH-091

Stable URI · Machine-readable · Resolvable · CC BY 4.0

This article is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).

Author: Dr Darrin Baines · Publisher: Intelligent Parameters Ltd · Identifier: https://healtheconomics.wiki/concept/hyperparameter