Dictionary of Applied Machine Learning
Typeset PDF version — the authoritative form of this entry
The ultimate goal of machine learning (ML) is the accurate prediction of the label of a data point from its features. A label is an attribute of a data point that represents a quantity of interest. Determining the label of a data point is error-prone and often involves human annotation. The choice of label determines the learning task: whether the task is classification or regression depends on the label space together with the loss function. In self-supervised learning, the label is constructed from the features themselves, so that no manual annotation is required.
A label of a data point $\datapoint$ is one of its attributes that represents a higher-level fact, or quantity of interest, and that typically requires human expertise or domain knowledge to determine (Anon., 2003; Everitt and Skrondal, 2010; Gujarati and Porter, 2009). Unlike a feature, which can be computed or measured easily, a label is usually harder to obtain.
For a data point that represents a patient, a feature could be the body weight, while the label could be the presence of a disease. Whether a given attribute serves as a feature or a label is often a design choice that depends on the resources available in a given machine learning (ML) application. If an oncologist is readily available, a cancer prognosis can serve as a feature. On the other hand, if no oncologist is available, the cancer prognosis is a label that needs to be predicted from patient features.
One way to make the notion of a label precise is by introducing a labeling function $\bar{\hypothesis}: \datapointspace \rightarrow \labelspace$. The domain of this function is the data point space $\datapointspace$, the set of all possible data points that can occur in a given ML application. Its values lie in the label space $\labelspace$, the set of all possible values the label of a data point can take on. The function assigns each data point $\datapoint$ its label $\truelabel = \bar{\hypothesis}(\datapoint)$ (Shalev-Shwartz and Ben-David, 2014, Ch. 2).
Note that the labeling function $\bar{\hypothesis}$ acts on the data point $\datapoint$ itself, that is, on the whole patient. A trained model (or learned hypothesis) $\learnthypothesis$ instead acts on the feature vector $\featurevec$, a fixed list of recorded features such as the patient's body weight and age. The feature vector usually captures only part of a data point.
For example, in a health-care application, the data point space $\datapointspace$ contains patients, whereas the feature space $\featurespace$ contains only their recorded feature vectors. Two patients with the same feature vector may therefore carry different labels, since they can differ in information that was never recorded as a feature. No hypothesis $\learnthypothesis$ that reads only $\featurevec$ can then deliver perfect predictions.
In practice, the true label $\bar{\hypothesis}(\datapoint)$ of a data point is rarely known exactly. Even with full access to the data point, its label must be determined by human judgment or measurement, which is imperfect, so the available label is only a noisy version of $\bar{\hypothesis}(\datapoint)$ (Hastie et al., 2009, Sect. 2.6).
For instance, an object category assigned by a human annotator or a diagnosis obtained from a clinician may be wrong, even though the annotator or clinician examines the data point directly. The discrepancy between such an observed label and the true label is called label noise and can degrade training and the resulting generalization. This source of error differs from the incompleteness of the recorded features discussed above: here the data point is accessible, but its label is determined imperfectly.
Label noise also matters for regulation. The EU AI Act requires the minimization of label noise and its impact on high-risk machine learning systems (ML systems) (Parliament and Union, 2024, Arts. 10(3) and 15(1)). When labels are personal data, the general data protection regulation (GDPR) requires them to be accurate (Parliament and Union, 2016, Art. 5(1)(d)).
One way to reduce the effect of label noise is label smoothing, which slightly perturbs the labels of data points used for model training (Goodfellow et al., 2016, Sect. 7.5.1). It is a form of data augmentation that acts as regularization.
The choice of label (or labeling function $\bar{\hypothesis}$)
determines a specific learning task. For the image of a cow herd in
Fig. 1, the label could be a binary indicator of
whether the image contains cows (binary classification), the
number of cows or the average green level (regression), or a
masked center pixel predicted from the surrounding pixels
(self-supervised learning).
In self-supervised learning, the label is constructed from the features themselves, so no manual annotation is required. A prominent example is large language model (LLM) training: consider the sentence "All human beings are born free and equal," tokenized as the sequence ("All", "human", "beings", "are", "born, "free", "and", "equal"). The label for the subsequence ("All", "human", "beings") is the next token "are," the label for ("All", "human", "beings", "are") is "born," and so on. By sliding through the sequence, a single sentence produces many labeled data points from plain text alone.
Synonyms: target, response, ground truth, quantity of interest.
See also: data point, feature, label space, learning task, classification, regression, self-supervised learning, large language model, EU AI Act, robustness, data augmentation, regularization.
@misc{dictml_label,
author = {Jung, Alexander},
title = {label},
howpublished = {Dictionary of Applied Machine Learning (course edition)},
year = {2026},
doi = {10.5281/zenodo.21569296},
note = {ISBN 978-952-64-3013-3, CC BY 4.0, retrieved 2026-08-06},
url = {https://dictionaryofml.org/terms/label.html}
}