Create and explore imaginative 3D worlds with our new product Dreamfield (opens in a new tab)
Papers
Topics
Authors
Recent
Search
2000 character limit reached

Patient Cohesion-Separation Loss (PCSL)

Updated 4 June 2026
  • Patient Cohesion-Separation Loss (PCSL) is defined as the ratio of intra-patient scatter to inter-patient scatter, preserving unique patient signatures in feature embeddings.
  • It employs both cohesion and separation terms to cluster features from the same patient while repelling different patient centroids, enhancing the robustness of lung sound classification.
  • Integration of PCSL within the PAFA framework has shown measurable performance gains on ICBHI benchmarks by mitigating inter-patient variability.

Patient Cohesion-Separation Loss (PCSL) is a training objective introduced by Jeong and Kim in the context of lung sound classification to address inter-patient variability observable in biomedical signals, even among individuals with similar clinical presentations. Within the Patient-Aware Feature Alignment (PAFA) framework, PCSL explicitly enforces that representations of examples from the same patient are clustered together, while the centroids of different patients are pulled apart in feature space. This mechanism aims to preserve individualized patient signatures during supervised learning, thereby improving generalization and robustness on benchmarks with substantial subject-specific heterogeneity (Jeong et al., 28 May 2025).

1. Formal Definition and Mathematical Structure

PCSL operates on mini-batches composed of MM samples, each with a patient label p(i)∈Pp(i)\in P. The backbone and projection network fθ(⋅)f_\theta(\cdot) maps each input xix_i (e.g., a Mel-spectrogram) to a feature vector zi∈Rdz_i\in\mathbb{R}^d. For each patient p∈Pp\in P, let Ip={i ∣ p(i)=p}\mathcal{I}_p = \{i\,|\,p(i)=p\} denote the index set for samples from pp, with Np=∣Ip∣N_p=|\mathcal{I}_p|, and define the patient-specific centroid: μp=1Np∑i∈Ipzi.\mu_p = \frac{1}{N_p} \sum_{i\in\mathcal{I}_p} z_i. Two statistics are introduced:

  • Intra-patient scatter:

SW=∑p∈P∑i∈Ip∥zi−μp∥22S_W = \sum_{p\in P} \sum_{i\in\mathcal{I}_p} \|z_i - \mu_p\|_2^2

which quantifies within-patient variance.

  • Inter-patient scatter:

SB=∑p∈P∑q∈P, q≠p∥μp−μq∥22S_B = \sum_{p\in P}\sum_{q\in P,\,q\ne p}\|\mu_p-\mu_q\|_2^2

which quantifies between-centroid separation.

PCSL is then defined as the ratio

LPCSL=SWSB+ϵ\mathcal{L}_{\text{PCSL}} = \frac{S_W}{S_B + \epsilon}

where ϵ>0\epsilon>0 is a small constant for numerical stability. Minimizing LPCSL\mathcal{L}_{\text{PCSL}} drives embeddings for the same patient towards their centroid (reducing SWS_W) and centroids of different patients apart (increasing SBS_B).

2. Roles and Interplay of Cohesion and Separation Terms

The two components of PCSL operate antagonistically yet synergistically:

  • Cohesion Term (SWS_W): Penalizes dispersion of features from the same patient, encouraging tight patient-specific clusters in feature space.
  • Separation Term (SBS_B): Promotes dispersal among patient centroids, ensuring that patient-specific manifolds do not collapse onto one another.
  • Ratio Formulation: Simultaneously encourages intra-patient tightness and inter-patient diversity. Reduction of SWS_W or increase in SBS_B both independently decrease LPCSL\mathcal{L}_{\text{PCSL}}.
  • Stabilization Factor: The addition of ϵ\epsilon, typically 1e−61\text{e}^{-6}, prevents numerical instability when centroids coalesce early in training.

3. Centroid Calculation and Feature Space Dynamics

During each batch, the model executes:

  1. Forward pass to obtain {zi}\{z_i\}.
  2. Divides embeddings per patient, determines indices Ip\mathcal{I}_p.
  3. Computes μp\mu_p for all pp via averaging.
  4. Calculates SWS_W, SBS_B, and thus LPCSL\mathcal{L}_{\text{PCSL}}.

Because μp\mu_p depends on all constituent ziz_i and thus on network parameters θ\theta, centroid locations evolve throughout training. As optimization progresses, centroids for distinct patients stabilize at well-separated locations if the latent space accommodates individual-variation structure.

4. Integration into the Overall Training Objective

PCSL is combined with standard cross-entropy (for supervised class prediction) and the Global Patient Alignment Loss (GPAL), which mildly regularizes all patient centroids toward their grand mean: μG=1∣P∣∑p∈Pμp,LGPAL=1∣P∣∑p∈P∥μp−μG∥22.\mu_G = \frac{1}{|P|}\sum_{p\in P}\mu_p,\qquad \mathcal{L}_{\text{GPAL}} = \frac{1}{|P|}\sum_{p\in P}\|\mu_p-\mu_G\|_2^2. The full objective for the PAFA framework is

Ltotal=LCE+λpcsl⋅LPCSL+λgpal⋅LGPAL.\mathcal{L}_{\text{total}} = \mathcal{L}_{\text{CE}} + \lambda_\text{pcsl}\cdot\mathcal{L}_{\text{PCSL}} + \lambda_\text{gpal}\cdot\mathcal{L}_{\text{GPAL}}.

Hyperparameters λpcsl=50\lambda_\text{pcsl}=50 and λgpal=0.0005\lambda_\text{gpal}=0.0005 provided optimal performance in ICBHI experiments via grid search.

5. Optimization, Implementation, and Feature Manifold Effects

The backpropagated gradients from LPCSL\mathcal{L}_{\text{PCSL}} impact features as follows:

  • From SWS_W: Each ziz_i is pulled toward its patient centroid μp(i)\mu_{p(i)}.
  • From SBS_B: Centroid positions, being functions of current embeddings, interact so as to repel each μp\mu_p from others; each ziz_i thus indirectly receives a (weaker) push away from non-identical patient centroids.

Efficient computation is possible for practical batch sizes (e.g., ∣P∣≤32|P|\leq32); complexity of SBS_B is O(∣P∣2)O(|P|^2). In batches, if Np=1N_p=1 (only one sample for a patient), μp=zi\mu_p=z_i and that sample contributes zero to SWS_W, but still participates in SBS_B. High λpcsl≫1\lambda_\text{pcsl}\gg1 is necessary since raw LPCSL\mathcal{L}_{\text{PCSL}} is much smaller in magnitude than classification loss; normalization per initial batch statistics is recommended.

The effect on the embedding space is twofold: the manifold expands to provide distinct patient-specific regions (mitigating feature collapse driven solely by class labels), and the structure becomes multi-modal, reflecting mixed patient and disease characteristics.

6. Empirical Effects on the ICBHI Benchmark

The PAFA framework, incorporating PCSL and GPAL, demonstrated the following results on the ICBHI lung sound dataset:

  • Four-class (Normal/Crackle/Wheeze/Both):
    • Baseline (BEATs+CE): 63.49%
    • PCSL+GPAL (full PAFA): 64.84% (absolute gain of +1.35%)
  • Two-class (Normal/Abnormal):
    • Baseline: 70.76%
    • PAFA: 72.08% (absolute gain of +1.32%)
  • Ablation (BEATs backbone, four-class):
    • w/o PCSL: 63.92%
    • w/o GPAL: 63.88%
    • full PAFA: 64.84%
    • This suggests PCSL alone provides an improvement of approximately 0.9–1.0% absolute.

t-SNE analyses reveal that standard CE-only training produces class-centric clusters, whereas the addition of PCSL (and GPAL) introduces prominent subclusters corresponding to patient idiosyncrasies—reduced intra-patient spread and increased centroid separation.

7. Practical Considerations and Limitations

Batch size must be configured to ensure multiple samples per patient for effective μp\mu_p computation; if not, contributions to SWS_W may degenerate. The computational expense of SBS_B is quadratic in the number of patients in a batch but remains tractable under common batch size settings. Weighting λpcsl\lambda_\text{pcsl} is set high to align magnitudes of loss terms. By directly penalizing the ratio of within- versus between-patient dispersion, PCSL preserves individualized features for each patient and affords improved generalization to under-represented or outlier patients (Jeong et al., 28 May 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Patient Cohesion-Separation Loss (PCSL).