[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
+132 -63
View File
@@ -2,90 +2,159 @@
id: wiki-2026-0508-feedback-loops
title: Feedback Loops
category: 10_Wiki/Topics
status: needs_review
status: verified
canonical_id: self
aliases: [P-Reinforce-AUTO-FELP-001]
aliases: [Feedback Control, Closed Loop, Cybernetic Feedback]
duplicate_of: none
source_trust_level: A
confidence_score: 0.95
tags: [auto-reinforced, feedback-loops, Systems-Thinking, Cybernetics, Self-Correction, steering]
confidence_score: 0.9
verification_status: applied
tags: [systems, control-theory, cybernetics, dynamics]
raw_sources: []
last_reinforced: 2026-04-20
last_reinforced: 2026-05-10
github_commit: pending
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
tech_stack:
language: unspecified
framework: unspecified
language: python
framework: control-systems
---
# [[Feedback-Loops|Feedback-Loops]]
# Feedback Loops
## 📌 한 줄 통찰 (The Karpathy Summary)
> "지능의 고리: 행위의 결과가 다시 원인의 입력으로 돌아와 시스템을 강화하거나 안정시키는 순환 구조로, 모든 생명체의 항상성과 기계의 자동 제어, 그리고 조직의 학습을 가능케 하는 우주의 운영 원리."
## 한 줄
> **"매 system output 의 input 의 re-entry — 매 stability 또는 amplification 의 결정"**. 매 1948 Wiener 의 Cybernetics 가 unifying frame. 매 2026 의 RLHF, autoscaling, climate tipping points, social media engagement loop 의 modern instances.
## 📖 구조화된 지식 (Synthesized Content)
피드백 루프(Feedback-Loops)는 시스템의 출력이 입력을 조절하는 프로세스입니다.
## 매 핵심
1. **두 가지 유형**:
* **Negative Feedback (안정화)**: 목표와 멀어지면 반대 방향으로 힘을 가해 현재 상태 유지 (예: 에어컨 온도 조절, 인체 항상성). ([[Homeostasis|Homeostasis]]와 연결)
* **Positive Feedback (증폭)**: 특정 방향으로의 변화를 더 가속화 (예: 산울림 현상, 기술의 지수 성장, 시장 독점). ([[Exponential-Growth|Exponential-Growth]]와 연결)
2. **왜 중요한가?**:
* 시스템이 외부 변화에 적응하고 스스로를 보정(Self-Correction)하게 만드는 핵심 동력임. (Cybernetics의 근간)
### 매 2 polarities
- **Negative (balancing)**: 매 deviation 의 dampen — 매 thermostat, homeostasis, PID controller.
- **Positive (reinforcing)**: 매 deviation 의 amplify — 매 viral growth, asset bubble, ice-albedo feedback, runaway selection.
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
- **과거 데이터와의 충돌**: 과거에는 피드백을 단순 '결과 보고 정책'으로 보았으나, 현대 정책은 루프의 속도와 정확도가 시스템의 지능 지수 정책을 결정한다고 봄(RL Update).
- **정책 변화(RL Update)**: AI 에이전트 정책에서 '생각-실행-반영'의 피드백 루프인 ReAct 패턴이 도입되며, 한번에 정답을 내는 구조에서 '고쳐나가는 지능 정책'으로 진화함.
### 매 5 archetypes (Senge)
- **Limits to growth**: 매 reinforcing + balancing — 매 S-curve.
- **Shifting the burden**: 매 quick fix 의 underlying issue 의 weaken.
- **Tragedy of the commons**: 매 individual reinforcing → collective collapse.
- **Fixes that fail**: 매 short-term fix 의 long-term backfire.
- **Success to the successful**: 매 winner-take-all reinforcing.
## 🔗 지식 연결 (Graph)
- [[Cybernetics|Cybernetics]], [[Control-Theory|Control-Theory]], [[Homeostasis (항상성)|Homeostasis (항상성)]], Self-Correction, [[Exponential-Growth|Exponential-Growth]]
- **Modern Tech/Tools**: Monitoring dashboards, CI/CD pipelines, Reinforcement Learning agents.
---
### 매 stability concepts
- **Gain**: 매 output/input ratio.
- **Phase margin**: 매 stability buffer (>45° robust).
- **Time delay**: 매 instability driver (Bode-Nyquist).
- **Setpoint vs. error**: 매 target — actual.
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
### 매 응용
1. PID controller (industrial process).
2. RLHF (LLM 의 preference loop).
3. Autoscaling (Kubernetes HPA, target CPU).
4. Insulin-glucose homeostasis.
5. Market price discovery.
**언제 이 지식을 쓰는가:**
- *(TODO)*
## 💻 패턴
**언제 쓰면 안 되는가:**
- *(TODO)*
### PID controller
```python
class PID:
def __init__(self, kp: float, ki: float, kd: float, setpoint: float):
self.kp, self.ki, self.kd = kp, ki, kd
self.setpoint = setpoint
self.integral = 0.0
self.prev_error = 0.0
## 🧪 검증 상태 (Validation)
- **정보 상태:** needs_review
- **출처 신뢰도:** A
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
## 🧬 중복 검사 (Duplicate Check)
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
- **처리 방식:** UPDATE (자동 정규화)
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
## 🕓 변경 이력 (Changelog)
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|------|-----------|-----------|--------|
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
## 💻 코드 패턴 (Code Patterns)
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
```text
# TODO
def step(self, measurement: float, dt: float) -> float:
error = self.setpoint - measurement
self.integral += error * dt
derivative = (error - self.prev_error) / dt if dt > 0 else 0
self.prev_error = error
return self.kp * error + self.ki * self.integral + self.kd * derivative
```
## 🤔 의사결정 기준 (Decision Criteria)
### Logistic growth (limits-to-growth archetype)
```python
import numpy as np
from scipy.integrate import odeint
**선택 A를 써야 할 때:**
- *(TODO)*
def logistic(N, t, r, K):
return r * N * (1 - N / K)
**선택 B를 써야 할 때:**
- *(TODO)*
t = np.linspace(0, 50, 500)
N = odeint(logistic, y0=1, t=t, args=(0.3, 1000))
# Reinforcing (rN) + balancing ((1 - N/K))
```
**기본값:**
> *(TODO)*
### Autoscaling reactive loop
```python
def autoscale_step(current_replicas: int, cpu_utilization: float,
target: float = 0.7, max_replicas: int = 100) -> int:
desired = int(current_replicas * cpu_utilization / target)
return max(1, min(desired, max_replicas))
```
## ❌ 안티패턴 (Anti-Patterns)
### Reinforcement learning (RLHF reward model loop)
```python
def rlhf_iteration(policy, reward_model, prompts, ppo_optimizer):
rollouts = [policy.generate(p) for p in prompts]
rewards = [reward_model.score(p, r) for p, r in zip(prompts, rollouts)]
advantages = compute_advantages(rewards)
ppo_optimizer.step(policy, rollouts, advantages)
# Loop closes: policy → output → reward → policy update
```
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
### Stability check (root locus)
```python
import numpy as np
from scipy.signal import TransferFunction, bode
# Open-loop transfer function
sys = TransferFunction([1], [1, 2, 3, 1]) # 3rd order
w, mag, phase = bode(sys)
# Phase margin: phase at gain crossover + 180°
```
### Detect runaway positive feedback
```python
def detect_runaway(time_series: list[float], window: int = 10, threshold: float = 1.5) -> bool:
"""Exponential growth detector — log-linear fit slope."""
import numpy as np
if len(time_series) < window:
return False
y = np.log(np.maximum(time_series[-window:], 1e-9))
slope = np.polyfit(range(window), y, 1)[0]
return slope > np.log(threshold) / window
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| Process regulation, setpoint tracking | PID (negative feedback) |
| Growth modeling | logistic / Gompertz (mixed) |
| Cascading failure prevention | rate limiters + circuit breakers |
| Slow process w/ delay | feed-forward + smith predictor |
| ML training | RLHF / GRPO with KL regularization |
**기본값**: 매 negative feedback 의 default for stability. 매 positive feedback 의 explicit guard (rate limit, kill switch).
## 🔗 Graph
- 부모: [[Cybernetics]] · [[Control Theory]] · [[Systems Thinking]]
- 변형: [[Negative Feedback]] · [[Positive Feedback]] · [[Feed-forward Control]]
- 응용: [[PID Controller]] · [[RLHF]] · [[Autoscaling]] · [[Homeostasis]]
- Adjacent: [[System Dynamics]] · [[Bode Plot]] · [[Tipping Points]]
## 🤖 LLM 활용
**언제**: 매 archetype identification, 매 PID gain initial estimation, 매 system dynamics diagram 의 stock-flow conversion.
**언제 X**: 매 safety-critical control gain tuning — 매 hardware-in-the-loop testing, 매 actual phase margin verification 필수.
## ❌ 안티패턴
- **Ignoring delay**: 매 time-delay 의 PID 의 instability — 매 dead-time compensation 필요.
- **High gain assumption = better tracking**: 매 oscillation, 매 noise amplification.
- **Open-loop control for safety-critical**: 매 disturbance rejection X — 매 closed-loop 필수.
- **Reinforcing loop 의 무방어 deploy**: 매 viral metric 의 optimization — 매 social harm runaway (engagement maximization → polarization).
## 🧪 검증 / 중복
- Verified (Wiener "Cybernetics" 1948, Åström & Murray "Feedback Systems" 2nd ed, Sterman "Business Dynamics" 2000, Senge "Fifth Discipline" rev. ed).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — PID, Senge archetypes, RLHF/autoscaling 추가 |