Use when replacing softmax attention with quantum-derived doubly stochastic matrices (QDSM) for data-limited molecular/gene-expression prediction from histopathology.
Installs into .claude/skills of the current project.
Are you the author of Qdsm Quantum Attention Molecular Profiling?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hiyenwong-qdsm-quantum-attention-molecular-profiling)
---
name: qdsm-quantum-attention-molecular-profiling
description: Use when replacing softmax attention with quantum-derived doubly stochastic matrices (QDSM) for data-limited molecular/gene-expression prediction from histopathology.
category: ai_collection
trigger_words: [quantum attention, doubly stochastic matrix, QDSM, histopathology, gene expression prediction, molecular profiling, precision oncology, TCGA, small cohort, molecular triage, softmax replacement, transformer attention, cancer]
arxiv: 2609.21115
---
# QDSM Quantum Attention for Histopathology-Based Molecular Profiling
**Source**: arXiv:2609.21115 (Rhrissorrakrai, Bose, Guzman-Saenz, Utro, Pardia — IBM Research; 2026-09-17), quant-ph.
Paper: https://arxiv.org/abs/2609.21115
## Core Idea
Replace the **softmax attention** inside a transformer with a **quantum-derived doubly
stochastic matrix (QDSM)**, for the task of predicting tumor **gene expression programs
from routine histopathology images** (H&E slides) — enabling precision-oncology molecular
profiling when sequencing is unavailable, tissue is limited, or cohorts are small.
A doubly stochastic matrix (rows and columns both sum to 1) is exactly the structure a
unitary process over amplitudes produces when squaring transition amplitudes — so quantum
hardware is a *native* source of this attention primitive. Separate experiments on IBM
quantum processors recovered the QDSM primitive underlying the attention mechanism.
## Key Findings
1. **Selective, context-dependent gains — not uniform improvement.** Across 29 TCGA
cancer cohorts + an independent CPTAC pancreatic cohort, QDSM attention produced the
largest *relative* improvements in **smaller, data-limited cohorts** (adrenocortical
carcinoma, uveal melanoma).
2. **Accuracy redistribution, not raw uplift.** QDSM did not improve transcriptome-wide
performance uniformly; it **redistributed predictive accuracy across genes and
pathways** — improving biologically relevant targets in some tumor contexts while
worsening others.
3. **Prognostic link.** In adrenocortical carcinoma, the preferentially improved genes
were **enriched for adverse overall-survival associations** — enhanced molecular
inference landed on prognostically relevant biology.
4. **Mixed-effects decomposition.** A leave-one-cancer-out mixed-effects model showed
baseline molecular features predict part of the gene-level benefit; **residuals
identify cancer-specific programs** that improve more or less than expected.
5. **Honest negatives**: cross-cohort transfer (pancreatic) improved selected
metabolic/lineage genes but **did not consistently improve under cohort shift**.
## Reusable Patterns
### Pattern 1 — Quantum primitive as attention replacement
- Identify a classical attention component whose mathematical form matches a quantum
measurement outcome (here: doubly-stochastic ↔ squared amplitudes of a unitary).
- Swap it in behind the same interface; keep the rest of the transformer classical.
- Validate the quantum primitive **separately on hardware** before integration.
### Pattern 2 — Small-cohort relative-gain evaluation
- Report gains **stratified by cohort size**, not just aggregate metrics. Quantum
inductive bias pays off where data is scarce; this is where to look for advantage.
### Pattern 3 — Gene-level benefit decomposition (mixed-effects)
- Fit `performance_gain ~ baseline_molecular_features + (1|cancer)` via
leave-one-cohort-out; inspect residuals to find cohort-specific winners/losers.
- Distinguishes "the model got better everywhere" from "it got better exactly where
biology says it should".
### Pattern 4 — Molecular triage positioning
- Frame the deliverable as **triage**: image-based molecular inference when direct
testing is unavailable, incomplete, or impractical — not as a sequencing replacement.
## Activation
Use when: building hybrid quantum-classical attention; predicting molecular targets from
images with small cohorts; evaluating whether a quantum component helps via per-target
redistribution analysis; designing molecular-triage pipelines.
## Pitfalls
- QDSM attention is **context- and target-dependent** — do not claim uniform superiority.
- Cross-cohort shift can erase gains; always run transfer experiments.
- Doubly stochasticity must be enforced exactly (unit-derived), or the attention
degrades to an unnormalized kernel.