---
title: Supervised Coupled Matrix-Tensor Factorization
url: https://www.emergentmind.com/topics/supervised-coupled-matrix-tensor-factorization-scmtf
type: topic
---

# Supervised Coupled Matrix-Tensor Factorization

Supervised Coupled Matrix-Tensor Factorization (SCMTF) is a low-rank factorization framework designed to extract interpretable latent structures—termed phenotypes—from heterogeneous clinical data integrating temporal, static, and patient-reported variables. Its defining features are the simultaneous factorization (coupling) of a temporal tensor and a static matrix, explicit handling of missing data, and direct supervision by clinical outcomes, making it especially suited for phenotyping in domains with complex, multi-modal, and highly incomplete data such as patient-reported outcomes (PROs) in ulcerative colitis [2506.20065].

## 1. Data Organization and Mathematical Formulation

SCMTF models datasets comprising $N$ patients, each described by both time-varying and static clinical features:

- $X \in \mathbb{R}^{N\times F \times T}$: Third-order tensor of temporal observations, combining $F$ temporal features (labs and PRO items) over $T$ time windows.
- $M \in \mathbb{R}^{N\times D}$: Matrix of $D$ static features per patient (e.g., demographics, medication history).
- $y \in \{0,1\}^N$: Binary outcome vector (e.g., medication persistence).

The unsupervised base is a coupled low-rank factorization:
- $X \approx [[w; A, B, C]]$, a rank-$r$ nonnegative CANDECOMP/PARAFAC (CP) decomposition.
- $M \approx [w; A, D]$, where the patient-mode factor $A \in \mathbb{R}^{N\times r}$ is shared.

Bias tensors $B_{feat}$ (size $F \times 1 \times T$) and $B_{pat}$ (size $N \times 1 \times T$) are introduced to account for feature- and patient-level offsets, ensuring that the factorized components model deviations—representing temporal phenotypes—rather than global shifts.

## 2. Supervised Extension

To direct the factor model towards predictive phenotypes, SCMTF integrates an explicit supervised loss. A two-layer neural classifier $f(A;Z)$ maps each subject's phenotype vector $a_i$ (row $i$ of $A$) to $\hat y_i = f(a_i;Z)$, an estimated probability for the clinical outcome.

The total loss optimized is:

\[
\min_{w,A,B,C,D,b,Z}\; (1-\lambda)\left[
\|\Omega\circ(X - ([[w;A,B,C]] + B_{feat} + B_{pat}))\|_F^2
+ \|\Gamma\circ(M - [w;A,D])\|_F^2
+ \gamma L_{\mathrm{sp}}(A,B,C,D)
\right] + \lambda L_{\mathrm{cl}}(A,Z)
\]
subject to $w,A,B,C,D \ge 0$.

Here,
- $\Omega$, $\Gamma$: Binary masks for observed entries in $X$, $M$
- $L_{\mathrm{sp}}(A,B,C,D) = \|A\|_1 + \|B\|_1 + \|C\|_1 + \|D\|_1$: $\ell_1$ sparsity term
- $L_{\mathrm{cl}}(A,Z)$: Cross-entropy (logistic) loss for outcome prediction
- $\lambda \in [0,1]$: Balance between reconstruction and supervised loss
- $\gamma \ge 0$: Sparsity penalty

## 3. Handling Missing Data

SCMTF is explicitly constructed to address missingness pervasive in PRO data:

- For the tensor $X$, only observed entries (where $\Omega_{i,j,k} = 1$) contribute to the squared error; unobserved data is ignored in both loss computation and gradient updates.
- Missing values in $M$ are similarly handled via $\Gamma$.
- This design allows for data imputation as a byproduct, as missing entries are completed by the fitted model.

A plausible implication is that this approach makes SCMTF applicable to high-missingness scenarios, such as longitudinal PRO data, without introducing bias from imputation preprocessors [2506.20065].

## 4. Optimization and Implementation

SCMTF is optimized end-to-end in a deep learning environment (TensorLy + PyTorch):

- Variables $\{w,A,B,C,D,b\}$: Updated via Adam with $\ell_1$-proximal steps, enforcing nonnegativity by projection after each gradient step.
- Classifier parameters $Z$: Trained with stochastic gradient descent (SGD) with momentum.
- Hyperparameters (rank $r$, loss balance $\lambda$, learning rate, and $\ell_1$ penalty $\gamma$) are determined via grid search. Optimal settings in the reported work were $r = 28$, $\lambda = 0.7$, learning rate $0.01$, and $\gamma = 10^{-3}$.

## 5. Application to Ulcerative Colitis Phenotyping

In the published UC application, data included $2303$ patients with:
- $M \in \mathbb{R}^{2303\times D}$ ($D \approx 15$): Static features (age, sex, disease duration/location, endoscopic severity, medication status).
- $X \in \mathbb{R}^{2303\times F \times 7}$ ($F \approx 50$): Temporal features, such as 4-month binned labs (CRP, calprotectin, Hgb, WBC) and patient-reported Likert-scale surveys across 7 windows centered on medication change.

Phenotypes are defined by the columns of factor matrices $(A,B,C,D)$:
- $A_{i,s}$: Patient $i$’s membership in phenotype $s$.
- $B_{j,s}$: Loading of temporal feature $j$ for $s$.
- $C_{k,s}$: Time profile across the 7 windows for $s$.
- $D_{\ell,s}$: Static-feature contribution to $s$.

Downstream prediction of medication persistence used the $A$ factors as inputs:
- Neural network classifier inside SCMTF achieved test set AUC $= 0.807$.
- Random Forest on $A$ achieved AUC $= 0.853$ at $8$ months, $0.803$ at $20$ months.

Three phenotypes—indexed $16$, $24$, and $27$—were most predictive:
- **24 (“chronic arthritis-pain-lab”)**: Persistently high pain, bloating, arthritis, elevated albumin.
- **16 (“episodic emotional-and-arthritis symptoms”)**: Fluctuating arthritis, anger, worry, CRP/WBC—relevant for $8$-month prediction.
- **27 (“hemoglobin-driven”)**: Variable Hgb and arthritis—most relevant at $20$ months.

This suggests that PRO-based and mixed temporal phenotypes, previously excluded due to data challenges, can be leveraged for clinically-relevant stratification [2506.20065].

## 6. Interpretability and Domain Significance

SCMTF produces sparse, nonnegative, and interpretable phenotypes by construction:
- Each phenotype connects static and temporal clinical features, with explicit temporal profiles.
- Phenotype-specific patterns (e.g., symptom trajectories, biomarker dynamics) are recoverable and clinically characterizable.
- The use of nonnegativity and sparsity encourages each phenotype to capture distinct clinical presentations.

A plausible implication is that such structure facilitates downstream clinical interpretation and discovery of actionable patient subgroups, especially where symptom data has previously been omitted [2506.20065].

## 7. Distinguishing Features and Research Impact

SCMTF is the first tensor-based approach to be both supervised and coupled, with the inaugural application to ulcerative colitis and patient-reported outcomes. By jointly factorizing static and temporal modalities, effectively handling missing values, and incorporating supervision via a flexible neural classifier, SCMTF advances computational phenotyping in settings with heterogeneous and incomplete clinical data. Its empirical performance in medication-persistence prediction and clinical interpretability demonstrates the viability of low-rank matrix and tensor factorization in domains and data regimes previously considered inaccessible [2506.20065].

Source: https://www.emergentmind.com/topics/supervised-coupled-matrix-tensor-factorization-scmtf