Abstract
Multitask deep learning has been applied to patient outcome prediction from text, taking clinical notes as input and training deep neural networks with a joint loss function of multiple tasks. However, the joint training scheme of multitask learning suffers from inter-task interference, and diagnosis prediction among the multiple tasks has the generalizability issue due to rare diseases or unseen diagnoses. To solve these challenges, we propose a hypernetwork-based approach that generates task-conditioned parameters and coefficients of multitask prediction heads to learn task-specific prediction and balance the multitask learning. We also incorporate semantic task information to improves the generalizability of our task-conditioned multitask model. Experiments on early and discharge notes extracted from the real-world MIMIC database show our method can achieve better performance on multitask patient outcome prediction than strong baselines in most cases. Besides, our method can effectively handle the scenario with limited information and improve zero-shot prediction on unseen diagnosis categories.
Introduction
Predicting patient outcomes, such as readmission risk or length of stay (LoS), from clinical notes is a fundamental multitask learning (MTL) challenge. While MTL aims to leverage shared features across tasks to improve robustness, it frequently encounters two significant obstacles:
- Inter-task Interference: Different tasks often compete for model capacity. For instance, optimizing for diagnosis prediction might degrade performance on readmission risk assessment.
- The "Long Tail" of Diagnosis: Medical datasets contain thousands of codes, many of which are rare. Traditional models struggle to generalize to these "unseen" diagnoses because they treat labels as arbitrary indices rather than semantically meaningful concepts.
Methods: The MT-Hyper Framework
To address these issues, researchers developed MT-Hyper, a framework that utilizes hypernetworks to generate task-specific parameters dynamically. Unlike static architectures, MT-Hyper adapts its internal logic based on the semantic context of the task at hand.
The core components include:
- Base Encoder: A ClinicalBERT model transforms raw clinical text into dense vector representations.
- Task Embeddings: Instead of simple indices, the model encodes textual descriptions of tasks (e.g., "readmission prediction"). This provides the hypernetwork with semantic context.
- Adapter HyperNet: This component acts as a "parameter factory," generating weights for task-specific prediction heads on the fly, conditioned on task embeddings. This allows the model to share meta-knowledge while isolating task-specific logic.
- Weight HyperNet (WH): This secondary hypernetwork dynamically generates coefficients for the joint loss function, automatically balancing the learning process across multiple tasks without manual hyperparameter tuning.
Datasets and Experimental Setup
The study utilizes the MIMIC-III database, focusing on two subsets:
- Discharge Summaries: Notes written at the end of a hospital stay.
- Early Notes: Notes written within the first 24–72 hours of admission, representing a more challenging but clinically valuable prediction window.
The model was evaluated on four tasks: Readmission (binary), Diagnosis (multi-class), Length-of-Stay (10-class), and Admission Type (3-class).
Key Results and Insights
MT-Hyper consistently outperformed strong baselines like MT-BERT across almost all metrics. On "Early Notes," MT-Hyper achieved an average F1 score of 37.14, significantly higher than MT-BERT's 31.69.
The Zero-Shot Breakthrough
The most significant finding was the model's performance on unseen diagnoses. While baseline models performed near random (AUC-ROC ~10%) for diagnoses absent from the training set, MT-Hyper achieved an AUC-ROC of 68.33% on unseen discharge diagnoses. This success stems from the model's ability to treat labels as semantic concepts.
By using semantic descriptions, the model understands that "Pneumonia" is related to respiratory issues, allowing it to generalize to new but semantically similar categories. Furthermore, the Weight HyperNet improved predictive scores in 10 out of 16 evaluation metrics, validating the effectiveness of automated task balancing.
Discussion and Future Work
While MT-Hyper excels at semantic tasks, it faces challenges with numerical reasoning, particularly in Length-of-Stay (LoS) prediction. LoS often depends on hospital workflows and numerical data that semantic embeddings may not fully capture. Additionally, the model's performance is inherently tied to the quality of the medical ontologies and task descriptions provided.
Future research directions include integrating structured EHR data, such as laboratory results and vital signs, alongside clinical notes to improve performance on time-sensitive and numerically-driven outcomes.
Summary updated