fuse_proj: Initial operational package for 3 researchers (Pavlenko/Blizno/Moroz)
Multimodal fusion research on StripNet+GTA-UAV proxy: - 3 independent fusion tracks: condition-aware (A), token/bottleneck (B), role-aware (C) - Shared interfaces, protocol, dataset audit, baseline benchmarks - Canonical version-chain references to vault (SPEC, ANALYSIS, TRIAGE) - Personalized task plans and decision tables for each researcher - 3 generated DOCX task assignment files with milestones and DoD checklist - Full modality dropout diagnostics and missing-modality robustness requirements - Data contract, benchmark registry, experiment tracking infrastructure Operational documents: - docs/00_project/: MERIDIAN context, protocol, repository reuse guide, experiment specification - docs/01_tasks/: Master assignment + 3 individual researcher tracks + joint integration - docs/02_references/: Core literature, version-chain bases, code maps - docs/03_codebase_guides/: Existing code snapshots from vault - scripts/: gen_task_plans.js (DOCX generation), placeholder infrastructure - vendor_reference/: Snapshots of caption_test, depth_edges_annotate, existing SOFIA/SegModel code - reports/, results/, experiments/: Shared output structure for all 3 researchers 3 DOCX files generated from gen_task_plans.js (Times New Roman 14pt, GOST format): - План_заданий_Павленко_БВ.docx (Condition-Aware track, fusion API owner) - План_заданий_Близно_МВ.docx (Token/Bottleneck track, benchmark owner) - План_заданий_Мороз_ЕС.docx (Role-Aware track, data contract owner) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
267
docs/01_tasks/02_BLIZNO_TOKEN_BOTTLENECK.md
Normal file
267
docs/01_tasks/02_BLIZNO_TOKEN_BOTTLENECK.md
Normal file
@@ -0,0 +1,267 @@
|
||||
# Задание Близно Максиму Витальевичу
|
||||
|
||||
## 1. Трек
|
||||
|
||||
Token/Bottleneck Full-Modal Aggregation.
|
||||
|
||||
Дополнительная командная роль: владелец общего benchmark, run registry, метрик, statistical comparison и воспроизводимости.
|
||||
|
||||
## 2. Исследовательский вопрос
|
||||
|
||||
Как выполнить cross-modal reasoning между StripNet features, text, segmentation и geometry через компактный token set, не обрабатывая все spatial positions квадратично и не допуская collapse к одной модальности?
|
||||
|
||||
## 3. Обязательное чтение
|
||||
|
||||
### Общий пакет
|
||||
|
||||
- `docs/02_references/01_required/`
|
||||
- `docs/02_references/02_fusion_core/СИНТЕЗ_3_fusion.md`
|
||||
- `docs/02_references/02_fusion_core/ОБЗОР_fusion_rgb_multimodal_full_v1.md`
|
||||
- StripNet analysis B14.
|
||||
|
||||
### Персональный пакет
|
||||
|
||||
- `F45_2024_Flex-MoE_Modeling_Arbitrary_Modality_Combination.md`
|
||||
- `F46_2024_FuseMoE_Mixture-of-Experts_Transformers_Fleximodal.md`
|
||||
- `P50_2026_MMGeo_deep_dive_for_MERIDIAN.md`
|
||||
- `ImageBind One Embedding Space To Bind Them All.md`
|
||||
- `F40_2025_M3amba_CLIP-driven_Mamba_Multi-modal_RS.md`
|
||||
- `F4_2025_EARTHMIND ... MULTIMODAL LLM.md`
|
||||
|
||||
### Канонические опоры (проверенные выводы из vault, использовать в evidence matrix)
|
||||
|
||||
| Источник | Факт | Следствие для трека B |
|
||||
|---|---|---|
|
||||
| P50 MMGeo deep dive | Mutable Token (Query) над Modality Pool (K/V); softmax перенормирует веса при удалении модальности; multimodal-trained модель превосходит RGB-only-trained даже на RGB-only inference | главный CVGL-прецедент трека; ⚠️ конкретные числа (88.5→97.3 R@1) проверить по PDF до цитирования |
|
||||
| MBT (NeurIPS 2021, arXiv 2107.00135, см. TRIAGE §1) | весь кросс-модальный поток через малый набор bottleneck-токенов; выход фиксированной формы при любом подмножестве модальностей | peer-reviewed первоисточник bottleneck-схемы |
|
||||
| Perceiver IO (ICLR 2022) / BLIP-2 Q-Former (ICML 2023), TRIAGE §2 | фиксированный латентный массив ⊥ длине входа; query-bottleneck над frozen encoder | прецеденты learned-resampler кандидата B-C1/B-C2 |
|
||||
| CMNeXt (CVPR 2023, TRIAGE §1) | Self-Query Hub: ~0.01M params на модальность, масштабируется 1→81 модальностей, отсутствующая aux вносит ноль | дёшевый RGB-anchored hub как альтернатива полному token pool |
|
||||
| ImageBind | late-fusion-by-alignment | нижняя граница: если bottleneck не бьёт ImageBind-style late fusion, он не нужен |
|
||||
|
||||
Внешние статьи (MBT, Perceiver IO, BLIP-2, CMNeXt) найти по arXiv ID из `02_fusion_core/TRIAGE_teacher_fusion_dropout_2026-06-11.md` и прочитать оригиналы — конспектов в пакете нет.
|
||||
|
||||
## 4. Общая обязанность: benchmark
|
||||
|
||||
Совместно с коллегами реализовать единый запуск, который меняет только fusion variant.
|
||||
|
||||
Обязательные возможности:
|
||||
|
||||
1. Gin config.
|
||||
2. Seed control.
|
||||
3. Config snapshot.
|
||||
4. Git commit в manifest.
|
||||
5. Train/eval metrics CSV.
|
||||
6. Multi-match R@K.
|
||||
7. Peak VRAM и latency.
|
||||
8. Diagnostics aggregation.
|
||||
9. Experiment registry update.
|
||||
10. Одинаковый loss/sampler для всех variants.
|
||||
|
||||
## 5. Персональные задачи
|
||||
|
||||
### B0. Evidence matrix
|
||||
|
||||
Минимальные поля:
|
||||
|
||||
| Source | Tokenizer | Aggregator | Complexity | Modality identity | Collapse control | Transfer risk |
|
||||
|---|---|---|---|---|---|---|
|
||||
|
||||
### B1. Определить token contract
|
||||
|
||||
Для каждой modality указать:
|
||||
|
||||
| Поле | RGB | Text | Segmentation | Geometry |
|
||||
|---|---|---|---|---|
|
||||
| Source tensor | | | | |
|
||||
| Number of tokens | | | | |
|
||||
| Token dim | | | | |
|
||||
| Position encoding | | | | |
|
||||
| Modality embedding | | | | |
|
||||
| View embedding | | | | |
|
||||
| Normalization | | | | |
|
||||
|
||||
### B2. Сжать StripNet features
|
||||
|
||||
Сравнить:
|
||||
|
||||
1. Stage-4 GAP: 1 token.
|
||||
2. Stage-4 adaptive grid 4x4: 16 tokens.
|
||||
3. Stage-3/4 pyramid: например 4x4 + 2x2.
|
||||
4. Learned resampler с K queries.
|
||||
|
||||
Рассчитать attention complexity для каждого варианта при общей token dimension 256 и 512.
|
||||
|
||||
### B3. Tokenization segmentation
|
||||
|
||||
Сравнить:
|
||||
|
||||
- global class histogram token;
|
||||
- mask-pooled class tokens;
|
||||
- fixed spatial grid over embedded class map;
|
||||
- learned query pooling.
|
||||
|
||||
Обработать отсутствующие классы через mask, не создавая NaN при делении на ноль.
|
||||
|
||||
### B4. Tokenization geometry
|
||||
|
||||
Для depth и CHM сравнить:
|
||||
|
||||
- pooled dense encoder features;
|
||||
- adaptive spatial grid;
|
||||
- global statistics + spatial tokens;
|
||||
- gradient-aware tokenization.
|
||||
|
||||
Input encoders view-specific, output token contract общий.
|
||||
|
||||
### B5. Tokenization text
|
||||
|
||||
Сравнить:
|
||||
|
||||
- один global text token;
|
||||
- L1/L2/L3 как три tokens;
|
||||
- learned resampling sequence в K tokens.
|
||||
|
||||
Text token count и encoder фиксируются до primary comparison.
|
||||
|
||||
### B6. Сформировать три кандидата
|
||||
|
||||
| Candidate | Required design |
|
||||
|---|---|
|
||||
| B-C1 | mutable query читает общий modality token pool |
|
||||
| B-C2 | shared bottleneck tokens с 1-2 aggregation layers |
|
||||
| B-C3 | soft modality experts + unified readout |
|
||||
|
||||
Top-k routing не использовать в primary без доказанной необходимости, так как он усложняет стабильность и fair comparison.
|
||||
|
||||
### B7. Выбрать primary и fallback
|
||||
|
||||
Сравнить по:
|
||||
|
||||
- R@1 potential;
|
||||
- token count;
|
||||
- quadratic cost;
|
||||
- gradient flow;
|
||||
- modality attribution;
|
||||
- load balancing;
|
||||
- implementation complexity.
|
||||
|
||||
### B8. Формализовать aggregation
|
||||
|
||||
Для primary задать:
|
||||
|
||||
```math
|
||||
T_v = concat(T_rgb, T_text, T_seg, T_geom) + E_mod + E_view + E_pos
|
||||
```
|
||||
|
||||
```math
|
||||
Q_v^{k+1} = Q_v^k + CrossAttention(Q_v^k, T_v, T_v)
|
||||
```
|
||||
|
||||
или альтернативную точную формулу.
|
||||
|
||||
Указать Q/K/V direction, heads, layers, token dim, MLP ratio, residual и normalization.
|
||||
|
||||
### B9. Предотвратить collapse
|
||||
|
||||
Диагностика обязательна, regularization выбирается только по данным.
|
||||
|
||||
Минимально логировать:
|
||||
|
||||
- attention mass per modality;
|
||||
- cosine similarity bottleneck tokens;
|
||||
- token covariance rank;
|
||||
- gradient norm per modality tokenizer;
|
||||
- readout sensitivity leave-one-group-out.
|
||||
|
||||
Кандидаты контроля:
|
||||
|
||||
- modality-balanced attention penalty;
|
||||
- token diversity loss;
|
||||
- decorrelation;
|
||||
- auxiliary modality readouts;
|
||||
- soft expert load balancing.
|
||||
|
||||
Выбрать один минимальный механизм для primary, если baseline показывает collapse.
|
||||
|
||||
### B10. Readout
|
||||
|
||||
Сравнить:
|
||||
|
||||
1. One fused token.
|
||||
2. Mean bottleneck tokens.
|
||||
3. Attention pooling.
|
||||
4. Concat token readout + RGB GAP.
|
||||
5. Residual fused token к RGB descriptor.
|
||||
|
||||
### B11. Tests
|
||||
|
||||
1. Token count для каждой modality соответствует config.
|
||||
2. Masked/empty class tokens не дают NaN.
|
||||
3. Attention mask блокирует invalid tokens.
|
||||
4. Output shape и norm.
|
||||
5. Gradient достигает каждого tokenizer.
|
||||
6. Token order permutation test там, где position не должен влиять.
|
||||
7. Complexity estimator выдаёт ожидаемый порядок роста.
|
||||
|
||||
### B12. Персональные ablations
|
||||
|
||||
| ID | Сравнение |
|
||||
|---|---|
|
||||
| B-AB1 | GAP vs adaptive grid vs learned resampler |
|
||||
| B-AB2 | stage 4 vs stages 3-4 |
|
||||
| B-AB3 | mutable query vs bottleneck |
|
||||
| B-AB4 | bottleneck vs soft experts |
|
||||
| B-AB5 | token dim 256 vs 512 |
|
||||
| B-AB6 | 1 vs 2 vs 4 layers |
|
||||
| B-AB7 | no collapse control vs selected control |
|
||||
| B-AB8 | single token vs pooled readout |
|
||||
| B-AB9 | with vs without modality embeddings |
|
||||
| B-AB10 | fused-only vs RGB-residual readout |
|
||||
|
||||
### B13. Statistical comparison
|
||||
|
||||
Для финалистов:
|
||||
|
||||
- mean/std по 3 seed;
|
||||
- paired per-query success table;
|
||||
- bootstrap CI R@1 delta;
|
||||
- Holm correction, если выполняется много pairwise tests;
|
||||
- Pareto table accuracy/VRAM/latency.
|
||||
|
||||
### B14. Falsification
|
||||
|
||||
Гипотеза token aggregation не подтверждена, если:
|
||||
|
||||
- late concat не хуже;
|
||||
- token representations коллапсируют;
|
||||
- gain исчезает при RGB-residual control;
|
||||
- attention cost растёт без retrieval gain;
|
||||
- результат чувствителен к несущественному token order;
|
||||
- улучшение не повторяется по seed.
|
||||
|
||||
## 6. Кодовые артефакты
|
||||
|
||||
```text
|
||||
src/fuse_proj/models/fusion/token_bottleneck.py
|
||||
scripts/run_experiment.py
|
||||
scripts/aggregate_results.py
|
||||
scripts/benchmark_latency.py
|
||||
in/config_files/fusion_token_bottleneck.gin
|
||||
tests/test_token_bottleneck.py
|
||||
experiments/experiment_registry.csv
|
||||
reports/blizno/DESIGN.md
|
||||
reports/blizno/IMPLEMENTATION_AND_RESULTS.md
|
||||
```
|
||||
|
||||
## 7. Definition of Done
|
||||
|
||||
- [ ] Общий benchmark принят всей командой.
|
||||
- [ ] Token contract заполнен для всех modalities.
|
||||
- [ ] Три candidates сравнены.
|
||||
- [ ] Primary/fallback выбраны.
|
||||
- [ ] Attention complexity рассчитана.
|
||||
- [ ] Collapse diagnostics реализованы.
|
||||
- [ ] Все tests проходят.
|
||||
- [ ] B-AB1..B-AB10 выполнены в согласованном объёме.
|
||||
- [ ] Павленко выполнил code review.
|
||||
- [ ] Финальные runs сведены статистически.
|
||||
Reference in New Issue
Block a user