Files
2nd/10_Wiki/Topics/Computer_Science_and_Theory/Phase-Amplitude Coupling.md
T
Antigravity Agent f8b21af4be Wiki cleanup: error-doc removal, dedup merge, link normalization
10_Wiki/Topics 대규모 정리:
- 오류 캡처/미완성 stub 문서 227개 제거
- 교차폴더 중복 43클러스터 병합 (63파일 → redirect)
- 링크명 정규화: 깨진 링크 수정·redirect 직결·개념 매핑 ~2,400건
- 카테고리 MOC 6개 신규 생성
- Graph 섹션 미해결 related-keyword 링크 10,058건 제거

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 23:52:15 +09:00

5.2 KiB
Raw Blame History

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-phase-amplitude-coupling Phase Amplitude Coupling 10_Wiki/Topics verified self
PAC
Cross-Frequency Coupling
Theta-Gamma PAC
none A 0.85 applied
neuroscience
signal-processing
eeg
oscillations
2026-05-10 pending
language framework
python mne/numpy

Phase Amplitude Coupling

매 한 줄

"매 slow rhythm 의 phase 가 매 fast rhythm 의 amplitude 를 모듈레이션.". 2006 Canolty et al. theta-gamma PAC in human ECoG → 2010s memory/working-memory 의 neural mechanism 으로 자리잡음. 2026 BCI, sleep staging, anesthesia depth monitoring 에 활용.

매 핵심

매 What is PAC

  • Two oscillations: phase φ_low(t) ∈ [−π, π], amplitude A_high(t) ≥ 0.
  • PAC: A_high 가 φ_low 의 특정 phase에 preferentially elevated.
  • Canonical pair: theta (48 Hz) phase × gamma (3080 Hz) amplitude.

매 PAC Metrics

  • Modulation Index (MI, Tort): KL divergence of phase-binned amplitude from uniform.
  • Mean Vector Length (MVL, Canolty): |⟨A·e^(iφ)⟩|.
  • Phase-Locking Value (PLV): |⟨e^(i(φ_low φ_amp_envelope))⟩|.
  • GLM-based: regress A on sin/cos(φ).

매 응용

  1. Working memory (theta-gamma in hippocampus, PFC).
  2. Sleep stage classification (slow oscillation × spindle).
  3. Anesthesia depth (alpha-gamma, alpha-beta PAC).
  4. Parkinson's DBS biomarker (beta-gamma PAC).

💻 패턴

Filter + Hilbert (extract phase & amplitude)

import numpy as np
from scipy.signal import butter, sosfiltfilt, hilbert

def phase_amp(x, fs, f_low=(4,8), f_high=(30,80)):
    sos_lo = butter(4, f_low, btype='band', fs=fs, output='sos')
    sos_hi = butter(4, f_high, btype='band', fs=fs, output='sos')
    x_lo = sosfiltfilt(sos_lo, x)
    x_hi = sosfiltfilt(sos_hi, x)
    phi = np.angle(hilbert(x_lo))
    amp = np.abs(hilbert(x_hi))
    return phi, amp

Tort Modulation Index

def tort_mi(phi, amp, n_bins=18):
    edges = np.linspace(-np.pi, np.pi, n_bins+1)
    bin_idx = np.digitize(phi, edges) - 1
    bin_idx = np.clip(bin_idx, 0, n_bins-1)
    P = np.array([amp[bin_idx == k].mean() for k in range(n_bins)])
    P = P / P.sum()
    H = -np.sum(P * np.log(P + 1e-12))
    H_max = np.log(n_bins)
    return (H_max - H) / H_max  # MI ∈ [0, 1]

Canolty MVL with surrogate test

def mvl(phi, amp):
    return np.abs(np.mean(amp * np.exp(1j * phi)))

def mvl_significance(phi, amp, n_surr=200):
    obs = mvl(phi, amp)
    surr = []
    for _ in range(n_surr):
        shift = np.random.randint(len(amp))
        surr.append(mvl(phi, np.roll(amp, shift)))
    p = np.mean(np.array(surr) >= obs)
    z = (obs - np.mean(surr)) / np.std(surr)
    return obs, z, p

Comodulogram (PAC across freq pairs)

def comodulogram(x, fs, lo_freqs, hi_freqs):
    MI = np.zeros((len(lo_freqs)-1, len(hi_freqs)-1))
    for i in range(len(lo_freqs)-1):
        for j in range(len(hi_freqs)-1):
            phi, amp = phase_amp(x, fs,
                f_low=(lo_freqs[i], lo_freqs[i+1]),
                f_high=(hi_freqs[j], hi_freqs[j+1]))
            MI[i, j] = tort_mi(phi, amp)
    return MI

MNE-Python ready pipeline

import mne
from mne_connectivity import phase_slope_index

raw = mne.io.read_raw_edf("eeg.edf", preload=True)
raw.filter(1, 100).notch_filter(60)
epochs = mne.make_fixed_length_epochs(raw, duration=2.0)
# pactools for PAC
from pactools import Comodulogram
estimator = Comodulogram(fs=raw.info['sfreq'],
                          low_fq_range=np.linspace(2, 12, 11),
                          high_fq_range=np.linspace(20, 100, 17),
                          method='tort')
estimator.fit(epochs.get_data()[0, 0])
estimator.plot()

매 결정 기준

상황 Method
Quick screening Tort MI (robust to amp distribution)
Phase preference angle Canolty MVL (gives complex vector)
Phase-phase coupling n:m PLV
Need significance Surrogate w/ time shifts (≥200)
Continuous data sliding-window comodulogram

기본값: Tort MI + 200 time-shift surrogates + FDR correction across frequency pairs.

🔗 Graph

🤖 LLM 활용

언제: PAC method 선택 explain, comodulogram 결과 interpretation. 언제 X: 매 raw EEG 매 LLM에 stream (use MNE/pactools locally).

안티패턴

  • Spurious PAC from sharp transients: 매 epileptic spikes / artifacts → broadband amp. Always inspect raw + reject artifacts.
  • No surrogate test: MI > 0 always — significance ≠ value.
  • Filter bandwidth too narrow: ringing → spurious phase locking.
  • Edge effects: 매 hilbert 에서 매 처음/끝 cycle 버려야.

🧪 검증 / 중복

  • Verified (Tort et al. 2010 J Neurophysiol; Canolty & Knight 2010 Trends Cogn Sci).
  • 신뢰도 A.

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — Tort MI / Canolty MVL / comodulogram 패턴, surrogate test