Organizations: Institute of Data Science and Engineering, National Yang Ming Chiao Tung University, Hsinchu, Taiwan · EECS International Graduate Program, National Yang Ming Chiao Tung University, Hsinchu, Taiwan · College of Intelligent Computing and Medical Statistics Research Center, Chang Gung University, Taoyuan, Taiwan · Department of Emergency Medicine, Chang Gung Memorial Hospital, Keelung, Taiwan · Department of Computer Science, National Yang Ming Chiao Tung University, Hsinchu, Taiwan · Computational Health Informatics Program, Boston Children’s Hospital, Boston, MA, USA
Sepsis is a heterogeneous syndrome. Identifying clinically distinct phenotypes may enable more precise treatment strategies. In recent years, many researchers have applied clustering algorithms to sepsis patients. However, many existing approaches require aggregating or imputing temporal Electronic Health Records (EHRs), which can limit the model's ability to capture disease progression. Furthermore, existing clustering processes seldom incorporate domain-driven constraints, often resulting in phenotypes that lack clear clinical distinction. We propose a novel clustering network, NPCNet, that comprises a text embedding generator, a clustering operator, and a target navigator. We first transformed EHRs into pseudo texts by discretizing continuous clinical measurements and integrated them with static variables to construct the embeddings. The target navigator then infused clinical knowledge into the embeddings through auxiliary tasks, constraining clustering results to better align sepsis phenotypes with clinical significance. Finally, the clustering operator employed an iterative refinement mechanism to jointly optimize phenotype centroids and patient representations under domain-driven constraints. Extensive experiments on public datasets demonstrated that NPCNet achieved superior performance on both internal clustering and clinical metrics. We identify four distinct sepsis phenotypes with divergent SOFA trajectories. Notably, although α and δ exhibit similarly severe conditions initially, NPCNet distinguishes patients likely to improve (α) from those at risk of deterioration (δ). Furthermore, treatment effect analysis suggests that early vasopressor administration may be associated with improved outcomes in the α, {beta}, and δ phenotypes. These findings highlight NPCNet's potential for phenotype-specific treatment strategies.
Figures & tables
Figure 1: The overview of NPCNet. Through the text embedding generator, we first bin the value of time-varying variables into bin indices according to the distribution of the training set. We then transform the series of time-varying variables into pseudo texts, combining static information. NPCNet trains with an objective function that consists of Lrec , Lclustering , and Lnavigator . Through the clustering network in the clustering operator and clinical relevance through the target navigator, we can derive the patient embeddings and the centroids of computable phenotypes during the training stage.
Figure 2: Illustration of the binning process for converting time-varying EHR into a pseudo-text sequence. Numerical observations are discretized into quantile-based bins, encoded using the [VARIABLE][BIN] format, and arranged chronologically to generate the final pseudo text. For example, a systolic blood pressure (SBP) value of 32 falls into the lowest quantile bin (SBP-1) and is encoded as "SBP SBP-1".
Figure 3: An example of the NPCNet input representation. Temporal clinical variables are converted into pseudo text and mapped to token-level embeddings, which are combined with order encoding to preserve the examination order. Static variables are encoded separately and fused with the temporal representation using a weighted sum to form the final input for NPCNet.
Figure 4: Abnormal clinical variables, grouped into eight organ systems [ 24 ] , among the sepsis computable phenotypes. The ribbon connects from a phenotype to an organ system if the group median is more abnormal than the overall median ( Supplementary Table 2 ). The more clinical variables are abnormal for the phenotype, the broader the ribbon.
Characteristic
Total
\upalpha
\upbeta
\upgamma
\updelta
No. of patients (%)
19834 (100)
4624 (23.3)
6246 (31.5)
6250 (31.5)
2714 (13.7)
Age, mean (SD)
64.7 (15.8)
63.3 (14.2)
63.6 (16.2)
66.2 (16.1)
66.1 (16.3)
Sex, No. (%)
Male
11763 (59.3)
3122 (67.5)
3535 (56.6)
3513 (56.2)
1593 (58.7)
Female
8071 (40.7)
1502 (32.5)
2711 (43.4)
2737 (43.8)
1121 (41.3)
SOFA score, median (IQR)
7 [4, 10]
7 [3, 9]
5 [3, 8]
7 [5, 10]
11 [8, 14]
Table 1: Characteristics of the 4 sepsis computable phenotypes.
Model
SI ↑
CHI ↑
DBI ↓
TDI ↑
consensus K-means [ 34 ]
-0.043 (0.011)***
0.040 (0.005)***
5.426 (0.870)***
0.716 (0.073)
KM-DTW
0.000 (0.000)***
0.335 (0.004)***
1.993 (0.011)***
0.476 (0.093)***
DCN [ 38 ]
0.344 (0.048) ***
1.482 (0.420) **
1.140 (0.083) ***
0.480 (0.080)***
DKM [ 2 ]
0.290 (0.053)***
0.423 (0.029)***
1.690 (0.098)***
0.463 (0.065)***
USNID [ 41 ]
0.711 (0.413)
4.415 (5.146)
0.830 (0.628)
0.213 (0.197)***
naviDCN [ 29 ]
0.335 (0.076)***
0.824 (0.285)***
1.184 (0.129)***
0.533 (0.138) ***
Table 2: The performance of NPCNet and benchmarks in the testing set
Figure 5: Multivariable logistic regression on in-hospital mortality with phenotypes.
Figure 6: SOFA trajectories during the 18 hours following phenotype derivation by NPCNet, stratified by the SOFA score at six hours after ICU admission.
Figure 7: Pairwise comparisons of SOFA trajectories between four phenotypes at each hour within each stratum for NPCNet and benchmarks. The cell in the heatmap represents the number of significantly different phenotype pairs, out of six total possible pairwise combinations, at each time point within each SOFA stratum. The values range from 0 to 6, with darker colors indicating more pairwise differences, thereby reflecting how distinguishable the phenotypes are over time. The Trajectory Divergence Index (TDI) was then derived by normalizing the number of statistically significant pairs by the total number of pairwise comparisons, yielding a metric between 0 and 1 that quantifies the overall performance of models in clinical significance.
Feature modalities
SI ↑
CHI ↑
DBI ↓
TDI ↑
table w/ MLP
0.134 (0.030)***
0.298 (0.020)***
2.180 (0.304)***
0.595 (0.063) ***
matrix w/ CNN
0.428 (0.040) **
1.441 (0.478) **
0.766 (0.102) *
0.587 (0.128)**
NPCNet
0.447 (0.012)
2.051 (0.161)
0.670 (0.022)
0.753 (0.061)
Table 3: Ablation of the feature modalities and corresponding backbones in the testing set. The table uses the most abnormal measurements with imputation and an MLP backbone; temporal matrices aggregate measurements into hourly windows using ADL [ 14 ] with a CNN backbone; pseudo text preserves the original temporal resolution without aggregation or imputation and uses a Transformer backbone (NPCNet).
Text
Positional encoding
SI ↑
CHI ↑
DBI ↓
TDI ↑
value
timeline
0.285 (0.051)***
0.715 (0.364)***
1.167 (0.167)***
0.481 (0.072)***
value
order
0.450 (0.027)
2.135 (0.164)
0.682 (0.024)
0.576 (0.056)***
bin
timeline
0.348 (0.053) ***
0.862 (0.245) **
1.017 (0.083) ***
0.681 (0.063) *
bin
order
0.447 (0.012)
2.051 (0.161)
0.670 (0.022)
0.753 (0.061)
Table 4: Ablation of the text representation by combining two value encodings (raw vs. discretized) and two positional encodings (timeline vs. examination order) in the testing set.
Lprob
Ldist
SI ↑
CHI ↑
DBI ↓
TDI ↑
0.326 (0.012) ***
0.817 (0.104) ***
0.864 (0.017) ***
0.268 (0.062)***
V
0.278 (0.022)***
0.512 (0.053)***
1.262 (0.100)***
0.600 (0.029)***
V
0.211 (0.034)***
0.319 (0.055)***
1.910 (0.317)***
0.633 (0.055) ***
V
V
0.447 (0.012)
2.051 (0.161)
0.670 (0.022)
0.753 (0.061)
Table 5: Ablation of the objective functions in the testing set. Each navigator loss is removed individually while retaining reconstruction and clustering losses to prevent embedding collapse.
Figure 8: SOFA trajectories across phenotypes under different target navigators: No Navigator, ICU LOS Navigator, and Dual Navigator. In the Dual Navigator, ICU LOS guides Lprob , while discharge status guides Ldist . In the primary NPCNet, discharge status is used as the navigator. Pairwise comparisons of SOFA trajectories between phenotypes at each hour within each stratum in the testing set. The darker the color is, the greater the number of pairwise phenotypes that have statistically significant differences.
Chengdu Medical College, Chengdu, Sichuan 610500, China · Kunming Medical University, Kunming, Yunnan 650500, China · National Yang Ming Chiao Tung University, Taipei, Taiwan 900, China +2