Friday, June 5, 20262026年6月5日(金)
Assignment 2 (Generalization) is due Fri Jun 19, 8:00 PM — worth 7.5%.
課題2(一般化)は6月19日(金)20:00締切 — 配点7.5%。
New twist on Chibany this week: students now bring Chibany both a tonkatsu and a hamburger bento every day — and Chibany chooses which one to eat.
There’s a habit in the choosing: Chibany loves tonkatsu, so after a tonkatsu day they usually want it again — but every so often they fancy a change. And after a hamburger day, they almost always swing back to tonkatsu.
If Chibany chose tonkatsu yesterday, what will they probably eat today? And does it matter what they ate last Tuesday?
今週のチバニーの新展開: 学生は毎日チバニーに とんかつ と ハンバーグ の弁当を両方届けるようになり、チバニーがどちらを食べるか選ぶ。
選び方にクセがある:チバニーはとんかつが大好きなので、とんかつの日の翌日は たいていまたとんかつ — でもたまに気分を変えたくなる。そしてハンバーグの 日の翌日は、ほぼ必ずとんかつに戻る。
昨日チバニーがとんかつを選んだなら、今日はたぶん何を食べる? そして先週の火曜に何を食べたかは関係ある?
Two states (\(X_t\) = today’s bento), arrows = probabilities of tomorrow’s choice. Today depends only on yesterday. Chibany loves tonkatsu: sticks with it (0.65) and swings back to it after a burger (0.82).
2つの状態(\(X_t\) = 今日のお弁当)、矢印 = 明日の選択の確率。今日は昨日だけに依存する。チバニーはとんかつが大好き:とんかつを続け(0.65)、ハンバーグの後はとんかつに戻る(0.82)。
Given the present, the future is independent of the past.
現在を知れば、未来は過去と独立である。
The future is independent of the past, given the present.
\[P(X_{t+1} \mid X_t, X_{t-1}, \dots, X_0) \;=\; P(X_{t+1} \mid X_t)\]
現在を知れば、未来は過去と独立である。
\[P(X_{t+1} \mid X_t, X_{t-1}, \dots, X_0) \;=\; P(X_{t+1} \mid X_t)\]
Each row of \(P\) is a probability distribution over next states → it sums to 1. Such a matrix is called row-stochastic.
\(P\) の各行は次状態の確率分布 → 合計1。このような行列を行確率的と呼ぶ。

Picture view: Chibany’s chain — states + labeled arrows (the same one from “Draw the habit”).
絵の見方: チバニーの連鎖 — 状態 + ラベル付き矢印(「クセを図にする」と同じもの)。
Matrix view: \[P = \begin{pmatrix} 0.65 & 0.35 \\ 0.82 & 0.18 \end{pmatrix}\]
Row 1 = “if T today, then tomorrow.” Row 2 = “if H today.” (columns are T, H)
Same chain, two pictures.
行列の見方: \[P = \begin{pmatrix} 0.65 & 0.35 \\ 0.82 & 0.18 \end{pmatrix}\]
行1 =「今日 T なら、明日は」。行2 =「今日 H なら」。 (列は T, H)
同じ連鎖、2つの絵。
How does the chain actually take a step? You roll a (continuous) die.
Say today is tonkatsu (T), so the row is \([\,0.65,\; 0.35\,]\) — 0.65 stay T, 0.35 switch to H.
Repeat tomorrow, and the next day… the matrix plus a stream of random numbers generates the whole sequence. Hold this idea — it returns at the end of class.
連鎖は実際にどう1歩進む? (連続的な)サイコロを振る。
今日が とんかつ (T) なら、行は \([\,0.65,\; 0.35\,]\) — 0.65でT継続、0.35でHへ。
翌日も、その次の日も繰り返す… 行列 + 乱数の流れが系列全体を生成する。 この発想を覚えておいて — 授業の最後に戻ってくる。
Five runs of Chibany’s chain, each starting at T:
T H T H T T H T H T T T H T H T T T T H
T T H T H H T T T T T H T H T T T T T T
T T H T H T T H T T T H T T T H T H T T
T T T T H T T H T T T T T T T T H T T T
T T H T H T T H T T T H T T T T H T T T
Mostly T, with brief H interruptions (hamburger almost never repeats). Over time, roughly 70% T, 30% H.
チバニーの連鎖を5回走らせる。各回 T から開始:
T H T H T T H T H T T T H T H T T T T H
T T H T H H T T T T T H T H T T T T T T
T T H T H T T H T T T H T T T H T H T T
T T T T H T T H T T T T T T T T H T T T
T T H T H T T H T T T H T T T T H T T T
ほとんど T、たまに H が割り込む(ハンバーグはほぼ繰り返さない)。長い目で見ると、おおよそ 70% T, 30% H。
You shuffle a deck before a game. What are you actually trying to achieve — what’s the computational goal of shuffling?
ゲームの前にデッキをシャッフルする。本当は何を達成しようとしている — シャッフルの計算的なゴールは?
The goal of shuffling: make every ordering equally likely — a uniform distribution over all \(52!\) orderings.
We were never after one ordering — we were after a distribution the process settles into. Let’s make that precise.
シャッフルのゴール:すべての並びを等確率にする — \(52!\) 通りの並びに対する一様分布。
私たちは1つの並びを求めていたのではない — 過程が落ち着く分布を求めていた。これを正確にしよう。
Run a chain for a very long time. What fraction of the time do you spend in each state?
Over a whole semester, what fraction of Chibany’s lunches are tonkatsu?
Call that distribution \(\pi\).
Definition: \(\pi\) is stationary if running one more step doesn’t change it: \[\pi P = \pi\]
If you’re already distributed as \(\pi\), you stay distributed as \(\pi\) forever.
連鎖を非常に長く走らせる。各状態で過ごす時間の割合は?
1学期を通して、チバニーの昼食のうちとんかつは何割?
その分布を \(\pi\) と呼ぶ。
定義: もう1歩進めても変わらないとき \(\pi\) は定常: \[\pi P = \pi\]
すでに \(\pi\) の分布なら、その後ずっと \(\pi\) のまま。
Start from any distribution and step repeatedly — i.e. multiply by \(P\) over and over: \[\mathbf{v},\; \mathbf{v}P,\; \mathbf{v}P^2,\; \mathbf{v}P^3,\; \dots \;\longrightarrow\; \pi\]
This is called power iteration. Let’s watch it on Chibany’s chain.
任意の分布から始めて、繰り返し1歩進める — つまり \(P\) を何度も掛ける: \[\mathbf{v},\; \mathbf{v}P,\; \mathbf{v}P^2,\; \mathbf{v}P^3,\; \dots \;\longrightarrow\; \pi\]
これをべき乗法と呼ぶ。チバニーの連鎖で見てみよう。
We’ll run Chibany’s chain two ways — he always starts on tonkatsu, or always on hamburger — for 20 days.
Before we look: is the chance he’s eating tonkatsu on day 20 the same either way?
チバニーの連鎖を2通りで走らせる — いつもとんかつから始める、またはいつもハンバーグから — 20日間。
見る前に: 20日目にとんかつを食べている確率は、どちらから始めても同じ?
Same start always-tonkatsu (top) vs always-hamburger (bottom). After \(k\) steps:
いつもとんかつから(上)対 いつもハンバーグから(下)。\(k\)ステップ後:
A. Essentially the same. After 1 step they differ; by 20 steps both reach 70% T / 30% H. The chain forgot where it started.
A. ほぼ同じ。 1ステップ後は違うが、20ステップで両方とも 70% T / 30% H に到達。連鎖は出発点を忘れた。
After enough days the chain forgets where it started — it mixes. The long-run distribution is the stationary \(\pi\) (Chibany’s 70/30), and (for a well-behaved chain) it’s the same from every starting point.
The technical condition is ergodicity — you can get from any state to any other, and the chain doesn’t get trapped in a cycle.
十分な日数の後、連鎖は出発点を忘れる — 混合する。長期の分布は 定常分布 \(\pi\) であり、(性質の良い連鎖では)どの出発点からでも同じ。
技術的条件はエルゴード性 — どの状態からどの状態へも到達でき、周期に 閉じ込められないこと。
Power iteration converges to \(\pi\). But what is \(\pi\), exactly?
\(\pi\) is the left eigenvector of \(P\) with eigenvalue 1.
The bar charts showed this: once the shape stopped changing under \(\times P\), you’d found \(\pi\).
べき乗法は \(\pi\) に収束する。では \(\pi\) とは正確には何?
\(\pi\) は 固有値1に対応する \(P\) の左固有ベクトル。
棒グラフが示したこと:\(\times P\) で形が変わらなくなったら \(\pi\) を見つけた。

A 3-state random walk (states 1, 2, 3). Same rules as Chibany — just more states. Its transition matrix:
\[A = \begin{pmatrix} 0 & 0.1 & 0.9 \\ 0.5 & 0 & 0.5 \\ 0.8 & 0.2 & 0 \end{pmatrix}\]
Row \(i\) = where you go from state \(i\). (No self-loops here — the diagonal is 0.)
3状態のランダムウォーク(状態 1, 2, 3)。チバニーと同じルール — 状態が増えただけ。遷移行列:
\[A = \begin{pmatrix} 0 & 0.1 & 0.9 \\ 0.5 & 0 & 0.5 \\ 0.8 & 0.2 & 0 \end{pmatrix}\]
行 \(i\) = 状態 \(i\) からの行き先。(ここでは自己ループなし — 対角は0。)

\[A = \begin{pmatrix} 0 & 0.1 & 0.9 \\ 0.5 & 0 & 0.5 \\ 0.8 & 0.2 & 0 \end{pmatrix}\]
Run this 3-state walk a long time. Which state does it visit MOST often?
Which state do the others tend to send you toward?
この3状態のウォークを長く走らせる。最も頻繁に訪れる状態は?
他の状態はどこへ送りがち?
Same method as Chibany: pick two starts (state 1 / state 2), multiply by \(A\) over and over.
チバニーと同じ方法:2つの出発点(状態1 / 状態2)を選び、\(A\) を何度も掛ける。

\[A = \begin{pmatrix} 0 & 0.1 & 0.9 \\ 0.5 & 0 & 0.5 \\ 0.8 & 0.2 & 0 \end{pmatrix}\]
Run this walk for 20 steps. Is the chance of being in state 2 the same from state 1 as from state 2?
Same question we asked for Chibany — does it still hold with 3 states?
このウォークを20ステップ走らせる。状態2にいる確率は、状態1からでも状態2からでも同じ?
チバニーで聞いたのと同じ問い — 3状態でも成り立つ?
A. Essentially the same — and the walk’s long-run home is:
\[\pi \approx (\,0.42,\; 0.13,\; 0.45\,)\]
A. ほぼ同じ — そしてウォークの長期的な居場所は:
\[\pi \approx (\,0.42,\; 0.13,\; 0.45\,)\]
A graph \(G = (V, E)\) is just nodes (\(V\)) joined by edges (\(E\)).
You already met graphs last week — a Bayes net is a directed graph. There an edge meant “depends on”; the graphs today use edges to mean “is related / connected to.”
グラフ \(G = (V, E)\) とは、ノード(\(V\))をエッジ(\(E\))で結んだもの。
グラフは先週すでに登場した — ベイズネットは有向グラフ。そこでのエッジは「依存する」の意味だったが、今日のグラフではエッジは「関連・接続している」を意味する。
The power of the abstraction: one object, many domains. What are the nodes and edges?
抽象化の力:1つの対象、多くの領域。 ノードとエッジは何?
| Graph | Nodes | Edges |
|---|---|---|
| Semantic network (cog sci) | concepts / words | “is related / associated” |
| The Web | web pages | hyperlinks (directed) |
| Co-authorship network | researchers | “wrote a paper together” |
| Social network | people | friendships / follows |
| Road map | intersections | roads (weighted = distance) |
| Neural network (brain) | neurons | synapses |
Today’s star is the semantic network — concepts as nodes, associations as edges. Cognitive science has used it for decades (Collins & Quillian 1969; Collins & Loftus 1975).
| グラフ | ノード | エッジ |
|---|---|---|
| 意味ネットワーク(認知科学) | 概念 / 単語 | 「関連・連想する」 |
| ウェブ | ウェブページ | ハイパーリンク(有向) |
| 共著ネットワーク | 研究者 | 「一緒に論文を書いた」 |
| ソーシャルネットワーク | 人 | 友人関係 / フォロー |
| 道路地図 | 交差点 | 道路(重み = 距離) |
| 神経回路(脳) | ニューロン | シナプス |
今日の主役は意味ネットワーク — 概念がノード、連想がエッジ。認知科学は何十年も使ってきた(Collins & Quillian 1969; Collins & Loftus 1975)。

Adjacency matrix \(L\): \(L_{ij} = 1\) when nodes \(i\) and \(j\) share an edge, else \(0\).
\[L = \begin{array}{r|cccccc} & \text{D} & \text{W} & \text{C} & \text{L} & \text{T} & \text{Z} \\ \hline \text{Dog} & 0 & 1 & 1 & 0 & 0 & 0 \\ \text{Wolf} & 1 & 0 & 1 & 0 & 0 & 0 \\ \text{Cat} & 1 & 1 & 0 & 1 & 1 & 0 \\ \text{Lion} & 0 & 0 & 1 & 0 & 1 & 1 \\ \text{Tiger} & 0 & 0 & 1 & 1 & 0 & 1 \\ \text{Zebra} & 0 & 0 & 0 & 1 & 1 & 0 \end{array}\]
Symmetric (undirected). Each row sum = that node’s degree — Cat’s row sums to 4.
隣接行列 \(L\):ノード \(i\) と \(j\) がエッジで繋がっていれば \(L_{ij} = 1\)、なければ \(0\)。
\[L = \begin{array}{r|cccccc} & \text{D} & \text{W} & \text{C} & \text{L} & \text{T} & \text{Z} \\ \hline \text{Dog} & 0 & 1 & 1 & 0 & 0 & 0 \\ \text{Wolf} & 1 & 0 & 1 & 0 & 0 & 0 \\ \text{Cat} & 1 & 1 & 0 & 1 & 1 & 0 \\ \text{Lion} & 0 & 0 & 1 & 0 & 1 & 1 \\ \text{Tiger} & 0 & 0 & 1 & 1 & 0 & 1 \\ \text{Zebra} & 0 & 0 & 0 & 1 & 1 & 0 \end{array}\]
対称(無向)。各行の和 = そのノードの次数 — Cat の行は4。

The hinge of the whole lecture:
Now \(P\) describes a walker who, at each node, steps to a random neighbor.
Structure (the graph) + process (the walk) — a Markov chain whose states are nodes.
講義全体の要:
\(P\) は、各ノードでランダムな隣へ進む歩行者を表す。
構造(グラフ) + 過程(ウォーク) — 状態がノードであるマルコフ連鎖。

Start at Wolf. Pick a random neighbor → Dog.
The sequence of nodes we visit is a Markov chain.
Wolf から開始。ランダムな隣を選ぶ → Dog。
訪れるノードの系列がまさにマルコフ連鎖。

Dog → random neighbor → Cat.
Dog → ランダムな隣 → Cat。

Cat → Lion. The walk crossed the bridge from the “pets” side to the “big cats.”
Cat → Lion。ウォークは橋を渡り「ペット」側から「大型ネコ」へ。

…Lion → Tiger → Zebra. Visited so far: Wolf → Dog → Cat → Lion → Tiger → Zebra.
Run it long enough — which nodes get visited most?
…Lion → Tiger → Zebra。訪問: Wolf → Dog → Cat → Lion → Tiger → Zebra。
十分長く走らせると — どのノードが一番訪れられる?
For an undirected, unweighted network, the long-run visit frequency has a beautifully simple form:
\[\pi_i \;\propto\; \deg(i)\]
where \(\deg(i)\) = the degree of node \(i\) = how many edges touch it, and \(\propto\) means “grows with” — double the edges, roughly double the visits.
More connected → visited more often. No eigen-solve needed for this case — the degree is the answer.
無向・重みなしネットワークでは、長期の訪問頻度は驚くほど単純:
\[\pi_i \;\propto\; \deg(i)\]
ここで \(\deg(i)\) = ノード \(i\) の次数 = 接続するエッジの本数、 \(\propto\) は「に比例して増える」 — エッジが倍なら訪問もおよそ倍。
繋がりが多い → 訪問が多い。 この場合は固有値計算不要 — 次数が答えそのもの。

Run a random walk on this network for a long time.
Which node do you visit most often?
このネットワークでランダムウォークを長く走らせる。
最も頻繁に訪れるノードは?
A. Cat — it has the highest degree.A. Cat — 次数が最も高い。

\(\pi_i \propto \deg(i)\), and Cat touches the most edges (degree 4) — it’s the bridge between the two clusters. Long-run behavior is dictated by structure: no extra assumption needed, and no eigen-solve for an undirected graph — the degree is the answer.
Hold onto this: the most-visited concept is the most-connected one. That’s about to explain how people recall.
\(\pi_i \propto \deg(i)\) であり、Cat が最も多くのエッジ(次数4)に接する — 2つのクラスタを繋ぐ橋だから。長期挙動は構造で決まる:追加の仮定も、 無向グラフなら固有値計算も不要 — 次数が答えそのもの。
覚えておいて:最も訪れられる概念は最も繋がった概念。これがこの後、人が どう思い出すかを説明する。
5 minutes
5分
List as many animals as you can — 60 seconds. Go.
動物をできるだけたくさん挙げて — 60秒。スタート。
People don’t list animals at random. They come out in bursts by category:
wolf, lion, giraffe, zebra … dog, cat, hamster …
A run of African animals, a pause, a run of pets. Then a switch.
Why this structure? And why those animals, in that order?
人はランダムに動物を挙げない。カテゴリごとのまとまりで出てくる:
オオカミ、ライオン、キリン、シマウマ … イヌ、ネコ、ハムスター …
アフリカの動物の連続、一拍、ペットの連続。そして切り替え。
なぜこの構造? なぜそれらの動物が、その順で?

Abbott, Austerweil & Griffiths (2012):
Your semantic memory is a network; recall is a random walk on it. The list you produce is the sequence of nodes the walk visits.
No extra “search strategy” needed — it falls out of the network.
Abbott, Austerweil & Griffiths (2012):
意味記憶はネットワークであり、想起はその上のランダムウォーク。 あなたが出すリストはまさにウォークが訪れるノードの系列。
追加の「探索戦略」は不要 — ネットワークから自然に出る。
A random walk revisits nodes and wanders through non-animals — but a fluency list has neither. So the walk is not the list directly.
The censoring function (Abbott et al. 2012) is the missing link: you report a word only the first time the walk hits it, and only if it’s an animal. Everything else is censored (hidden).
ランダムウォークはノードを再訪し、動物以外もさまよう — でも流暢性リストにはどちらもない。だからウォークはそのままではリストではない。
打ち切り関数(Abbott et al. 2012)が欠けていた繋がり:ウォークが初めてその語に到達したときだけ、しかも動物なら報告する。それ以外は打ち切り(隠す)。
The walk visits animal → dog → house → dog → cat. Reported: dog, cat. house (not an animal) and the second dog (a revisit) are censored. The IRT to “cat” is the step-gap between first-hits, plus the word’s length.
ウォークは animal → dog → house → dog → cat を訪れる。報告:dog, cat。house(動物でない)と2回目のdog(再訪)は打ち切り。「cat」へのIRTは初到達間のステップ差 + 語長。
The famous optimal-foraging finding (Hills et al. 2012): line up each animal by when it appears relative to a category switch.
Marginal Value Theorem: leave a patch when its return rate drops below your overall average. People look like they’re foraging.
有名な最適採餌の発見(Hills et al. 2012):各動物をカテゴリ切り替えに対する位置で並べる。
限界価値定理:パッチの収益率が全体平均を下回ったら離れる。人は採餌しているように見える。
The censored random walk — one process, no switch rule — produces the same curve as humans: position 1 slowest, position 2 fastest. The “decision to switch” was never needed; it falls out of the network’s structure.
打ち切りランダムウォーク — 1つの過程、切り替え規則なし — が人間と同じ曲線を生む:位置1が最も遅く、位置2が最も速い。「切り替えの決定」は不要だった。ネットワークの構造から自然に出る。
The same structure + process split we’ve used since Marr (Week 2):
Structure + process jointly predict behavior — and they fit human data well, with no recall-specific machinery bolted on.
Marr 以来(第2週)使ってきた 構造 + 過程 の分け方:
構造 + 過程が行動を共同で予測 — しかも想起専用の仕掛けなしで人間データによく合う。

PageRank (the original Google algorithm) ranks pages by the stationary distribution of a random walk over the link graph — exactly the \(\pi\) from this morning, at web scale.
Griffiths, Steyvers & Firl (2007), Google and the mind: PageRank over a semantic network predicts human word-fluency. Same algorithm, same \(\pi\).
PageRank(元祖 Google アルゴリズム)は、リンクグラフ上のランダム ウォークの定常分布でページを順位付け — まさに今朝の \(\pi\) を、ウェブ規模で。
Griffiths, Steyvers & Firl (2007)『Google and the mind』: 意味 ネットワーク上の PageRank が人間の語の流暢性を予測する。同じアルゴリズム、同じ \(\pi\)。

Zemla, Gooding & Austerweil (2023): actual category-leave times track the MVT optimum almost exactly (46 ms apart).
And optimal switching is preserved with age — older adults switch less, but strategically, not from a deficit.
Zemla, Gooding & Austerweil (2023): 実際のカテゴリ離脱時間は MVT最適値をほぼ正確に追う(46 ms 差)。
そして最適な切り替えは加齢で保たれる — 高齢者はより少なく切り替えるが、 欠陥ではなく戦略的に。

So far: network → walk → fluency list. You can also run it backwards — given fluency lists, infer the most likely network (U-INVITE; Zemla & Austerweil 2018).
That makes the network a measurement instrument: estimate someone’s semantic network from a few fluency lists, then compare groups.
Tool: SNAFU — github.com/AusterweilLab/snafu-py
これまで:ネットワーク → ウォーク → 流暢性リスト。逆向きにも走らせられる — 流暢性リストから最尤ネットワークを推定(U-INVITE;Zemla & Austerweil 2018)。
これでネットワークは測定器になる:数本の流暢性リストから個人の意味ネットワークを推定し、群間比較できる。
ツール:SNAFU — github.com/AusterweilLab/snafu-py
Zemla & Austerweil (2019) estimated networks for 41 AD patients vs. healthy controls. Three structural differences point to an impaired representation — fewer associates per concept, more spurious links, less organized — measured from fluency lists alone. (A separate retrieval deficit — faulty monitoring of what’s already been said — shows up too.)
Zemla & Austerweil (2019) は41名のAD患者と健常対照のネットワークを推定。3つの構造的差異が表現の障害を示す — 概念あたりの連想が少なく、偽の結合が多く、組織化が低い — 流暢性リストだけから測定。(別の検索の障害 — 既出項目の追跡の不全 — も現れる。)
Look back at the day:
We were estimating a distribution by sampling — that’s Monte Carlo.
今日を振り返ると:
私たちはサンプリングで分布を推定していた — それがモンテカルロ。
Monte Carlo — and we flip the problem.
Today the chain came first and we found its stationary distribution. Next week we reverse it: start with a target distribution we want to sample (e.g. a Bayesian posterior), and design a Markov chain whose stationary distribution is that target.
That’s Markov chain Monte Carlo (MCMC) — and it leads to a wild idea: people may sample from their own posteriors (MCMC with People).
Required reading + presenter on the readings page.
モンテカルロ — そして問題を反転する。
今日は連鎖が先にあり、その定常分布を求めた。来週は逆:サンプリング したい目標分布(例:ベイズ事後分布)から始め、その目標を定常分布に持つ マルコフ連鎖を設計する。
それがマルコフ連鎖モンテカルロ(MCMC) — そしてとんでもない 発想へ:人は自分の事後分布からサンプリングしているかもしれない(MCMC with People)。
必須リーディングと発表者はリーディングのページに。