← Playground← 놀이터

PRISM · Statistical-Mechanics PlaygroundPRISM · 통계역학 놀이터

Predictive Coding & Free Energy예측 부호화와 자유 에너지
A hierarchy that perceives by minimizing precision-weighted prediction error정밀도로 가중된 예측오차를 최소화하며 지각하는 위계 구조

The brain never sees the world directly — it predicts its sensory input from internal causes and only transmits the error. Inference is gradient descent on a variational free energy F = ½ Σ Π·ε², and each error is weighted by its precision Π. Slide the precisions to feel perception tip between what the senses say and what the prior expects.뇌는 세계를 직접 보지 않는다 — 내부 원인으로부터 감각 입력을 예측하고 오차만 전달한다. 추론은 변분 자유 에너지 F = ½ Σ Π·ε²에 대한 경사 하강이며, 각 오차는 그 정밀도 Π로 가중된다. 정밀도를 움직여 지각이 감각과 사전 기대 사이에서 어떻게 기우는지 느껴보라.

Hierarchy · predictions ↓   prediction errors ↑위계 · 예측 ↓   예측오차 ↑ φ̇ = ξ_below − ξ_above
sensory x감각 x belief φ₁ (feature)믿음 φ₁ (특징) belief φ₂ (cause)믿음 φ₂ (원인) prior m사전 m error unit ξ오차 유닛 ξ
Free-energy landscape over φ₁φ₁에 대한 자유 에너지 지형 the belief rolls downhill믿음이 골짜기로 굴러간다
Sensory input vs beliefs over time시간에 따른 감각 입력 vs 믿음
past과거time →시간 →now현재
Controls제어판
Sensory precision Π₀감각 정밀도 Π₀ trust in the senses감각에 대한 신뢰 4.0
Intermediate precision Π₁중간 정밀도 Π₁ feature ↔ cause link특징 ↔ 원인 연결 2.0
Prior precision Π₂사전 정밀도 Π₂ strength of expectation기대의 강도 2.0
Prior mean m사전 평균 m what you expect기대하는 값 0.00
True cause v참 원인 v the world세계 1.50
World noise σ세계 잡음 σ sampling spread of xx의 표집 산포 0.25
Run, then raise Π₀ to pull the belief onto the data, or Π₂ to pull it onto the prior.실행한 뒤 Π₀를 올리면 믿음이 데이터로, Π₂를 올리면 사전으로 끌려간다.
Measurements측정값 Updating
free energy F자유 에너지 F
total error Σξ²총 오차 Σξ²
belief φ₁믿음 φ₁
belief φ₂믿음 φ₂
sensory PE ξ₀감각 오차 ξ₀
posterior φ₁* (exact)사후 φ₁* (정확)
Things to try해볼 것들
  1. Precision-weighted percept: set v and m far apart, then trade Π₀ against Π₂φ₁* lands at the precision-weighted average.정밀도 가중 지각: vm을 멀리 벌린 뒤 Π₀Π₂를 맞바꿔 보라 — φ₁*가 정밀도 가중 평균에 놓인다.
  2. Surprise: hit and watch the error units flare, F spike, then the belief chase the new input down the bowl.놀람: 를 눌러 오차 유닛이 확 타오르고 F가 치솟은 뒤, 믿음이 새 입력을 따라 골짜기로 내려가는 것을 보라.
  3. Strong prior illusion: crank Π₂ high with low Π₀ — perception clamps to the expectation even when the data disagrees.강한 사전의 착시: Π₀는 낮추고 Π₂를 크게 — 데이터가 달라도 지각이 기대에 고정된다.
  4. Hierarchy: lower Π₁ and the cause φ₂ decouples from the feature φ₁ — each level explains what it can.위계: Π₁을 낮추면 원인 φ₂가 특징 φ₁에서 분리된다 — 각 층이 설명할 수 있는 만큼 설명한다.
  5. Stream: turn Stream on to feed fresh noisy samples and watch beliefs filter the signal in real time.스트림: 스트림을 켜서 잡음 섞인 새 표본을 계속 넣고, 믿음이 신호를 실시간으로 걸러내는 것을 보라.

Free energy = prediction error자유 에너지 = 예측오차

Under a Gaussian model the variational free energy is F = ½ Σᵢ Πᵢ εᵢ² (plus constants), where εᵢ is a prediction error and Πᵢ its precision. Perception is gradient descent φ̇ = −∂F/∂φ, so each belief moves until the error it sends up balances the error it receives from below: ξ₀ = ξ₁ = ξ₂.가우시안 모형에서 변분 자유 에너지는 F = ½ Σᵢ Πᵢ εᵢ²(상수 제외)이며, εᵢ는 예측오차, Πᵢ는 그 정밀도다. 지각은 경사 하강 φ̇ = −∂F/∂φ이므로, 각 믿음은 위로 보내는 오차와 아래에서 받는 오차가 균형을 이룰 때까지 이동한다: ξ₀ = ξ₁ = ξ₂.

Precision = gain / attention정밀도 = 이득 / 주의

The stable belief is a Π-weighted average of sensory data and prior: φ₁* = (Π₀x + Π₁φ₂)/(Π₀+Π₁). Precision is exactly the synaptic gain on each error channel — the computational stand-in for attention. Turn it up and that channel dominates the percept.안정된 믿음은 감각 데이터와 사전의 Π-가중 평균이다: φ₁* = (Π₀x + Π₁φ₂)/(Π₀+Π₁). 정밀도는 각 오차 채널의 시냅스 이득에 정확히 대응하며, 주의의 계산적 대응물이다. 이를 키우면 그 채널이 지각을 지배한다.

The bridge to biomedical databiomedical 데이터로의 다리

Prediction errors are measurable: the EEG mismatch negativity and P300 are error signals, and cortical microcircuits carry the up/down messages here. Aberrant precision is a leading account of hallucinations and autism. A predictive-coding hierarchy is a biological VAE — the generative-model view of representation learning behind PRISM's neural-signal work.예측오차는 측정 가능하다: EEG의 불일치 음성전위(MMN)와 P300은 오차 신호이며, 대뇌 미세회로가 여기의 상·하향 메시지를 나른다. 비정상적 정밀도는 환각과 자폐의 유력한 설명이다. 예측 부호화 위계는 생물학적 VAE다 — PRISM의 신경 신호 연구가 기반하는, 표현 학습의 생성모형적 관점이다.