Friday, July 10, 20262026年7月10日(金)
Times are lecture-clock, after the paper presentation.
時刻は論文発表後の講義開始からの目安です。
Last week: Bayesian nonparametric models (CRP, Dirichlet process, GPs). Do they have parameters?
先週:ベイズ・ノンパラメトリックモデル(CRP・ディリクレ過程・GP)。パラメータはある?
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.
ノンパラメトリックモデルはパラメータ数を固定しない — データとともに増やす。この発想を覚えておいて:今日のネットワークも巨大で、先週見たように無限幅の極限はまさにガウス過程だった。
Which of these is not a parametric model?
次のうちパラメトリックでないのはどれ?
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)。ならば次の問いは —
Where does the hypothesis space come from? Week 10 gave three answers — and all three fix the features (the kernel) in advance.
仮説空間はどこから来るのか? 先週は三つの答え — そのどれもが特徴(カーネル)を事前に固定する。
Today: the fourth answer — learn the features themselves.今日:四つ目の答え — 特徴そのものを学習する。
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?).
今日のすべてのモデルはこのパイプライン。ブロックごとに一つの問いを点灯する:表現(何を表せる?)・学習(どう見つける?)・理解(なぜ汎化する — 実は密かにベイズ的?)。
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?
今週の課題論文 — 人間のように学び考える機械をつくる — は「深層学習に何が欠けているか」の主張。採点表を持ち歩く:今日の各アイデアはこの批判に答えるか、かわすか?
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年の再検証で、今のモデルがその差を埋めたかを問う。
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.
コネクショニズム(並列分散処理):認知を多数の相互接続された単純な要素上の計算としてモデル化 — 各要素の活動は入力元の要素だけに依存する。ゆるくニューロンに着想。
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}\) は結合重み。
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 (a pattern over units):
分散(要素上のパターン):
Localist (one node per concept):
The distributed view is what makes word embeddings possible.
局在(概念ごとに一ノード):
分散的な見方こそが単語埋め込みを可能にする。
📋 Lake scorecard: distributed reps buy similarity and interpolation — but not compositionality by themselves.📋 Lake採点表:分散表現は類似性と補間をもたらすが、それ自体では構成性は得られない。
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次元ベクトルは平面上の点そのもの — データを描くことと「表現する」ことは同じ行為。
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 similarity — pointing 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\) は内積そのもの — どの素子も入力が自分の重みにどれだけ似ているかを採点している。
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の表現的土台。
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}\) が決定線のどちら側かを報告する。学習とは線を動かすこと。
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\) = 学習率(ステップ幅)。
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).同じ形:新 = 旧 + (ステップ幅)×(誤差)×(誰の責任か)。
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\) は入力。
A single perceptron draws one straight line. It can learn AND and OR. Which can it not learn?
単一パーセプトロンは一本の直線を引く。ANDとORは学習できる。学習できないのは?
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年以上停滞した。
AND and OR: one line separates the classes. XOR: no line works — the two “true” corners are diagonal from each other.
ANDとOR:一本の線でクラスが分かれる。XOR:どの線もダメ — 二つの「真」の角が対角にある。
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]\) の行き先 — 行列は平面全体を動かす。
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層より多くを表せるはず?
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}.\]
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\) が必要な理由。
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クラスが線形分離可能になる — その後、出力層が歪んだ空間で線を引く。
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)。
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 stepReverse-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 が計算するもの — がまさに誤差逆伝播。逆伝播は専用アルゴリズムではなく、連鎖律の自動化を一回の呼び出しで行うだけ。手計算の更新則は不要。
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).
全結合ネットは全入力を同等に扱う。実際のアーキテクチャはデータについての仮定を組み込む — それはまさに事前分布(第4週以降のベイズの言葉)。
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.
小さなカーネルを画像上で滑らせ、その重みをどこでも再利用(重み共有)。猫はどこに現れても猫 — 並進不変性を、ゼロから学ぶのではなく組み込む。
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は局所構造をよく学び、大域構造を苦手とした。
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\) も含めて。
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の背後にあるアーキテクチャ。
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)。性能は驚くほどスケールだけから予測可能 — 新しいアイデアは不要。
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つの要求の一つ。それが構成的かは、まさに次のスライドの議論。
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→? — とパターンを続ける。再訓練は一切なし;「学習」はすべて文脈窓の中で起きた。
A frozen LLM picks up a made-up rule from 3 prompt examples. Where does what-it-just-learned live?
凍結したLLMが3つのプロンプト例から作り話のルールを覚える。今学んだことはどこにある?
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.
パラメータを更新せず例で条件付けることは、訓練というより推論によく似ている。この類似が、印象的で — かつ議論のある — 主張の根拠。
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週の階層ベイズ以降すべての成果でもある。
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.
事前学習モデルはテキストを予測する;それを有用で安全にするのは第2段階 — RLHF(第9週):人間の選好に報酬モデルを当てはめ(Bradley–Terry)、方策をRLで最適化。同じ逆強化学習の仕組みを、今度は価値に向ける。
“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週)。
Deep nets deliver — genuinely
深層ネットが確かに提供
Still missing (Lake et al. 2017)
なお欠けているもの (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 の批判はなお有効であり、学習された特徴も強力。両方とも真。
Week 12 · July 17
第12週 · 7月17日
Ethics, fairness & alignment
倫理・公平性・アラインメント
Meanwhile — play the two widgets: XOR net & attention lookup, linked from the slides.その間に — 2つのウィジェット(XORネット・アテンション辞書引き)で遊んでみて。スライドからリンク。