Paper commentary
Typical Angina, Reversed: A Long-Standing Documentation Error in the UCI Heart Disease Data
Researchers show UCI heart disease chest-pain codes are stored in reverse
- Problem UCI heart data chest-pain labels are reversed, misleading interpretations.
- Method The authors check the stored codes against the 1986 Cleveland study and against the other three sites. Their mapping sends stored code k to the documented label of 5 minus k, which reverses the labels.
- Results Under the corrected mapping, 25 of 32 direction-stating SHAP papers contradict the category identities. Zero-shot language models lose 0.12 to 0.33 AUC under the documented labels.
![Table 1: Logistic regression of CAD on age, sex and chest pain in the Cleveland data (303 patients):
coefficients published by Detrano et al. [5] (Table 8, sub…](/papers/b1cd0f68-7d26-46cf-88cd-e57ef82a37ed/figures/figure-ae54677e81650302903185ec8a104d1f.png?thumb=512)
Table 1 : Logistic regression of CAD on age, sex and chest pain in the Cleveland data (303 patients): coefficients published by Detrano et al. [5] (Table 8, subset 1) and refitted on the UCI file withcp as stored and corrected (5−cp).
Original paper · CC BY 4.0 · Tejas Tovinkere Pattabhi · Typical Angina, Reversed: A Long-Standing Documentation Error in the UCI Heart Disease Data · Original paper figure · Extracted the figure area from page 3 of the original PDF.A backwards risk gradient
The UCI Heart Disease data have become a standard set for teaching and benchmarking, so an error in one column would spread widely. The documentation maps code 4 to asymptomatic and code 1 to typical angina. Read that way, the data say patients with no chest pain are most likely to have coronary artery disease (CAD): 72.9% of Cleveland patients coded asymptomatic have CAD, while 30.4% of those coded typical angina do.
That runs against a basic gradient in cardiology, where typical angina predicts CAD most strongly and no chest pain least.
The open question is whether the gradient belongs to the patients or to the labels. The authors argue for the labels: the codes are stored in reverse of their documentation, so the gradient is a property of the documentation. A change of this kind could survive for years, because relabeling a categorical variable barely moves the predictions of most models.
Stored values are right, the names are reversed
The key idea is that the stored patient values are internally consistent and only the category names are attached in reverse. The clinically correct label of stored code k is therefore the documented label of 5−k, so code 4 means typical angina and code 1 means asymptomatic. The same mapping applies to all four UCI files and to Statlog, and the middle codes swap as well.
Stored code 3 therefore means atypical angina and stored code 2 means non-anginal pain.
Two independent checks support the mapping, one for Cleveland and one for the other three sites. Patients stored under code 4 almost always have all three features, at 93–96% across the three files. Code 1 patients almost never have any, and the mean feature count falls from code 4 to code 1 at every site.
Matching the 1986 Cleveland study
The Cleveland raw file leaves the angina fields missing, so this check uses the published tables of the 1986 Cleveland study. The authors matched a 16-cell table of chest pain by sex and disease status to the UCI file. Under the documented coding 0 of 16 cells are consistent, while under the corrected coding (5−cp) 15 of 16 are.
Refitting on the UCI file reproduces these values only when pain enters as 5−cp.
Where the documented names already live
The earliest check is a word-labeled Cleveland file prepared in March 1990 and kept in the UCI archive. Its own outcomes show the consequence: 73% of patients labeled asympt are sick. Statlog (Heart) matches 270 Cleveland rows with the same codes and outcomes, so it inherits the error.
Most copies that name their categories use the documented names. The OpenML and PMLB copies, together with two heavily voted Kaggle copies, reach about 400,000 downloads combined. The Kaggle copy by D. Lapp is the exception: it swaps the end codes and reverses the outcome, and its 1,025 rows hold only 302 unique Cleveland patients. Under the usual 0-based reading its end codes are right, so the copy looks wrong mainly through its reversed outcome, while some users read code 0 as asymptomatic and carry the error forward.
What published SHAP papers claim
The authors next asked whether published SHAP studies of these data read the chest-pain effects correctly.
Three of the 25 are inconsistent for other reasons, so excluding them leaves 22 of 32 (69%) attributable to the documentation. That refinement was defined after coding, so the authors label it post hoc. Nine of the 22 also explain the direction clinically, for example by calling asymptomatic chest pain the most severe.
Conventional models barely notice
Conventional models barely notice the swap, which is one reason the error went unseen. On Cleveland, with five-fold cross-validation, logistic regression gives identical predictions under both codings, with AUC 0.903 and 0.911. Random forests and gradient boosting differ in AUC by at most 0.002.
Coefficients tell a different story, because they attach the names directly to effects. In a one-hot logistic model on standardized features, fitted to all 303 patients, the largest chest-pain coefficient is +0.48 for asymptomatic and −0.25 for typical angina. An analyst who trusts the documented names would read this as no chest pain raising risk, which is the reading the literature audit found in published work.
Language models read the names
A language-model classifier serializes each record as text, so the label words are part of its input. The authors ran a zero-shot probe on Cleveland with Qwen2.5-7B, Llama-3.1-8B and Phi-3.5-mini, each quantized to 4 bits. The score is P(Yes) relative to P(No) for the first answer token, with each patient described by all 13 predictors (full) or by age, sex and chest pain only (minimal).
Each description was run under documented labels, corrected labels or no chest-pain line.
The minimal template shows the largest effect of the labels. Corrected labels improved AUC by 0.12–0.33 in all three models. Qwen2.5-7B fell to 0.458 with the documented labels, compared to 0.789 with the corrected labels. Qwen and Llama both scored worse with the documented labels than with the chest-pain line left out.
For Llama on the minimal template, mean predicted risk rises from 0.02 at code 1 to 0.29 at code 4 under corrected labels, and falls from 0.29 to 0.02 under documented labels.
On the minimal template P(Yes) never exceeded 0.015 for Phi or 0.003 for Qwen, so their AUC gaps rest on very small probabilities. The scale-up threshold was met only on one reading, the minimal template with end codes, and the Hungarian replication wasn't run.
Limitations
The Cleveland check rests on the original study alone, since the Cleveland raw file lacks the angina features. The literature frame is one Scholar query requiring asymptomatic and SHAP, so the rates describe direction-stating papers in that frame. One author coded the audit, and the 25 of 32 rests on pre-specified categories, while the 22 and the sensitivity counts rest on categories defined after coding.
17% of sampled papers couldn't be read.
The LLM probe covers three small quantized models, one prompt format, zero-shot use and one site. Kaggle copies were chosen from a list sorted by votes, so other popular copies may differ.
What to change
Maintainers of the UCI page, OpenML, PMLB and the Kaggle copies should correct the labels and add a note to existing versions. Papers that interpret chest-pain effects should re-examine those interpretations, though most conventional predictive results stay unaffected. Text-based models may not escape the change, so they need the check more than the classical ones.
Paper info
- Authors
- Tejas Tovinkere Pattabhi
- Venue
- arXiv · Preprint
- First published
- 2026-11-24
- Added
- 2026-11-26
- Updated
- 2026-11-24
- Version
- v1
- arXiv
- 2611.33248
- Category
- cs.LG
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
The UCI Heart Disease data are a widely used machine-learning benchmark. We show that their chest-pain variable is stored in reverse of its documentation. At all four sites, the code documented as "asymptomatic" (4) marks patients with typical angina, and the code documented as "typical angina" (1) marks patients with almost none of the classical angina features (at Cleveland, no chest pain). Two complementary checks establish this: (i) the chest-pain table and regression coefficients of the original 1986 Cleveland study are reproduced only under the corrected reading; (ii) in the Budapest, Switzerland and Long Beach files, 93-96% of patients coded 4 have all three classical angina features. A 1990 word-labeled Cleveland file already uses the documented labels, and Statlog (Heart), a Cleveland subset, stores the same codes. OpenML, PMLB and two highly voted Kaggle copies that name the categories use the same documented labels (about 400,000 downloads combined). We audited a seeded random sample of 150 records from a pre-specified Scholar query for SHAP studies of these data mentioning asymptomatic chest pain (124 readable). Of 32 papers that state a direction for a named category, 25 (78%; 95% CI 61-89%) state one inconsistent with the corrected category identities; 22 (69%; 51-82%; post hoc) are attributable to the documentation error, and nine of these explain it clinically. None of the 124 readable papers identifies the reversal. Conventional models are essentially unaffected, one reason the error went unnoticed. Interpretations that attach the documented names to model effects are reversed, and zero-shot language-model classifiers that read the labels are misled: with the documented labels, three open-weight models lose 0.12-0.33 in area under the receiver operating characteristic curve (AUC) given age, sex and chest-pain type. We give the corrected mapping, evidence and code.
Quote from the paper
Tejas Tovinkere Pattabhi (2026). Typical Angina, Reversed: A Long-Standing Documentation Error in the UCI Heart Disease Data. arXiv:2611.33248v1. https://arxiv.org/abs/2611.33248v1
BibTeX
@misc{pattabhi2026typical,
title = {{Typical Angina, Reversed: A Long-Standing Documentation Error in the UCI Heart Disease Data}},
author = {Tejas Tovinkere Pattabhi},
year = {2026},
eprint = {2611.33248},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.33248v1}
}