Week 11 — Deep Neural Networks & LLMs第11週 — 深層ニューラルネットワークとLLM

Friday, July 10, 20262026年7月10日(金)

Prof. Joseph Austerweilオウステウェイル ジョセフ教授

Housekeeping事務連絡

  • Today’s paper presentation kicks us off — then the lecture.
  • Due TONIGHT, 8 PM: the Reinforcement Learning assignment and the Monte Carlo assignment.
  • Final-project presentations: next week (Week 12, Jul 17) — bring a laptop.
  • Two new widgets today — I’ll drive them live, and they’re linked from the slides to replay.
  • 本日は論文発表から始めます — その後に講義。
  • 本日20:00締切: 強化学習課題モンテカルロ課題。
  • 最終プロジェクト発表: 来週(第12週・7月17日)— ノートPCを持参。
  • 本日は新しいウィジェットが2つ — ライブで操作します。スライドからリンクされています。

Paper presentation論文発表

Agenda本日の予定

  • Where we left off — from fixed kernels to learned features前回の続き — 固定カーネルから学習された特徴 0:05
  • Represent I — connectionism, distributed reps & vectors, concretely表現 I — コネクショニズム・分散表現・具体的なベクトル 0:17
  • Learn I — perceptron, gradient descent, the delta rule学習 I — パーセプトロン・勾配降下・デルタ則 0:43
  • Learn IImatrices, XOR, depth, and backpropagation学習 II行列・XOR・深さ・誤差逆伝播 1:01
  • Represent II — architecture as prior: CNN → RNN → attention表現 II — 事前分布としてのアーキテクチャ:CNN → RNN → アテンション 1:23
  • Understand — scaling, emergence, in-context learning理解 — スケーリング・創発・文脈内学習 1:36
  • Where this leaves us — one question, four answersまとめ — 一つの問い、四つの答え 1:50

Times are lecture-clock, after the paper presentation.

時刻は論文発表後の講義開始からの目安です。

Where we left off前回の続き

Quick poll — do nonparametric models have parameters?小テスト — ノンパラメトリックモデルにパラメータはある?

Last week: Bayesian nonparametric models (CRP, Dirichlet process, GPs). Do they have parameters?

先週:ベイズ・ノンパラメトリックモデル(CRP・ディリクレ過程・GP)。パラメータはある?

  • A. Yes — infinitely many
  • B. Yes — just a few
  • C. No — it’s called nonparametric for a reason
  • A. ある — 無限個
  • B. ある — 少数だけ
  • C. ない — だからノンパラメトリック

Reveal答え

A — infinitely many.A — 無限個。

A nonparametric model doesn’t fix how many parameters it has — it lets the number grow with the data. Hold that thought: today’s networks are also enormous, and last week we saw the infinite-width limit is a Gaussian process.

ノンパラメトリックモデルはパラメータ数を固定しない — データとともに増やす。この発想を覚えておいて:今日のネットワークも巨大で、先週見たように無限幅の極限はまさにガウス過程だった。

Quick poll — which is NOT parametric?小テスト — パラメトリックでないのは?

Which of these is not a parametric model?

次のうちパラメトリックでないのはどれ?

  • A. a 3-cluster Gaussian mixture
  • B. a single Gaussian
  • C. a kernel / exemplar method
  • A. 3クラスタのガウス混合
  • B. 単一のガウス分布
  • C. カーネル法・事例ベース法

Reveal答え

C — kernel / exemplar methods.C — カーネル法・事例ベース法。

A kernel method’s “parameters” are the stored examples. Week 10’s punchline: an infinitely wide net trained by gradient descent behaves like a fixed-kernel method (the NTK). So the natural next question —

カーネル法の「パラメータ」は保存された事例そのもの。先週の要点:無限幅のネットを勾配降下で訓練すると固定カーネル法のように振る舞う(NTK)。ならば次の問いは —

The question the whole course has been askingこの講義全体が問うてきたこと

Where does the hypothesis space come from? Week 10 gave three answers — and all three fix the features (the kernel) in advance.

  • Penalize complexity → ridge · grow with the data → Bayesian nonparametrics · prior over functions → Gaussian processes

仮説空間はどこから来るのか? 先週は三つの答え — そのどれもが特徴(カーネル)を事前に固定する。

  • 複雑さを罰する → リッジ · データとともに増やす → ベイズ・ノンパラメトリクス · 関数上の事前分布 → ガウス過程

Today: the fourth answer — learn the features themselves.今日:四つ目の答え — 特徴そのものを学習する。

One machine, three questions一つの仕組み、三つの問い

Every model today is this pipeline. We’ll light up one question per block: Represent (what can it express?), Learn (how do we find it?), Understand (why does it generalize — and is it secretly Bayesian?).

今日のすべてのモデルはこのパイプライン。ブロックごとに一つの問いを点灯する:表現(何を表せる?)・学習(どう見つける?)・理解(なぜ汎化する — 実は密かにベイズ的?)。

Our standing critic: Lake et al. 2017常設の批評者:Lake et al. 2017

This week’s reading — Building machines that learn and think like people — is the “what’s missing from deep learning” case. We’ll keep a running scorecard: does each idea today address the critique, or dodge it?

  • Their asks: compositionality, causality, learning-to-learn, intuitive physics/psychology.

今週の課題論文 — 人間のように学び考える機械をつくる — は「深層学習に何が欠けているか」の主張。採点表を持ち歩く:今日の各アイデアはこの批判に答えるか、かわすか?

  • 彼らの要求:構成性因果性学習の学習直観物理/心理

The charge isn’t new: Lake et al. modernize Fodor & Pylyshyn (1988), who argued neural nets lack the systematicity of symbolic thought — anyone who can think “John loves Mary” can also think “Mary loves John.” A 2025 re-test at the end asks whether today’s models close the gap.この批判は新しくない:Lake らは Fodor & Pylyshyn (1988) — ニューラルネットは記号的思考の体系性を欠くという主張 — を現代化したもの。最後に 2025年の再検証で、今のモデルがその差を埋めたかを問う。

Represent I — connectionism表現 I — コネクショニズム

Emergence: order from simple units創発:単純な要素からの秩序

  • A termite mound — meters tall, ventilated, temperature-regulated — is built by thousands of termites with no architect and no blueprint.
  • Each unit follows tiny local rules; the structure is emergent.
  • シロアリの塚 — 数メートル、換気され、温度調節される — は設計者なしで数千匹が作る。
  • 各個体は小さな局所ルールに従い、構造は創発する

Connectionism (Parallel Distributed Processing): model cognition as computation over many interconnected simple units — each unit’s activity depends only on the units feeding it. Loosely neuron-inspired.

コネクショニズム(並列分散処理):認知を多数の相互接続された単純な要素上の計算としてモデル化 — 各要素の活動は入力元の要素だけに依存する。ゆるくニューロンに着想。

The artificial neuron人工ニューロン

One unit: \(a_i = g\!\left(\sum_j w_{ij}\, a_j\right)\) — a weighted sum of its inputs, squashed by an activation function \(g\). The weights \(w_{ij}\) are what the network learns.

一つの要素:\(a_i = g\!\left(\sum_j w_{ij}\, a_j\right)\) — 入力の重み付き和活性化関数 \(g\) で押しつぶす。重み \(w_{ij}\) こそネットワークが学習するもの。\(\sum\) は総和、\(w_{ij}\) は結合重み。

Activation functions: a short history活性化関数の小史

  • tanh / sigmoid (1980s): smooth, nice derivatives — good for the early learning rules.
  • ReLU \(=\max(0,x)\) (2012–): cheap, doesn’t saturate — the deep-learning workhorse.
  • GELU / SiLU (today): smooth ReLU-like; the standard in transformers.
  • tanh / シグモイド(1980年代):滑らかで微分が扱いやすい — 初期の学習則に好適。
  • ReLU \(=\max(0,x)\)(2012年〜):安価で飽和しない — 深層学習の主力。
  • GELU / SiLU(現在):滑らかなReLU様 — トランスフォーマーの標準。

Distributed representations分散表現

A concept isn’t one node — it’s a pattern of activity across many units. “Cat” and “dog” are nearby points in a feature space (snout size, body size → pitch, timbre).

概念は一つのノードではなく、多数の要素にまたがる活動パターン。「猫」と「犬」は特徴空間内の近い点(鼻の大きさ・体の大きさ → 音高・音色)。

Distributed vs localist — why it matters分散 vs 局在 — なぜ重要か

Distributed (a pattern over units):

  • noise tolerance for free — flip one unit, the pattern survives
  • interpolation — points between “cat” and “dog” are meaningful

分散(要素上のパターン):

  • ノイズ耐性が無料 — 一要素が反転してもパターンは残る
  • 補間 — 「猫」と「犬」の中間点も意味を持つ

Localist (one node per concept):

  • transparent, but brittle
  • no natural notion of “between”

The distributed view is what makes word embeddings possible.

局在(概念ごとに一ノード):

  • 透明だが脆い
  • 「中間」の自然な概念がない

分散的な見方こそが単語埋め込みを可能にする。

📋 Lake scorecard: distributed reps buy similarity and interpolation — but not compositionality by themselves.📋 Lake採点表:分散表現は類似性補間をもたらすが、それ自体では構成性は得られない。

Data become vectorsデータがベクトルになる

Machines only eat numbers — so measure: this bento weighs 500 g, crunch 8/10. The list of measurements \([500, 8]\) is a vector; each measurement is a component; the number of components is the dimension. A 2-D vector is a point on a plane — plotting data and “representing” data are the same act.

機械は数しか食べない — だから測る:この弁当は500g、サクサク度8/10。測定値のリスト \([500, 8]\)ベクトル;各測定値が成分;成分の数が次元。2次元ベクトルは平面上の点そのもの — データを描くことと「表現する」ことは同じ行為。

Similarity is direction: the dot product類似性は方向:内積

Multiply matching components, add them up: \(\mathbf{u}\cdot\mathbf{v} = 3{\times}4 + 4{\times}3 = 24\) — the dot product. Divide by the arrows’ lengths (\(5 \times 5\), by Pythagoras) and you get \(0.96\): cosine similaritypointing the same way = similar. And look back: the neuron’s \(\sum_j w_{ij}a_j\) is a dot product — every unit scores how similar its input is to its weights.

対応する成分を掛けて足す:\(\mathbf{u}\cdot\mathbf{v} = 3{\times}4 + 4{\times}3 = 24\)内積。矢印の長さ(ピタゴラスで \(5 \times 5\))で割ると \(0.96\)コサイン類似度同じ方向を向く = 似ている。そして振り返ると:ニューロンの \(\sum_j w_{ij}a_j\)内積そのもの — どの素子も入力が自分の重みにどれだけ似ているかを採点している。

Drive it — bentos as vectors操作してみる — ベクトルとしての弁当

Words as vectors: king − man + woman ≈ queen単語をベクトルに:king − man + woman ≈ queen

Learn a vector per word from co-occurrence (word2vec, Mikolov et al. 2013) and analogies become arithmetic. The features weren’t designed — they were learned. This is the representational substrate every LLM is built on.

共起から単語ごとにベクトルを学習(word2vec, Mikolov et al. 2013)すると類推が算術になる。特徴は設計されたのではなく学習された。これがすべてのLLMの表現的土台。

Learn I — the perceptron学習 I — パーセプトロン

The perceptron: a linear classifierパーセプトロン:線形分類器

Rosenblatt (1958). Output \(y = \operatorname{sign}(\mathbf{w}\cdot\mathbf{x})\) — score the input’s similarity to the weight vector (the dot product you just met), and \(\operatorname{sign}\) reports which side of the decision line you’re on. Learning = moving the line.

Rosenblatt (1958)。出力 \(y = \operatorname{sign}(\mathbf{w}\cdot\mathbf{x})\) — 入力と重みベクトルとの類似度(さっき学んだ内積)を採点し、\(\operatorname{sign}\)決定線のどちら側かを報告する。学習とは線を動かすこと

Error-driven learning = gradient descent誤差駆動学習 = 勾配降下

Define an error \(E\) (how wrong the outputs are). Walk downhill on \(E\): nudge each weight in the direction that lowers it, stop where the slope is zero. \(\eta\) = learning rate (step size).

誤差 \(E\)(出力がどれだけ間違っているか)を定義。\(E\)坂を下る:各重みを \(E\) が下がる方向に少し動かし、傾きがゼロで止まる。\(\eta\) = 学習率(ステップ幅)。

You’ve seen this update beforeこの更新則は見たことがある

Q-learning (Week 8): \[Q \leftarrow Q + \alpha\,\big(\underbrace{\text{target} - Q}_{\text{error}}\big)\]

Q学習(第8週): \[Q \leftarrow Q + \alpha\,\big(\underbrace{\text{目標} - Q}_{\text{誤差}}\big)\]

The delta rule (today): \[w_j \leftarrow w_j + \eta\,\underbrace{(t - y)}_{\text{error}}\,x_j\]

デルタ則(今日): \[w_j \leftarrow w_j + \eta\,\underbrace{(t - y)}_{\text{誤差}}\,x_j\]

Same shape: new = old + (step size) × (error) × (who’s responsible).同じ形:新 = 旧 + (ステップ幅)×(誤差)×(誰の責任か)。

Anatomy of the delta ruleデルタ則の解剖

For a general activation \(g\), the update also carries a \(g'\) term — “correct for how fast the unit is changing.” That \(g'\) factor is exactly what will propagate backward through a deep net.

一般の活性化 \(g\) では更新に \(g'\) の項も入る — 「要素がどれだけ速く変化するかを補正」。この \(g'\) 因子こそ深層ネットで逆向きに伝播するもの。\(g'\)\(g\) の微分。\(t\) は目標、\(y\) は出力。\(x_j\) は入力。

Learn II — depth & backpropagation学習 II — 深さと誤差逆伝播

Quick poll — the limits of a straight line小テスト — 直線の限界

A single perceptron draws one straight line. It can learn AND and OR. Which can it not learn?

単一パーセプトロンは一本の直線を引く。ANDとORは学習できる。学習できないのは?

  • A. NAND (not-and)
  • B. XOR (exclusive-or)
  • C. it can learn all three
  • A. NAND(否定論理積)
  • B. XOR(排他的論理和)
  • C. 三つとも学習できる

Reveal答え

B — XOR.B — XOR。

No straight line separates XOR’s two classes. Minsky & Papert (1969) proved it — and argued important abilities (like judging whether a shape is connected) need exactly this. Neural-network research went quiet for over a decade.

XORの2クラスを分ける直線は存在しない。Minsky & Papert (1969) がこれを証明し、重要な能力(図形が連結かの判断など)にはまさにこれが必要だと論じた。ニューラルネット研究は10年以上停滞した。

Why XOR is hardなぜXORは難しいか

AND and OR: one line separates the classes. XOR: no line works — the two “true” corners are diagonal from each other.

ANDとOR:一本の線でクラスが分かれる。XOR:どの線もダメ — 二つの「真」の角が対角にある。

One more tool: the matrixもう一つの道具:行列

Adding a layer means transforming every input vector at once. The machine that does that is a matrix — and multiplying by one is just a dot product per row:

\[\begin{bmatrix}2 & 0\\ 0 & 1\end{bmatrix}\begin{bmatrix}3\\ 4\end{bmatrix} = \begin{bmatrix}2{\times}3 + 0{\times}4\\ 0{\times}3 + 1{\times}4\end{bmatrix} = \begin{bmatrix}6\\ 4\end{bmatrix}\]

The first column is where \([1,0]\) lands; the second is where \([0,1]\) lands — the matrix moves the whole plane.

を足すとは、すべての入力ベクトルを一度に変換すること。それをやる機械が行列 — 掛け算は行ごとの内積にすぎない:

\[\begin{bmatrix}2 & 0\\ 0 & 1\end{bmatrix}\begin{bmatrix}3\\ 4\end{bmatrix} = \begin{bmatrix}2{\times}3 + 0{\times}4\\ 0{\times}3 + 1{\times}4\end{bmatrix} = \begin{bmatrix}6\\ 4\end{bmatrix}\]

第1\([1,0]\) の行き先、第2列は \([0,1]\) の行き先 — 行列は平面全体を動かす。

Drive it — a matrix moves every point操作してみる — 行列は全ての点を動かす

Does stacking layers help? (1/3)層を重ねれば解決?(1/3)

Try two linear layers, one after the other: \[\mathbf{h} = W_1\mathbf{x}, \qquad y = W_2\mathbf{h}.\] Surely two layers can do more than one?

線形の層を2つ、続けて試す: \[\mathbf{h} = W_1\mathbf{x}, \qquad y = W_2\mathbf{h}.\] 2層なら1層より多くを表せるはず?

Does stacking layers help? (2/3)層を重ねれば解決?(2/3)

Multiply it out — two machines run in a row are one machine (matrix × matrix is just another matrix): \[y = W_2(W_1\mathbf{x}) = \underbrace{(W_2 W_1)}_{\text{one matrix } W'}\,\mathbf{x} = W'\mathbf{x}.\]

展開すると — 続けて動かす二つの機械は一つの機械(行列×行列はやはり一つの行列): \[y = W_2(W_1\mathbf{x}) = \underbrace{(W_2 W_1)}_{\text{一つの行列 } W'}\,\mathbf{x} = W'\mathbf{x}.\]

Does stacking layers help? (3/3)層を重ねれば解決?(3/3)

Depth alone buys nothing — it’s still one straight line.深さだけでは何も得られない — やはり一本の直線。

The fix is the nonlinearity: put an activation \(g\) between the layers, \[\mathbf{h} = g(W_1\mathbf{x}),\] and the composition can no longer collapse — that is why depth needs \(g\).

解決策は非線形性:層の間に活性化 \(g\) を挟むと \[\mathbf{h} = g(W_1\mathbf{x}),\] 合成はもう潰れない — これが深さに \(g\) が必要な理由。

Depth + nonlinearity solves XOR深さ+非線形性でXORが解ける

A nonlinear hidden layer warps the space so the two XOR classes become linearly separable — then the output layer draws its line in the warped space.

非線形の隠れ層が空間を歪め、XORの2クラスが線形分離可能になる — その後、出力層が歪んだ空間で線を引く。

Drive it — can your net learn XOR?操作してみる — あなたのネットはXORを学べる?

How do we train the hidden weights? Backprop隠れ層の重みはどう訓練する? 誤差逆伝播

Backpropagation (Rumelhart, Hinton & Williams, 1986): run the input forward, measure the output error, then apportion the blame backward — each hidden unit’s share is how much it fed into the error (that \(g'\) term, chained by the chain rule). In very deep stacks those \(g'\) factors multiply and can shrink toward zero — the vanishing-gradient problem — which is why modern nets add residual connections and normalization (Block 5).

誤差逆伝播(Rumelhart, Hinton & Williams, 1986):入力を順伝播し、出力誤差を測り、責任を逆向きに配分 — 各隠れ要素の取り分は、それが誤差にどれだけ寄与したか(連鎖律で連なる \(g'\) の項)。非常に深い積層ではこれらの \(g'\) が掛け合わさりゼロに縮みうる — 勾配消失問題 — だから現代のネットは残差接続と正規化を加える(ブロック5)。

Backprop is just automatic differentiation誤差逆伝播とは自動微分にすぎない

You’ve used JAX all term. Meet its autodiff tool, jax.grad: hand it a function, get back the function’s gradient — the chain rule, automated.

今学期ずっとJAXを使ってきた。その自動微分ツール jax.grad を紹介:関数を渡すと、その関数の勾配が返る — 連鎖律の自動化。

import jax, jax.numpy as jnp

def loss(w, x, t):                      # a tiny network's error
    y = jnp.tanh(x @ w)                 # forward pass
    return jnp.mean((y - t) ** 2)       # squared error

grad_fn = jax.grad(loss)               # <- reverse-mode autodiff = backprop
g = grad_fn(w, x, t)                   # the gradient, one call
w = w - 0.1 * g                         # one gradient-descent step

Reverse-mode autodiff — what jax.grad computes — is backpropagation. Backprop is not a bespoke algorithm; it’s the chain rule automated, in one call. No hand-derived update rules.

逆モード自動微分jax.grad が計算するもの — がまさに誤差逆伝播。逆伝播は専用アルゴリズムではなく、連鎖律の自動化を一回の呼び出しで行うだけ。手計算の更新則は不要。

Represent II — architecture as prior表現 II — 事前分布としてのアーキテクチャ

Architecture is an inductive bias — a priorアーキテクチャは帰納バイアス — 事前分布

A fully-connected net treats every input the same. Real architectures bake in an assumption about the data — which is exactly a prior (the Bayesian word from Week 4 onward).

  • CNN: nearby pixels matter together, and the same pattern can appear anywhere.
  • RNN: the data is a sequence; process it one step at a time.

全結合ネットは全入力を同等に扱う。実際のアーキテクチャはデータについての仮定を組み込む — それはまさに事前分布(第4週以降のベイズの言葉)。

  • CNN: 近くのピクセルは一緒に効き、同じパターンはどこにでも現れうる。
  • RNN: データは系列;一歩ずつ処理する。

CNNs: bake in translation invarianceCNN:並進不変性を組み込む

Slide one small kernel across the image and reuse its weights everywhere (weight sharing). A cat is a cat wherever it appears — translation invariance, built in rather than learned from scratch.

小さなカーネルを画像上で滑らせ、その重みをどこでも再利用(重み共有)。猫はどこに現れても猫 — 並進不変性を、ゼロから学ぶのではなく組み込む。

RNNs: bake in sequence — but a bottleneckRNN:系列を組み込む — だがボトルネック

Feed the hidden state back in at each step (Elman, 1990) — the net carries a memory of what came before. But everything must squeeze through one hidden state, step by step: a famous bottleneck. RNNs learned local structure well and global structure poorly.

各ステップで隠れ状態を戻す(Elman, 1990)— ネットは過去の記憶を運ぶ。だが全てが一つの隠れ状態を一歩ずつ通らねばならない:有名なボトルネック。RNNは局所構造をよく学び、大域構造を苦手とした。

Attention: a soft dictionary lookupアテンション:ソフトな辞書引き

Instead of one bottleneck, let every token look at every other token. Each token issues a query; it’s matched against every token’s key — the match score is a dot product, the same similarity you met this morning. The softmax of those scores weights a blend of the values — the same softmax from Week 9, sharpness \(\beta\) and all.

一つのボトルネックの代わりに、全トークンが他の全トークンを見る。各トークンがクエリを出し、全トークンのキーと照合する — 一致度は内積、今朝学んだのと同じ類似度。そのスコアのソフトマックスの混合を重み付ける — 第9週と同じソフトマックス、鋭さ \(\beta\) も含めて。

Drive it — attention as lookup操作してみる — 辞書引きとしてのアテンション

The transformer: attention + MLP, stackedトランスフォーマー:アテンション+MLP、積層

One block = self-attention (mix information across tokens) + a per-token MLP (transform each), wrapped in residual connections and normalization (the vanishing-gradient fixes). Stack \(N\) of them. No recurrence, no bottleneck — this is the architecture behind every modern LLM.

1ブロック = 自己アテンション(トークン間で情報を混ぜる)+ トークンごとのMLP(各々を変換)を、残差接続正規化(勾配消失の対策)で包む。\(N\) 個積む。再帰なし、ボトルネックなし — すべての現代LLMの背後にあるアーキテクチャ。

Understand — scale, emergence, in-context learning理解 — スケール・創発・文脈内学習

Scaling laws: bigger is (predictably) betterスケーリング則:大きいほど(予測通り)良い

Test loss falls as a straight line on a log-log plot against parameters, data, and compute (Kaplan et al. 2020; Hoffmann et al. 2022). Performance is, to a surprising degree, predictable from scale alone — no new idea required.

テスト損失は、パラメータ・データ・計算量に対して両対数プロットで直線として下がる(Kaplan et al. 2020; Hoffmann et al. 2022)。性能は驚くほどスケールだけから予測可能 — 新しいアイデアは不要。

Emergence — and a caveat創発 — と注意点

Some abilities appear to switch on suddenly past a scale threshold — arithmetic, multi-step reasoning — abilities the smaller model seemed not to have at all (“emergent abilities”).

一部の能力は、あるスケール閾値を超えると突然現れるように見える — 算術、多段推論 — 小さいモデルには全く無かったように見えた能力(「創発的能力」)。

Caveat (Schaeffer et al. 2023): some “emergence” is a mirage of the metric — switch to a smoother score and the jump becomes a gentle curve. Real or measured? Still debated.

注意(Schaeffer et al. 2023): 一部の「創発」は指標の蜃気楼 — 滑らかな尺度に変えると、急上昇は緩やかな曲線になる。本物か測定の産物か? 議論中。

📋 Lake scorecard: in-context learning is real learning-to-learn — adapting from a few examples — one of Lake et al.’s four asks. Whether it’s compositional is exactly the debate on the next slide.📋 Lake採点表:文脈内学習は本物の学習の学習 — 少数の例からの適応 — でLake らの4つの要求の一つ。それが構成的かは、まさに次のスライドの議論。

In-context learning: learning without weight updates文脈内学習:重み更新なしの学習

Give a frozen model a few examples in its prompt — plip→blue, plap→red, plip→? — and it continues the pattern. Nothing was retrained; the “learning” happened entirely in the context window.

凍結したモデルにプロンプト内でいくつか例を与える — plip→青, plap→赤, plip→? — とパターンを続ける。再訓練は一切なし;「学習」はすべて文脈窓の中で起きた。

Quick poll — where did the learning go?小テスト — 学習はどこへ?

A frozen LLM picks up a made-up rule from 3 prompt examples. Where does what-it-just-learned live?

凍結したLLMが3つのプロンプト例から作り話のルールを覚える。今学んだことはどこにある

  • A. in updated weights
  • B. in the context window — weights unchanged
  • C. in a retrieval database
  • A. 更新された重みの中
  • B. 文脈窓の中 — 重みは不変
  • C. 検索データベースの中

Reveal答え

B — in the context window; the weights never change.B — 文脈窓の中;重みは変わらない。

Conditioning on examples without updating parameters looks a lot like inference, not training. That resemblance is the basis of a striking — and contested — claim.

パラメータを更新せず例で条件付けることは、訓練というより推論によく似ている。この類似が、印象的で — かつ議論のある — 主張の根拠。

Frozen weights, adaptive answer — how?凍結した重み、適応する答え — どうやって?

  • Fixed weights are a fixed function, not a fixed answer. A sorting routine’s code never changes, yet it sorts any list. Weights are the code; the prompt is the input.
  • Pretraining wrote a procedure, not facts. To predict the next token across an ocean of mixed text, the net must read the prefix, infer what kind of text this is, and predict to match — the loss-minimizing move.
  • That “kind” is a latent concept — a topic, a task, the plip/plap rule. Read examples → infer the concept → continue is inference, run in the forward pass.
  • So the weights hold an amortized inference engine — trained once to emit an inference’s answer in one pass. It never stored “plip → blue,” only how to read examples and continue.
  • 固定した重みは固定した関数であって、固定した答えではない。 ソートのコードは変わらないが、どんなリストもソートする。重みがコード、プロンプトが入力。
  • 事前学習は事実ではなく手続きを書き込んだ。 混在した膨大なテキストで次トークンを当てるには、前文脈を読み、これはどんなテキストかを推論し、合わせて予測せねばならない — それが損失最小化の動き。
  • その「種類」が潜在概念 — 話題・課題・plip/plapのルール。例を読む → 概念を推論 → 継続 は、順伝播の中で走る推論。
  • だから重みは償却された推論エンジンを保持する — 推論の答えを一回の順伝播で出すよう一度だけ訓練済み。「plip → 青」を記憶したのではなく、例を読んで継続する方法を記憶した。

The Bayesian lens — and its criticsベイズの視点 — とその批判者

The claim — ICL \(\approx\) implicit Bayes. Pretraining fits a prior over latent patterns; the prompt’s examples are observations; the continuation is the posterior predictive. Pretraining is empirical Bayes — estimating the prior itself from data. (Xie et al. 2022; Ye et al. 2024)

主張 — 文脈内学習 \(\approx\) 暗黙のベイズ。 事前学習は潜在パターン上の事前分布を当てはめ;プロンプトの例は観測;継続は事後予測。事前学習は経験ベイズ — 事前分布そのものをデータから推定。(Xie et al. 2022; Ye et al. 2024)

The pushback — the math doesn’t check out. If prompt examples are exchangeable (order shouldn’t matter), the running prediction must be a martingale: no systematic drift as examples arrive. Real LLM predictions violate that. (Falck et al. 2024)

反論 — 数学が合わない。 例が交換可能(順序は無関係)なら、逐次予測はマルチンゲールでなければならない:例が増えても系統的に漂動しない。実際のLLMの予測はそれを破る(Falck et al. 2024)

The lens is suggestive, not settled — and it’s the payoff of everything from Week 4’s hierarchical Bayes onward.この視点は示唆的であり確定ではない — そして第4週の階層ベイズ以降すべての成果でもある。

How these get aligned → next weekこれらがどう整合されるか → 来週

A pretrained model predicts text; making it helpful and safe is a second step — RLHF (Week 9): fit a reward model to human preferences (Bradley–Terry), then RL the policy. Same inverse-RL machinery, now aimed at values.

  • Next week (Week 12): ethics, fairness, adversarial examples, alignment.

事前学習モデルはテキストを予測する;それを有用で安全にするのは第2段階 — RLHF(第9週):人間の選好に報酬モデルを当てはめ(Bradley–Terry)、方策をRLで最適化。同じ逆強化学習の仕組みを、今度は価値に向ける。

  • 来週(第12週): 倫理・公平性・敵対的事例・アラインメント。

Where this leaves usまとめ

One question, four answers一つの問い、四つの答え

“Where does the hypothesis space come from?” — penalize complexity (ridge), grow with data (BNP), a prior over functions (GP), or learn the features (neural nets). The first three fix the kernel; the fourth learns it — and at infinite width, it circles back to a GP (Week 10).

「仮説空間はどこから来るのか?」 — 複雑さを罰する(リッジ)、データとともに増やす(BNP)、関数上の事前分布(GP)、または特徴を学習する(ニューラルネット)。最初の三つはカーネルを固定;四つ目はそれを学習 — そして無限幅ではGPに戻る(第10週)。

Lake’s scorecard, settledLakeの採点表、締め

Deep nets deliver — genuinely

  • Learned representations
  • Similarity
  • Scale

深層ネットが確かに提供

  • 学習された表現
  • 類似性
  • スケール

Still missing (Lake et al. 2017)

  • Compositional generalization
  • Causal, model-based understanding

なお欠けているもの (Lake et al. 2017)

  • 構成的汎化
  • 因果的・モデルベースの理解

Meta-learned systematicity comes only with effort (Lake & Baroni, 2023); a 2025 multimodal re-test on Lake’s own domains stays short of people (Schulze Buschoff et al., 2025).

メタ学習の体系性でさえ努力を要し(Lake & Baroni, 2023)、2025年のマルチモーダル再検証もLake自身の領域で人間に及ばない(Schulze Buschoff et al., 2025)

Honest verdict: the 1988 → 2017 → 2025 critique still bites and learned features are powerful. Both true.正直な評価: 1988 → 2017 → 2025 の批判はなお有効であり、学習された特徴も強力。両方とも真。

Next week来週

Week 12 · July 17

第12週 · 7月17日

Ethics, fairness & alignment

  • Fairness & bias in learned models
  • Adversarial examples — where nets break
  • Alignment — steering models toward human values
  • Final-project presentations — bring a laptop

倫理・公平性・アラインメント

  • 学習モデルの公平性とバイアス
  • 敵対的事例 — ネットが壊れる場所
  • アラインメント — モデルを人間の価値へ導く
  • 最終プロジェクト発表 — ノートPCを持参

Meanwhile — play the two widgets: XOR net & attention lookup, linked from the slides.その間に — 2つのウィジェット(XORネット・アテンション辞書引き)で遊んでみて。スライドからリンク。