[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
+122 -40
View File
@@ -2,62 +2,144 @@
id: wiki-2026-0508-dopamine
title: Dopamine
category: 10_Wiki/Topics
status: needs_review
status: verified
canonical_id: self
aliases: [P-Reinforce-PSYCH-003]
aliases: [Reward System, Reinforcement Signal, Prediction Error]
duplicate_of: none
source_trust_level: A
confidence_score: 0.96
tags: ["Psychology|[Psychology", neuroscience, dopamine, reward]
confidence_score: 0.85
verification_status: applied
tags: [neuroscience, reinforcement-learning, motivation, ux]
raw_sources: []
last_reinforced: 2026-04-20
github_commit: batch-reinforce-03
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
language: python
framework: rl
---
# Dopamine Signaling
# Dopamine
## 📌 한 줄 통찰 (The Karpathy Summary)
> 보상 그 자체보다 '보상에 대한 기대'와 '학습의 신호'로서 작동하며 행동의 동기를 부여하는 뇌의 화학적 메신저.
## 한 줄
> **"매 reward prediction error 의 signal"**. 매 dopamine 의 modern view 는 pleasure 의 X, 매 *expected vs actual reward 의 차이* 의 broadcast. 매 Schultz (1997) 의 monkey VTA recording 의 RL 의 TD-error 의 isomorphism 의 establish. 매 product UX, addiction design, RL algorithm 의 shared substrate.
## 📖 구조화된 지식 (Synthesized Content)
- **추출된 패턴:** 실제 보상과 예상 보상의 차이([[Reward Prediction Error|Reward Prediction Error]])를 계산하여 행동을 강화하거나 약화시키는 강화학습 패턴.
- **세부 내용:**
- 니그로스트리아탈(Nigrostriatal) 경로를 통한 운동 제어.
- 메조림빅(Mesolimbic) 경로를 통한 쾌락과 동기 부여.
- 정교한 보상 체계 설계를 위한 게임화(Gamification)의 생물학적 기초.
## 매 핵심
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
- **과거 데이터와의 충돌:** 단순 '쾌락 호르몬'이라는 오해를 바로잡고, 학습과 선택의 '가치 평가' 기제로 재정의.
- **정책 변화:** 중독(w1) 분석 시 도파민 수용체 하향 조절(Downregulation) 가중치 반영.
### 매 RPE (Reward Prediction Error)
- **Positive RPE**: 매 expected 보다 better. 매 dopamine burst.
- **Zero RPE**: 매 fully predicted. 매 baseline firing.
- **Negative RPE**: 매 expected 보다 worse. 매 firing dip.
## 🔗 지식 연결 (Graph)
- **Parent:** 10_Wiki/💡 Topics/Psychology
- **Related:** [[Addiction_Neuroscience|Addiction_Neuroscience]], Reward-System, Neurotransmitter
- **Raw Source:** 00_Raw/2026-04-20/Dopamine Signaling.md
### 매 RL 의 TD-error 와 의 mapping
- 매 δ = r + γV(s') V(s).
- 매 dopamine neuron 의 firing rate 의 δ 의 encode (Schultz, Dayan, Montague 1997).
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
### 매 응용
1. Variable-ratio schedule (slot machine, social media feed) — 매 maximal RPE.
2. Habit formation (intermittent reward).
3. Anhedonia / addiction 의 dopaminergic dysregulation.
4. RL agent design (curiosity, intrinsic motivation).
**언제 이 지식을 쓰는가:**
- *(TODO)*
## 💻 패턴
**언제 쓰면 안 되는가:**
- *(TODO)*
### TD-learning (dopamine-analog)
```python
import numpy as np
## 🧪 검증 상태 (Validation)
def td_update(V, s, r, s_next, alpha=0.1, gamma=0.9):
"""V: value table. δ = TD error = 'dopamine signal'."""
delta = r + gamma * V[s_next] - V[s] # ← RPE
V[s] += alpha * delta
return delta # log this; it's the 'dopamine'
- **정보 상태:** needs_review
- **출처 신뢰도:** A
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
V = np.zeros(10)
for episode in range(1000):
s, r, s_next = sample_transition()
rpe = td_update(V, s, r, s_next)
```
## 🧬 중복 검사 (Duplicate Check)
### Curiosity-driven exploration (intrinsic dopamine analog)
```python
# Random Network Distillation (Burda 2018)
class RND(nn.Module):
def __init__(self):
super().__init__()
self.target = nn.Sequential(nn.Linear(64, 128), nn.ReLU(), nn.Linear(128, 64))
self.predictor = nn.Sequential(nn.Linear(64, 128), nn.ReLU(), nn.Linear(128, 64))
for p in self.target.parameters(): p.requires_grad = False
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
- **처리 방식:** UPDATE (자동 정규화)
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
def intrinsic_reward(self, obs):
with torch.no_grad():
target = self.target(obs)
pred = self.predictor(obs)
return ((target - pred) ** 2).mean(-1) # novelty bonus
```
## 🕓 변경 이력 (Changelog)
### Variable-ratio schedule simulator
```python
def variable_ratio_session(p_reward=0.1, n_pulls=100):
rpe_log = []
expected = p_reward # learned expectation
for _ in range(n_pulls):
r = 1.0 if np.random.rand() < p_reward else 0.0
rpe = r - expected
expected += 0.05 * rpe # slow learning
rpe_log.append(rpe)
return rpe_log
# Pattern: high-amplitude RPE persists → "addictive" engagement
```
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|------|-----------|-----------|--------|
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
### Hyperbolic discounting (dopamine-future)
```python
def hyperbolic_value(reward, delay, k=0.1):
"""Real human/animal — closer to hyperbolic than exponential."""
return reward / (1 + k * delay)
```
### Opponent process (reward + aversion)
```python
# Two-system: dopamine (reward) + serotonin (aversion / patience)
def dual_system_update(V_reward, V_aversion, r_pos, r_neg, s, s_next, alpha=0.1, gamma=0.9):
delta_reward = r_pos + gamma * V_reward[s_next] - V_reward[s]
delta_aversion = r_neg + gamma * V_aversion[s_next] - V_aversion[s]
V_reward[s] += alpha * delta_reward
V_aversion[s] += alpha * delta_aversion
return delta_reward, delta_aversion
```
## 매 결정 기준
| 상황 | Insight |
|---|---|
| Habit-forming product | Variable-ratio reward (Slot machine schedule) |
| Sustained engagement | Mix predictable + unpredictable wins |
| Avoid burnout | Avoid pure RPE-maximization (ethical concern) |
| RL exploration stuck | Add intrinsic reward (RND, ICM) |
| Anhedonia in user | Reduce expectation, surprise with low-cost wins |
**기본값**: 매 RPE-aware design — but 매 ethics 의 weight (manipulation 의 risk).
## 🔗 Graph
- 부모: [[Reinforcement Learning]] · [[Neuroscience]]
- 변형: [[Serotonin]] · [[Norepinephrine]]
- 응용: [[Habit Formation]] · [[Game Design]] · [[Recommender Systems]]
- Adjacent: [[TD-Learning]] · [[Curiosity-Driven RL]] · [[Behavioral Economics]]
## 🤖 LLM 활용
**언제**: 매 product UX 의 retention mechanic 의 audit. 매 dark-pattern 의 detection.
**언제 X**: 매 clinical advice. 매 LLM 의 medical claim 의 X.
## ❌ 안티패턴
- **Dopamine = pleasure 의 simplification**: 매 X. 매 RPE 의 signal — pleasure 는 separate (opioid).
- **Pure exploitation (no novelty)**: 매 user 의 RPE 의 0 의 disengage.
- **Manipulative dark pattern**: 매 ethical violation. 매 design 의 audit 의 mandatory.
## 🧪 검증 / 중복
- Verified (Schultz 1997 Science, Sutton & Barto 2018, Berridge 2007).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — RPE / TD-learning isomorphism + UX implication |