Accuracy & methodology
We test the pipeline on published figures, against the statistics their authors printed, and on simulated trials where the truth is known. The first 40 papers were used to find and fix bugs, so they are a development set. The next 96 papers were read after the code was frozen: that is the real test.
Our own benchmark, not peer reviewed. 96 papers. Read the limits below before quoting these.
Each dot is one printed hazard ratio. On the line, reconstruction and print agree. All 461 checks as a CSV.
What these numbers are, and are not
- Figures. 158 figures from 96 papers; 144 contained survival curves. The other 14 (flow diagrams, forest plots, waterfall plots and similar) were rejected. Of the first set, 77 of 87 contained survival curves. All are open-access (CC BY) papers, harvested automatically from PubMed Central.
- Readers. Readings were made through Claude Code with the production prompt, not through the API. Readers could see the printed statistics and the caption, so these checks are not fully independent of the reading.
- You cannot run this exact path. The API and validation packs use the same prompt and zoom tool through the API, and that route has not been benchmarked since the fixes. A free upload is a quick reading, with no zoom and no second reading. On 24 simulated figures, reading without zoom had about 4 times the median-survival error (0.29 vs 0.07 months).
- Not preregistered. The order of events rests on file timestamps from 25 Sep 2026: the last engine edit came before the first stored reading. There is no version history to confirm it.
- Direction. In 60% of checks (125 of 211) the figure did not say which arm was compared with which, so we used the closer orientation. Those checks cannot detect swapped arms. Where direction was printed: 95% within 10% (82 of 86).
- Significance. In 3–6% of checks the reconstructed CI gives a different significance call from the printed one (6 of 207 here, 8 of 129 in the development set). Printed HRs are often adjusted or stratified, and the reconstructed HR is an unstratified Cox estimate, so a result near the line can fall either side.
- What 10% means. It is a fixed tolerance. At HR 0.70 it spans 0.63–0.77. Where this site calls a curve validated, it means every printed value we could check was within it, and no more than that.
| Measure | Result | 95% CI (Wilson) | By-paper bootstrap |
|---|---|---|---|
| Test set: 96 papers, read after the code was frozen | |||
| HRs within 10% | 205/211 = 97.2% | 93.9–98.7 | 93.9–99.6 (62 papers) |
| HRs within 5% | 185/211 = 87.7% | 82.6–91.5 | 83.0–91.9 |
| Medians within 10% | 235/250 = 94.0% | 90.3–96.3 | 88.0–98.8 (35 papers) |
| Mean signed HR difference | 0.0001 | −0.0036 to 0.0038 | |
| Mean / median absolute HR difference | 2.89% / 1.63% | ||
| HRs with direction printed, within 10% / 5% | 82/86 = 95.3%, 78/86 | ||
| Development set: the first 40 papers, used to find and fix bugs | |||
| HRs within 10% | 133/141 = 94.3% | 89.2–97.1 | 89.8–98.6 (35 papers) |
| HRs within 5% | 116/141 = 82.3% | 75.1–87.7 | 74.5–90.4 |
| Medians within 10% | 125/128 = 97.7% | 93.3–99.2 | 92.2–100.0 (23 papers) |
| Simulated: 80 figures with known truth, also used for model selection | |||
| HR within 5% of the truth | 73/80 = 91.2% | 83.0–95.7 | |
| HR within 10% of the truth | 77/80 = 96.2% | 89.5–98.7 | |
All checks re-scored on engine 0.2.0 from the same stored readings. The three test-set headline counts did not change. Development set: 258 of 269 checks on printed hazard ratios and medians passed. N and event counts printed on a figure are used as inputs, so they are consistency checks and are not counted here. Printed values are rounded.
What the remaining differences are. On the development set, figures with a flagged check were read again by another model (Claude Fable 5.1). It reproduced all 14 flagged differences to within 5%. That points to the figure or to a shared method, not a one-off misreading. Two came from our own median rule and cleared when we adopted R's. The rest include printed hazard ratios that are adjusted or stratified, medians in arms of 8 to 17 patients, where one event moves the median, and event counts that do not match the plotted curve.
Checked against R
The calculators and the engine's statistics, run against real R on known datasets: R 4.5.1 with survival 3.8.6, survRM2 1.0.4, gsDesign 3.9.0 and rpact 4.4.0, in November 2026. The calculator code is public at /survcalc.js, so you can rerun any of it.
| Quantity | Tested on | Against | Result |
|---|---|---|---|
| Kaplan–Meier S(t), n and d | 21 datasets: aml, Freireich, Pike rats, lung, pbc in years and in months, 15 edge cases. 543 event times | survfit | 0 mismatches |
| Median and log-log CI | 42 arms | survfit(conf.type="log-log") | Match. lung: male 270 (210–306), female 426 (345–524) |
| Log-rank χ², O, E, V and p | 20 datasets | survdiff | Match. aml 3.3964 / 0.0653; lung 10.3267 / 0.00131; rats 3.1227 / 0.0772 |
| Cox HR and CI, Efron ties | 16 datasets | coxph | Match. 5 more say "not estimable" where coxph warns of no convergence or gives NA |
| RMST, SE, difference and CI | 23 comparisons: 21 at the default τ, pbc τ 10, lung τ 365 | survRM2::rmst2 | Match |
| Events (Schoenfeld) | 8 scenarios, 14 table cells | gsDesign::nEvents | Match |
| Patients | Default and 2:1 allocation | gsDesign::nSurv, rpact | Match: 557.95 shown as 560, 643.3 shown as 645, because the page rounds events up first |
| Power | 5 scenarios | The formula; gsDesign on 4 of them | Match |
| Engine: HR, CI, log-rank p and medians | Every comparison in both stored runs, refitted from its CSV rows: 500 HRs, 509 log-rank tests, 1,018 medians | coxph, survdiff, survfit | All match. 9 more comparisons have no estimable HR in the engine, where R returns an extreme value |
| Guyot reconstruction | 8 simulated arms | An R version we wrote from the published algorithm; the authors' own supplement could not be downloaded | Row-identical |
How this compares
Published evaluations use different figure sets, mixes of difficulty and metric definitions, so this comparison is indicative only. None is a head-to-head.
| Source | Setting | Reported result | TrialCurve |
|---|---|---|---|
| Saluja et al. 2019 | Manual digitisation + Guyot, 118 curves from 55 RCTs | Mean signed HR error 0.0094 (95% CI −0.0012 to 0.020) | Mean signed difference from printed HRs 0.0001 (−0.0036 to 0.0038) |
| Kim et al. 2025 | CurveSnap or the IPDfromKM app (partly manual), then IPDfromKM or Guyot's code. 58 HRs from 46 curves | 49 of 58 within 5%. Mean absolute difference 2.85–2.93% | 185 of 211 within 5%. Mean absolute difference 2.89% |
| KM-GPT (2025) | Automated pipeline, 538 of 540 synthetic plots | Median integrated absolute error 0.018 | 0.0027 on simulated figures (median per-arm mean |ΔS|, a similar statistic) |
| Annan et al., ISPOR 2025 | Pipeline vs GPT-4o alone, 10 published single-arm curves | Median survival deviation ±0.6 vs ±1.9 months | Median error in median survival 0.09 months (simulated) |
Simulated figures with known truth
The same pipeline on 80 simulated figures also used for model selection (seeds 11000–11079), where the true patient data are known. To isolate each part, the same model readings were also scored without pixel tracing ("model only"), and the measurement engine was run alone on the same figures.
| Metric | Production | Model only | Measurement only |
|---|---|---|---|
| Hazard ratio within 5% of truth | 91.2% | 93.8% | 85.5% |
| Hazard ratio within 10% of truth | 96.2% | 96.2% | 90.8% |
| Median |log HR| error | 0.009 | 0.007 | 0.012 |
| Curve error (median of per-arm mean |ΔS|) | 0.0027 | 0.0027 | 0.0028 |
| Error in median survival (median, months) | 0.09 | 0.08 | 0.10 |
| Events per arm (median relative error) | 0.9% | 0.9% | 1.0% |
| At-risk table cells read exactly | 100.0% | 100.0% | 95.6% |
| Arm names read exactly | 95.9% | 95.9% | 88.1% |
Pixel tracing does not improve these numbers. Production is slightly behind the model's reading alone (91.2% vs 93.8% within 5%; worse on 31 figures, better on 25). We keep it because it cross-checks the reading and flags disagreement, and it takes over when the model is unavailable.
How these readings were produced. The model readings for this page were made by Claude Opus 5.5 running in Claude Code, with the production instructions and output schema, the same image the API would send, and the same zoom tool (identical crops, enlargement and ruler). Readers saw the figure and its caption, including any printed statistics, but not our results or the checks. The pipeline downstream of the reading is the code the API runs. Through the API, the reading runs at a fixed effort level with the same tool and a budget of 14 zooms.
Known limits
Where results are least reliable, and what the API tells you when it happens.
The production pipeline
- Adjusted or stratified hazard ratios. Many trials print a stratified or covariate-adjusted HR. The reconstruction gives an unstratified Cox estimate, so a gap is expected even from a perfect reading. The median gap we measured is 1.6% on the test set and 2.1% on the development set.
- Very small arms. With fewer than about 15 patients, one event moves the median by months, and a printed median may not be reproduced within 10%.
- Figures that disagree with themselves. Printed event counts sometimes come from a different data cut than the curve. The reconstruction follows the curve and the at-risk table, and the check flags the difference. A count that rises, or sits above the curve, is flagged on survival panels.
- Image quality. The model can only read what is visible. PubMed Central's web images are often about 700 px wide; the article PDF usually carries the figure at 2–5× that resolution, so export from the PDF or zoom to 200% before taking a screenshot.
- No numbers-at-risk table. Reconstruction from the initial N alone is much less precise (63% of HRs within 10% versus 94% with a table, in the simulated benchmark). Pass the total events when the paper reports them.
- Cumulative-incidence plots with competing risks. These are reconstructed on the 1 − cumulative incidence scale, which is approximate when competing events are frequent. The result carries a warning.
- Vector PDFs. Figures must be supplied as images (PNG or JPEG) for now.
On the API and validation packs, a failed check triggers a second, more thorough reading. If it gives the same result, the check is labelled accordingly, which points to the figure or to a shared method, not a one-off misreading.
The measurement engine (fallback)
Without the vision model, results come from pixel measurement and on-device OCR. It handles single panels only, and is weakest on:
- Small or compressed screenshots: 80% of HRs within 10% versus 94% on clean figures.
- Black-and-white figures where same-coloured curves cross: 52% within 10% versus 93% for colour.
- Shaded confidence bands: 69% within 10% with bands versus 93% without.
Which model reads curves best?
Last tested 25 Sep 2026. Each model below read the whole figure on its own, curves included, with no pixel tracing, and the same Guyot reconstruction ran on its reading. Scores are against the exact truth on 24 simulated figures also used for model selection (seeds 11000–11023; the xhigh row uses the first 12). The first four rows are single API calls without the zoom tool.
| Model (reading alone) | Curve error | Median-survival error (months) | HR within 5% | Median |log HR| error | Cost / figure |
|---|---|---|---|---|---|
| Claude Opus 5 | 0.0155 | 0.72 | 86% | 0.033 | ~$0.06 |
| Claude Fable 5.1 | 0.0075 | 0.42 | 95% | 0.014 | ~$0.14 |
| Claude Opus 5.5 (high effort) | 0.0057 | 0.29 | 95% | 0.011 | ~$0.05 |
| Claude Opus 5.5 (xhigh effort) | 0.0060 | 0.21 | 100% | 0.008 | ~$0.10 |
| Claude Opus 5.5 with the zoom tool (production reader) | 0.0026 | 0.07 | 92% | 0.006 | ~$0.10–0.30 |
Curve error is the median of each arm's mean absolute difference in survival probability. With the zoom tool the model crops and enlarges the full-resolution figure wherever it needs to (the at-risk table, steps, crossings, the 50% line). That roughly halved the curve error and cut the median-survival error by three quarters, which matters more than effort level or a larger model. The zoom row was produced through Claude Code with the production instructions; API cost depends on how many zooms a figure needs. A free upload runs the high-effort row, without zoom.
How the pipeline got here
Earlier in 2026 the balance was the other way round. On the same 80 simulated figures, Claude Opus 5 reading curves on its own put 72.5% of hazard ratios within 5% of the truth, against 85.5% for pixel measurement, and its curve error was more than five times larger. So the API used a hybrid: the model read the text, and the curves were measured in pixels. Opus 5.5 with a zoom tool now reads curves as precisely as the measurement engine, and reads text far better, so the model's reading comes first. Pixel tracing checks each curve, replaces it where the two agree closely, and takes over when the model is unavailable.
Measurement engine: 400 simulated figures
Pixel measurement and on-device OCR, without the vision model. It cross-checks the model's curves in production and takes over when the model is unavailable. Results on the full held-out set of simulated figures:
All figures in the held-out set, including degraded, black-and-white and table-less figures. Hazard-ratio metrics use every figure where both of the first two arms were reconstructed (n = 357).
Distributions
| Metric | n | Median | Mean | 90th pct | Max |
|---|---|---|---|---|---|
| |ΔlogHR| (per figure) | 357 | 0.0113 | 0.0839 | 0.0919 | 4.2756 |
| Median survival error (months, per arm) | 638 | 0.083 | 0.614 | 0.659 | 41.056 |
| Median survival error (relative, per arm) | 638 | 0.4% | 2.9% | 3.4% | 383.0% |
| Events error (relative, per arm) | 786 | 1.1% | 9.3% | 26.1% | 328.2% |
| Curve mean |ΔS| (per arm) | 824 | 0.0026 | 0.0145 | 0.0054 | 0.8268 |
| Curve max |ΔS| (per arm) | 824 | 0.027 | 0.056 | 0.082 | 1.000 |
| RMST error / τ (per arm) | 786 | 0.11% | 0.87% | 0.41% | 70.28% |
| Processing time (s per figure) | 398 | 11.519 | 11.484 | 15.891 | 22.708 |
n counts figures for HR metrics and arms for the per-arm metrics. Means are pulled up by a small number of failures. That is why the page leads with medians and with the share of results inside fixed tolerances.
Breakdowns and methodology of the 400-figure benchmark
Breakdowns
The same metrics, split by what makes a figure hard. "Processed" is the share of figures that returned a result. HR columns only count figures where a hazard ratio could be reconstructed.
Numbers-at-risk table present or absent
Without a table, IPD is reconstructed from the true N per arm (N-only Guyot).
| Subgroup | Figures | Processed | HR n | Median |ΔlogHR| | Mean |ΔlogHR| | HR within 10% | Median events error | At-risk cells exact |
|---|---|---|---|---|---|---|---|---|
| no table (N supplied) | 53 | 98% | 48 | 0.0658 | 0.0987 | 63% | 24.3% | — |
| with at-risk table | 347 | 100% | 309 | 0.0095 | 0.0816 | 94% | 0.8% | 92% |
Colour vs black & white
Black & white includes curves separated only by grey level or line style.
| Subgroup | Figures | Processed | HR n | Median |ΔlogHR| | Mean |ΔlogHR| | HR within 10% | Median events error | At-risk cells exact |
|---|---|---|---|---|---|---|---|---|
| black&white | 31 | 97% | 23 | 0.0480 | 0.6929 | 52% | 5.3% | 73% |
| colour | 369 | 100% | 334 | 0.0110 | 0.0419 | 93% | 1.0% | 94% |
Clean vs degraded images
Degraded = downscaled to 55–100% and/or JPEG quality 55–92.
| Subgroup | Figures | Processed | HR n | Median |ΔlogHR| | Mean |ΔlogHR| | HR within 10% | Median events error | At-risk cells exact |
|---|---|---|---|---|---|---|---|---|
| clean | 266 | 100% | 244 | 0.0093 | 0.0236 | 94% | 0.9% | 96% |
| degraded (downscaled/JPEG) | 134 | 99% | 113 | 0.0167 | 0.2141 | 80% | 1.7% | 85% |
Shaded confidence bands
Figures with shaded 95% CI bands around each curve.
| Subgroup | Figures | Processed | HR n | Median |ΔlogHR| | Mean |ΔlogHR| | HR within 10% | Median events error | At-risk cells exact |
|---|---|---|---|---|---|---|---|---|
| CI bands | 59 | 100% | 48 | 0.0176 | 0.2556 | 69% | 1.8% | 81% |
| no CI bands | 341 | 99% | 309 | 0.0104 | 0.0572 | 93% | 1.0% | 95% |
Number of arms
| Subgroup | Figures | Processed | HR n | Median |ΔlogHR| | Mean |ΔlogHR| | HR within 10% | Median events error | At-risk cells exact |
|---|---|---|---|---|---|---|---|---|
| 2 arms | 354 | 99% | 312 | 0.0115 | 0.0725 | 90% | 1.1% | 93% |
| 3 arms | 46 | 100% | 45 | 0.0096 | 0.1626 | 84% | 1.2% | 92% |
Methodology
Simulated trials
- Each figure shows 2 arms (about 88% of figures) or 3 arms. Arms have 40–450 patients each, with Weibull survival (shape 0.75–1.6), control-arm median 5–36 months and hazard ratios 0.4–1.05.
- Censoring combines staggered accrual (8–36 months), administrative censoring at the end of follow-up (6–40 months after accrual closes) and random dropout.
- Ground truth for each figure: the exact individual patient data, the exact Kaplan–Meier curves, and the Cox hazard ratio (Efron ties) of arm 2 vs arm 1 fitted to the true data.
Rendering
- Six palettes modelled on common journal and software styles: tab10, ggplot/survminer, NEJM-, Lancet- and JCO-like colours, and black & white with solid, dashed or dotted lines.
- Five fonts (DejaVu Sans, Arial, Helvetica, Times New Roman, Verdana) at 8–12 pt. Line widths 0.9–2.4 pt.
- Censor marks (none,
+or|), shaded 95% confidence bands, legends in four positions, HR/p-value annotations inside the plot, light grids, titles. - Survival axis as a proportion or a percentage, several tick spacings. The time axis is sometimes truncated before the end of follow-up, as journals often do.
- Numbers-at-risk tables under ~85% of figures, sometimes with coloured rows, thinned to every second or third time point when columns would collide.
- A "hard" third of figures is downscaled to 55–100% of its size and/or JPEG-compressed at quality 55–92, simulating screenshots of PDFs.
Held-out protocol
The engine was developed on separate seed ranges. The benchmark reported here uses seeds 7000–7399, generated after development and never used for tuning or threshold selection. Each figure goes through the measurement engine's own code path, with no hints. For figures without an at-risk table, reconstruction uses the true N per arm, as a user would supply it from the paper.
Metric definitions
- HR within 5% / 10%
- |log(HRreconstructed / HRtrue)| below log(1.05) or log(1.10), comparing arm 2 vs arm 1 on the reconstructed IPD with the same comparison on the true IPD.
- |ΔlogHR|
- Absolute difference in log hazard ratio. For small values it is roughly the relative HR error (0.01 ≈ 1%).
- Curve mean |ΔS|
- Per arm: mean absolute difference between the reconstructed and true survival curves over 600 time points from 0 to the end of the plotted curve (an integrated absolute error normalised by time).
- Median survival error
- Per arm: absolute difference in months between the KM median of the reconstructed and true data, where both are reached within the plotted range.
- Events error
- Per arm: |eventsreconstructed − eventstrue| / eventstrue, counting true events within the plotted time range.
- RMST error
- Per arm: |RMSTreconstructed − RMSTtrue| / τ, where τ is the end of the plotted follow-up.
- At-risk cells exact / misread
- Share of numbers-at-risk cells, within the plotted range, returned with exactly the true value or with a wrong value. The remainder were not returned.
- Arm names
- Share of arms whose returned name matches the true name, ignoring case, spaces and punctuation.
- Processed
- Share of figures for which the engine returned a result instead of an error.
Version log and corrections
Every response records the engine version.
- 0.2.0, November 2026. CSV covers every panel. Check counts leave out inputs. Median follows R and SAS when the curve sits exactly at 50%. Log-rank p is the true log-rank test. Hazard ratios are computed from the rows in the CSV. Reference arm chosen by name, then first listed. At-risk check on every survival panel. Quality grade lowered when pixel tracing disagrees.
- 0.1.0, September 2026. First release. The number did not change while the pipeline moved from measurement, to a hybrid, to model first, so 0.1.0 alone does not say which one produced a result.
Correction, November 2026. Calculators: pasted data with decimal commas, or with status coded 1 and 2, were misread without warning. Fixed; re-run anything pasted before this release. Medians now follow the R and SAS rule when the curve sits exactly at 50%. This page: the first 40 papers are now labelled a development set.
How to cite
TrialCurve (2026). Automated reconstruction of individual patient data from published Kaplan–Meier figures, engine v0.2.0. https://trialcurve.com/accuracy. Benchmark data: benchmark_production.json, benchmark_checks.csv and benchmark.json (CC BY 4.0).
Reproducing the benchmark
The figure generator and scoring harness are not public yet. If you need them to validate this work, email hello@trialcurve.com.
Whole review to do? $49 a figure, checked by a person.
See the validation pack