# VERA Fusion Net v0.2: evaluation on the locked NHANES test set

Run `nhanes-v0.2`, code `c956484`, trained on spark-a98a (NVIDIA GB10). Generated by `python -m fusionnet.report` from the run's `tuning.json` and `test-eval.json`; do not edit numbers by hand. Research model: not a medical device and not for clinical decisions.

## The test set: what was seen before this scoring

- **This is the second scoring of the locked test set.** v0.1 (code `3fac562`) was scored once on 8 November 2026 (`reports/v0-evaluation.md`). A review of v0.1, which read those test results, led to the changes in v0.2: sparse-panel training, a withheld output below a minimum panel, no typical-age fill-in, unit conversion, refitted baselines, a calibrated age gap and fp32 calibration. v0.2 was then retuned on the validation split and scored on the test set once. Its test numbers are therefore not fully independent of the earlier test results.
- Before v0.1 was trained, a compatibility check (`tools/nhanes_check.py`) read the test split and printed descriptive figures: death counts, the number of participants with all nine PhenoAge inputs, mean PhenoAge and mean age. No model was fitted or selected on them.
- From v0.2 on, the scoring writes a marker file (`test-scored.json`) next to the model and refuses to run again when it exists. Tuning checks the stored test lock against the records before it reuses it.

## Mortality

All scores are compared on the same 5,627 test participants (1,000 deaths): the ones with all nine PhenoAge inputs. Intervals are 95% participant-level bootstrap intervals (1,000 paired resamples). The refitted Cox models were fitted on the training split only. Harrell's C uses all follow-up, up to 249 months, with censoring that depends on the survey cycle. Uno's C is truncated at 120 months and weights each death by the inverse square of the probability of remaining uncensored (Kaplan-Meier of the censoring).

| score | Harrell C | Uno C (120 months) | Fusion Net minus score, Harrell | Fusion Net minus score, Uno |
|---|---|---|---|---|
| Fusion Net v0.2 | 0.877 (0.866 to 0.888) | 0.876 (0.863 to 0.889) |  |  |
| PhenoAge, published score (Levine 2018) | 0.856 (0.844 to 0.868) | 0.855 (0.841 to 0.868) | +0.021 (+0.015 to +0.026) | +0.021 (+0.015 to +0.027) |
| Cox: age + sex (refitted) | 0.840 (0.828 to 0.853) | 0.838 (0.823 to 0.852) | +0.037 (+0.030 to +0.044) | +0.038 (+0.031 to +0.046) |
| Cox: PhenoAge's 9 labs + age (refitted) | 0.859 (0.847 to 0.871) | 0.858 (0.844 to 0.871) | +0.017 (+0.012 to +0.023) | +0.018 (+0.012 to +0.025) |
| Cox: all analytes, linear, with missing indicators, + age + sex (refitted) | 0.873 (0.862 to 0.884) | 0.874 (0.861 to 0.886) | +0.003 (-0.000 to +0.007) | +0.002 (-0.002 to +0.007) |

- **Against the published PhenoAge score:** Fusion Net beats the published PhenoAge score (Harrell C +0.021 (+0.015 to +0.026)).
- **Against the best refitted baseline** (Cox: all analytes, linear, with missing indicators, + age + sex (refitted), the highest Harrell C among the refitted Cox models on this test set): the network's own gain is +0.003 (-0.000 to +0.007) in Harrell C and +0.002 (-0.002 to +0.007) in Uno's C. The interval includes zero, so this test set shows no clear gain from the network over a linear Cox model fitted on the same data. Most of the advantage over the published PhenoAge score comes from extra inputs, sex and fitting on this cohort.
- For reference, chronological age alone ranks the same participants at C = 0.837.
- On the whole test set (7,216 participants, 1,179 deaths) Fusion Net scores Harrell C 0.879 (0.869 to 0.888) and Uno's C 0.876 (0.865 to 0.887) (age alone 0.836).
- Training randomness: 5 training seeds of the selected configuration score Harrell C 0.875 (SD 0.0015, range 0.873 to 0.877) and Uno's C 0.874 (SD 0.0014) on the comparison set. The model reported above is seed 1234, fixed before training.

## Biological age

Fusion Net's age head predicts chronological age from physiology, and PhenoAge was built to predict mortality, so error against chronological age is not a fair test of either. Each is judged instead by its age-acceleration gap: the residual after a linear fit on chronological age (Fusion Net's fitted on the validation split, PhenoAge's on the training split). A useful gap predicts death beyond age and sex. n = 5,337 (809 deaths); 290 top-coded ages are left out.

| gap | hazard ratio per SD, adjusted for age and sex (95% CI) | SD of the gap (years) | correlation of the gap with age |
|---|---|---|---|
| Fusion Net age acceleration | 1.19 (1.10 to 1.28) | 8.1 | +0.038 |
| PhenoAge acceleration | 1.27 (1.24 to 1.30) | 9.3 | -0.017 |

Cox models on age, sex and each gap, fitted on the validation split and scored here (Harrell C):

| model | Harrell C | Uno C (120 months) |
|---|---|---|
| age + sex | 0.818 (0.803 to 0.832) | 0.811 (0.794 to 0.829) |
| age + sex + PhenoAge gap | 0.835 (0.821 to 0.849) | 0.830 (0.814 to 0.847) |
| age + sex + Fusion Net gap | 0.820 (0.807 to 0.834) | 0.814 (0.797 to 0.831) |

- Adding the Fusion Net gap to age and sex changes Harrell C by +0.003 (+0.001 to +0.005). Against the model with PhenoAge's gap instead, the difference is -0.015 (-0.019 to -0.011): PhenoAge's gap carries more mortality information than Fusion Net's.

Context only, not a biological-age result: error against chronological age (years). The age head is trained to predict chronological age on this cohort, so this comparison structurally favours Fusion Net. PhenoAge correlates more closely with age (r = 0.892 against 0.862), so most of its larger error is an offset and scale difference that a linear recalibration removes.

| | MAE against chronological age | Fusion Net minus this |
|---|---|---|
| Fusion Net age head | 6.72 (6.57 to 6.88) | |
| PhenoAge, published | 7.80 (7.62 to 8.00) | -1.08 (-1.32 to -0.86) |
| PhenoAge, linearly recalibrated on the training split | 5.45 (5.32 to 5.60) | +1.27 (+1.07 to +1.46) |

The service reports the age-acceleration gap (the residual), and biological age as chronological age plus that gap, so typical labs give a gap near zero at every age.

## Sparse panels

NHANES rows carry a median of 54 analytes (10th percentile 53, test split), while a routine VERA panel may carry a handful. v0.2 trains with whole panels or single analytes hidden at random (per person and epoch: 35% full, 30% panel dropout, 35% a log-uniform number of analytes; 15% with all values hidden), and withholds biological age and risk below a minimum. The minimum is **40 analytes**, chosen on the validation split by this rule: min_analytes = the smallest k such that, for k and every larger k in the grid, validation people with k randomly kept analytes reach (a) a survival C-index at least halfway from the age-and-sex Cox model to the full-panel C-index, and (b) a correlation of at least 0.7 between their age-acceleration gap and their full-panel gap. Below it, biological age and mortality risk are withheld.

Test set, people grouped by how many analytes they actually have (few NHANES rows are sparse):

| analytes present | people | deaths | C-index | age MAE (years) |
|---|---|---|---|---|
| 20-39 | 123 | 29 | 0.857 | 7.75 |
| 40-49 | 102 | 35 | 0.855 | 7.60 |
| 50+ | 6,991 | 1,115 | 0.878 | 6.74 |

Test set, every person scored again with k analytes kept at random (C-index of the full panel on the same people alongside):

| k | people | deaths | C-index | C-index, same people, full panel | age MAE (years) | gap r with full-panel gap |
|---|---|---|---|---|---|---|
| 1 | 7,216 | 1,179 | 0.842 | 0.879 | 14.21 | 0.01 |
| 2 | 7,216 | 1,179 | 0.845 | 0.879 | 13.80 | 0.06 |
| 3 | 7,216 | 1,179 | 0.846 | 0.879 | 13.49 | 0.08 |
| 4 | 7,216 | 1,179 | 0.849 | 0.879 | 13.20 | 0.12 |
| 6 | 7,216 | 1,179 | 0.852 | 0.879 | 12.52 | 0.17 |
| 8 | 7,216 | 1,179 | 0.854 | 0.879 | 12.20 | 0.22 |
| 10 | 7,216 | 1,179 | 0.860 | 0.879 | 11.64 | 0.28 |
| 12 | 7,216 | 1,179 | 0.858 | 0.879 | 11.18 | 0.31 |
| 15 | 7,216 | 1,179 | 0.862 | 0.879 | 10.67 | 0.39 |
| 20 | 7,216 | 1,179 | 0.866 | 0.879 | 9.86 | 0.47 |
| 25 | 7,213 | 1,177 | 0.867 | 0.879 | 9.31 | 0.56 |
| 30 | 7,134 | 1,158 | 0.871 | 0.878 | 8.75 | 0.62 |
| 40 | 7,093 | 1,150 | 0.874 | 0.879 | 7.91 | 0.78 |

Test set, named panels (only the listed analytes kept):

| panel | people | deaths | C-index | C-index, same people, full panel | age MAE (years) | gap r with full-panel gap |
|---|---|---|---|---|---|---|
| albumin + creatinine | 7,105 | 1,153 | 0.851 | 0.879 | 13.55 | 0.12 |
| PhenoAge inputs (9) | 7,216 | 1,179 | 0.868 | 0.879 | 11.49 | 0.31 |
| biochemistry profile | 7,106 | 1,154 | 0.867 | 0.879 | 10.07 | 0.47 |
| blood count | 7,207 | 1,177 | 0.866 | 0.879 | 12.67 | 0.19 |
| biochemistry + blood count | 7,216 | 1,179 | 0.876 | 0.879 | 9.56 | 0.54 |
| lipids + glucose + HbA1c | 7,212 | 1,176 | 0.841 | 0.879 | 11.64 | 0.27 |

- The minimum is set by the biological-age gap, not by risk: with random subsets the C-index stays within 0.02 of the full panel from 15 analytes on, while the gap needs 40 to track the full-panel gap (correlation 0.7 on validation). The service applies one minimum to both outputs; serving risk from a lower minimum is an open decision.
- The rule was set on random subsets, which spread over all panels. Structured panels carry less: biochemistry + blood count (median 41 analytes) clears the count but its gap correlates only 0.54 with the full-panel gap. A panel-aware rule is needed before biological age is shown for such panels.
- The service reports `coverage.level`: `insufficient` below the minimum (outputs withheld), `partial` from the minimum, `full` from the 10th percentile of training rows.

## VERA token path

A VERA token stream carries deciles, not values. v0.2 trains with all values hidden for 15% of people per epoch, and the token path is checked here against the value path for the same test people (the token encoding of a single visit equals the value encoding with values hidden; a unit test checks this). C-index 0.879 with values and 0.877 with deciles only; 10-year risk differs by a median of 0.0036 (90th percentile 0.0425); the age-acceleration gaps correlate at r = 0.972 (median absolute difference 1.01 years). Requests with more than one visit are rejected (HTTP 422), because v0 was trained on single visits only.

## Reproducibility and training randomness

- Runs use deterministic algorithms with fixed seeds. The selected configuration was trained a second time with seed 1234: identical validation history: **yes**; largest weight difference 0.
- Validation C-index over 5 seeds: 0.8770 (SD 0.0011) with the KG and 0.8762 (SD 0.0012) without; age MAE 7.00 (SD 0.36) with and 7.31 (SD 0.35) without.
- 5 KG configurations (`base`, `lr1e-3`, `bs512`, `wide`, `drop0.2`) came within the tie margin of the best validation C-index, so the choice among them was in effect made on validation age MAE.
- Image `nvcr.io/nvidia/pytorch:25.11-py3` (image id `sha256:eea3fe49e8a583008e4ea66fbeb36b2a7a111db8e1e322d2f310fd697baad95b`, arm64 manifest `sha256:4a85d8cf6fb3a943280960b8948cf4e9b6eca77b4414c68c9b2c7bb863f79b70`); torch 2.10.0a0+b558c986e8.nv25.11, CUDA 13.0, Python 3.12.3. `pip freeze` from inside the image is stored in `tuning.json` (242 packages, sha256 `502cc2bef62800c1…`). The PyPI torch pin in `fusionnet/requirements.txt` is for local CPU tests only.

## What the knowledge graph can and cannot do in v0

Each KG vector is fixed per lab code, and the KG memory tokens are exactly the codes already in the person's sequence. In v0 the KG can therefore only act as a prior on the code embeddings: it tells the model nothing about the individual person, and the full-data with/without comparison cannot show a knowledge benefit.

Where prior knowledge could matter, with few training examples (validation split, 3 seeds each):

| training fraction | C-index with KG | C-index without | age MAE with KG | age MAE without |
|---|---|---|---|---|
| 5% | 0.8594 (SD 0.0077) | 0.8604 (SD 0.0086) | 10.69 | 10.85 |
| 20% | 0.8743 (SD 0.0008) | 0.8738 (SD 0.0002) | 7.64 | 7.81 |

## Calibration (context, not a comparison)

Predicted 10-year mortality against the Kaplan-Meier estimate, by tenths of each score's own predicted risk (a row holds different people for the two scores). Fusion Net's absolute risk uses a Breslow baseline fitted on this cohort's training split in fp32; PhenoAge's is its external NHANES III score. A lower gap for Fusion Net is expected and is not a win. Mean absolute gap over the tenths: Fusion Net 0.011, PhenoAge 0.039 (a grouped summary, not Austin's smoothed ICI).

| risk tenth | n | Fusion Net predicted | observed (Kaplan-Meier) | PhenoAge predicted | observed (Kaplan-Meier) |
|---|---|---|---|---|---|
| 1 | 563 | 0.4% | 0.4% | 0.2% | 1.0% |
| 2 | 563 | 0.7% | 0.9% | 0.4% | 0.7% |
| 3 | 563 | 1.0% | 1.8% | 0.7% | 2.0% |
| 4 | 563 | 1.6% | 2.7% | 1.3% | 3.2% |
| 5 | 563 | 2.8% | 3.5% | 2.3% | 4.4% |
| 6 | 563 | 5.2% | 6.9% | 4.3% | 9.2% |
| 7 | 563 | 9.5% | 8.4% | 7.6% | 10.9% |
| 8 | 562 | 19.2% | 15.9% | 13.7% | 15.8% |
| 9 | 562 | 39.1% | 39.8% | 25.9% | 40.6% |
| 10 | 562 | 75.2% | 73.6% | 61.7% | 69.5% |

## Next-event and personal-range heads

Scored on directly measured analytes only, with the calculated ones (globulin, BMI, absolute white-cell counts, osmolality, Friedewald LDL, haematocrit, MCH, MCHC) removed from the input (308,696 positions): decile accuracy 0.200 against 0.130 for the most common decile of each analyte in training; code top-1 0.759 (mostly the pipeline's fixed order within a visit). Personal-range 95% coverage 0.950 after the validation-fitted scale (1.008). With one visit per person these are within-visit predictions against the population. The service withholds both outputs: in training the last position never predicts anything and the personal-history inputs were always zero.

## What was trained

- **Data:** `vera-fusion-net-v0-nhanes-1999-2018-lmf-2019` (data_pipeline `9e7d969`, manifest sha256 `b6b1ac0664dc5a7a…`). Training 33,896 participants, validation 7,302; test n = 7,216 (id digest `9c4434def72c8fe0…`).
- **Knowledge graph:** kg_embed run `kg-20261109-a` (ComplEx-N3, 512-d; entities sha256 `3fdb9d2505197f36…`); 36 of 59 LOINC codes have an entity embedding.
- **Model:** `lr1e-3`: d_model 128, 4 layers, 4 heads, dropout 0.1, learning rate 0.001, batch 256, 1,281,043 parameters; best validation epoch 27 of 33. No frontier-model modalities are attached (NHANES has none), so the organ-age heads stay inactive.
- **Compute:** NVIDIA GB10; the whole tuning run took 68 minutes.

## Tuning (validation split only)

Rule, fixed before any run: max validation C-index; within 0.002 the lower validation age MAE; KG configs only. At most 40 epochs, early stopping after 6 epochs without a better validation C-index, seed 1234.

| configuration | KG | parameters | best epoch | validation C-index | validation age MAE | minutes |
|---|---|---|---|---|---|---|
| `base` | yes | 1,281,043 | 24 | 0.8770 | 6.97 | 4.1 |
| `lr1e-3` **selected** | yes | 1,281,043 | 27 | 0.8777 | 6.68 | 4.5 |
| `bs512` | yes | 1,281,043 | 19 | 0.8774 | 7.07 | 3.9 |
| `wide` | yes | 4,854,675 | 10 | 0.8762 | 7.21 | 4.9 |
| `drop0.2` | yes | 1,281,043 | 28 | 0.8769 | 7.16 | 4.7 |
| `small` | yes | 220,627 | 10 | 0.8748 | 7.56 | 1.6 |
| `base-nokg` | no (ablation) | 1,214,354 | 13 | 0.8760 | 7.74 | 2.2 |

## Limitations

- The comparison set is limited to participants with CRP, so the 2011-2014 cycles drop out. Values are not corrected for assay changes between cycles, and the analysis is unweighted (the examined sample, not the US population).
- NCHS perturbed some follow-up times and causes of death in the public-use mortality files. Deaths run to 31 December 2019.
- Top-coded ages (80+ or 85+) feed the survival head as lower bounds; they are not age targets and are not scored.
- The sparse-panel results simulate panels by deleting analytes from complete NHANES rows; real routine panels may differ (other assays, other missingness).
- Unit conversion covers the entries of VERA's `loinc-conversions.v1.json` only (a demo subset, review status example); any other unit that differs from the trained unit is rejected.
- NHANES and the linked mortality files are NCHS public-use data, used here for statistical analysis only (terms in `data_pipeline/DATASET_CARD.md`). Only aggregate results are reported.

## Provenance and files

- Checkpoints on spark-a98a: `~/vera-fusion/network/runs/nhanes-v0.2/model.pt` (finalized), `configs/<name>/{best,last}.pt`, `seeds/seed-<n>/model.pt`. Raw results: `reports/v0.2/tuning.json` and `reports/v0.2/test-eval.json`.

```
~/vera-fusion/network/run.sh tune       # grid, repro, seeds, low-data KG ablation on train/val; never scores test
~/vera-fusion/network/run.sh evaluate   # the single test scoring; refuses when test-scored.json exists
python -m fusionnet.report --run fusionnet/runs/nhanes-v0.2 --out reports/v0.2-evaluation.md
```
