Files
2nd/10_Wiki/Topic_Programming/AI_and_ML/Bayesian-Brain-Hypothesis.md
T
Antigravity Agent 9148c358d0 docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를
Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류.

- 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로
  자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거,
  동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거.
- 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming,
  Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business,
  Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로,
  나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는
  title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백).
  원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지.
- 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서.
- 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는
  지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지.
- Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경.
- 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
2026-07-05 00:33:48 +09:00

7.3 KiB

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit tech_stack
wiki-2026-0508-bayesian-brain-hypothesis Bayesian Brain Hypothesis 10_Wiki/Topics verified self
Bayesian brain
predictive coding
free energy principle
active inference
Friston
none B 0.85 conceptual
neuroscience
predictive-coding
bayesian
free-energy
friston
active-inference
perception
generative-model
2026-05-10 pending
language applicable_to
neuroscience / cognitive science
Active Inference Agents
Perception Models
World Models

Bayesian Brain Hypothesis

📌 한 줄 통찰

"매 brain = 매 inference engine". 매 incomplete sensor + 매 prior → 매 best guess (posterior). 매 Friston 의 Free Energy Principle 의 unify perception / action / learning. 매 modern world model + active inference 의 theoretical base.

📖 핵심

매 core claim

  • 매 brain = 매 generative model.
  • 매 perception = 매 Bayesian inference.
  • 매 prior + likelihood → posterior.
  • 매 surprise (prediction error) 의 minimize.

Bayes' theorem (perception version)

P(\text{cause} | \text{sensation}) = \frac{P(\text{sensation} | \text{cause}) \cdot P(\text{cause})}{P(\text{sensation})}

매 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.

매 핵심 개념

Predictive Coding

  • 매 cortex 의 hierarchical prediction.
  • 매 top-down prediction + bottom-up error.
  • 매 error 만 의 propagate.
  • 매 efficient (most signal 의 cancelled).

Free Energy Principle (Friston)

  • 매 organism 의 environment 의 surprise 의 minimize.
  • 매 free energy = upper bound on surprise.
  • 매 perception (model 의 update) + action (world 의 change) 의 둘 다.

Active Inference

  • 매 action = 매 prediction error 의 reduce 의 way.
  • 매 motor 의 proprioception 의 prediction.
  • 매 RL 의 reward 의 alternative.

Markov Blanket

  • 매 system 의 외부 / 내부 의 boundary.
  • 매 Friston 의 ontological foundation.

매 layer (cortical)

  • 매 deep layer (5/6): 매 prediction (top-down).
  • 매 superficial (2/3): 매 error (bottom-up).
  • 매 NMDA / AMPA receptor 의 different role.

매 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.

매 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

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)

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

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)

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

🤖 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.

🧪 검증 / 중복

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — Friston FEP + predictive coding + active inference + world model code