You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nn.MultiheadAttention degenerates twice when its keys/values are identical tokens: identical keys force exactly uniform softmax weights regardless of the query, and identical values make the weighted sum equal that value regardless of the weights. Both modalities arrived as a single pooled vector tiled into identical tokens, so both blocks were degenerate and the probe reduced to a concat-MLP with a linear pre-map per modality — with the two halves of the concat swapped, since echo_ctx depended only on ECG and ecg_ctx only on echo.
Clip-level echo retention (--max-clips, on feat/manifest-probe-training) fixes exactly one direction. Measured attention-weight spread, D=32, eval mode — 0 means uniform means degenerate:
block
keys
tiled echo
clip-level echo
ecg_to_echo
echo
0.000e+00
3.724e-02
echo_to_ecg
ECG
0.000e+00
0.000e+00
echo_to_ecg stays dead because its keys and values are the ECG tokens, and _ensure_ecg_tokens still tiles one pooled 768-d HuBERT-ECG vector into 4 identical tokens. No amount of echo work reaches it. Sensitivity of echo_ctx to a 100x perturbation of the echo input is exactly 0.000e+00 both before and after.
Steps:
Establish whether token-level ECG embeddings are obtainable — per-lead, per-time-window, or the pre-pooling HuBERT-ECG hidden states. The current Parquet stores one pooled vector per record, so this may require re-extraction rather than a loader change.
If they are, feed them as real tokens and confirm echo_to_ecg weight spread goes non-zero the same way ecg_to_echo did.
If they are not, decide honestly what to do with the fused probe. A cross-attention block that provably cannot attend in one direction should either be replaced with something that does fuse, or the paper should describe the model as what it is.
Stated yes/no on token-level ECG availability, with evidence.
If yes: echo_to_ecg demonstrably attends, pinned by a test in the style of test_cross_attention_fusion_ignores_padded_clips.
If no: a decision recorded on whether M09 stays cross-attention, plus a docs correction so the architecture is not described as doing something it cannot.
Caveat: all measurements above are mechanism checks on synthetic tensors. data/ is empty on the machine this was found on, so nothing here says what fixing it is worth in MAE or AUROC.
Task metadata
M11Features / method
The cross-attention fused probe has no cross-modal interaction. Half of it is now fixed; the other half needs token-level ECG embeddings.
Description
Splitting this out of #67 because it is a defect in the headline model, not a hypothesis about the baseline gap.
CrossAttentionFusionruns two attention blocks:nn.MultiheadAttentiondegenerates twice when its keys/values are identical tokens: identical keys force exactly uniform softmax weights regardless of the query, and identical values make the weighted sum equal that value regardless of the weights. Both modalities arrived as a single pooled vector tiled into identical tokens, so both blocks were degenerate and the probe reduced to a concat-MLP with a linear pre-map per modality — with the two halves of the concat swapped, sinceecho_ctxdepended only on ECG andecg_ctxonly on echo.Clip-level echo retention (
--max-clips, onfeat/manifest-probe-training) fixes exactly one direction. Measured attention-weight spread,D=32, eval mode — 0 means uniform means degenerate:ecg_to_echoecho_to_ecgecho_to_ecgstays dead because its keys and values are the ECG tokens, and_ensure_ecg_tokensstill tiles one pooled 768-d HuBERT-ECG vector into 4 identical tokens. No amount of echo work reaches it. Sensitivity ofecho_ctxto a 100x perturbation of the echo input is exactly0.000e+00both before and after.Steps:
echo_to_ecgweight spread goes non-zero the same wayecg_to_echodid.Acceptance criteria:
echo_to_ecgdemonstrably attends, pinned by a test in the style oftest_cross_attention_fusion_ignores_padded_clips.Caveat: all measurements above are mechanism checks on synthetic tensors.
data/is empty on the machine this was found on, so nothing here says what fixing it is worth in MAE or AUROC.