AI Research NotesChapter 7 · Gradient-Based LearningLoss · Gradient · Geometry · NTK
The Principles of Deep Learning Theory/Chapter 7/2026.08.22

오차는 어떻게
학습이 되는가

Gradient descent as function dynamics — from supervised loss to the neural tangent kernel

Gradient descent and neural tangent kernel훈련 샘플의 error factor와 model sensitivity가 gradient update를 만들고, neural tangent kernel이 그 변화가 다른 샘플과 출력 성분으로 전달되는 경로를 결정하는 개념도다. TRAINING SAMPLEerror ε∂L / ∂z PARAMETER UPDATE−η ∇θ Lchain ruleloss falls for small η MODEL GEOMETRYNTK H∂z/∂θ · λ · ∂z/∂θ SAMPLE AXISgeneralizexα → xδ OUTPUT AXIScouplej → i error says how much to learn; the NTK says where that learning propagates
Chapter Thesis

Bayesian learning이 가능한 모든 network를 확률적으로 평균하는 방법이었다면, gradient-based learning은 하나의 network를 뽑아 parameter를 직접 움직인다. 계산은 훨씬 실용적이지만, 이론의 질문은 더 날카로워진다. 한 샘플에서 생긴 오차가 왜 다른 샘플의 예측까지 바꾸는가.

7장은 그 질문에 답하기 위한 최소한의 언어를 만든다. supervised learning은 loss를 정의하고, gradient descent는 그 loss를 줄이는 parameter update를 만든다. 그러나 function approximation에서 진짜 중요한 것은 parameter가 얼마만큼 움직였는지가 아니다. 그 움직임이 network output의 공간에서 어디로 전달되는가이다. 그 전달 구조를 압축한 것이 neural tangent kernel, NTK다.

Central Decomposition

gradient-based function approximation의 한 step은 두 요인의 곱으로 나뉜다. error factor는 얼마나 틀렸는지를 말하고, NTK는 그 오차에 대응한 parameter 변화가 다른 샘플과 다른 출력 성분에 얼마나 영향을 줄지를 말한다.

Output dynamics · Eq. 7.20
\[\boxed{z_i(x_\delta;\theta_{t+1})-z_i(x_\delta;\theta_t)=-\eta\sum_{j=1}^{n_{\mathrm{out}}}\sum_{\tilde\alpha\in A}H_{ij;\delta\tilde\alpha}\,\varepsilon_{j;\tilde\alpha}+O(\eta^2)}\]
lossprediction과 label의 불일치를 수치화하는 auxiliary objective
gradientparameter space에서 loss를 가장 빠르게 증가시키는 방향; 반대 방향으로 움직이면 작은 step에서 loss가 감소한다.
ε\(\partial L/\partial z\). 현재 prediction이 얼마나 잘못되었는지를 output space에서 나타내는 error factor
NTKparameter 변화가 output 변화로 전달되는 model-dependent geometry. loss와는 독립적이다.

이 글은 7장 전체, 즉 §7.1 Supervised Learning과 §7.2 Gradient Descent and Function Approximation만을 다룬다. 7장은 이후 NTK의 layer-wise statistics를 계산하는 8장과 실제 training dynamics를 분석하는 뒤 장들을 위한 짧지만 핵심적인 다리 역할을 한다.

Part I · Chapter Opening

Bayes는 network를 지웠고,
gradient descent는 다시 불러낸다

Practical learning begins when parameters stop being integrated out and start moving.

6장에서 Bayesian inference는 network parameter를 적분해 output distribution만 남겼다. 이론적으로는 우아하다. initialization ensemble을 prior로 읽고, 관측을 조건으로 걸어 posterior를 계산하면 된다. 문제는 dataset이 커질수록 exact marginalization이 빠르게 비싸진다는 데 있었다.

7장은 여기서 한 가지 불편한 질문을 던진다. parameter를 전부 적분해 버린다면 굳이 neural network에서 시작할 이유가 무엇인가. Bayesian inference는 output distribution만 있으면 작동한다. 특정한 neural-network mechanism에 본질적으로 묶여 있지 않다.

신경망이 중요한 까닭은 더 현실적인 곳에 있다. 실제로 잘 작동하고, 실제로는 parameter를 직접 반복해서 조정하며 학습한다. gradient-based learning은 initialization distribution에서 한 network realization을 뽑은 뒤, 많은 데이터를 그 network에 통과시키면서 weights와 biases를 업데이트한다.

Bayesian route

ensemble을 유지한다

가능한 network를 적분하고 posterior distribution을 계산한다. prediction uncertainty를 원칙적으로 표현할 수 있지만 naive exact computation은 데이터가 커질수록 어렵다.

Gradient route

한 network를 움직인다

하나의 parameter realization을 training loss가 낮아지는 방향으로 반복 갱신한다. full ensemble uncertainty는 잃지만 계산과 데이터 처리의 확장성이 좋다.

이 대비는 어느 쪽이 절대적으로 우월하다는 뜻이 아니다. 이 장의 관심은 gradient learning의 장점인 실용성을 인정한 뒤, 그 과정을 effective-theory 언어로 어떻게 이해할지에 있다.

supervised setting에서 parameter update는 function-approximation error와 output의 parameter gradient의 곱으로 분해된다. 바로 이 구조가 NTK를 불러낸다. 원문은 NTK를 단순한 similarity kernel보다 더 강한 의미에서, observable의 training dynamics를 생성하는 Hamiltonian과 비슷한 객체로 해석할 수 있다고 예고한다.

Part II · §7.1

supervised learning은
조건부 분포를 배우는 문제다

The label is observed, but the real target is the conditional structure behind it.

supervised learning의 출발점은 joint data distribution

Data distribution
\[p(x,y)=p(y\mid x)p(x).\]

이다. 목표는 임의로 sampled된 input \(x\)를 보고 label \(y\)를 예측하는 것이다. 더 정확히 말하면 model은 conditional distribution \(p(y\mid x)\)을 배우려 한다. 이 때문에 supervised model은 discriminative model이라고 불리기도 한다.

책은 두 개의 전형적인 예를 든다. 손글씨 숫자 이미지 \(x\)를 보고 \(y=3\)처럼 class를 맞추는 computer vision 문제, 그리고 문장 속 단어 cat을 보고 품사 \(y=\text{noun}\)을 맞추는 NLP 문제다. dataset이 supervised라고 불리는 것은 이런 input에 사람이 label을 붙이는 과정이 일반적으로 필요하기 때문이다.

neural network는 \(z(x;\theta)\)라는 prediction을 낸다. parameter \(\theta\)는 initialization distribution에서 뽑히지만 그 distribution은 실제 data distribution을 알지 못한다. 따라서 좋은 prediction을 하려면 data를 사용해 \(\theta\)를 바꿔야 한다.

좋은 prediction을 수치로 번역하는 장치가 loss다

prediction \(z(x_\delta;\theta)\)와 label \(y_\delta\)가 가까울수록 작아지는 auxiliary objective를 정의한다.

Auxiliary objective · Eq. 7.1
\[\mathcal L\bigl(z(x_\delta;\theta),y_\delta\bigr).\]

가장 직관적인 예는 MSE다.

MSE example · Eq. 7.2
\[\mathcal L_{\mathrm{MSE}}\bigl(z(x_\delta;\theta),y_\delta\bigr)=\frac12\bigl(z(x_\delta;\theta)-y_\delta\bigr)^2.\]

원문은 MSE가 deep learning에서 항상 가장 흔한 선택은 아니라고 분명히 말한다. 그러나 이 장의 gradient-dynamics 논증에는 loss의 구체적 모양이 본질적이지 않다. 필요한 것은 prediction이 좋아질수록 loss가 낮아지는 objective라는 점이다.

궁극적으로 최소화하고 싶은 것은 sample 하나의 loss가 아니라 전체 data distribution에 대한 expected loss다.

Population objective · Eq. 7.3
\[\mathbb E[\mathcal L(\theta)]=\int dx\,dy\;p(x,y)\,\mathcal L\bigl(z(x;\theta),y\bigr).\]

하지만 실제로 \(p(x,y)\)의 analytic form을 아는 경우는 거의 없다. 무한히 많은 sample을 볼 수도 없다. 그래서 finite training set \(A\)를 뽑아 empirical proxy를 최소화한다.

Training loss · Eq. 7.4
\[\mathcal L_A(\theta)=\sum_{\tilde\alpha\in A}\mathcal L\bigl(z(x_{\tilde\alpha};\theta),y_{\tilde\alpha}\bigr),\qquad \theta^\star=\arg\min_\theta \mathcal L_A(\theta).\]
Part III · §7.1

training loss를 줄이는 일과
학습을 잘하는 일은 같지 않다

Optimization sees the training set; learning is judged on the distribution beyond it.

training problem을 \(\arg\min_\theta \mathcal L_A(\theta)\)로 쓰는 순간 한 가지 착각이 생기기 쉽다. training set을 완벽하게 외우면 learning이 끝났다는 착각이다. 그러나 supervised learning의 실제 목표는 training set이 아니라 전체 data distribution에서 loss를 줄이는 것이다.

training set은 population을 대신하는 finite sample이다. 따라서 표본 자체가 편향되었거나 variance가 크면 training loss가 population loss를 제대로 대표하지 못할 수 있다. 이 때문에 별도의 test set \(B\)를 떼어 두고 training이 끝난 뒤에만 평가한다.

Population

진짜 목표

전체 \(p(x,y)\)에 대한 expected loss. 실제로는 직접 계산하기 어렵다.

Train A

최적화에 사용하는 proxy

finite sample에서 empirical loss를 줄인다. parameter update는 이 집합을 보고 계산한다.

Test B

generalization의 관측창

training에 사용하지 않은 sample에서 loss를 재어 population behavior를 추정한다.

training set \(A\)가 full distribution을 잘 대표한다면 training loss의 감소가 test loss 감소와 함께 가는 경우가 많다. 그러나 보장은 없다. 7장은 이 차이를 분명히 남겨 두고, generalization의 구체 분석은 뒤 장으로 미룬다.

합을 쓸 것인가 평균을 쓸 것인가

원문은 작은 표기 차이도 짚는다. expected loss는 intensive quantity지만, Eq. 7.4의 training loss는 sample 수 \(N_A\)에 비례하는 extensive sum이다. 통상적인 machine-learning 표기처럼 평균

Alternative convention · Eq. 7.5
\[\mathcal L_A^{\mathrm{avg}}(\theta)=\frac{1}{|A|}\sum_{\tilde\alpha\in A}\mathcal L\bigl(z(x_{\tilde\alpha};\theta),y_{\tilde\alpha}\bigr)\]

을 써도 된다. gradient descent에서는 이 전체 normalization을 global learning rate \(\eta\)에 흡수할 수 있기 때문에 두 convention은 dynamics를 적절히 rescale하면 같은 역할을 한다. 이 책이 sum convention을 유지하는 이유는 앞 장의 Bayesian likelihood에서 관측 수가 늘수록 likelihood가 prior를 압도한다는 extensivity와 자연스럽게 이어지기 때문이다.

training loss는 목적 그 자체가 아니라 population objective를 손에 잡히게 만든 대리물이다. 최적화는 대리물을 본다. generalization은 그 대리물이 얼마나 정직했는지를 나중에 묻는다.
Part IV · §7.2

gradient descent는 해답을 풀지 않고
해답 쪽으로 걸어간다

Optimization replaces an intractable stationary equation with a sequence of local moves.

loss의 minimum을 analytic하게 찾으려면 원칙적으로 \(d\mathcal L_A/d\theta_\mu=0\)을 풀어야 한다. loss가 parameter에 대해 quadratic인 특별한 경우를 제외하면 이 식은 대개 닫힌 형태로 풀리지 않는다. gradient descent는 이 난제를 직접 풀지 않는다. 대신 현재 위치에서 기울기를 보고 조금씩 내려간다.

Gradient descent · Eq. 7.8
\[\theta_\mu(t+1)=\theta_\mu(t)-\eta\left.\frac{d\mathcal L_A}{d\theta_\mu}\right|_{\theta=\theta(t)}.\]

\(t=0\)은 initialization, \(\eta>0\)는 learning rate다. learning rate는 parameter space에서 한 step의 크기를 결정한다.

왜 negative gradient 방향인가. 현재 parameter 주변에서 loss를 Taylor expand하면 한 update 뒤 변화는

Descent guarantee for small η · Eq. 7.9
\[\Delta\mathcal L_A=-\eta\sum_\mu\left(\frac{d\mathcal L_A}{d\theta_\mu}\right)^2+O(\eta^2).\]

이다. leading term이 제곱들의 합에 마이너스를 붙인 형태이므로 충분히 작은 \(\eta\)에서는 loss가 감소한다. 이것이 gradient descent의 가장 기초적인 보장이다. 다만 “항상 global minimum에 도달한다”는 보장이 아니다. 원문도 보통 적어도 local minimum 근처로 간다는 수준으로 표현한다.

full gradient를 계산하려면 training set의 모든 sample contribution을 더해야 하므로 한 step의 계산량은 dataset 크기에 선형으로 증가한다. 대규모 학습에서는 이 비용 때문에 stochastic variant가 중요해진다.

Part V · §7.2

SGD는 데이터를 줄이고,
tensor는 학습의 기하를 바꾼다

One modification changes which data are seen per step; another changes how gradients move through parameter space.

SGD: 전체 합 대신 mini-batch를 본다

stochastic gradient descent는 매 step마다 전체 training set \(A\)가 아니라 subset \(S_t\subset A\)의 loss만 사용한다.

SGD · Eq. 7.10
\[\theta_\mu(t+1)=\theta_\mu(t)-\eta\left.\frac{d\mathcal L_{S_t}}{d\theta_\mu}\right|_{\theta=\theta(t)}.\]

각 \(S_t\)가 mini-batch이고, training set 전체를 한 번 통과하는 단위를 epoch이라 부른다. 원문이 강조하는 장점은 둘이다. 한 step의 계산량이 전체 \(|A|\)가 아니라 고정된 batch size에 맞춰지고, SGD가 full-batch gradient descent보다 generalization이 더 좋다고 여겨지는 경우가 많다는 점이다. 이 장의 이후 논의는 기본적으로 GD로 쓰지만 핵심 구조는 SGD에도 적용된다고 본다.

Tensorial gradient descent: parameter space에 metric을 넣는다

더 일반적인 update는 gradient component를 그대로 쓰지 않고 learning-rate tensor \(\lambda_{\mu\nu}\)로 섞는다.

Tensorial gradient descent · Eq. 7.11
\[\theta_\mu(t+1)=\theta_\mu(t)-\eta\sum_\nu\lambda_{\mu\nu}\left.\frac{d\mathcal L_A}{d\theta_\nu}\right|_{\theta=\theta(t)}.\]

보통 gradient descent는 \(\lambda_{\mu\nu}=\delta_{\mu\nu}\)인 특수한 경우다. 일반 tensor는 gradient의 \(\nu\)번째 성분이 parameter의 \(\mu\)번째 좌표를 얼마나 움직일지 조절한다. parameter space에서 방향별 학습 속도와 coupling을 정하는 셈이다.

이때도 작은 \(\eta\)에서 loss가 감소하려면 \(\lambda\)가 positive semidefinite여야 한다.

Loss change with learning-rate tensor · Eq. 7.12
\[\Delta\mathcal L_A=-\eta\sum_{\mu,\nu}\lambda_{\mu\nu}\frac{d\mathcal L_A}{d\theta_\mu}\frac{d\mathcal L_A}{d\theta_\nu}+O(\eta^2).\]

이 tensorial generalization은 장식이 아니다. 바로 다음에 등장하는 NTK의 정의에 \(\lambda\)가 들어가면서 optimization geometry가 function dynamics에 직접 반영된다.

Part VI · §7.2

NTK는 오차를
다른 예측으로 운반한다

The error determines the pressure to learn; the neural tangent kernel determines the route of influence.

여기서 gradient descent가 일반 최적화가 아니라 function approximation이라는 사실이 중요해진다. loss는 parameter에 직접 의존하는 것이 아니라 output \(z\)를 통해 의존한다. chain rule을 쓰면

Chain-rule factorization · Eq. 7.13
\[\frac{d\mathcal L_A}{d\theta_\mu}=\sum_{i=1}^{n_{\mathrm{out}}}\sum_{\tilde\alpha\in A}\frac{\partial\mathcal L_A}{\partial z_{i;\tilde\alpha}}\frac{dz_{i;\tilde\alpha}}{d\theta_\mu}.\]

가 된다. 첫 factor는 output이 label과 얼마나 어긋났는지, 둘째 factor는 parameter를 움직였을 때 output이 얼마나 변하는지를 나타낸다.

원문은 첫 항을 error factor로 정의한다.

Error factor · Eqs. 7.15–7.16
\[\varepsilon_{i;\tilde\alpha}\equiv\frac{\partial\mathcal L_A}{\partial z_{i;\tilde\alpha}},\qquad \text{MSE에서는}\quad \varepsilon_{i;\tilde\alpha}=z_i(x_{\tilde\alpha};\theta)-y_{i;\tilde\alpha}.\]

예측이 label에 가까우면 error factor는 작아지고, 멀면 커진다. 즉 얼마나 수정해야 하는가를 정하는 양이다.

두 번째 factor가 neural tangent kernel이다

Neural tangent kernel · Eq. 7.17
\[\boxed{H_{i_1i_2;\tilde\alpha_1\tilde\alpha_2}\equiv\sum_{\mu,\nu}\lambda_{\mu\nu}\frac{dz_{i_1;\tilde\alpha_1}}{d\theta_\mu}\frac{dz_{i_2;\tilde\alpha_2}}{d\theta_\nu}}\]

NTK는 auxiliary loss에 의존하지 않는다. 같은 architecture와 parameter, 같은 learning geometry \(\lambda\)라면 loss의 종류와 별개로 model output이 parameter 변화에 어떤 민감도를 갖는지 나타낸다. 이 때문에 chapter 7은 error와 dynamics를 분리할 수 있다.

training loss 한 step의 변화는 error factor 두 개와 NTK의 contraction으로 쓸 수 있다. 하지만 NTK의 역할은 training loss에 한정되지 않는다. output들에 의존하는 임의의 observable \(O(z(x_{\delta_1}),\ldots,z(x_{\delta_M}))\)을 생각하면 그 변화도 같은 NTK가 생성한다.

General observable dynamics · Eq. 7.19
\[\Delta O=-\eta\sum_{i_1,i_2}\sum_{\tilde\alpha\in A}\sum_{\delta\in D}\left(\frac{\partial\mathcal L_A}{\partial z_{i_1;\tilde\alpha}}\frac{\partial O}{\partial z_{i_2;\delta}}\right)H_{i_1i_2;\tilde\alpha\delta}+O(\eta^2).\]

square bracket는 어떤 error가 있고 observable이 output에 어떻게 의존하는지를 담는다. NTK는 model 자체의 dynamical information을 담는다. 바로 이런 의미에서 원문은 NTK가 “kernel”보다 Hamiltonian에 더 가깝다고 해석할 여지를 남긴다. observable evolution을 생성하기 때문이다.

한 training example의 오차가 다른 example을 바꾸는 이유

observable을 특정 input \(x_\delta\)의 output component \(z_i(x_\delta)\)로 고르면 핵심 식이 얻어진다.

Function approximation dynamics · Eq. 7.20
\[z_i(x_\delta;\theta_{t+1})-z_i(x_\delta;\theta_t)=-\eta\sum_j\sum_{\tilde\alpha\in A}H_{ij;\delta\tilde\alpha}\varepsilon_{j;\tilde\alpha}+O(\eta^2).\]

training example \(x_{\tilde\alpha}\)에서 생긴 error \(\varepsilon_{j;\tilde\alpha}\)가 다른 input \(x_\delta\)의 output \(i\)를 바꾼다. 그 영향의 세기를 정하는 것이 \(H_{ij;\delta\tilde\alpha}\)다. function approximation이 가능하려면 “본 샘플의 오차”가 “아직 보지 않은 위치의 함수값”에 영향을 줄 수 있어야 한다. NTK가 그 통로다.

NTK 방향Off-diagonal component의미이 장의 해석
Sample axis\(\delta\neq\tilde\alpha\)한 training sample의 error가 다른 input의 output을 얼마나 바꾸는가generalization behavior와 직접 연결되는 경로
Output axis\(i\neq j\)한 output feature의 error가 다른 output feature를 얼마나 바꾸는가feature-to-feature coupling을 허용하는 경로

여기서 중요한 제한도 있다. 충분히 작은 learning rate에서 training loss는 감소하지만, 일반 observable은 반드시 감소하지 않는다. test loss 역시 일반 observable이므로 감소가 보장되지 않는다. overfitting이 일어나면 training loss는 계속 낮아져도 test loss는 오를 수 있다.

gradient descent는 “오차를 줄인다”는 한 문장으로 설명할 수 있지만, 딥러닝의 핵심은 그보다 한 단계 뒤에 있다. 어느 오차가 어느 예측까지 영향을 미치는가. 7장은 그 질문의 답을 NTK라는 동역학적 연결망으로 바꿔 놓는다.이 장의 역할은 NTK 값을 계산하는 데 있지 않다. NTK가 왜 필요한지를 정확히 정의하는 데 있다.

무엇이 아직 남아 있는가

7장만으로 실제 deep MLP의 training behavior가 계산되지는 않는다. NTK \(H\)가 architecture와 random initialization에 따라 어떤 통계를 갖는지 아직 모른다. 원문은 다음 장에서 preactivation에 사용했던 layer-to-layer RG flow를 NTK에 적용해 mean과 fluctuation을 계산하고, 그 결과를 바탕으로 뒤 장에서 실제 gradient-based training을 분석할 것이라고 예고한다.

  • 01Supervision은 loss를 만든다. label이 prediction의 오차를 수치화할 기준을 제공한다.
  • 02Gradient descent는 parameter를 움직인다. 작은 learning rate에서는 training loss를 감소시키는 local update를 제공한다.
  • 03Error와 model geometry는 분리된다. \(\varepsilon=\partial L/\partial z\)는 얼마나 틀렸는지, NTK는 그 수정이 어디로 퍼지는지 말한다.
  • 04Generalization은 NTK의 off-diagonal 구조와 연결된다. training sample에서 얻은 정보가 다른 sample의 output을 바꾸려면 sample-index coupling이 필요하다.
  • 05Training loss와 test loss는 다른 observable이다. 전자의 감소가 후자의 감소를 자동으로 보장하지 않는다.

이 장은 gradient descent와 SGD의 입문적 dynamics를 다루며 momentum, adaptive optimizer, finite learning-rate nonlinear effects, explicit generalization bounds를 분석하지 않는다. 또한 NTK의 실제 layer-wise statistics와 width/depth dependence는 8장 이후의 주제다.

References & Source Notes

01
Daniel A. Roberts, Sho Yaida, Boris Hanin. The Principles of Deep Learning Theory.

Cambridge University Press. Chapter 7, “Gradient-Based Learning,” pp. 191–198. DOI: 10.1017/9781009023405.009.

02
Neural Tangent Kernel lineage.

Chapter 7의 각주는 NTK가 infinite-width network의 맥락에서 Jacot et al.의 선행연구 [57]에서 처음 식별되었다고 설명한다. 이 글은 별도 bibliographic 세부를 추정하지 않고 원저의 attribution을 따른다.

03
Conceptual scope.

본문의 SVG는 Chapter 7의 Eq. 7.13–7.20을 설명하기 위한 개념도이며 측정 데이터나 실험 결과를 시각화한 그림이 아니다.

본문은 원문의 문장을 직역하지 않고, 논리적 명료성·근거 중심의 설득·복잡한 개념의 단계적 설명을 중시하는 한국어 기술 에세이로 재구성했다. source fact와 해석을 구분하고, 7장이 직접 다루지 않는 후속 NTK 통계나 empirical optimizer 성능은 주장하지 않았다.