Skip to content

Next-Visit Diagnosis Prediction: Why Aggregate F1 Misleads Buyers

THE ARGUMENT

Aggregate micro-F1 blends persistent, newly recorded and recurrent diagnoses into one number, letting a zero-cost repeat-the-last-visit rule match or beat most LLM methods; only a transition- and history-depth-aware split shows what a model actually adds.

On this page

You have a vendor evaluation for a next-visit diagnosis prediction tool on your desk, and the only number on it is an average score. It beats the baselines, so the question is whether to sign. But what a hospital needs to know is whether the model flags a diagnosis that never appeared in this patient's record, or one that vanished two visits ago and is coming back — and an average answers neither. This paper takes that average apart. Across two EHR datasets and four LLM backbones, it scores predictions separately for persistent, newly recorded and recurrent diagnoses, and finds a zero-cost rule — repeat the last visit — beats 21 of 24 LLM results on the aggregate metric while predicting no new or recurrent diagnosis at all [1].

What the average hides: persistent, new, recurrent

The task is easy to state. Given a patient's prior encounters — demographics, clinical notes, and the diagnosis codes recorded at each visit — predict the diagnosis set documented at the next one. The difficulty is that set: a visit may carry three diagnoses or fifteen, and common and rare labels differ by orders of magnitude in frequency.

The paper partitions the next visit against the observed history, and that partition is the foundation of everything else:

  • Persistent: diagnoses in the next visit that also appear in the most recent visit.
  • New: diagnoses in the next visit that appear nowhere in the observed record.
  • Recurrent: diagnoses in the next visit that appeared earlier but not in the most recent visit.

The three sets are disjoint and together cover the next visit [1]. A second axis is history depth: patients seen once (Visit 1) versus twice or more (Visit 2+). With a single observed visit, recurrence is empty by construction, so Recurrent F1 is reported only for Visit 2+. Aggregate metrics such as micro-F1 pool every label from every patient into one score, giving a correct common diagnosis and a correct rare complication the same weight.

About six in ten next-visit labels were already there

DatasetDepthPatients (%)New (%)Persistent (%)Recurrent (%)
MIMIC-IIIVisit 178.645.6454.36–
MIMIC-IIIVisit 2+21.427.5259.3113.17
MIMIC-IVVisit 174.441.3758.63–
MIMIC-IVVisit 2+25.625.0559.1415.81

In the Visit 2+ stratum, a model that copies the previous visit verbatim covers roughly six in ten target labels without computing anything. Its aggregate score looks respectable; its New and Recurrent scores are zero, because it never predicts either category. A leaderboard that does not split the three apart cannot tell a model that predicts well from one that copies safely.

A repeat-the-last-visit rule beats 21 of 24 LLM results

The paper uses last-visit carry-forward (LVCF, repeat the most recent visit's diagnoses) and observed-history union (OHU, predict the union of all observed diagnoses) as rule baselines, against 24 LLM results: four backbones times six methods.

On MIMIC-IV, LVCF reaches a micro-F1 of .582 at Visit 1 and .586 at Visit 2+, beating 21 of the 24 LLM results; on MIMIC-III it beats every LLM method. Its New and Recurrent F1 are .000. OHU does produce a Recurrent F1 of .444 at Visit 2+, but its New F1 is also .000.

A few LLM methods do win on the aggregate: NECHOv3 with Llama-3.3-70B reaches .600 micro-F1 at Visit 2+ against LVCF's .586. Its New F1 in the same cell is .082. Almost all of that 0.014 margin comes from restating old diagnoses more completely.

Retrieval and memory are strong in different places

The two dominant approaches behave differently. Retrieval methods (EHR-RAG is the representative baseline) pull the record chunks most relevant to the query; memory methods (Traj-CoA) compress the whole trajectory into a summary first.

Across all four backbones, retrieval achieves higher micro-F1 in both history strata. Memory achieves higher Recurrent F1 with three of four backbones and higher New F1 in six of eight backbone-by-depth settings; Persistent F1 has no consistent direction. That is not one view being stronger — the two views see different evidence, one local, one global. The exception is Gemini-3.1-Flash-Lite, where EHR-RAG leads on every transition.

How LONGINUS joins them: keep consensus, adjudicate disagreement

The retrieval view splits the label space by history state — Current (in the latest visit), Past-only (seen before, absent from the latest visit), Unseen (never recorded) — issues one dense-retrieval query per state against the patient's own record, merges and deduplicates chunks by best rank, and sends the top 12 (k=12) in chronological order.

The memory view uses two LLM calls: one compresses the record into a structured memory card (chronic conditions, recurrent and acute events, abnormal trends, prior treatments and procedures, unresolved problems, risk factors), the second predicts from that card.

Adjudication touches only disagreements. Labels both views agree on are kept; labels proposed by one view become candidates, annotated with history state and prior visits, but the adjudicator is never told which view proposed them, so it cannot collapse into a fixed preference. One batched call applies state-specific criteria: continued activity evidence for Current, no exclusion merely for absence from the latest visit for Past-only, patient-specific support for Unseen.

Across MIMIC-III and MIMIC-IV with four backbones, LONGINUS achieves the best transition-specific F1 among LLM-based methods in 22 of 24 settings and stays competitive on aggregate metrics [1].

Where this evidence stops

What the study supports: within two retrospective MIMIC cohorts and a fixed 112-label CCS space, aggregate scores hide the persistent/new/recurrent split, and LONGINUS is consistently better under that split.

What it does not support, in four layers.

  • Dataset: MIMIC is single-country and ICU-heavy, and its coding reflects billing and workflow; New is new relative to recorded codes, not necessarily new disease.
  • Model: every method is training-free and only four backbones are tested — swap the backbone or the prompt and the ranking can move, as the Gemini-3.1-Flash-Lite results already hint.
  • Cost: each LONGINUS prediction runs retrieval, two memory calls and a batched adjudication, more expensive than a single prompt, and the paper does not convert that into a per-unit cost claim.
  • Evaluation: this is offline prediction, not a causal result and not a deployment case; change the label space to full ICD or to another hospital's coding practice and every number needs re-running.

Use it as an acceptance checklist, not as a leaderboard.

References

  1. Rethinking Next-Visit Diagnosis Prediction Beyond Aggregate Metrics: Retrieval–Memory Multi-Agent Adjudication

Sign in to Padda

A code in your inbox. No password to remember.

Connecting to sign-in…