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

Heejoon KooarXiv 2026

TL;DR

This paper demonstrates that standard aggregate metrics for next-visit diagnosis prediction are misleading, often rewarding models that simply repeat previous diagnoses while failing to detect new or recurrent conditions. To fix this, the authors introduce a more granular evaluation framework and LONGINUS, a multi-agent system that adjudicates between local retrieval and global patient memory to achieve state-of-the-art performance on complex clinical transitions.

What Problem Does This Paper Address?

Predicting a patient's next set of diagnoses from Electronic Health Records (EHR) is a cornerstone of prospective clinical care. However, the field has a "persistence bias." Because many chronic conditions persist across visits, a trivial baseline—Last-Visit Carry-Forward (LVCF)—often outperforms sophisticated Large Language Model (LLM) approaches on aggregate scores like Micro-F1.

The authors argue that aggregate metrics hide a model's true utility. A clinically useful model must distinguish between:

  • Persistent diagnoses: Conditions continuing from the immediate last visit.
  • New diagnoses: Conditions never seen before in the patient's history.
  • Recurrent diagnoses: Conditions that reappear after a period of absence.

As shown in Figure 1, these categories represent very different clinical challenges that vary significantly depending on how much history (visit depth) is available.

Figure 1: A synthetic illustrative example of the multi- faceted nature of next-visit diagnosis prediction.

Methods

The authors propose a two-part solution: a new evaluation framework and a novel multi-agent architecture.

1. The Evaluation Framework

Instead of one "big number," they stratify performance by:

  • History Depth: Separating patients with only one prior visit from those with two or more (where recurrence is actually identifiable).
  • Temporal State: Calculating specific F1 scores for Persistent, New, and Recurrent labels.

2. The LONGINUS Framework

LONGINUS (LONGitudinal INtegration of retrieval and memory Using Source-neutral adjudication) uses a "divide and conquer" strategy with three main components:

  • Retrieval View: Performs dense retrieval over EHR chunks using specific queries for "Current," "Past-only," and "Unseen" history states to find local evidence.
  • Memory View: Summarizes the entire patient trajectory into a structured "memory card" (covering chronic conditions, acute events, risk factors, etc.) to maintain a global perspective.
  • Source-Neutral Adjudicator: This is the "aha!" moment of the architecture. It identifies where the Retrieval and Memory views agree (consensus) and where they disagree. For disagreements, a third agent reviews the evidence. Crucially, the adjudicator is not told which view proposed which label, preventing it from developing a bias toward one specific "expert."
Figure 2: Overview of Our LONGINUS Framework. Candidate labels follow the example patient in Figure 1.

Datasets

The study utilizes two major open-source clinical datasets:

  • MIMIC-III: A large database of de-identified health-related data associated with over forty thousand patients who stayed in intensive care units.
  • MIMIC-IV: An updated version of MIMIC-III with more recent data and improved structure.

The authors sampled 1,000 unique patients per dataset, mapping diagnoses to 112 Clinical Classifications Software (CCS) labels to ensure a consistent and clinically relevant label space.

Key Insights and Ideas

  • The Aggregate Metric Trap: The paper proves that LVCF beats 21 out of 24 LLM-based results in Micro-F1 on MIMIC-IV, despite having zero ability to predict new or recurrent cases. This highlights why the research community needs to move beyond aggregate scores.
  • Complementary Strengths: Retrieval-based methods are generally better at maintaining high overall F1, while memory-based methods are often better at spotting recurrences and new onsets. LONGINUS is designed specifically to exploit this complementarity.
  • Source-Neutrality Matters: In their ablation studies, the authors found that revealing which agent proposed a label actually lowered performance. Hiding the source forces the adjudicator to rely strictly on the patient's clinical evidence rather than a "reliability heuristic" for a specific sub-agent.
  • Consensus as a Signal: Agreement between agents is a strong indicator of truth. In their stage-wise analysis, consensus predictions were significantly more precise (up to 66.7%) than those where agents disagreed (around 21-38% before adjudication).

Key Results

LONGINUS was tested across four different LLM backbones (Gemini 2.5/3.1 Flash-Lite, GPT-OSS-120B, and Llama-3.3-70B).

  • Transition-Specific Dominance: LONGINUS achieved the best transition-specific F1 (Persistent, New, and Recurrent) in 22 out of 24 settings.
  • Significant Gains: On MIMIC-IV with Llama-3.3-70B, LONGINUS outperformed the strongest LLM baseline by 3.5 points in Micro-F1 and nearly 3 points in both New and Recurrent F1.
  • Efficiency: Despite being a multi-agent system, it uses 54–76% fewer tokens than other complex multi-agent baselines like MedAgents or KAMAC because it avoids unnecessary re-adjudication of consensus labels.
Next-visit diagnosis prediction performance for two representative LLM backbones.

Limitations and Future Work

  • Candidate-Generation Bottleneck: If both the Retrieval and Memory views miss a diagnosis, the adjudicator has no way to "discover" it. Improving the initial recall of these views remains a challenge.
  • Inference Costs: Due to the cost of LLM calls, the evaluation was limited to 1,000 patients per dataset. Larger-scale evaluations are needed to confirm generalizability.
  • Supervised Models: This work focused on training-free LLM methods. Integrating these insights into supervised sequential models (like Transformers trained specifically on EHR) is a promising future direction.
  • Clinical Validation: As a research prototype, LONGINUS has not been validated for real-world clinical use, which would require rigorous prospective trials.

Summary updated

Abstract

Next-visit diagnosis prediction forecasts the diagnoses documented at a patient's next encounter, turning retrospective electronic health records into prospective clinical prediction. However, conventional aggregate evaluation obscures its multifaceted nature: distributionally, models must handle variable-size diagnosis sets and long-tailed labels; temporally, they must distinguish persistent, newly recorded, and recurrent diagnoses; and both vary with observed history depth. We introduce an evaluation framework along these dimensions and apply it to rule-based heuristics, LLM-based prompting, retrieval, memory, and multi-agent approaches. This reveals that repeating the last visit outperforms most LLM-based approaches overall despite predicting no new or recurrent diagnoses, and that retrieval and memory exhibit distinct profiles whose relative strengths vary across temporal transitions and backbones. Motivated by this, we propose LONGINUS, a retrieval-memory multi-agent adjudication framework combining evidence retrieved from patient records with structured memory of the patient trajectory. Using cross-view agreement as a reliability heuristic, it preserves shared predictions and adjudicates disagreements without revealing their source. Across MIMIC-III and MIMIC-IV with four LLM backbones, LONGINUS achieves the best transition-specific performance among LLM-based methods in nearly all settings while remaining competitive with them on aggregate metrics.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
MIMIC-IIILONGINUSMicro-F1.547training-free
Source quote
L1227: .547†
MIMIC-IVLONGINUSMicro-F1.597training-free
Source quote
L1233: .597†
MIMIC-IVLONGINUS (Gemini-3.1-Flash-Lite)Micro-F1.583training-free
Source quote
L1259: margins are smaller in aggregate metrics (e.g., .583
BibTeX
@misc{koo2026rethinking,
  author = {Heejoon Koo},
  title = {{Rethinking Next-Visit Diagnosis Prediction Beyond Aggregate Metrics: Retrieval--Memory Multi-Agent Adjudication}},
  year = {2026},
  eprint = {2611.03826},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.03826},
}
Figure