← Playground← 놀이터

PRISM · Statistical-Mechanics PlaygroundPRISM · 통계역학 놀이터

Grokking & Learning Transitions그로킹과 학습 상전이
Learning isn't always gradual — it can sit on a plateau, then jump학습은 늘 점진적이지 않다 — 정체하다가 갑자기 도약한다

Loss curves look smooth from far away, but up close learning often happens in sudden steps. A deep network descending its loss lands on saddle points, sits nearly still, then abruptly slides off as it discovers the next feature — a staircase of transitions. Grokking is the dramatic version: training accuracy is solved early, yet generalization arrives much later as a sharp phase transition. Here a deep linear network learns a task one mode at a time — watch the plateaus and the jumps.손실 곡선은 멀리서 보면 매끄럽지만, 가까이서 보면 학습은 흔히 갑작스러운 단계로 일어난다. 손실을 내려가는 심층 신경망은 안장점에 내려앉아 거의 멈춰 있다가, 다음 특징을 발견하는 순간 급격히 미끄러진다 — 전이의 계단이다. 그로킹은 그 극적인 형태다: 훈련 정확도는 일찍 해결되지만 일반화는 훨씬 뒤에 날카로운 상전이로 도착한다. 여기서 심층 선형 신경망이 한 번에 한 모드씩 과제를 배운다 — 정체와 도약을 지켜보라.

Loss over training — plateaus & sudden drops학습에 따른 손실 — 정체와 급강하 log scale로그 스케일
start시작training step →학습 스텝 →now현재
Features learned, one mode at a time한 번에 한 모드씩 학습되는 특징 bar = learned · outline = target막대 = 학습됨 · 외곽 = 목표
Controls제어판

Task spectrum과제 스펙트럼

Initial scale초기 스케일 smaller = longer plateaus작을수록 긴 정체0.020
Learning rate학습률0.020
Press Train — the loss holds on a plateau, then drops each time a feature is found.Train을 누르세요 — 손실이 정체하다가 특징을 찾을 때마다 뚝 떨어집니다.
Measurements측정값
loss손실
step스텝
features learned학습된 특징
total features전체 특징
Things to try해볼 것들
  1. Small init, sharp steps: lower the Initial scale — plateaus get longer and the drops get more abrupt. This is the saddle-to-saddle regime.작은 초기값, 날카로운 계단: 초기 스케일을 낮추면 정체가 길어지고 급강하가 더 뚜렷해진다. 안장-대-안장 영역이다.
  2. Order by importance: watch the features panel — the strongest mode is learned first, then the next, in order of magnitude.중요도 순서: 특징 패널을 보라 — 가장 강한 모드가 먼저, 그다음이 크기 순으로 학습된다.
  3. Two clean steps: pick Two steps — two well-separated transitions, the simplest staircase.깔끔한 2단: 2단을 고르면 잘 분리된 두 전이 — 가장 단순한 계단이다.
  4. Reset and rerun: the transition times shift with initialization — the plateau length is set by how weak the mode starts.초기화 후 재실행: 전이 시점은 초기화에 따라 달라진다 — 정체 길이는 모드가 얼마나 약하게 시작하느냐로 정해진다.

Saddle-to-saddle dynamics안장-대-안장 동역학

From small initialization, gradient descent visits a sequence of saddle points of the loss. Near each, the gradient is tiny — a plateau — until one direction grows exponentially and the network snaps to the next saddle. Each snap is a feature (a singular mode) being learned, in order of its strength.작은 초기값에서 시작하면 경사 하강은 손실의 안장점들을 차례로 방문한다. 각 안장점 근처에서는 기울기가 아주 작아 정체가 생기고, 어느 한 방향이 지수적으로 자라나면 신경망이 다음 안장점으로 튕겨 간다. 각 튕김은 강도 순서대로 하나의 특징(특이 모드)이 학습되는 것이다.

What grokking adds그로킹이 더하는 것

In grokking, the network first memorizes — training loss is solved fast — but keeps evolving under weight decay until its weight norm crosses into a region where a simple, generalizing solution takes over, and test accuracy jumps long afterward. Same idea as here, but the delayed transition is in generalization, not just the fit.그로킹에서는 신경망이 먼저 암기해 훈련 손실을 빠르게 해결하지만, 가중치 감쇠 아래 계속 변화하다가 가중치 크기가 단순하고 일반화되는 해가 우세해지는 영역으로 넘어가면 한참 뒤에 테스트 정확도가 도약한다. 여기와 같은 원리지만, 지연된 전이가 단순한 적합이 아니라 일반화에서 일어난다.

Why it matters왜 중요한가

Sudden transitions mean a flat validation curve doesn't prove a model is done learning — capabilities can emerge abruptly with more training or scale. For biomedical models trained on scarce data, knowing that generalization can arrive late argues for patience, weight decay, and watching more than just the training loss.갑작스러운 전이는 검증 곡선이 평평하다고 학습이 끝났다는 뜻이 아님을 의미한다 — 능력은 더 많은 학습이나 규모와 함께 급작스레 나타날 수 있다. 희소한 데이터로 학습하는 biomedical 모델에서는, 일반화가 늦게 도착할 수 있음을 아는 것이 인내·가중치 감쇠·훈련 손실만이 아닌 관찰의 필요성을 뒷받침한다.