[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,69 +2,173 @@
id: wiki-2026-0508-signal-in-noise
title: Signal in Noise
category: 10_Wiki/Topics
status: needs_review
status: verified
canonical_id: self
aliases: [P-Reinforce-AUTO-SINO-001]
aliases: [SNR, Signal-to-Noise Ratio, Detectability]
duplicate_of: none
source_trust_level: A
confidence_score: 0.92
tags: [auto-reinforced, Information-Theory, signal-Processing, Statistics, decision-making]
confidence_score: 0.9
verification_status: applied
tags: [signal-processing, statistics, detection-theory, snr]
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: python
framework: scipy / numpy / torch
---
# [[Signal in Noise|Signal in Noise]]
# Signal in Noise
## 📌 한 줄 통찰 (The Karpathy Summary)
> "혼돈 속의 진실 찾기: 가짜 정보와 임의의 변동성([[Noise|Noise]])이 가득한 세상에서, 우리가 진짜 주목해야 할 유의미한 패턴(Signal)을 추출해내는 지혜와 기술의 총체."
## 한 줄
> **"매 'signal in noise' 는 informative variation 을 stochastic background 위에서 detect 하는 문제"**. Shannon (1948) 의 channel capacity, Wiener filter (1949), 매 modern denoising diffusion (Song & Ermon 2019, EDM2 2024) 까지의 lineage. 2026 의 LLM RAG pipeline 에서 querydocument retrieval, gravitational-wave detection (LIGO-Voyager), ML feature engineering 까지 매 universal motif.
## 📖 구조화된 지식 (Synthesized Content)
노이즈 속의 신호(Signal in Noise)는 정보 이론 및 데이터 과학에서 무의미한 방해 요소(Noise)를 제거하고 유용한 정보(Signal)를 식별해내는 과정과 그 능력을 의미합니다.
## 매 핵심
1. **개념적 구조**:
* **Signal**: 목적에 부합하는 유효 데이터, 인과관계, 미래 예측의 단서.
* **Noise**: 우연한 변동, 측정 오류, 관련 없는 데이터, 의도적인 가짜 정보.
* **SNR (Signal-to-Noise Ratio)**: 신호 대 잡음비. 이 값이 높을수록 정보를 명확히 식별 가능.
2. **추출 기법**:
* **Statistical Filtering**: 칼만 필터, 푸리에 변환 등을 통해 특정 주파수나 패턴의 신호만 선택.
* **Averaging**: 반복 측정을 통해 무작위 노이즈를 상쇄시켜 신호를 강화.
* **Dimensionality Reduction**: 고차원 데이터에서 핵심적인 정보를 보존하며 불필요한 차원(노이즈)을 제거(PCA 등).
3. **철학적/사회적 맥락**:
* 정보 폭발의 시대에 '무엇이 진짜 중요한 뉴스인가'를 판단하는 미디어 리터러시 역량과 직결됨.
### 매 SNR 정의들
- **Power SNR**: `P_signal / P_noise` (linear).
- **dB SNR**: `10·log10(P_signal/P_noise)`.
- **PSNR (image)**: `20·log10(MAX/RMSE)`.
- **Detection SNR (matched filter)**: `(s, s) / σ²` — 매 detection theory 의 sufficient stat.
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
- **과거 데이터와의 충돌**: 과거에는 노이즈를 단순히 '버려야 할 쓰레기'로 보았으나, 최근의 데이터 정책은 노이즈를 분석하여 시스템의 새로운 취합 지표로 쓰거나, 노이즈 자체에 숨겨진 보이지 않는 경향성을 연구하는 쪽으로 고도화됨(RL Update).
- **정책 변화(RL Update)**: 소셜 미디어 플랫폼 등에서 인위적인 노이즈(어뷰징, 봇 공격)를 걸러내어 진짜 여론을 보호하기 위한 'AI 기반 신호 정화(Signal Purification) 정책'이 국가 선거 방어 프로그램 등으로 상설 운영됨.
### 매 Detection theory 4-quadrant
- **Hit / Miss / FA / CR** — 매 ROC curve → AUC.
- **d (d-prime)**: `Z(hit) Z(FA)` — 매 perceptual sensitivity.
- **Likelihood ratio**: optimal NeymanPearson decision.
## 🔗 지식 연결 (Graph)
- [[Statistics & Data Analysis|Statistics & Data Analysis]], [[Probability Theory|Probability Theory]], [[Decision Theory|Decision Theory]], Cybersecurity, Information Ethics
- **Modern Tech/Tools**: Signal processing libraries (SciPy), Time-series forecasting, Advanced anomaly detection AI.
---
### 매 Noise types
- **White Gaussian**: 매 i.i.d. — 매 baseline assumption.
- **Pink (1/f)**: 매 brain LFP, financial returns.
- **Shot**: 매 Poisson — photon detector.
- **Quantization**: 매 ADC bit-depth 의 fundamental floor.
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
### 매 응용
1. RAG retrieval (relevant doc = signal, distractor = noise) → reranker 로 SNR↑.
2. RLHF reward modeling — 매 preference label noise 의 robust loss (Wu et al 2024).
3. Sensor fusion (Kalman) — 매 process vs measurement noise 의 trade.
4. Diffusion model — 매 noise schedule 이 곧 generation curriculum.
**언제 이 지식을 쓰는가:**
- *(TODO)*
## 💻 패턴
**언제 쓰면 안 되는가:**
- *(TODO)*
### SNR / PSNR (numpy)
```python
import numpy as np
## 🧪 검증 상태 (Validation)
def snr_db(signal, noise):
ps = np.mean(signal ** 2); pn = np.mean(noise ** 2)
return 10.0 * np.log10(ps / pn)
- **정보 상태:** needs_review
- **출처 신뢰도:** A
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
def psnr(y_true, y_pred, max_val=1.0):
mse = np.mean((y_true - y_pred) ** 2)
return 20.0 * np.log10(max_val / np.sqrt(mse + 1e-12))
```
## 🧬 중복 검사 (Duplicate Check)
### Matched filter (1D)
```python
from scipy.signal import correlate
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
- **처리 방식:** UPDATE (자동 정규화)
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
def matched_filter(x, template):
h = template[::-1] / np.linalg.norm(template)
y = correlate(x, h, mode="same")
return y # peak at template's location
```
## 🕓 변경 이력 (Changelog)
### Wiener filter (frequency domain)
```python
def wiener(x_noisy, sxx, snn):
X = np.fft.rfft(x_noisy)
H = sxx / (sxx + snn + 1e-12)
return np.fft.irfft(H * X, n=len(x_noisy))
```
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|------|-----------|-----------|--------|
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
### Adaptive threshold via d
```python
from scipy.stats import norm
def d_prime(hit_rate, fa_rate, eps=1e-6):
h = np.clip(hit_rate, eps, 1 - eps)
f = np.clip(fa_rate, eps, 1 - eps)
return norm.ppf(h) - norm.ppf(f)
```
### Spectral subtraction (denoise speech)
```python
import numpy as np
def spectral_subtract(y, noise_psd, frame=512, hop=128, alpha=1.0):
win = np.hanning(frame)
out = np.zeros_like(y, dtype=float)
norm = np.zeros_like(y, dtype=float)
for i in range(0, len(y) - frame, hop):
seg = y[i:i+frame] * win
Y = np.fft.rfft(seg)
mag = np.maximum(np.abs(Y) - alpha * np.sqrt(noise_psd), 0)
out[i:i+frame] += np.fft.irfft(mag * np.exp(1j*np.angle(Y))) * win
norm[i:i+frame] += win ** 2
return out / np.maximum(norm, 1e-9)
```
### Diffusion-style denoiser score (toy)
```python
import torch, torch.nn as nn
class ScoreNet(nn.Module):
def __init__(self, d=128):
super().__init__()
self.net = nn.Sequential(nn.Linear(d+1, 256), nn.SiLU(), nn.Linear(256, d))
def forward(self, x, sigma):
s = sigma.expand(x.size(0), 1)
return -self.net(torch.cat([x, s], dim=1)) / sigma # ≈ ∇ log p_σ(x)
```
### RAG reranker SNR boost (cross-encoder)
```python
from sentence_transformers import CrossEncoder
reranker = CrossEncoder("BAAI/bge-reranker-v2-m3") # 2025 SOTA reranker
def rerank(query, candidates, k=5):
pairs = [[query, c] for c in candidates]
scores = reranker.predict(pairs)
order = scores.argsort()[::-1][:k]
return [(candidates[i], float(scores[i])) for i in order]
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| Known template | Matched filter |
| Stationary noise PSD known | Wiener |
| Speech / audio enhance | Spectral subtraction / RNNoise |
| Image denoise | NLM / BM3D / Diffusion (DiffBIR 2025) |
| RAG noise (irrelevant docs) | Cross-encoder reranker |
| Binary detection | ROC + NeymanPearson |
**기본값**: detection task 는 d/ROC, denoise 는 problem-domain 에 맞춘 method (음성→spectral, 이미지→diffusion-prior, retrieval→reranker).
## 🔗 Graph
- 부모: [[Information Theory]] · [[Signal-Processing-Foundations]]
- 변형: [[Noise]] · [[Information-Entropy]]
- 응용: [[Kalman-Filter-and-State-Tracking]] · [[Particle-Filter-Algorithms]]
- Adjacent: [[Statistical-Power]] · [[Information Retrieval Evaluation Metrics]]
## 🤖 LLM 활용
**언제**: retrieval quality debug, A/B significance check, sensor pipeline, image/audio gen quality, agent observation-fusion.
**언제 X**: deterministic logic / no stochastic component (compile-time invariants).
## ❌ 안티패턴
- **SNR 단위 혼동**: linear vs dB — 매 plot legend 명시.
- **Stationarity 가정 위반**: nonstationary 면 STFT/wavelet 으로 local SNR.
- **threshold 의 hardcoding**: 매 base-rate 변하면 d tracking 으로 adaptive.
- **Reranker 만 의존**: bi-encoder recall 이 부족하면 rerank top-k 안에 정답이 없음.
## 🧪 검증 / 검토
- Verified (Kay 1998 "Fundamentals of Statistical Signal Processing, vol II"; Macmillan & Creelman "Detection Theory" 2005; Karras EDM2 paper 2024).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — SNR/PSNR/d-prime, matched/Wiener/spectral patterns, 2026 RAG-reranker context |