FedEHR-Agents: Federated Agentic Optimization for Automated EHR Modeling
Organizations: School of Computer Science, McGill University, Montreal, Canada · Mila – Quebec AI Institute, Montreal, Canada
Abstract
Recent advances in large language models are enabling autonomous clinical agents to perform increasingly complex electronic health record (EHR) modeling workflows. However, agents deployed at individual hospitals remain constrained by institution-specific data and modeling environments, while direct cross-hospital collaboration is restricted by the sensitivity of patient-level EHR data. Although federated learning (FL) provides a natural foundation for privacy-preserving collaboration, existing approaches remain predominantly model-centric, limiting federation to prediction models or their updates while overlooking the richer modeling experience accumulated by autonomous agents. To address this limitation, we propose FedEHR-Agents, an experience-centric federated agentic optimization framework for automated EHR modeling. Each hospital deploys an autonomous clinical EHR agent that performs data preprocessing and model development while refining local clinical modeling experience through historical memory, task-specific evaluation, and TextGrad-based prompt refinement. The federated server performs evidence-guided experience aggregation to integrate reliable and complementary modeling experience across heterogeneous hospitals and distills the aggregated experience into global meta-prompts for subsequent local refinement. Extensive experiments on real-world multi-hospital EHR benchmarks demonstrate that FedEHR-Agents consistently outperforms local and federated baselines across diverse clinical prediction tasks and remains robust across different federation scales and LLM backbones. These results establish clinical modeling experience as a promising collaborative object beyond conventional parameter-centric FL and point toward federated autonomous clinical intelligence.
Figures & tables
| Method | Mortality-48h | ARF-4h | LOS 7d | Sepsis |
|---|---|---|---|---|
| Centralized Methods (Upper Bound) | ||||
| Centralized AutoML | ||||
| Centralized Agent | ||||
| Independent Methods | ||||
| Local AutoML | ||||
| Local Agent | ||||
| Memory | Evaluator | DP Module | EGEA | AUPRC |
|---|---|---|---|---|
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| # Hospitals | ARF-4h | LOS 7d | Sepsis | |||
|---|---|---|---|---|---|---|
| PromptAvg | FedEHR-Agents | PromptAvg | FedEHR-Agents | PromptAvg | FedEHR-Agents | |
| 3 | 0.183 ± 0.006 | 0.194 ± 0.004 | 0.506 ± 0.012 | 0.532 ± 0.010 | 0.286 ± 0.011 | 0.316 ± 0.009 |
| 5 | 0.197 ± 0.004 | 0.225 ± 0.003 | 0.513 ± 0.011 | 0.538 ± 0.009 | 0.302 ± 0.011 | 0.322 ± 0.011 |
| 10 | 0.202 ± 0.006 | 0.229 ± 0.005 | 0.527 ± 0.010 | 0.544 ± 0.010 | 0.311 ± 0.010 | 0.328 ± 0.010 |
| 15 | 0.208 ± 0.005 | 0.231 ± 0.005 | 0.529 ± 0.013 | 0.546 ± 0.008 | 0.317 ± 0.007 | 0.335 ± 0.009 |
| 20 | 0.214 ± 0.006 | 0.236 ± 0.004 | 0.533 ± 0.011 | 0.553 ± 0.011 | 0.318 ± 0.009 | 0.341 ± 0.010 |
| Memory | Evaluator | DP Module | EGEA | ARF-4h | LOS 7d | Sepsis |
|---|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | 0.187 ± 0.004 | 0.521 ± 0.012 | 0.303 ± 0.010 | |
| ✓ | ✓ | ✓ | 0.185 ± 0.005 | 0.515 ± 0.010 | 0.298 ± 0.009 | |
| ✓ | ✓ | ✓ | 0.176 ± 0.005 | 0.510 ± 0.011 | 0.294 ± 0.008 | |
| ✓ | ✓ | ✓ | 0.183 ± 0.006 | 0.506 ± 0.010 | 0.286 ± 0.011 | |
| ✓ | ✓ | ✓ | ✓ | 0.194 ± 0.004 | 0.532 ± 0.010 | 0.316 ± 0.009 |
| Hospital | Demographic Features | Intake/Output Features | Laboratory Features | Medication Features | Respiratory Care Features | Periodic Vital Sign Features | Aperiodic Vital Sign Features | Total | |
|---|---|---|---|---|---|---|---|---|---|
| Hospital 73 | 2,663 | 10 | 4 | 38 | 18 | 16 | 16 | 10 | 112 |
| Hospital 264 | 3,006 | 9 | 4 | 33 | 15 | 14 | 14 | 9 | 98 |
| Hospital 420 | 2,636 | 10 | 4 | 37 | 17 | 15 | 15 | 10 | 108 |
| Feature Name | eICU Mapping | Table Source | Description |
|---|---|---|---|
| creatinine | lab: creatinine | Laboratory | Serum creatinine reflecting renal function and potential kidney impairment. |
| bun | lab: BUN | Laboratory | Blood urea nitrogen reflecting renal function and accumulation of nitrogenous waste products. |
| lactate | lab: lactate | Laboratory | Blood lactate reflecting tissue hypoperfusion and metabolic stress. |
| glucose | lab: glucose / bedside glucose | Laboratory | Blood glucose concentration reflecting glycemic and metabolic status. |
| wbc | lab: WBC x 1000 | Laboratory | White blood cell count reflecting inflammatory and infectious responses. |
| age | patient.age | Demographics | Patient age at ICU admission, representing baseline demographic risk. |
| EHR Source | Data Characteristics | Primary Feature Strategy |
|---|---|---|
| Periodic Vital Signs | Dense and relatively high-frequency physiological measurements | Representative within-interval values together with compact temporal-change or variability features when sufficiently supported. |
| Laboratory | Sparse and irregular laboratory observations with high missingness | Representative measurements together with selected temporal-change or variability features while limiting redundant feature expansion. |
| Medication | Sparse event-based medication administration records | Binary indicators representing whether each medication category is administered within the corresponding temporal interval. |
| Intake/Output | Repeated fluid intake, output, and balance measurements | Temporal aggregation of intake, output, and net fluid-balance variables within each interval. |
| Respiratory Care | Sparse but clinically important respiratory-intervention events | Binary indicators representing the occurrence of respiratory-support events within each temporal interval. |
| Aperiodic Vital Signs | Sparse and intermittently measured physiological observations | Representative measurements, such as the most recent or average value, without unreliable higher-order temporal statistics. |
Federated Learning
Federated learning trains shared models across data holders without requiring them to pool their raw data.
See all 938 papers