Track 0 Math Foundations

준비: 수학Math Foundations

선형대수·미분·최적화·확률·통계·정보 이론·수치 계산 — 이후 모든 트랙이 쓰는 수학을, 어디에 쓰이는지와 함께 손으로 만져 본다.Linear algebra, calculus, optimisation, probability, statistics, information theory and numerics — the maths every later track uses, handled hands-on and tied to where it is used.

10개 레슨10 lessons약 7.3시간~7.3 h 진행Progress 0 / 10
  1. 벡터·행렬·텐서Vectors, matrices and tensors

    행렬을 "숫자 표"가 아니라 선형 사상으로 읽고, 내적·노름·행렬곱·텐서 shape·einsum·broadcasting을 이후 attention, MoE, Muon 레슨이 쓰는 그대로 손에 익힌다.Read a matrix as a linear map rather than a table of numbers, and get fluent with the inner products, norms, matrix products, tensor shapes, einsum and broadcasting that the attention, MoE and Muon lessons use.

    linear algebra · dot product · norm · matrix multiplication · einsum · broadcasting · tensor shapes
    40 분min
  2. 고유값·SVD·저랭크Eigenvalues, SVD and low rank

    고유분해와 SVD로 행렬을 "가장 좋은 좌표"에서 읽는다. power iteration, 스펙트럼 정리, 회전-배율-회전, Eckart–Young 저랭크 근사, 직교 행렬, 조건수, 유사역행렬을 유도하고 PCA·Muon·LoRA·MLA·Hessian으로 잇는다.Read a matrix in its best coordinates with the eigendecomposition and the SVD. Derive power iteration, the spectral theorem, rotate–scale–rotate, Eckart–Young low-rank approximation, orthogonal matrices, the condition number and the pseudo-inverse, and connect them to PCA, Muon, LoRA, MLA and Hessians.

    linear algebra · eigenvalues · SVD · low rank · condition number · least squares · PCA
    45 분min
  3. 미분·연쇄법칙·JacobianDerivatives, the chain rule and Jacobians

    미분을 "가장 좋은 선형 근사"로 읽고, gradient가 왜 최급상승 방향인지, 연쇄법칙이 계산 그래프에서 어떻게 VJP의 사슬이 되는지(그래서 reverse mode), 행렬 미분 몇 가지와 테일러 근사(GD·Newton·trust region), log-derivative 항등식까지 유도하고 수치로 확인한다.Read the derivative as the best linear approximation, then derive why the gradient is the steepest-ascent direction, how the chain rule on a computation graph becomes a chain of VJPs (hence reverse mode), the matrix-calculus results the site uses, Taylor models behind GD, Newton and trust regions, and the log-derivative identity — all checked numerically.

    calculus · gradient · chain rule · Jacobian · autodiff · matrix calculus · Taylor · log-derivative
    45 분min
  4. 최적화의 수학The mathematics of optimisation

    정류점의 1·2차 조건과 Hessian의 곡률, 볼록성과 Jensen 부등식, 라그랑주 승수와 KKT 조건을 유도하고, 같은 도구로 softmax(엔트로피 정규화 argmax)와 KL 정규화 RL의 닫힌 해 π* ∝ π_ref·exp(r/β), 그리고 mirror descent를 한 줄씩 끌어낸다.First- and second-order conditions and Hessian curvature, convexity and Jensen's inequality, Lagrange multipliers and the KKT conditions — then the same tools derive softmax as the entropy-regularised argmax, the closed form π* ∝ π_ref·exp(r/β) of KL-regularised RL, and mirror descent, one line at a time.

    optimization · convexity · hessian · newton · jensen · lagrange multiplier · KKT · duality · softmax · KL regularization · mirror descent
    45 분min
  5. 확률Probability

    확률변수·기댓값·분산·공분산, 조건부 확률과 베이즈 규칙, 연쇄 법칙이 곧 자기회귀 LM이라는 것, Bernoulli·categorical·Gaussian·Gumbel(Gumbel-max trick 유도), 몬테카를로 추정과 1/√N 오차, score function(log-derivative trick)과 reparameterisation gradient의 분산 비교, 그리고 MDP의 전제인 Markov chain까지.Random variables, expectation, variance and covariance; conditional probability and Bayes' rule; the chain rule as the autoregressive LM; Bernoulli, categorical, Gaussian and Gumbel distributions (with a derivation of the Gumbel-max trick); Monte Carlo estimation and its 1/√N error; the score-function (log-derivative) versus reparameterisation gradient and their variances; and Markov chains, the prerequisite for MDPs.

    probability · expectation · variance · covariance · bayes · chain rule · gaussian · gumbel · monte carlo · score function · reparameterization · markov chain
    50 분min
  6. 통계와 추정Statistics and estimation

    추정량의 편향·분산·MSE, MLE(Bernoulli·Gaussian)와 Fisher 정보, 중심극한정리와 신뢰구간(Wald가 어디서 무너지는지), Hoeffding과 union bound, 부트스트랩, importance sampling과 ESS(시퀀스 길이에 따른 붕괴), control variate로서의 baseline, 그리고 모델 평가의 통계 — pass@k 불편 추정량, 벤치마크 점수의 분산, 두 모델을 가르는 데 필요한 문항 수.Bias, variance and MSE of estimators; MLE (Bernoulli, Gaussian) and Fisher information; the central limit theorem and confidence intervals (and where Wald breaks); Hoeffding and the union bound; the bootstrap; importance sampling and the effective sample size (and its collapse with sequence length); baselines as control variates; and the statistics of evaluation — the unbiased pass@k estimator, the variance of benchmark scores, and how many questions it takes to separate two models.

    statistics · estimator · bias · variance · MLE · fisher information · CLT · confidence interval · bootstrap · importance sampling · ESS · control variate · pass@k · evaluation
    50 분min
  7. 정보 이론Information theory

    엔트로피·cross-entropy·KL을 부호 길이로 읽고, KL의 두 방향, JS·TV·χ², 상호정보와 data-processing 부등식, 토큰 KL의 연쇄 법칙, perplexity와 bits-per-byte를 이 사이트의 손실·정규화·평가에 바로 쓸 수 있게 정리한다.Entropy, cross-entropy and KL read as code lengths; the two directions of KL; JS, TV and χ²; mutual information and the data-processing inequality; the chain rule that makes sequence KL a sum of token KLs; perplexity and bits per byte — the pieces this site's losses, regularisers and evaluations are built from.

    entropy · cross-entropy · KL divergence · Jensen-Shannon · total variation · mutual information · data processing inequality · perplexity · bits per byte · Fisher information
    45 분min
  8. 수치 계산Numerics

    부동소수점의 구조(부호·지수·가수, ulp, 단위 반올림)와 FP32·BF16·FP16·FP8의 차이, 상쇄와 합산 순서가 만드는 오차, 배치 크기가 결과를 바꾸는 이유, logsumexp·안정적 softmax, 수치 미분과 gradient check, mixed precision과 loss scaling을 직접 조작하며 익힌다.How floating point works (sign, exponent, mantissa, ulp, unit roundoff) and how FP32, BF16, FP16 and FP8 differ; the errors made by cancellation and by summation order, and why batch size changes results; logsumexp and stable softmax; numerical differentiation and gradient checks; mixed precision and loss scaling.

    floating point · bf16 · fp16 · fp8 · ulp · rounding · cancellation · summation · Kahan · logsumexp · softmax · finite differences · gradient check · mixed precision · loss scaling
    45 분min
  9. 극값과 Gumbel 트릭Extremes: maxima, tails and the Gumbel trick

    N개 중 최댓값의 분포(N·F^(N−1)·f), 최댓값이 √(2 ln N)보다 느리게 자라는 이유와 보정식 z_N, 로그정규 꼬리의 straggler, Gumbel 극한과 logsumexp, Gumbel-max·top-k 샘플링과 Bradley–Terry를 Best-of-N·rollout 꼬리·MoE 부하에 바로 쓸 수 있게 정리한다.The distribution of the largest of N draws (N·F^(N−1)·f), why it grows like √(2 ln N) and the sharper z_N, log-normal stragglers, the Gumbel limit and its link to logsumexp, and Gumbel-max / top-k sampling and Bradley–Terry — the tools behind Best-of-N, rollout tails and MoE load.

    order statistics · extreme values · maximum · Gumbel · Gumbel-max · Gumbel-top-k · log-normal · quantile · best-of-N · Bradley-Terry
    35 분min
  10. 정지 기울기와 대리 목적함수Stop-gradient and surrogate objectives

    sg[·](.detach())의 정확한 의미, 값은 무의미하지만 gradient는 맞는 대리 목적함수, 샘플링 분포가 θ에 의존할 때 빠지는 score 항, score-function과 pathwise 추정량, straight-through를 유도하고, RL 손실 코드의 detach가 각각 무엇을 하는지 읽을 수 있게 한다.What sg[·] (.detach()) means exactly; surrogate objectives whose value is meaningless but whose gradient is right; the score term that disappears when the sampling distribution depends on θ; score-function vs pathwise estimators; straight-through — so that every detach in an RL loss can be read.

    stop-gradient · detach · surrogate objective · score function · REINFORCE · reparameterization · pathwise gradient · straight-through · KL estimator · PPO
    35 분min