Sub topic 10
Estimating the ceiling: human level and irreducible error
This chapter assumes you can fit scikit-learn models and read common metrics such as accuracy and mean absolute error (MAE). It also assumes you know what a held-out test split is. You have already built baselines and compared them to candidates. This chapter covers the opposite end of the scale: how much better can any model get?
Why you need an upper bound
A baseline tells you how little a model must achieve. A ceiling tells you how much a model could achieve at most. Together they bound the room for improvement.
Suppose a candidate scores 0.86 balanced accuracy and the baseline scores 0.50. Is more tuning worthwhile? If the ceiling is 0.88, the remaining gap is small. Further work will likely cost more than it returns. If the ceiling is 0.97, there is a lot of room, and you should keep investigating.
Without a ceiling, a score has no context. You can only say it is better than the baseline, not whether it is close to what is achievable.
Irreducible error
Irreducible error is the error that remains even for the best possible predictor, given the inputs you have. It is also called the Bayes error for classification. It comes from three sources:
- Noise in the target. The process that generates the label is partly random. Two customers with identical features behave differently.
- Missing information. The features do not contain what determines the outcome. A model cannot predict from data it never sees.
- Label noise. The recorded labels are sometimes wrong, so even a perfect model disagrees with them.
Irreducible error depends on the feature set, not only on the task. Adding an informative feature can lower it. A bigger model on the same features cannot.
A synthetic case where the floor is known
You rarely know the irreducible error for real data. You can for synthetic data, and that shows what the ceiling looks like. In this example the target is a linear signal plus Gaussian noise with standard deviation 1. No model can predict the noise, so the best possible MAE is the mean absolute value of that noise. For a Gaussian this is sigma * sqrt(2 / pi), about 0.798.
import numpy as np
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_absolute_error
from sklearn.model_selection import train_test_split
rng = np.random.default_rng(0)
sigma = 1.0
n = 5000
X = rng.normal(size=(n, 3))
signal = 3.0 * X[:, 0] - 2.0 * X[:, 1]
y = signal + rng.normal(scale=sigma, size=n)
X_train, X_test, y_train, y_test, _, signal_test = train_test_split(
X, y, signal, random_state=0
)
model = LinearRegression().fit(X_train, y_train)
print("model MAE: ", round(mean_absolute_error(y_test, model.predict(X_test)), 3))
print("oracle MAE: ", round(mean_absolute_error(y_test, signal_test), 3))
print("theoretical floor:", round(sigma * np.sqrt(2 / np.pi), 3))The model MAE lands very close to the oracle MAE, which uses the true signal. Both sit near 0.8. Nothing you do to this model, short of leaking the noise, will push test MAE meaningfully below that. A model that reported 0.3 here would be a warning sign, not a success.
Human-level performance as a proxy
On real data you cannot compute the Bayes error directly. A common proxy is human performance, because people are often close to the best achievable on perception and language tasks such as reading images or classifying text.
Human-level performance is a useful ceiling when:
- the labels came from humans or could be checked by humans,
- humans have access to the same information the model gets,
- the task is one where people are generally reliable.
It is a poor ceiling when the task needs information a person would not see, or when models can use signals humans cannot. Predicting credit default from thousands of numeric fields is an example. Human performance there is low, and it says little about what is possible.
Define the human level carefully. A single novice, a typical annotator, and a panel of experts reaching consensus give different numbers. The strongest defensible choice for a ceiling is usually the best group of experts, because that is the closest available approximation to the optimal predictor. Record which one you used.
Estimating human-level error from agreement
When you have two or more annotators label the same items, their disagreement tells you about label noise. For binary labels, assume each annotator errs independently with the same rate e. Then the observed agreement is p = 1 - 2e + 2e². Solving for e gives e = (1 - sqrt(2p - 1)) / 2.
import numpy as np
from sklearn.metrics import cohen_kappa_score
rng = np.random.default_rng(0)
truth = rng.integers(0, 2, size=5000)
def annotate(truth, error_rate):
flip = rng.random(truth.shape) < error_rate
return np.where(flip, 1 - truth, truth)
a = annotate(truth, 0.08)
b = annotate(truth, 0.08)
agreement = np.mean(a == b)
kappa = cohen_kappa_score(a, b)
est_error = (1 - np.sqrt(2 * agreement - 1)) / 2
print("agreement:", round(agreement, 3))
print("kappa:", round(kappa, 3))
print("estimated per-annotator error:", round(est_error, 3))The true error rate is 0.08, and the estimate should come out close to it. In a real project you do not know the truth, so the formula is the useful part. Agreement of about 0.85 implies that each annotator is wrong roughly 8% of the time. That suggests a ceiling near 92% accuracy against these single-annotator labels.
Cohen's kappa corrects raw agreement for the agreement expected by chance. Use it to compare tasks with different class balance. A raw agreement of 0.9 is impressive on balanced classes and unremarkable when 90% of items belong to one class.
Turning estimates into a ceiling
Different methods give different evidence. Use more than one when you can.
| Source | What it estimates | Main weakness |
|---|---|---|
| Human or expert performance | Practical ceiling for human-style tasks | Humans may lack information the model has, or the reverse |
| Annotator agreement | Label noise level | Needs repeated labels, and assumes independent errors |
| Synthetic noise knowledge | Exact floor | Only available for simulated data |
| Plateau in learning curves | Practical limit for current features and model family | Cannot tell weak features from true noise |
| Best-known result on the same benchmark | Empirical ceiling | Benchmarks may have noisy labels or differ from your data |
The learning-curve method is worth knowing. Train on 10%, 20%, up to 100% of the data and plot validation error. If the curve flattens at a level well above zero, either the model family cannot do better or the remaining error is irreducible. Trying a much more flexible model on the same features separates these cases. If a stronger model also flattens at the same level, the features are likely the limit.
Using the ceiling in decisions
Put the baseline, the candidate and the ceiling on one scale. Compute the fraction of the achievable gain you have captured:
captured = (candidate - baseline) / (ceiling - baseline)
For balanced accuracy with baseline 0.50, candidate 0.86 and ceiling 0.90, the candidate captures 0.36 / 0.40 = 90% of the achievable gain. The last 10% costs the most effort for the least return. For a candidate at 0.70, the same formula gives 50%, which argues for continued work.
Treat this as a rough guide. Both the baseline and the ceiling are estimates with their own noise. The earlier chapters on repeated cross-validation apply here as well.
Common mistakes
- Treating human level as a hard limit. Models sometimes exceed average human performance, especially when labels came from a more informed process than a human reader could replicate. Treat it as a guide.
- Ignoring label noise in the test set. If 8% of test labels are wrong, measured accuracy tops out near 92%. The model may be better than the score suggests. Clean a sample of the test set and measure again.
- Using the wrong human comparison. Comparing against a rushed, untrained annotator gives a ceiling that is too low and makes the model look closer to done than it is.
- Confusing underfitting with irreducible error. A flat learning curve does not prove the floor has been reached. Try richer features or a more flexible model before concluding that.
- Measuring the ceiling on a different metric. Human accuracy and model AUC cannot be compared. Express both on the metric you chose for the project.
Summary
The ceiling is the best score any model could plausibly reach with your inputs and labels. You estimate it from known noise, human or expert performance, annotator agreement and learning curves. Together with the baseline, it tells you how much room is left. The next chapters use that room, together with error analysis and cost, to define when a model is good enough.
Exercise
Two annotators label 1,000 binary examples and agree on 820 of them. Assume independent, equal error rates. Estimate each annotator's error rate, and say what accuracy ceiling this suggests when a model is scored against single-annotator labels. Then, with a baseline accuracy of 0.60 and a candidate at 0.75, compute the share of the achievable gain that the candidate captures.
Show answer
Agreement p = 0.82. Error rate e = (1 - sqrt(2 * 0.82 - 1)) / 2 = (1 - sqrt(0.64)) / 2 = (1 - 0.8) / 2 = 0.10. Each annotator is wrong about 10% of the time, so the ceiling against single-annotator labels is about 0.90 accuracy. The captured share is (0.75 - 0.60) / (0.90 - 0.60) = 0.15 / 0.30 = 50%. Half of the achievable gain remains, so further work may be worthwhile.