The classic OT problem
For probability distributions and with , and cost matrix :
is the mass moved from bin or population i to j; the cost of moving it.
At the core of CogniMune is a mathematically rigorous approach leveraging regularized optimal transport, enabling unbiased comparisons of high-dimensional cytometry datasets — and a clearer view of rare immune-cell subsets that may reflect therapy-induced changes.
A 40-color measurement describes each blood sample as millions of cells spread over a high-dimensional marker space. Comparing two such samples is hard: established computational methods for dimensionality reduction and clustering are acceptable and widely used, but they can sometimes oversimplify the data or create groupings that, while mathematically valid, lack biological relevance.
Optimal transport (OT) asks a simple question instead: what is the least amount of “work” needed to turn one sample's distribution of cells into the other's? The answer is a distance — zero when nothing has changed, larger when more cells have shifted further — and a transport plan that shows which cells moved where.
Classical OT solvers can be computationally intensive. CogniMune uses the Sinkhorn distance, a regularized Wasserstein distance that adds entropy for computational efficiency, and summarizes each sample as a low-resolution graph of immune-cell populations — a fingerprint that can be compared across visits.
How the patient's cells are spread across marker expression — here, one marker in a few intensity bins.
Mass moved × distance traveled, minimized over every possible plan.
Distances between populations define a graph; distances between graphs track change over time.
OT Sinkhorn distances quantify immune-profile changes objectively, eliminating the subjective interpretation variability that limits current approaches.
Graph edit operations name the cell populations and relationships that contribute to a change; layouts follow phenotype similarity.
Comparing whole distributions provides a clearer view of rare immune-cell subsets that may reflect therapy-induced immunological changes.
Two histograms stand in for one marker’s intensity distribution at baseline (μ) and on therapy (ν). The demo runs the log-domain Sinkhorn–Knopp algorithm in your browser and compares the result with the exact one-dimensional Wasserstein distance W₁.
Drag across the bars to reshape a distribution, or focus a histogram and use ← → to pick a bin and ↑ ↓ to change it. Bars are normalized to total mass 1; empty bins are allowed. The ground cost between bins i and j is |i − j|.
Entropy makes the problem smooth: a larger ε blurs the plan and converges in very few iterations, while a smaller ε approaches the exact optimal transport at the price of more iterations. The log-domain (stabilized) iterations used here, as in the CogniMune engine, stay numerically safe even for very small ε and for empty bins.
Each iteration costs one pass over the n × m cost matrix — the ~O(n²) per iteration cited in the proposal.
Drag two point clouds and compare the Sinkhorn distance with the exact earth mover’s distance and six other measures: Euclidean distance between centers, 1-D EMD on PC1, Jensen–Shannon, Bhattacharyya, energy distance and MMD.
The methodology follows a recent manuscript from the Purdue research partners. Notation as in the proposal; bold symbols are vectors and matrices.
For probability distributions and with , and cost matrix :
is the mass moved from bin or population i to j; the cost of moving it.
Entropy regularization with makes the problem smooth and fast to solve:
subject to the same constraints. As ε → 0 the Sinkhorn plan approaches the exact optimal plan (see the demo above).
With the Gibbs kernel and scaling vectors , :
Divisions are element-wise. Each update is a matrix–vector product; the demo and the CogniMune engine run the same updates in the log domain for numerical stability.
Classical OT solvers can be computationally intensive and challenging to implement. The Sinkhorn–Knopp algorithm reduces the cost per iteration and achieves rapid convergence on high-parameter flow cytometry data, based on current test data (per the proposal).
For cell-population distributions , a pairwise distance matrix:
Classical multidimensional scaling converts D into the similarity matrix B (double-centring of squared distances) and takes k-dimensional embeddings from its leading eigenvectors — the layout used for the fingerprint graphs.
Nodes correspond to population distributions , edge weights are Sinkhorn distances and node weights V are the cell-population proportions. Optional biological distance thresholding at τ keeps only close relationships.
Here D is the degree matrix, and the eigenvalues of the two normalized Laplacians, and .
The minimum total cost over edit paths — sequences of node and edge insertions, deletions and substitutions — that transform into . The operations themselves name the cell populations and relationships that contribute to a change.
Both metrics apply to annotated graphs (labeled populations) or raw graphs (statistical clusters).
CogniMune represents immune-cell populations and their relationships as a graph with biologically meaningful layouts derived from phenotype similarity, making interpretation intuitive for clinicians and cytometry practitioners.
Select a population in the graph.
Nodes are the 30 mutually exclusive (leaf) populations measured by the panel, colored by lineage. They are placed by classical MDS of their reference marker signatures (40% of the variance in two dimensions), then gently spaced apart so labels stay legible; each node is linked to its two nearest phenotypes. In a patient fingerprint, node size and edge weights come from the measured proportions and Sinkhorn distances. Hover a node for its definition; scroll or pinch to zoom.
| Population | Lineage |
|---|---|
| Mature neutrophils | Granulocytes |
| Immature neutrophils | Granulocytes |
| Basophils | Granulocytes |
| Classical monocytes | Monocytes |
| Intermediate monocytes | Monocytes |
| Non-classical monocytes | Monocytes |
| cDC2 (CD1c+ CD11c+ DC) | Dendritic cells |
| Plasmacytoid DC | Dendritic cells |
| CD56bright NK cells | NK cells |
| CD56dim CD16+ NK cells | NK cells |
| Innate lymphoid cells | ILC |
| NKT-like cells | Unconventional T |
| γδ T cells (CD27+) | Unconventional T |
| Effector/memory γδ T cells | Unconventional T |
| Naive CD4 T cells | CD4 T cells |
| Central memory CD4 T cells | CD4 T cells |
| Effector memory CD4 T cells | CD4 T cells |
| CD4 TEMRA | CD4 T cells |
| Regulatory T cells | CD4 T cells |
| Activated / terminally differentiated Treg | CD4 T cells |
| Naive CD8 T cells | CD8 T cells |
| Stem-cell memory CD8 T cells | CD8 T cells |
| Central memory CD8 T cells | CD8 T cells |
| Effector memory CD8 T cells | CD8 T cells |
| CD8 TEMRA | CD8 T cells |
| Naive B cells | B cells |
| Transitional / regulatory B cells (Breg) | B cells |
| IgD+ memory B cells (unswitched) | B cells |
| IgD− memory B cells (switched) | B cells |
| Plasmablasts | B cells |
After patient evaluation, each visit produces blood for cytometry and MRI imaging. Every cytometry acquisition becomes a graph; inter-graph distances identify quantitative metrics of ARIA progression, with GED operations specifying the contributing cell populations and relationships.
The peripheral immune system is read out from blood; the central nervous system through MRI.
Adapted from proposal Figure 7, “The general workflow for implementation and usage of automated data processing system.”
For future commercial data processing, the project selected Amazon Web Services (AWS), with robust HIPAA compliance through its Business Associate Agreement (BAA). Its capability to handle protected health information while adhering to strict security and compliance standards makes it an ideal foundation for a flow cytometry data-processing system.
The system will perform the computationally intensive tasks:
Blood samples are de-identified biobank samples, and the Phase I research portal stores study codes and study weeks only — no names, dates of birth or record numbers.
A user-friendly interface where clinicians upload cytometry files, OT-based summaries are computed automatically, and immunologic shifts are visualized without requiring familiarity with the underlying mathematics.
AWS services covered by the Business Associate Agreement provide the security and compliance foundation for handling protected health information.
The 40-color panel measures 39 immune markers plus a viability dye — the populations that become the nodes of every graph.