---
title: Cardiac Phase-Dynamics Attention (CPDA)
url: https://www.emergentmind.com/topics/cardiac-phase-dynamics-attention-cpda
type: topic
---

# Cardiac Phase-Dynamics Attention (CPDA)

Searching arXiv for the two cited papers and closely related cardiac video attention work.
arXiv search query: 2607.07518 Cardiac Phase-Dynamics Attention ShapeFuse 2509.19052 DyL-UNet temporal consistency echocardiographic segmentation
Cardiac Phase-Dynamics Attention (CPDA) denotes a class of phase-aware temporal attention mechanisms for cardiac video analysis, but recent arXiv usage is not uniform. In the DyL-UNet framework, CPDA is the named module inserted into Swin-Transformer encoder-decoder skip connections to combine spatial features, global dynamics from an Echo-Dynamics Graph (EDG), and explicit cardiac-phase cues for temporally consistent echocardiographic segmentation [2509.19052]. In the ShapeFuse exposition, the same label is used for clarity to refer to the entire fusion block comprising bidirectional cross-modal temporal attention, adaptive gating, and diagnostic pooling that unifies deformable shape and image texture representations for cine-CMR video classification [2607.07518]. In both settings, the motivating premise is the same: uniform weighting across cardiac phases is diagnostically suboptimal, and phase-sensitive temporal modulation can improve both predictive performance and interpretability.

## 1. Nomenclature and conceptual scope

The acronym CPDA is attached to two related but technically distinct modules. One is a skip-connection enhancement block for segmentation; the other is a latent-space fusion block for classification. Both are explicitly designed around temporal dynamics and cardiac phase, but they differ in modality structure, insertion point, and downstream task.

| Context | Inputs | Core operations |
|---|---|---|
| DyL-UNet | \(X_{\mathrm{spatial}}^{(\ell)}\), \(P_{\mathrm{EDG}}\), \(\varphi\) | temporal self-attention, channel-wise modulation, Conv3D enhancement |
| ShapeFuse | \(\{S_t\}_{t=0}^T\), \(\{T_t\}_{t=0}^T\) | bidirectional cross-attention, per-timepoint adaptive gate, temporal pooling |

In DyL-UNet, CPDA is designed to inject long-range temporal context from the EDG and explicit cardiac-phase cues into conventional 2D U-Net skip connections so that each decoder up-sampling stage can attend not only to the spatial features of the current frame but also to where in the cardiac cycle it lies and how its motion relates to the learned global dynamics [2509.19052]. In ShapeFuse, the corresponding block is described as a Bidirectional Cross-Modal Temporal Attention together with an adaptive gating and diagnostic pooling; the label CPDA is applied to that entire fusion block for clarity, not as the original paper’s formal module name [2607.07518].

This suggests that CPDA is best understood, at present, as a phase-aware design pattern rather than a single canonical architecture.

## 2. ShapeFuse: latent fusion of deformable shape and texture

ShapeFuse takes as input a cine-CMR video of \(T+1\) frames, \(\{I_0,\dots,I_T\}\). In a first stage, frozen at classification time, a diffeomorphic registration network produces a sequence of shape-embeddings
\[
S_t=\mathbf{z}_{v_t}\in\mathbb{R}^d \quad (t=0\ldots T),
\]
each encoding the SVF velocity that warps the source frame \(I_0\) to \(I_t\). In parallel, an image encoder produces texture-embeddings
\[
T_t=\mathbf{z}_{f_t}\in\mathbb{R}^d \quad (t=0\ldots T).
\]
The CPDA block then fuses the two \(d\)-dimensional sequences via bidirectional cross-attention, a per-timepoint adaptive gate, and temporal pooling; its output is a single vector \(\mathbf{h}\in\mathbb{R}^d\) that is fed into a small MLP classifier [2607.07518].

At each timepoint \(i\), the shape and texture tokens are linearly projected to queries, keys, and values using learnable matrices
\[
W_Q^S,W_K^S,W_V^S,\;
W_Q^X,W_K^X,W_V^X\in\mathbb{R}^{d\times d}.
\]
The projections are
\[
\begin{aligned}
Q_i^S &= W_Q^S S_i, &K_j^X &= W_K^X T_j, &V_j^X &= W_V^X T_j,\\
Q_i^X &= W_Q^X T_i, &K_j^S &= W_K^S S_j, &V_j^S &= W_V^S S_j.
\end{aligned}
\]
Shape-to-texture attention weights are defined by
\[
\alpha_{i\to j}^{S\to X}
=\frac{\exp\!\bigl((Q_i^S)^{T}K_j^X/\sqrt d\bigr)}
{\sum_{j'=0}^T \exp\!\bigl((Q_i^S)^{T}K_{j'}^X/\sqrt d\bigr)},
\]
and texture-to-shape weights by
\[
\alpha_{i\to j}^{X\to S}
=\frac{\exp\!\bigl((Q_i^X)^{T}K_j^S/\sqrt d\bigr)}
{\sum_{j'=0}^T \exp\!\bigl((Q_i^X)^{T}K_{j'}^S/\sqrt d\bigr)}.
\]
These produce attended tokens
\[
\widetilde S_i=\sum_{j=0}^T \alpha_{i\to j}^{S\to X}V_j^X,
\qquad
\widetilde T_i=\sum_{j=0}^T \alpha_{i\to j}^{X\to S}V_j^S,
\]
followed by residual connection and LayerNorm:
\[
\widehat S_i=\mathrm{LN}(S_i+\widetilde S_i),
\qquad
\widehat T_i=\mathrm{LN}(T_i+\widetilde T_i).
\]

A central property of this formulation is that the attention weights \(\alpha_{i\to j}^{S\to X}\) and \(\alpha_{i\to j}^{X\to S}\) are themselves functions of cardiac phase indices \(i,j\). No explicit sinusoidal or positional encoding beyond the learned \(W\) matrices is used; temporal structure is learned end-to-end via the softmax over \(j=0\ldots T\) [2607.07518].

## 3. Adaptive gating and diagnostic pooling in ShapeFuse

After cross-attention, ShapeFuse does not assume equal diagnostic value for shape and texture at every phase. Instead, it applies a per-timepoint gate
\[
g_i=\sigma\!\bigl(W_g[\widehat S_i\|\widehat T_i]+b_g\bigr)\in[0,1]^d,
\]
where \(\|\) denotes concatenation. The fused feature at time \(i\) is then
\[
F_i=g_i\odot \widehat S_i+(1-g_i)\odot \widehat T_i,
\]
with \(\odot\) denoting element-wise multiplication. A Bahdanau-style temporal pooling assigns diagnostic importance weights
\[
\beta_i=
\frac{\exp\bigl(w^\top \tanh(W_hF_i)\bigr)}
{\sum_{i'=0}^T \exp\bigl(w^\top \tanh(W_hF_{i'})\bigr)},
\qquad
\mathbf h=\sum_{i=0}^T \beta_iF_i.
\]
This makes the final representation explicitly phase-selective rather than a uniform aggregation over frames [2607.07518].

The training procedure is separated into two stages. In the registration stage, the shape network is optimized and then frozen. In the classification stage, all fusion and image-encoder weights \(\Theta\) are trainable while the shape-encoder remains frozen. The reported hyper-parameters are latent dimension \(d=512\), 8 attention heads, dropout \(p=0.3\) in the classifier, AdamW, learning rate \(1\mathrm{e}{-5}\), weight decay \(1\mathrm{e}{-2}\), ReduceLROnPlateau, up to 500 epochs, and early-stop patience 20 [2607.07518].

Empirically, the model learns structured phase relations. The reported attention maps show high \(\alpha^{S\to X}\) for mid-systole texture frames when querying shape, and a near-diagonal pattern for \(\alpha^{X\to S}\), described as texture seeking phase-aligned geometry. The gate distributions center just below \(0.5\), indicating slightly stronger reliance on geometry but still phase-adaptive; per-dimension gate profiles show clear separation of subspaces dedicated to shape versus texture [2607.07518].

## 4. DyL-UNet: CPDA in skip connections for temporally consistent segmentation

In DyL-UNet, CPDA is integrated directly into the skip path of a Swin-Transformer encoder-decoder. At each level \(\ell\), the conventional skip connection
\[
\text{encoder output} \rightarrow \text{decoder input}
\]
is replaced by
\[
\text{encoder output} \rightarrow \text{CPDA module} \rightarrow \text{decoder input}.
\]
The module fuses three inputs: the stack of spatial features \(X_{\mathrm{spatial}}^{(\ell)}\in\mathbb{R}^{T\times C\times H\times W}\), the global dynamic feature \(P_{\mathrm{EDG}}\in\mathbb{R}^{d_p}\) extracted by the EDG branch, and the per-frame scalar cardiac-phase cue \(\varphi\in\mathbb{R}^{T}\), where \(\varphi_t\in[0,1]\) is linearly interpolated from the known ED and ES frames and normalized across the cycle [2509.19052].

The internal sequence is explicit. First, spatial pooling yields
\[
F_{\rm pool}=\mathrm{AdaptiveAvgPool2D}(X_{\mathrm{spatial}}^{(\ell)}) \Rightarrow \mathbb{R}^{T\times C}.
\]
Phase encoding gives
\[
F_{\rm phase}=\mathrm{MLP}_{\rm phase}(\varphi)\Rightarrow \mathbb{R}^{T\times d},
\]
and dynamics encoding gives
\[
F_{\rm EDG}=\mathrm{MLP}_{\rm EDG}(P_{\rm EDG})\Rightarrow \mathbb{R}^{d},
\]
which is then broadcast to \(\mathbb{R}^{T\times d}\). The fusion token is
\[
F_{\rm fused}=\mathrm{concat}[F_{\rm pool}^{\downarrow},F_{\rm phase},F_{\rm EDG}]
\Rightarrow \mathbb{R}^{T\times d_{\rm model}},
\]
where \(F_{\rm pool}^{\downarrow}\) is a linear projection of \(F_{\rm pool}\) into \(\mathbb{R}^{T\times d}\). Temporal multi-head self-attention is then applied:
\[
F_{\rm attn}=\mathrm{MultiHeadAttention}(F_{\rm fused},F_{\rm fused},F_{\rm fused})
\Rightarrow \mathbb{R}^{T\times d_{\rm model}}.
\]

The attention output is converted into a channel-wise modulation signal. Mean-pooling across frames gives
\[
\bar F=\frac{1}{T}\sum_{t=1}^T F_{\rm attn}[t]\in\mathbb{R}^{d_{\rm model}},
\]
followed by
\[
S=\sigma(W_s\bar F+b_s)\in\mathbb{R}^{C}.
\]
Residual feature modulation is
\[
X_{\rm mod}=X_{\mathrm{spatial}}^{(\ell)}\odot \bigl(1+\alpha(2S-1)\bigr)\in\mathbb{R}^{T\times C\times H\times W},
\]
broadcast over \(H,W\), and the final spatio-temporal enhancement is
\[
X_{\rm enhanced}^{(\ell)}=0.5\cdot X_{\rm mod}+0.5\cdot \mathrm{Conv3D}(X_{\rm mod})
\in\mathbb{R}^{T\times C\times H\times W}.
\]
These enhanced skip features are then merged into the decoder [2509.19052].

The stated purpose is twofold: to suppress inter-frame jitter by smoothing features in line with physiological motion patterns and to preserve high-resolution spatial detail via the residual skip pathway. Phase information is encoded by a small MLP with two fully connected layers and ReLU, yielding a \(d\)-dimensional embedding that signals where in the cycle the current frame lies and guides attention to time-points with similar physiological motion [2509.19052].

## 5. Quantitative behavior and interpretability

For ShapeFuse, the reported quantitative gains are tied to replacement of simple concatenation or uniform weighting with phase-aware latent fusion. With a VoxelMorph+ResNet backbone, ShapeFuse boosts accuracy from 0.809 (shape only) or 0.832 (+weighted fusion) to 0.888 and \(F1=0.902\). With TLRN it reaches \(0.899/0.901\). Similar improvements are reported across EfficientNet, DenseNet, and ViT [2607.07518].

The interpretability analysis in ShapeFuse is multi-level. Grad-CAM visualizations show that competing fusion strategies produce diffuse or inconsistent myocardial activations, whereas ShapeFuse localizes strongly to the myocardium at mid-systole and early diastole—phases known to reveal wall motion abnormalities. The learned attention maps show that Shape\(\rightarrow\)Texture attention peaks at frames corresponding to peak contraction, while Texture\(\rightarrow\)Shape attention is nearly diagonal. Together with the adaptive gate and diagnostic pooling, this is presented as evidence that the model can identify diagnostically critical phases and modality contributions [2607.07518].

For DyL-UNet, the ablation on the CAMUS dataset is reported as follows: Baseline (no EDG, no \(\varphi\)): Dice \(=88.26\%\), HD95 \(=5.84\), TCD \(=0.0096\); + dynamic feature only (EDG, no \(\varphi\)): Dice \(=90.87\%\), HD95 \(=4.42\), TCD \(=0.0078\); + full CPDA (EDG + \(\varphi\)): Dice \(=92.17\%\), HD95 \(=3.90\), TCD \(=0.0062\). The summary given in the paper is that adding EDG reduces temporal jitter by \(\sim 19\%\) in TCD and improves Dice by \(\sim 2.6\%\), while integrating phase cues via CPDA yields a further \(\sim 20\%\) TCD reduction and \(\sim 1.3\%\) Dice gain [2509.19052].

The qualitative visualization in DyL-UNet emphasizes temporal stability. Without CPDA, frame-to-frame masks exhibit noticeable boundary jitter, especially at the LV wall. With CPDA, segmentation masks are smooth across the cycle and closely follow ground-truth motion. This aligns with the module’s stated role as a temporal consistency mechanism rather than a purely spatial attention block [2509.19052].

## 6. Implementation details, misconceptions, and limitations

The implementation regimes differ substantially across the two CPDA usages. ShapeFuse reports \(d=512\), 8 attention heads, and classifier dropout \(p=0.3\) [2607.07518]. DyL-UNet reports \(d_{\rm model}=256\), \(d=64\), 4 heads with \(d_k=64\), residual-scale \(\alpha=1.0\), two-layer ReLU MLPs for both \(\mathrm{MLP}_{\rm phase}\) and \(\mathrm{MLP}_{\rm EDG}\), a \(3\times 3\times 3\) Conv3D with stride 1 and padding 1, and dropout 0.1 in self-attention; \(\varphi\) is linearly interpolated at inference time for unannotated frames [2509.19052]. These details underscore that the same acronym does not imply a shared implementation template.

A common misconception would be to treat CPDA as a single standardized block. The available evidence indicates otherwise. In ShapeFuse, the relevant mechanism is explicitly cross-modal and operates over shape and texture tokens in a shared latent space. In DyL-UNet, CPDA is not cross-modal in that sense; it is a skip-path temporal self-attention and modulation module driven by pooled spatial features, EDG dynamics, and phase cues. This suggests that the unifying principle is phase-aware temporal conditioning, not architectural identity.

The limitations explicitly documented so far come from the DyL-UNet formulation. These include dependence on accurate optical flow, because poor flow estimation can corrupt the EDG features \(P_{\rm EDG}\); a fixed-cycle assumption, because linear phase interpolation may be less accurate in arrhythmic sequences; additional computation and memory from the 3D convolution and self-attention over \(T\) frames; and a 2D-only design that would require re-design for 3D volumetric ultrasound [2509.19052]. ShapeFuse, by contrast, frames its contribution primarily in terms of overcoming simple concatenation and uniform phase weighting, and in providing improved interpretability through attention mechanisms that identify diagnostically critical cardiac phases and modality contributions [2607.07518].

Taken together, the recent literature uses CPDA to denote mechanisms that replace temporally uniform processing with explicitly phase- and dynamics-conditioned feature selection. In classification, this appears as bidirectional cross-modal temporal attention with adaptive gating and diagnostic pooling; in segmentation, it appears as phase-guided temporal self-attention and residual skip-feature modulation. The shared research direction is clear even if the acronym’s exact architectural meaning remains context-dependent.

Source: https://www.emergentmind.com/topics/cardiac-phase-dynamics-attention-cpda