Add higher-capacity last-four-layer fusion
This commit is contained in:
@@ -79,6 +79,74 @@ The raw 8-second console output, machine-readable comparison, and detailed
|
||||
interpretation are archived in
|
||||
[`results/easycom_open_stream_8s_vs_20s_2026-08-23/`](results/easycom_open_stream_8s_vs_20s_2026-08-23/README.md).
|
||||
|
||||
### Last-4 query-layer learned mixture
|
||||
|
||||
A frozen Qwen2.5-Omni-3B experiment now reads the query states from the final
|
||||
four Thinker layers and learns four global softmax mixture weights before the
|
||||
same `10 x 3` anticipation head. With an 8-second open-stream context, 2 FPS
|
||||
video, 5 Hz outputs, and 25 head-training epochs, it reaches **73.45085** mAP
|
||||
at 0.2 seconds and **60.53423** mean mAP on official test Sessions 3, 2, and 1.
|
||||
Relative to the recorded single-final-layer 8-second run, this is **+1.45317**
|
||||
at 0.2 seconds and **+2.01486** mean mAP, with positive gains at every horizon.
|
||||
|
||||
The final oldest-to-newest layer weights are
|
||||
`[0.246384, 0.248327, 0.241774, 0.263515]`. Because they remain almost uniform,
|
||||
the result currently demonstrates the value of multi-layer query readout, not
|
||||
yet the value of learning the mixture. A fixed uniform last-4 mean is the next
|
||||
required control. The complete table, machine-readable metrics, provenance,
|
||||
and naming caveat are archived in
|
||||
[`results/easycom_frozen_3b_8s_last4_learned_mix_2026-08-26/`](results/easycom_frozen_3b_8s_last4_learned_mix_2026-08-26/README.md).
|
||||
|
||||
#### Higher-capacity last-4 concat-MLP ablation
|
||||
|
||||
`train_turn_head.py` also supports a higher-capacity fusion control. It
|
||||
flattens each `[4, 2048]` last-layer stack to `8192` dimensions, applies
|
||||
`LayerNorm -> Linear(8192, 2048) -> GELU`, and then uses the unchanged
|
||||
anticipation MLP. This adds about 16.8 million fusion parameters, compared
|
||||
with four logits in the scalar-mixture experiment. Keep the seed and training
|
||||
recipe fixed for a clean capacity ablation:
|
||||
|
||||
```bash
|
||||
CUDA_VISIBLE_DEVICES=0 \
|
||||
OMP_NUM_THREADS=4 \
|
||||
MKL_NUM_THREADS=4 \
|
||||
OPENBLAS_NUM_THREADS=4 \
|
||||
python train_turn_head.py \
|
||||
--feature-root /data1/yfzx/wangx/Datasets/easycom/omni_features/open_stream_2fps_8s_last4_stack \
|
||||
--target-root /data1/yfzx/wangx/Datasets/easycom/easycom_target_frame \
|
||||
--output checkpoints/easycom_frozen_3b_8s_last4_concat_mlp_25ep.pth \
|
||||
--sessions 4 5 6 7 8 9 10 11 12 \
|
||||
--epochs 25 \
|
||||
--batch-size 512 \
|
||||
--learning-rate 7e-5 \
|
||||
--weight-decay 5e-5 \
|
||||
--warmup-epochs 10 \
|
||||
--warmup-factor 0.3 \
|
||||
--dropout 0.2 \
|
||||
--loss lstr-mce \
|
||||
--layer-fusion concat-mlp \
|
||||
--expected-mode open-stream-replay \
|
||||
--seed 0 \
|
||||
--device cuda:0
|
||||
```
|
||||
|
||||
Evaluate with the same dense stacked test features:
|
||||
|
||||
```bash
|
||||
CUDA_VISIBLE_DEVICES=0 python infer_turn_head.py \
|
||||
--feature-root /data1/yfzx/wangx/Datasets/easycom/omni_features/open_stream_2fps_8s_last4_stack \
|
||||
--target-root /data1/yfzx/wangx/Datasets/easycom/easycom_target_frame \
|
||||
--checkpoint checkpoints/easycom_frozen_3b_8s_last4_concat_mlp_25ep.pth \
|
||||
--output-dir results/easycom_frozen_3b_8s_last4_concat_mlp_25ep \
|
||||
--expected-mode open-stream-replay \
|
||||
--batch-size 1024 \
|
||||
--device cuda:0
|
||||
```
|
||||
|
||||
Treat this as a capacity ablation. If it improves, compare it against a
|
||||
parameter-matched single-layer MLP and use stronger regularization or a clean
|
||||
development session before attributing the gain to cross-layer fusion.
|
||||
|
||||
## Current Ego4D context-length results
|
||||
|
||||
The following single-seed snapshot was recorded on 2026-08-22. Both variants
|
||||
|
||||
Reference in New Issue
Block a user