Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion docs/papers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ GraphLM 의 핵심 패러다임은 **training-time dynamic parameter count** (
| `graph/`, `hybrid/` (기존 8편) | **data-as-graph** | **Baseline reference 보존** — 직접 채택 대상 아님. "데이터를 graph 로" 의 비교군. |
| `computation-graph/` (sparse activation 6편) | **computation-as-graph (sparse activation 위주)** | **부분적 reference** — MoE/MoD/UT 6편은 \"고정 총량 + 동적 활성\" 이라 본 프로젝트 1순위가 아님. AutoFormer (NAS) / GHN-3 (arch-as-graph) 는 architecture-as-graph 측면 보조 정렬. |
| `computation-graph/` (dynamic param 22편 + function-level dynamic 7편) ⭐ | **training-time dynamic param count (THIS)** | **1순위 큐레이션** — Growing Networks (5) / DST (5) / DARTS (1) / Adaptive Trigger (5) / Resource·Deployment (6) / **Function-level dynamic (7 신규)** |
| `energy-based/` (5편) | **graph energy reference** | **historical foundation** — Boltzmann machine / RBM / DBN / DBM 의 *graph edge weight 학습* 시초. paradigm 의 `HybridGraphLinear` dual-gated edge 와 구조적 등가성. |
| `lm/` (미사용) | LM 일반 | 필요 시 활성화 |

신규 논문 요약 추가 시 **dynamic parameter count 계열** (Growing / DST / DARTS) 을 우선한다. sparse activation (MoE 류) 와 data-as-graph 는 둘 다 reference 자료 — 직접적 baseline 가치가 명확할 때만 추가.
Expand All @@ -27,7 +28,9 @@ docs/papers/
├── _template.md # 신규 요약 시 복사할 표준 템플릿
├── graph/ # 순수 그래프 방법 (GCN, GAT, GraphSAGE 등)
├── lm/ # 순수 언어 모델 (BERT, GPT, T5 등)
└── hybrid/ # 그래프 + LM 결합 / multimodal
├── hybrid/ # 그래프 + LM 결합 / multimodal
├── computation-graph/ # computation-as-graph (sparse activation + dynamic param count + function-level)
└── energy-based/ # graph energy 표현 (Boltzmann machine, RBM, DBN, DBM)
```

신규 카테고리가 필요하면 같은 깊이로 디렉토리를 추가하고 본 README 의 표를 갱신한다.
Expand Down Expand Up @@ -195,6 +198,18 @@ docs/papers/
| [computation-graph/2021-modular-transformer-csordas.md](computation-graph/2021-modular-transformer-csordas.md) | 2021 | Are Neural Nets Modular? | Differentiable weight mask 로 Transformer functional modularity 정량 측정 (post-hoc) |
| [computation-graph/2018-modular-networks-kirsch.md](computation-graph/2018-modular-networks-kirsch.md) | 2018 | Modular Networks | Hard routing + 학습 가능 (Gumbel-Softmax) — emergent specialization |

### Energy-based (graph energy reference, historical foundation)

> Boltzmann machine 계열의 *graph edge weight 학습* 시초 — `HybridGraphLinear` 의 `adj_outer · adj_inner · W` 의 dual-gated edge 와 구조적 등가성. paradigm 의 *graph energy 표현* + *layer-wise progressive growth* 의 historical roots.

| 파일 | 연도 | 모델/방법 | 한줄 요약 |
|---|---|---|---|
| [energy-based/1985-boltzmann-machine-hinton.md](energy-based/1985-boltzmann-machine-hinton.md) | 1985 | Boltzmann Machine | Stochastic graph energy model — `E = -Σ w_ij s_i s_j` + Gibbs sampling + contrastive update (positive/negative phase) |
| [energy-based/1986-harmony-theory-smolensky.md](energy-based/1986-harmony-theory-smolensky.md) | 1986 | Harmonium (RBM 원조) | Bipartite restricted BM, conditional independence 활용 — paradigm 의 bipartite directed graph 와 등가 구조 |
| [energy-based/2002-contrastive-divergence-hinton.md](energy-based/2002-contrastive-divergence-hinton.md) | 2002 | Contrastive Divergence (CD-1) | RBM 실용 학습 breakthrough — k-step Markov chain 으로 negative phase 근사. "biased but practical" 의 historical 시조 |
| [energy-based/2006-dbn-hinton.md](energy-based/2006-dbn-hinton.md) | 2006 | Deep Belief Network | Layer-wise greedy pre-training + variational bound 보장 — 딥러닝 부활 catalyst, Phase 16 후보 (Net2Net/LiGO) 의 historical precursor |
| [energy-based/2009-dbm-salakhutdinov.md](energy-based/2009-dbm-salakhutdinov.md) | 2009 | Deep Boltzmann Machine | 모든 layer 가 undirected RBM — Phase 14 의 full graph block 과 구조적 등가, Phase 17 (layer-wise 차등 prune) 의 motivation |

## 작성 원칙

- **요약은 자기 언어로** — 논문 abstract 복붙 금지. 본인이 이해한 표현으로 재기술
Expand Down
95 changes: 95 additions & 0 deletions docs/papers/energy-based/1985-boltzmann-machine-hinton.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
title: "A Learning Algorithm for Boltzmann Machines"
authors: "Ackley, D. H., Hinton, G. E., & Sejnowski, T. J."
year: 1985
venue: "Cognitive Science, 9(1): 147-169"
url: "https://www.cs.toronto.edu/~hinton/absps/cogscibm.pdf"
doi: "10.1207/s15516709cog0901_7"
tags: ["energy-based", "boltzmann-machine", "stochastic", "graph-energy", "gibbs-sampling"]
status: "draft"
cited_in: []
---

# Boltzmann Machine (BM) — 원조 energy-based stochastic network

## TL;DR (3줄)

- 노드가 binary stochastic unit 인 fully-connected graph 위에서 energy minimization 으로 학습하는 generative model — Hopfield network 의 stochastic 확장.
- Simulated annealing 으로 visible/hidden unit 의 결합 분포를 학습, Gibbs sampling 기반 contrastive update rule (positive/negative phase).
- 학습 신호 = data-clamped state 와 free-running state 의 통계 차이. 1980 년대 neural network 의 graph energy 학습 방법론 확립.

## 핵심 기여

- **Stochastic neural network 정식화**: deterministic Hopfield (1982) 의 일반화. unit 이 `s_i ∈ {0, 1}` 인데 결정값이 아니라 확률적 (`P(s_i = 1) = σ(net_i / T)`).
- **Energy function**: `E(s) = -Σ_{i<j} w_ij s_i s_j - Σ_i b_i s_i`. graph 의 edge weight `w_ij` 가 학습 대상.
- **Boltzmann distribution**: `P(s) ∝ exp(-E(s) / T)` — 학습 목표가 데이터의 marginal 분포를 모델 분포에 매칭.
- **Contrastive learning rule**: `Δw_ij ∝ ⟨s_i s_j⟩_data - ⟨s_i s_j⟩_model` — positive phase (data clamped) vs negative phase (free running) 의 차이.
- **Hidden units 도입** — visible 만 있던 Hopfield 대비 표현력 확장.

## 방법 요약

- 데이터: binary patterns (당시 toy problems — encoder/decoder, parity 등)
- 모델: fully-connected undirected graph (`N` units, weights symmetric `w_ij = w_ji`)
- 학습:
- **Simulated annealing** 으로 temperature `T` 를 점진적으로 낮추며 thermal equilibrium 도달
- Positive phase: visible unit clamped to data, hidden unit 들이 equilibrium 으로 수렴 → `⟨s_i s_j⟩_data` 측정
- Negative phase: 모든 unit free, equilibrium 도달 → `⟨s_i s_j⟩_model` 측정
- Weight update: `Δw_ij = η (⟨s_i s_j⟩_data - ⟨s_i s_j⟩_model)`
- 핵심 수식:
$$ E(s) = -\sum_{i<j} w_{ij} s_i s_j - \sum_i b_i s_i $$
$$ P(s) = \frac{\exp(-E(s)/T)}{Z}, \quad Z = \sum_{s'} \exp(-E(s')/T) $$

## 실험 / 결과

- 벤치마크: encoder/decoder task (4-2-4, 8-3-8 patterns), shifter task, parity check
- 주요 수치: 작은 toy 문제에서 hidden unit 활용한 internal representation 학습 성공 입증
- 재현성 메모: 1985 hardware 한계로 모든 결과가 매우 작은 scale. 본 논문의 의의는 framework 자체이지 수치적 SOTA 가 아님

## 한계 / 비판적 시각

- **계산 비용 막대**: 매 weight update 마다 simulated annealing 2 phase 실행 필요 → 사실상 큰 network 에 불가능
- **Equilibrium 가정의 비현실성**: 실제 simulation 에서 true equilibrium 도달 어려움 → 학습 instability
- **fully-connected 라 scale 안 됨**: weight matrix `O(N²)`
- 이 한계들이 17 년 후 Hinton 2002 (Contrastive Divergence) 로 일부 해결, Smolensky 1986 (RBM) 로 connectivity 제약 도입
- **딥러닝 발전 과정에서 한동안 잊혀짐** — 2006 DBN 으로 재부활 (Hinton+Osindero+Teh)

## 본 프로젝트 시사점

> GraphLM 의 paradigm 과 **graph energy 표현의 직접 선조**.

### graph energy 표현의 구조적 유사성

| Boltzmann Machine | GraphLM `HybridGraphLinear` |
|---|---|
| `E = -Σ w_ij s_i s_j` (energy via edge weights) | `eff_w = adj_outer · adj_inner · W` (effective edge weight) |
| graph 의 모든 edge `w_ij` 가 학습 대상 | edge magnitude 가 학습 대상 (adj_outer, adj_inner) |
| symmetric undirected graph | directed bipartite (input → output channels) |
| binary stochastic units | continuous deterministic units (Transformer hidden) |
| Boltzmann distribution 학습 | gradient descent 로 loss 최소화 |

- **공통점**: graph edge weight 가 학습 대상이라는 핵심 — paradigm 의 magnitude rule (≈ 1.0 sweet spot) 의 historical motivation.
- **차이점**: BM 은 stochastic + sampling-based, paradigm 은 deterministic + gradient-based. BM 의 contrastive update 가 explicit `⟨s_i s_j⟩` 통계인 반면, paradigm 의 backprop 은 chain rule 의 implicit 통계 추정.

### dynamic 위상 변화의 BM 관점

- Phase 15 의 edge prune (mask=0) 은 BM 에서 `w_ij = 0` (edge 자체 제거) 과 등가 — 두 unit 사이 contribution 정확히 0. (`w_ij → -∞` 는 다른 동작 — 두 unit 동시 1 강하게 억제하는 강한 음의 interaction 이라 prune 과 별개.)
- BM 의 학습은 energy landscape 의 모양 자체를 학습 — paradigm 의 *topology + magnitude 동시 학습* 의 mathematical precursor.
- **차용할 아이디어**: BM 의 positive/negative phase 의 contrastive 통계 → paradigm 에서 *학습된 connectivity 의 importance metric* 으로 활용 가능 (어떤 edge 가 data-driven activity 와 prior activity 의 차이가 큰가).

### 채택하지 않을 부분

- Sampling-based learning 자체는 paradigm 에 도입하지 않음 — Transformer 의 deterministic forward 와 mismatch.
- Symmetric weight 제약도 부적합 (Transformer 는 asymmetric directed).

### 후속 실험 가설

- BM 의 `⟨s_i s_j⟩_data - ⟨s_i s_j⟩_model` 통계와 유사한 *adj importance metric* 을 정의해 Phase 15 prune 의 magnitude 기준 외 대안 평가 — 학습 동안 활성도 차이가 큰 edge 우선 보존.

## 참고 / 인용

- 공식 코드: 1985 paper, 코드 없음
- 관련 논문:
- [Smolensky 1986 (RBM 원조)](1986-harmony-theory-smolensky.md)
- [Hinton 2002 (CD-1)](2002-contrastive-divergence-hinton.md)
- Hopfield 1982 (deterministic 전신, 외부 reference)
- 본 프로젝트 내 인용 위치: paradigm reference (cited_in 비어있음, 향후 사용 시 갱신)
91 changes: 91 additions & 0 deletions docs/papers/energy-based/1986-harmony-theory-smolensky.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
title: "Information Processing in Dynamical Systems: Foundations of Harmony Theory"
authors: "Smolensky, P."
year: 1986
venue: "Parallel Distributed Processing, Vol. 1, Chapter 6 (MIT Press)"
url: "https://stanford.edu/~jlmcc/papers/PDP/Volume%201/Chap6_PDP86.pdf"
tags: ["energy-based", "rbm-origin", "harmonium", "bipartite", "restricted-boltzmann"]
status: "draft"
cited_in: []
---

# Harmonium (RBM 원조) — bipartite restricted Boltzmann machine

## TL;DR (3줄)

- "Harmonium" 이라는 bipartite stochastic network 제안 — visible layer 와 hidden layer 의 connection 만 허용, 같은 layer 안 connection 금지 (= 후일 RBM).
- 인지과학 framework "harmony theory" 의 일환 — 표현의 *harmony* (= 음의 energy) 를 최대화.
- BM (Hinton+Sejnowski 1985) 의 fully-connected 한계를 bipartite 제약으로 완화 → conditional independence 활용한 효율적 inference 의 수학적 기반 제공.

## 핵심 기여

- **Bipartite restricted Boltzmann machine 정식화**: visible `v ∈ {0,1}^V` ↔ hidden `h ∈ {0,1}^H`, weights `W ∈ R^{V×H}`, intra-layer connection 없음.
- **Harmony function** = `-E(v, h) = Σ_ij w_ij v_i h_j + Σ_i a_i v_i + Σ_j b_j h_j`
- **Conditional independence**: bipartite 구조 덕분에 `P(h | v) = ∏_j P(h_j | v)`, `P(v | h) = ∏_i P(v_i | h)` — Gibbs sampling 한 step 이 한 layer 전체 병렬 가능.
- **인지과학적 motivation**: 인간의 perception/cognition 을 "전반적 harmony 최대화" 로 설명하는 connectionist framework.

## 방법 요약

- 데이터: cognitive task 예시 (linguistic / perceptual patterns)
- 모델: 2-layer bipartite undirected graph
- visible `v` (data dimension)
- hidden `h` (latent feature)
- weight `W` (only cross-layer)
- 학습: 본 chapter 는 framework 정의가 주, 직접적 학습 알고리즘 제시 없음. BM 의 positive/negative phase contrastive 규칙 (Hinton+Sejnowski 1985) 이 자연 적용 가능하나 계산 비용 막대. 실용적 RBM 학습은 후일 Hinton 2002 의 contrastive divergence (CD-1) 로 가능해짐.
- 핵심 수식:
$$ E(v, h) = -v^\top W h - a^\top v - b^\top h $$
$$ P(v, h) = \frac{\exp(-E(v, h))}{Z}, \quad P(h_j = 1 | v) = \sigma(W_{:j}^\top v + b_j) $$

## 실험 / 결과

- 인지과학 framework 위주 — 양적 벤치마크보다 정성적 설명력 강조
- 실용적 학습은 후속 연구로 위임됨 (Hinton 2002 의 CD-1 이 RBM 학습의 critical breakthrough)
- 1986 당시에는 큰 impact 못 받았으나 2000년대 RBM 부활과 함께 historical foundation 으로 재조명

## 한계 / 비판적 시각

- **학습 알고리즘 부재**: 이론적 framework 만 제시, 실용적 weight update rule 없음 → 17 년간 RBM 은 거의 사용되지 않음
- **인지과학 framework 의 모호성**: harmony theory 의 더 큰 ambition (cognition 통합) 은 후속 입증 못 함
- **연결성 제약의 cost**: bipartite 제약으로 BM 대비 표현력 감소 (intra-layer correlation 표현 불가)
- 이 한계를 stack 으로 보완한 것이 후일 DBN (Hinton+Osindero+Teh 2006)

## 본 프로젝트 시사점

> Paradigm 의 **bipartite/layer-restricted graph 구조** 와 직접 정렬 — `HybridGraphLinear` 의 input ↔ output channel 도 정확히 RBM 의 v ↔ h 와 같은 bipartite topology.

### 구조적 등가성

| Harmonium / RBM | GraphLM `HybridGraphLinear` |
|---|---|
| visible `v` ∈ {0,1}^V | input channel `x` ∈ R^{in_features} |
| hidden `h` ∈ {0,1}^H | output channel `y` ∈ R^{out_features} |
| weight `W` ∈ R^{V×H}, bipartite | weight `W` 와 dual adj — bipartite directed |
| `P(h | v)` factorizes (conditional independence) | forward 가 explicit `y = f(W, x)` |
| `P(v, h) ∝ exp(-E)` | (deterministic, energy 직접 정의 없음) |

- **공통점**: bipartite topology 라 inter-layer routing 만 학습. paradigm 의 layer-by-layer Transformer block 도 같은 패턴.
- **차이점**: RBM 은 undirected joint distribution, paradigm 은 directed conditional mapping.

### 차용 가능 아이디어

- **Conditional independence trick**: RBM 의 layer-wise parallelism 은 modern Transformer 의 layer-by-layer forward 와 본질적으로 같은 효율성 패턴.
- **Energy 관점**: paradigm 의 forward `y = (adj_outer · adj_inner · W) · x` 를 energy 관점으로 재해석하면 — *low-energy state = high prediction probability* 의 해석 framework 가 RBM 으로부터 유도 가능.

### Phase 15 prune 의 RBM 해석

- Phase 15 의 edge prune 은 RBM 에서 특정 `(v_i, h_j)` connection 의 `w_ij → 0` 과 등가.
- RBM 학습 후 작은 `|w_ij|` edge 는 contribution 미미 → "자연 sparsity 등장 가능" 의 historical 증거 (DBN 연구에서 확인됨).
- 본 paradigm 의 *30% almost-free prune 구간* 은 RBM 의 low-magnitude weight 자연 발생과 mathematical 일치.

### 후속 실험 가설

- RBM 의 pre-training 패러다임 (DBN stack 학습) 처럼, paradigm 에서도 *layer-wise progressive growth + prune* 이 효과적일 가능성 — Phase 16 후보 (RigL/Net2Net) 의 historical foundation.

## 참고 / 인용

- 공식 코드: 1986 paper, 코드 없음 (이론적 framework)
- 관련 논문:
- [BM 원조 (Hinton+Sejnowski 1985)](1985-boltzmann-machine-hinton.md)
- [CD-1 (Hinton 2002)](2002-contrastive-divergence-hinton.md) — RBM 실용 학습
- [DBN (Hinton+Osindero+Teh 2006)](2006-dbn-hinton.md) — RBM stack
- 본 프로젝트 내 인용 위치: paradigm bipartite reference (향후)
Loading
Loading