Learning to Route: Per-Sample Adaptive Routing for Multimodal Multitask Prediction

Marzieh Ajirak, Oded Bein, Ellen Rose Bowen, Dora Kanellopoulos, Avital Falk, Faith M. Gunning, Nili Solomonov, Logan Grosenick

Abstract

In clinical settings, data is often heterogeneous and outcomes are complexly interrelated. Standard machine learning models typically employ a static architecture that may not be optimal for every individual patient. This paper presents a novel routing-based neural network that dynamically selects the most effective processing path for each sample. By automatically determining which input modalities to prioritize and whether to share information across tasks, the proposed framework significantly improves predictive accuracy and provides a transparent view into the model's decision-making process.

Introduction

Predictive modeling in psychotherapy faces significant challenges due to the nature of clinical data. A single patient record might contain structured survey scores alongside unstructured clinician notes. While outcomes like depression and anxiety are often correlated, the strength of this relationship varies between individuals. Traditional "one-size-fits-all" architectures often force a fixed fusion strategy or universal multi-task learning, which can lead to "negative transfer" if certain data modalities are noisy or uninformative for a specific case.

Methodology: Hierarchical Mixture-of-Experts

The core of this research is a unified framework based on a Hierarchical Mixture-of-Experts (MoE) architecture. Instead of a static pipeline, the model utilizes two learned "routers" to direct data flow:

  1. Modality Router: This component selects between four distinct processing paths:
  2. T1/N1: Unimodal paths focusing solely on text or numerical data.
  3. T2 (Textualized Numerical + Text): A novel approach where numerical scores are converted into natural language sentences and merged with text notes for processing by language models.
  4. N2 (Numerical + Text Embedding): Combines raw numerical data with vector embeddings of text (e.g., via BERT).
  5. Task Router: This decides whether to employ Single-Task Learning (STL), treating outcomes independently, or Multi-Task Learning (MTL), which shares hidden representations across related tasks.
The Hierarchical Mixture-of-Experts architecture featuring modality and task routers.

The system is trained end-to-end using the Gumbel-Softmax trick to ensure routing decisions are differentiable. Additionally, the model incorporates heteroscedastic loss to estimate its own uncertainty, allowing it to discount potentially noisy samples.

Experimental Evaluation

The model was evaluated on both synthetic benchmarks and a real-world psychotherapy dataset involving 534 healthcare workers during the COVID-19 pandemic. The clinical data included clinician notes and standardized PHQ-9 (depression) and GAD-7 (anxiety) scores. To address privacy concerns and data volume, the researchers utilized a "Realistic Synthetic" corpus generated by Large Language Models (LLMs) that preserved the statistical properties of the original clinical records.

Key Results and Interpretability

The adaptive routing approach consistently outperformed fixed baseline models. On the psychotherapy dataset, the "Soft Routing" model achieved a Root Mean Squared Error (RMSE) of 3.62 for depression and 3.34 for anxiety, compared to standard MTL (4.12 / 3.78) and STL (4.28 / 3.95) baselines.

Beyond performance, the routing policy provides a unique form of interpretability. By analyzing which paths the model chooses for specific samples, researchers can understand the underlying logic. For instance, the model learned to prioritize fused paths (T2/N2) when both data types were informative, effectively "pruning" less useful unimodal paths.

Analysis of routing probabilities and joint PMF across modality paths and task paradigms.

Conclusion

This work demonstrates that per-sample adaptive routing can mitigate the risks of negative transfer in multimodal, multitask clinical environments. While the results are promising, future work is needed to validate these models in live clinical workflows and ensure that routing decisions align with clinical intuition without reinforcing biases present in clinician notes. Scaling this approach to more complex hierarchies with dozens of modalities remains a key area for future research.

Summary updated

BibTeX
@inproceedings{ajirak2025learning,
  author = {Marzieh Ajirak and Oded Bein and Ellen Rose Bowen and Dora Kanellopoulos and Avital Falk and FAITH M. GUNNING and Nili Solomonov and Logan Grosenick},
  title = {{Learning to Route: Per-Sample Adaptive Routing for Multimodal Multitask Prediction}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=peYBx7AiKw},
}
Figure