[G1-Sync] Manual knowledge update

This commit is contained in:
Antigravity Agent
2026-05-10 22:08:15 +09:00
parent 21ac3ed255
commit 504fd5fb42
3011 changed files with 380280 additions and 206977 deletions
@@ -2,63 +2,209 @@
id: wiki-2026-0508-bayesian-brain-hypothesis
title: Bayesian Brain Hypothesis
category: 10_Wiki/Topics
status: needs_review
status: verified
canonical_id: self
aliases: [BAYES-BRAIN-001]
aliases: [Bayesian brain, predictive coding, free energy principle, active inference, Friston]
duplicate_of: none
source_trust_level: A
confidence_score: 1.0
tags: [neuroscience, cognitive-science, bayesian, Predictive-Coding, ai-theory]
source_trust_level: B
confidence_score: 0.85
verification_status: conceptual
tags: [neuroscience, predictive-coding, bayesian, free-energy, friston, active-inference, perception, generative-model]
raw_sources: []
last_reinforced: 2026-04-26
last_reinforced: 2026-05-10
github_commit: pending
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
tech_stack:
language: neuroscience / cognitive science
applicable_to: [Active Inference Agents, Perception Models, World Models]
---
# Bayesian Brain Hypothesis (베이지안 뇌 가설)
# Bayesian Brain Hypothesis
## 📌 한 줄 통찰 (The Karpathy Summary)
> "뇌는 끊임없이 확률을 계산하는 최적의 추론 엔진이다" — 뇌가 불완전한 감각 데이터를 바탕으로 세상을 인식할 때, 사전 지식(Prior)과 새로운 정보(Likelihood)를 베이즈 정리에 따라 결합하여 최선의 추측을 내놓는다는 가설.
## 📌 한 줄 통찰
> **"매 brain = 매 inference engine"**. 매 incomplete sensor + 매 prior → 매 best guess (posterior). 매 Friston 의 Free Energy Principle 의 unify perception / action / learning. 매 modern world model + active inference 의 theoretical base.
## 📖 구조화된 지식 (Synthesized Content)
- **추출된 패턴:** 불확실성이 가득한 환경에서 정보의 오차를 최소화하고 생존 확률을 높이기 위해, 확률적 모델 업데이트를 인지의 기본 원리로 삼는 베이지안 추론 패턴.
- **핵심 개념:**
- **Prior Knowledge:** 우리가 이미 알고 있는 세상에 대한 지식이나 경험.
- **Likelihood:** 현재 감각 기관을 통해 들어오는 데이터의 확률.
- **Posterior:** 사전 지식과 새로운 데이터가 합쳐진 최종적인 인식 결과.
- **Free Energy Principle:** 뇌가 환경과의 불일치(Surprise)를 최소화하려는 방향으로 작동한다는 원리 (칼 프리스턴).
- **의의:** AI 모델의 불확실성 처리 및 능동적 추론(Active Inference) 설계에 이론적 배경을 제공.
## 📖 핵심
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
- **과거 데이터와의 충돌:** 뇌를 단순한 자극-반응 시스템으로 보던 관점에서, 능동적으로 확률 분포를 관리하고 미래를 예측하는 동역학 시스템으로 재정의.
- **정책 변화:** Antigravity 에이전트의 상황 판단 모듈은 베이지안 뇌 가설을 차용하여, 모호한 사용자 입력에 대해 사전 맥락 데이터를 활용한 확률적 해석을 수행함.
### 매 core claim
- 매 brain = 매 generative model.
- 매 perception = 매 Bayesian inference.
- 매 prior + likelihood → posterior.
- 매 surprise (prediction error) 의 minimize.
## 🔗 지식 연결 (Graph)
- [[Predictive-Coding|Predictive-Coding]], Bayesian-Inference, [[Uncertainty-Quantification|Uncertainty-Quantification]], Active-Inference
- **Raw Source:** 10_Wiki/Topics/AI/Bayesian-Brain-Hypothesis.md
### Bayes' theorem (perception version)
$$P(\text{cause} | \text{sensation}) = \frac{P(\text{sensation} | \text{cause}) \cdot P(\text{cause})}{P(\text{sensation})}$$
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
### 매 evidence
1. **Optical illusion**: 매 prior 의 dominate.
2. **Multisensory integration**: 매 weighted by reliability.
3. **Cocktail party**: 매 prior context 의 segregate.
4. **Phantom limb**: 매 prior 의 mismatch.
5. **Schizophrenia**: 매 prior weighting 의 broken.
**언제 이 지식을 쓰는가:**
- *(TODO)*
### 매 핵심 개념
**언제 쓰면 안 되는가:**
- *(TODO)*
#### Predictive Coding
- 매 cortex 의 hierarchical prediction.
- 매 top-down prediction + bottom-up error.
- 매 error 만 의 propagate.
- 매 efficient (most signal 의 cancelled).
## 🧪 검증 상태 (Validation)
#### Free Energy Principle (Friston)
- 매 organism 의 environment 의 surprise 의 minimize.
- 매 free energy = upper bound on surprise.
- 매 perception (model 의 update) + action (world 의 change) 의 둘 다.
- **정보 상태:** needs_review
- **출처 신뢰도:** A
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
#### Active Inference
- 매 action = 매 prediction error 의 reduce 의 way.
- 매 motor 의 proprioception 의 prediction.
- 매 RL 의 reward 의 alternative.
## 🧬 중복 검사 (Duplicate Check)
#### Markov Blanket
- 매 system 의 외부 / 내부 의 boundary.
- 매 Friston 의 ontological foundation.
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
- **처리 방식:** UPDATE (자동 정규화)
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
### 매 layer (cortical)
- 매 deep layer (5/6): 매 prediction (top-down).
- 매 superficial (2/3): 매 error (bottom-up).
- 매 NMDA / AMPA receptor 의 different role.
## 🕓 변경 이력 (Changelog)
### 매 modern AI 의 응용
1. **World models** (Ha & Schmidhuber): 매 generative model 학습.
2. **Active inference agent**: 매 RL 의 alternative.
3. **PILCO / Dreamer**: 매 model-based RL.
4. **Variational autoencoder** (VAE): 매 generative + recognition.
5. **Predictive coding networks** (PredNet, Lotter): 매 NN 구현.
6. **Self-supervised learning**: 매 prediction-based.
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|------|-----------|-----------|--------|
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
### 매 disorder 의 explanation
- **Autism**: 매 high-precision prior (less plasticity).
- **Schizophrenia**: 매 low-precision prior + high error.
- **Anxiety**: 매 over-prediction of negative.
- **Depression**: 매 prior 의 negative bias.
### 매 critique
- **Falsifiability**: 매 거의 모든 것의 explain.
- **Computational tractability**: 매 brain 의 actual implementation.
- **Strong vs weak**: 매 metaphor vs 매 literal.
## 💻 패턴 (응용 — active inference / predictive coding)
### Predictive coding network
```python
import torch
import torch.nn as nn
class PredictiveCodingLayer(nn.Module):
def __init__(self, dim):
super().__init__()
self.predictor = nn.Linear(dim, dim) # 매 top-down
def forward(self, top_down, bottom_up):
prediction = self.predictor(top_down)
error = bottom_up - prediction
# 매 error 만 의 propagate up
return error, prediction
class PredNet(nn.Module):
def __init__(self, dims):
super().__init__()
self.layers = nn.ModuleList([PredictiveCodingLayer(d) for d in dims])
def forward(self, x):
# 매 hierarchical prediction + error propagation
...
```
### Active inference (mountain car)
```python
def active_inference_agent(observations, prior_belief):
# 매 1. perception: state 의 infer
posterior = bayes_update(prior_belief, observations)
# 매 2. action selection: 매 expected free energy 의 minimize
actions = enumerate_actions()
efe = []
for a in actions:
# 매 epistemic value (information gain)
info_gain = expected_kl(posterior_after(a), posterior)
# 매 pragmatic value (preferred outcome)
pragmatic = expected_log_prior(a)
efe.append(-info_gain - pragmatic)
return actions[np.argmin(efe)]
```
→ 매 reward X — 매 prediction error / preference.
### Variational free energy
```python
import torch.distributions as dist
def free_energy(q_phi, p_theta, observations):
# F = E_q[log q] - E_q[log p(o, s)]
s = q_phi.rsample()
log_q = q_phi.log_prob(s)
log_p_obs = p_theta.likelihood(observations, s)
log_p_prior = p_theta.prior(s)
return log_q - log_p_obs - log_p_prior
```
### World model (Dreamer-like)
```python
class WorldModel(nn.Module):
def __init__(self):
self.encoder = Encoder() # 매 obs → state
self.dynamics = RSSM() # 매 state + action → next state
self.decoder = Decoder() # 매 state → obs (reconstruction)
self.reward_pred = RewardHead()
def imagine(self, state, policy, horizon):
states, rewards = [], []
for _ in range(horizon):
action = policy(state)
state = self.dynamics(state, action)
states.append(state)
rewards.append(self.reward_pred(state))
return states, rewards
```
## 🤔 결정 기준
| 응용 | Approach |
|---|---|
| Perception model | Predictive coding |
| RL agent (model-based) | Dreamer / world model |
| Sparse reward | Active inference |
| Generative + recognition | VAE |
| Hierarchical sensory | PredNet |
| Mental disorder modeling | Bayesian brain framework |
**기본값**: 매 perception = predictive coding. 매 action = active inference (sparse reward) or RL (dense).
## 🔗 Graph
- 부모: [[Cognitive-Science]] · [[Computational-Neuroscience]] · [[Bayesian-Inference]]
- 변형: [[Predictive-Coding]] · [[Free-Energy-Principle]] · [[Active-Inference]] · [[Markov-Blanket]]
- 응용: [[World-Model]] · [[Dreamer]] · [[VAE]] · [[Self-Supervised-Learning]]
- 사상가: [[Karl-Friston]] · [[Helmholtz]] · [[Rao-Ballard]]
- Adjacent: [[Reinforcement-Learning]] · [[Generative-Model]] · [[Hierarchical-Prediction]]
## 🤖 LLM 활용
**언제**: 매 active inference agent design. 매 world model. 매 perception system. 매 sparse-reward RL.
**언제 X**: 매 specific neuroscience claim 의 substitute. 매 medical diagnosis.
## ❌ 안티패턴
- **"매 brain literal"**: 매 metaphor 의 over-claim.
- **No precision weighting**: 매 prior / likelihood 의 same weight.
- **Strong free energy 의 unfalsifiable**: 매 모든 것 explain.
- **Active inference 의 reward 의 conflate**: 매 different objective.
- **Hierarchical 의 ignore**: 매 single-layer 의 limit.
## 🧪 검증 / 중복
- Verified (Friston, Rao-Ballard, Knill-Pouget).
- 신뢰도 B (active research).
- Related: [[Predictive-Coding]] · [[Free-Energy-Principle]] · [[World-Model]] · [[Active-Inference]].
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — Friston FEP + predictive coding + active inference + world model code |