Apr24 Best Loss Attention Pattern

Back to results · Best-loss dynamics

Note

This is an observational attention-pattern replay for the best Apr24 loss setting, dist_plus_tokcc_a0p5_b0p01_d50_lin50. To mirror the Apr22 attention-pattern analysis, this page uses the full adaptation run for each task at the selected loss setting.

Scope

The replay generated 1,536 traces: 256 sampled test examples for each of the six tasks. Of these, 1,535 traces had analyzable answer tokens, yielding 415,448 token-layer rows.

For each trace, the analysis samples z from the router, replays the conditioned generation with attention enabled, and compares per-token attention to the predictive z placeholder against the token-level negative log likelihood under a z-free reference model. The soft attention summaries use max-over-head attention to the predictive z position. The hard summaries measure whether any head's top attended key is the predictive z position.

Example Traces

The example panels show selected traces by task with token-level base-model loss and predictive-z attention. These panels are intended as qualitative checks on whether high-loss answer tokens line up with attention to the latent z placeholder.

Attention pattern examples by task

The hard-attention version shows the same examples using top-key hits rather than soft attention mass.

Hard attention pattern examples by task

Layer-Level Alignment

Across all tasks, every layer has positive bootstrap confidence intervals for Spearman alignment between base-token loss and predictive-z attention. The strongest overall Spearman alignment is in zero-indexed layer 7 at 0.2712, while the strongest Pearson alignment is in layer 4 at 0.2811.

LayerSpearman loss-attention alignmentPearson loss-attention alignmentMean predictive-z attentionHard top-key fraction
00.26140.25400.08250.1370
10.17600.24460.09160.2651
20.19770.22320.11280.3476
30.23490.20760.14380.4338
40.23960.28110.11270.4093
50.23460.26280.09290.3879
60.25460.25060.08200.3734
70.27120.25030.08520.3592
Predictive-z attention versus base-token loss by layer Pearson alignment between base-token loss and predictive-z attention by layer Spearman alignment between base-token loss and predictive-z attention by layer

The hard top-key baseline from random key selection is 0.0350. The observed hard top-key fraction peaks in layer 3 at 0.4338, about 12.4 times the random baseline.

Task-Level Pattern

The task-layer heatmap shows that every task has at least one positive layer-level Spearman alignment, with the strongest task-specific values on list_summation and sorting_algorithms. The best layer by task is:

TaskBest layerBest Spearman alignment
list_summation00.6070
sorting_algorithms30.3975
linear_equation_solving30.2701
base_conversion50.2430
grid_pathfinding70.2068
multidigit_addition70.1491
Task-layer heatmap for Spearman alignment between base-token loss and predictive-z attention

Artifacts

The generated trace and summary artifacts are in path:experiments/synthetic_sequences/disentangled/analysis/aggregates/continuous_cvae-Apr24-reconstruction-stack_20260424/data/attention_pattern_traces.jsonl, path:experiments/synthetic_sequences/disentangled/analysis/aggregates/continuous_cvae-Apr24-reconstruction-stack_20260424/data/attention_pattern_token_layer.csv, and the corresponding attention_pattern_*_summary.csv files. The replay script is path:experiments/synthetic_sequences/disentangled/analysis/run_continuous_cvae_apr22_attention_pattern.py, run with Apr24 report and loss-setting arguments.

Built with LogoFlowershow