Manuscript Offprint

arXiv:2611.03826

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

Heejoon Koo

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.

1 Introduction

Electronic health records (EHRs) accumulate a patient's clinical history across encounters, thereby enabling a shift from retrospective documentation towards prospective clinical prediction. Next-visit diagnosis prediction formulates this objective as multi-label prediction over a sequence of prior visits: given a patient's record up to the current encounter, predict the set of diagnoses documented

Figure

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

at the next visit (Choi et al., 2016a; Li et al., 2020; Koo, 2024). Anticipating these diagnoses could facilitate proactive scheduling, preventive testing, and personalized intervention (Escobar et al., 2020; Goldstein et al., 2020; Adams et al., 2022).

This formulation poses challenges that adjacent tasks do not. Single-label clinical prediction assigns one target per observation (Choi et al., 2016b; Baldenweg et al., 2024); single-visit classification uses one encounter (Rajpurkar et al., 2017; Baltruschat et al., 2019); and retrospective ICD coding labels an already documented encounter (Mullenbach et al., 2018; Huang et al., 2022). In contrast, next-visit diagnosis prediction forecasts a diagnosis set from multi-visit history for a future encounter, combining distributional and temporal challenges over longitudinal histories (Figure 1). Distributionally, encounters contain varying numbers of co-occurring diagnoses drawn from a long-tailed label distribution. Temporally, diagnoses may persist, be newly coded relative to observed history, or reappear after an interval of absence. Both challenges also vary with history depth: label and transition distributions shift as visits accumulate, and recurrence requires at least two observed visits. Aggregate scores alone may therefore conceal performance differences across distributional settings, temporal transitions, and history depths.

Prior WorkOverallDistributionTemporal TransitionsHistory Depth
Agg.CoLTPers.NewRec.
GRAM (Choi et al., 2017)✓✗✓✗✗✗✗
TCoN (Sun et al., 2021)✓✓✗✗✗✗✗
NECHO (Koo, 2024)✓✗✗✗✗✗✗
TAKECare (Wu et al., 2025a)✓✓✗✗✗✗✓
RAVEN (Rajamohan et al., 2026)✓✗✗✗✓✗✗
Ours (Evaluation)✓✓✓✓✓✓✓

Table 1: Evaluation coverage in representative next-visit diagnosis prediction studies. Agg.: aggregate metrics; Co: co-occurrence; LT: long-tail; Pers.: persistent; New: newly recorded; Rec.: recurrent. ✓/✗: explicitly evaluated/not explicitly evaluated.

Earlier approaches to next-visit diagnosis prediction modeled visit sequences using recurrent and attention-based networks (Choi et al., 2016a,b; Ma et al., 2017), medical ontologies (Choi et al., 2017), and transformer-based or multimodal architectures (Peng et al., 2021; Li et al., 2020; Koo, 2024). More recently, LLM-based methods have explored ontology-aware hierarchical Chain-of-Thought (CoT) prompting (Koo, 2025b) and fine-tuning (Ben Shoham and Rappoport, 2024).

The evaluation of these diverse approaches, by contrast, remains fragmented (Table 1). Distributional analyses have examined within-visit co-occurrence (Sun et al., 2021) and low-frequency diagnoses (Choi et al., 2017). Temporal analyses have focused primarily on newly appearing diagnoses: RAVEN emphasizes new onsets by down-weighting repeated events (Rajamohan et al., 2026). EviCare also targets novel diagnoses (Zhang et al., 2026). History depth has been examined separately (Wu et al., 2025a), and Kruse et al. (2025) show that LLMs struggle with both rare diagnoses and temporal progression. Nevertheless, to our knowledge, no prior study jointly evaluates distributional factors (multi-label set performance and label frequency), temporal transitions (persistent, new, and recurrent diagnoses), and history depth, leaving unclear how model strengths and limitations vary across these dimensions (see Appendix A).

We therefore introduce a unified, model-agnostic, distribution- and transition-aware evaluation framework that jointly assesses multi-label set performance, label frequency, temporal transitions, and observed history depth. On MIMIC-IV (Johnson et al., 2023), this framework reveals that aggregate scores can reward diagnostic persistence: last-visit carry-forward (LVCF) outperforms most LLM-based results in Micro-F1 (21 of 24; Section 2) despite predicting no New or Recurrent diagnoses, while observed-history union (OHU) can predict Recurrent but not New diagnoses. It also distinguishes the retrieval and memory views: retrieval achieves higher Micro-F1 across all backbones and history depths, whereas memory achieves higher Recurrent F1 with three of four backbones and higher New F1 in most settings, while Persistent F1 shows no consistent direction. These distinct profiles motivate reconciling the two views with patient-specific evidence, rather than relying on either view alone.

We propose LONGINUS (LONGitudinal Integration of retrieval and memory Using Source-neutral adjudication), a retrieval–memory disagreement-guided multi-agent adjudication framework that generates separate predictions from evidence retrieved from the patient’s record and a structured memory of the patient trajectory. Using cross-view agreement as a reliability heuristic, LONGINUS preserves shared predictions and reserves adjudication for candidates proposed by only one view. The adjudicator reviews these candidates using both evidence views and diagnosis-history states, without revealing which view proposed each. This design encourages evidence-based decisions without imposing an explicit preference for either retrieval or memory. In summary, our contributions are threefold:

  • We introduce a model-agnostic, distribution- and transition-aware evaluation framework that assesses multi-label set performance and label frequency, decomposes predictions into persistent, new, and recurrent diagnoses, and stratifies results by observed history depth.
  • We benchmark training-free LLM-based prompting, retrieval, memory, and multi-agent approaches, showing that LVCF exceeds every LLM-based method in Micro-F1 on MIMIC-III despite predicting no new or recurrent diagnoses, and that retrieval and memory exhibit distinct prediction profiles across transitions, backbones, and history depths.
  • We propose LONGINUS, a training-free, LLM-based multi-agent framework that combines local retrieval and global trajectory memory via consensus preservation and source-neutral adjudication. Across two datasets and four backbones, it achieves the best transition-specific F1 among training-free LLM-based methods in 22 of 24 settings while remaining competitive with them on aggregate metrics. Ablation, comparative, and stage-wise analyses further support our design choices.

References (23)