Experiment Matrix và Metrics
Research questions
RQ-A — Task-aware prompt có giúp continual relation extraction không?
So sánh shared prompt, oracle-task prompt và learned/prototype router để đo giá trị thật của task awareness.
RQ-B — Không có task ID lúc inference thì mất bao nhiêu performance?
Đo gap giữa oracle routing và predicted routing.
RQ-C — Prototype/hierarchy có làm routing tốt hơn không?
Kiểm tra prototype-guided router, đặc biệt trên các relation gần nghĩa.
RQ-D — Memory và prompt tương tác thế nào?
So M=0 rehearsal-free/raw-data-free với M=1 exemplar/relation nếu đủ thời gian.
Experiment matrix
| ID | Model | Shared Prompt | Task Prompt | Router | Prototype | Hierarchy | Replay | Mục đích |
|---|---|---|---|---|---|---|---|---|
| B0 | Sequential FT | - | - | - | - | - | 0 | Lower bound forgetting |
| B1 | Joint Training | - | - | - | - | - | full | Reference upper bound |
| B2 | Prototype sanity | - | - | - | relation | - | 0/1 | Kiểm tra representation/prototype |
| B3 | ConPL | - | - | - | relation | - | 1 | Prototype-based FCRE baseline |
| B4 | CPL | yes | - | - | model-specific | - | yes | Prompt + contrastive baseline |
| B5 | WAVE-CRE/WAVE++ hoặc EoE | yes | yes | learned/voting | model-specific | - | latent/0 | Closest task-aware prompt comparator |
| P0 | Shared Prompt | yes | - | - | - | - | 0/1 | Prompt baseline tối thiểu |
| P1 | Oracle-Task Prompt | yes | yes | oracle | - | - | 0/1 | Upper bound cho routing |
| P2 | Learned Task Router | yes | yes | learned | - | - | 0/1 | Test task prediction |
| P3 | Prototype Router | yes | yes | prototype | relation | - | 0/1 | Test semantic routing |
| P4 | TAPTA minimal | yes | yes | prototype-soft | relation/internal | yes | 0/1 | Proposed full model tối thiểu |
| A1 | P4 no hierarchy | yes | yes | prototype-soft | relation | - | 0/1 | Tree có cần không? |
| A2 | P4 hard routing | yes | yes | top-1 | relation/internal | yes | 0/1 | Soft routing có hơn hard routing không? |
| A3 | P4 no KD | yes | yes | prototype-soft | relation/internal | yes | 0/1 | KD có giúp chống quên không? |
| A4 | P4 EMA vs snapshot | yes | yes | prototype-soft | relation/internal | yes | 0/1 | EMA có hơn freeze checkpoint không? |
| A5 | P4 logits KD vs similarity KD | yes | yes | prototype-soft | relation/internal | yes | 0/1 | Distillation target nào giữ quan hệ cũ tốt hơn? |
Ablation và đối chứng KD
- A3: P4 không có KD, làm mốc cho mọi biến thể teacher.
- A4: EMA teacher so với snapshot teacher, giữ nguyên distillation target và các yếu tố khác.
- A5: distillation trên logits relation cũ so với distribution similarity giữa câu và relation/prototype, giữ cùng teacher. Chốt rõ class set, temperature, normalization và stop-gradient trước khi chạy.
- Nếu cần kiểm tra tương tác giữa EMA và target, chạy pilot 2×2 (snapshot/EMA × logits/similarity); không gộp hai thay đổi vào một ablation rồi quy toàn bộ gain cho một yếu tố.
RQ tương ứng: KD Logits hay Similarity, và Vai trò EMA Teacher trong TAPTA.
Metrics bắt buộc
Evaluator phải lưu performance matrix:
Test T1 Test T2 Test T3 ... Test Tn
After T1 A11
After T2 A21 A22
After T3 A31 A32 A33
...
After Tn An1 An2 An3 AnnTừ matrix này tính:
- Final Average Accuracy hoặc Final Macro-F1.
- Average Incremental Accuracy.
- Average Forgetting.
- Backward Transfer.
- Old/new split.
- Router/Task-ID accuracy.
- Oracle vs predicted routing gap.
- Similar-relation subset accuracy.
- Trainable parameters.
- Stored memory: raw examples, prototypes, prompt parameters, Gaussian/statistics nếu có.
- Inference latency hoặc số forward passes qua PLM.
Protocol mặc định (Protocol v1 — Đã khóa ngày 2026-11-14)
Chi tiết đặc tả: xem research-code-lab/docs/protocol-v1.md.
| Thành phần | Setting khóa cho Protocol v1 | Ghi chú |
|---|---|---|
| Hạ tầng thực thi / Compute | Google Colab (NVIDIA GPU CUDA: T4 / V100 / A100) cho toàn bộ các lượt train, chạy thử nghiệm (smoke) và full runs từ W15 trở đi | Đảm bảo tính nhất quán môi trường CUDA chuẩn quốc tế; không dùng MacBook cá nhân để huấn luyện. |
| Backbone | bert-base-uncased + entity markers ([E11], [E12], [E21], [E22]) | Báo cáo trainable parameters theo từng mô hình |
| Max sequence length | 256 (hoặc 128 tùy ablation được ghi rõ) | |
| Benchmarks | Track A: FewRel (8 tasks × 10 rels, 5-shot) & TACRED (8 tasks × 5 rels, 5-shot) Track B: FewRel 10×8 data-rich (cho B5 smoke run) | Nguồn split chuẩn: ConPL/CFRL |
| Memory budget | Báo cáo riêng 2 setting: (1 exemplar/rel) và (rehearsal-free) | Stored memory ghi rõ byte/kích thước |
| Task ID inference | Không cấp Task ID lúc inference (Class-Incremental chuẩn) | Task Oracle chỉ dùng đối chứng ở P1 |
| Metric chính | accuracy_whole trên tập quan hệ lũy kế đã học () | Kèm theo ma trận đầy đủ |
| Metric phụ | AIA, Average Forgetting (), BWT, Task-ID / Router Accuracy, Oracle Gap | |
| Seeds | 2021 (smoke), [2021, 2121, 2221] (pilot 3 seeds), + 2321, 2421 (final 5 seeds) | |
| Optimizer | AdamW | Theo config tác giả/mô hình |
| Encoder LR | 2e-5 nếu encoder trainable | |
| Prompt/router LR | 5e-4 hoặc 1e-4 | |
| Batch size | 16 | Dùng gradient accumulation nếu thiếu VRAM |
| Artifact storage | research-code-lab/runs/<model>/<setting>/seed_<k>/ | Lưu config, git commit provenance, env_info, run.log, metrics.json; checkpoints lưu Cloud |
Config cần có
configs/
conpl_original.yaml
cpl_original.yaml
wave_original.yaml
common_fewrel_5shot.yaml
common_tacred_5shot.yaml
tapta_p0_shared_prompt.yaml
tapta_p1_oracle_task_prompt.yaml
tapta_p2_learned_router.yaml
tapta_p3_prototype_router.yaml
tapta_p4_full.yamlRule: với published baseline, chạy authors’ config trước, common protocol sau. Không chỉnh baseline cho đến khi nó tốt rồi đem so với proposed method chạy config khác.
Master experiment table
| ID | Date | Model | Dataset | Protocol | Memory | Seed | AA/F1 | Forget | Router Acc | Config | Result File | Status |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| E001 | Sequential FT | FewRel | 5-shot | 0 | 2021 | - | todo | |||||
| E002 | Joint Training | FewRel | 5-shot | full | 2021 | - | todo | |||||
| E003 | Prototype sanity | FewRel | 5-shot | 0/1 | 2021 | - | todo | |||||
| E004 | ConPL | FewRel | 5-shot | 1 | 2021 | - | todo | |||||
| E005 | P0 Shared Prompt | FewRel | 5-shot | 0/1 | 2021 | - | todo | |||||
| E006 | 2026-11-15 | WAVE-CRE (B5) | FewRel | Track B (Authors 10x8) | 0 (latent GMM replay) | 2021 | 91.68% (5-task) | 3.50% | - | configs/b5_wave_cre_fewrel_author_seed2021.yaml | runs/wave_cre/fewrel_author_config/seed_2021/metrics.json | completed (smoke 5/10 tasks; see wave-b5-blocker-report-2026-11-15.md) |
| E007 | 2026-11-15 | P0 Shared Prompt | FewRel | Track A (Protocol v1 8x10) | 0 (rehearsal-free) | 2021 | CIL: 9.84%, Proto: 52.83% | 86.54% (Linear) / 19.20% (Proto) | - | configs/p0_shared_prompt_fewrel_5shot_seed2021.yaml | runs/p0_shared_prompt/fewrel_5shot/seed_2021/metrics.json | completed_real |
| E008 | 2026-11-15 | P1 Oracle Prompt | FewRel | Track A (Protocol v1 8x10) | 0 (rehearsal-free) | 2021 | CIL: 9.84%, Proto: 70.14%, TIL: 82.75% | 85.71% (Linear) / 8.36% (Proto) | 100% (Oracle) | configs/p1_oracle_prompt_fewrel_5shot_seed2021.yaml | runs/p1_oracle_prompt/fewrel_5shot/seed_2021/metrics.json | completed_real (Oracle Upper Bound) |
| E009 | 2026-11-21 | P2a Centroid Cosine Router | FewRel | Track A (Protocol v1 8x10) | 0 (rehearsal-free) | 2021 | Proto: 59.28%, Routed-Gated: 59.35%, AIA: 69.71% | 11.91% | 64.69% (AIA: 78.23%) | configs/p2a_centroid_router_fewrel_5shot_seed2021.yaml | runs/p2a_centroid_router/fewrel_5shot/seed_2021/metrics.json | completed_real (Colab CUDA, Gap Closed: 37.69%) |
| E010 | 2026-11-21 | P2b Learned MLP Router | FewRel | Track A (Protocol v1 8x10) | 0 (Gaussian feature replay) | 2021 | Proto: 56.04%, Routed-Gated: 46.25%, AIA: 67.45% | 14.51% | 50.85% (AIA: 67.75%) | configs/p2b_learned_router_fewrel_5shot_seed2021.yaml | runs/p2b_learned_router/fewrel_5shot/seed_2021/metrics.json | completed_real (Colab CUDA, Gap Closed: 18.56%) |
| E011 | 2026-11-21 | P3 Soft Top-K Prompt Router | FewRel | Track A (Protocol v1 8x10) | 0 (rehearsal-free) | 2021 | Proto: 55.50%, Top-1 Gated: 59.25%, AIA: 66.84% | 15.13% | Top-1: 64.69%, Top-2: 81.41% (AIA: 90.58%) | configs/p3_soft_router_fewrel_5shot_seed2021.yaml | runs/p3_soft_router/fewrel_5shot/seed_2021/metrics.json | completed_real (Colab CUDA, Gap Closed: 19.86% / 37.11%) |
Repository structure đề xuất
thesis/
data/
raw/
processed/
task_orders/
baselines/
conpl/
cpl/
sckd/
wave/
src/
models/
prompts/
router/
prototypes/
evaluation/
configs/
scripts/
results/
raw/
aggregate/
figures/
paper_notes/
weekly_reports/
thesis/