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
Phase 16 메인 이슈 #75 의 sub-issue (2/2). Phase 15 의 static prune 의 반대 방향 — 학습 중 신규 capacity 추가 + function preservation. Phase 16a (#76) 와 보완적: 16a 는 within-shape DST, 16b 는 cross-shape expansion.
목표
Net2Net-style FFN grow — 학습 중 ffn_dim 확장 (예: 256 → 384). 신규 group 추가.
function preservation — 확장 직후 forward output 이 확장 전과 정확히 동일 (atol=1e-5)
신규 edge 의 초기화 전략:
Net2WiderNet: 기존 unit 의 random duplication + weight 분할
또는 신규 edge weight=0 으로 시작 (gradient 가 깨움)
sweep: small-baseline (작게 시작 + 학습 끝까지 작은 상태) vs grown (작게 시작 + 중간에 확장) vs large-baseline (처음부터 크게)
설계 결정
확장 대상: FFN 의 ffn_dim 만 (가장 단순). hidden_dim 확장은 더 복잡 (downstream layer 모두 영향).
확장 시점: max_steps/2 (Phase 15 의 prune 시점과 동일)
확장 방법:
HybridGraphLinear.grow_out(n_new_groups): 신규 G_out group 추가, weight 0 init
HybridGraphLinear.grow_in(n_new_groups): 신규 G_in group 추가, weight 0 init
downstream layer 도 짝맞춰 grow_in 필요 (fc1 grow_out + fc2 grow_in 동시)
function preservation 보장: 신규 edge 의 outgoing weight (다음 layer 로 가는) 가 0 이면 forward 영향 0 → 함수 동치
작업 항목
HybridGraphLinear 확장:
grow_out(n_new): G_out 차원 확장 (신규 row 의 weight=0, adj=1, mask=1)
grow_in(n_new): G_in 차원 확장 (신규 column)
in_features / out_features / n_groups_* 갱신
tests:
grow 후 shape 정확성
function preservation: grow_out + grow_in (downstream) 동시 적용 후 forward 가 grow 전과 동일 (atol=1e-5)
Activity
Merge pull request #79 from EinSofINTEREST/feature/#77/neuron-phase16…