---
id: wiki-2026-0508-working-memory
title: Working Memory
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [WM, Short-Term Memory, Active Memory]
duplicate_of: none
source_trust_level: A
confidence_score: 0.9
verification_status: applied
tags: [cognitive-science, memory, attention, neuroscience]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
  language: Theory
  framework: Cognitive Psychology
---

# Working Memory

## 매 한 줄
> **"매 active manipulation 의 한 limited buffer"**. Baddeley & Hitch (1974) multi-component model — 매 modern cognitive psych / neuroscience 의 cornerstone, 매 LLM context window (Claude Opus 4.7 1M context, 2026) 의 biological analogue.

## 매 핵심

### 매 Baddeley-Hitch model
- **Phonological loop**: verbal/auditory rehearsal (~2 sec span).
- **Visuospatial sketchpad**: visual + spatial info.
- **Central executive**: attention controller, allocates resources.
- **Episodic buffer** (Baddeley 2000 update): integrates with LTM, multi-modal binding.

### 매 Capacity
- Miller (1956): "magical number 7 ± 2" (digit span).
- Cowan (2001): 4 ± 1 chunks (more conservative).
- 매 chunking 의 effective capacity 의 expand (chess masters, expert recall).

### 매 vs Short-term memory
- STM = passive storage.
- WM = storage + active manipulation.
- 매 partially overlap, 매 not identical.

### 매 Neural correlates
- Prefrontal cortex (DLPFC) — sustained delay activity.
- Parietal cortex — attention/maintenance.
- Hippocampus — episodic buffer interface.
- 2020s findings: WM = ensemble dynamics + synaptic short-term plasticity, not just sustained firing.

### 매 응용
1. Education (cognitive load theory — Sweller).
2. UX design (chunk info, reduce WM load).
3. Clinical (ADHD, schizophrenia, dementia diagnosis).
4. AI: LLM context window, Transformer attention as WM analogue.

## 💻 패턴

### N-back task (WM measurement)
```python
import random

def n_back_trial(sequence, n=2):
    """Subject says 'match' if current item == n items back."""
    targets = []
    for i, item in enumerate(sequence):
        if i >= n and item == sequence[i-n]:
            targets.append(i)
    return targets

seq = [random.choice('ABCDE') for _ in range(20)]
print(n_back_trial(seq, n=2))
```

### Digit span
```python
def digit_span_test():
    span = 3
    while True:
        digits = [random.randint(0,9) for _ in range(span)]
        print("Memorize:", digits)
        time.sleep(2)
        clear_screen()
        recall = input("Recall: ").split()
        if list(map(int, recall)) != digits:
            return span - 1
        span += 1
```

### Cognitive load reduction (UX)
```python
# Bad: dense form
form_bad = ["Name", "Address1", "Address2", "City", "State", "Zip",
            "Phone", "Email", "DOB", "SSN", "Employer", "Salary"]

# Good: chunked into pages of 4-5 items
def chunk_form(fields, chunk_size=5):
    return [fields[i:i+chunk_size] for i in range(0, len(fields), chunk_size)]
```

### LLM context-as-WM analogy (2026)
```python
from anthropic import Anthropic
client = Anthropic()

# Claude Opus 4.7 1M context = expanded "working memory"
# But like biological WM: not all positions equally accessible
# Lost-in-the-middle (Liu et al.) = WM rehearsal-decay analogue

def reasoning_with_scratchpad(problem, intermediate_steps):
    # Like phonological loop rehearsal — explicit working notes help
    msg = f"""Problem: {problem}
Working notes: {intermediate_steps}
Continue reasoning step by step."""
    return client.messages.create(
        model="claude-opus-4-7",
        max_tokens=4096,
        messages=[{"role": "user", "content": msg}]
    )
```

### Chunking for memorization
```python
def chunk_phone(digits: str) -> str:
    # 1234567890 → 123-456-7890 (3 chunks, easier than 10)
    return f"{digits[:3]}-{digits[3:6]}-{digits[6:]}"

# Chess: experts chunk board into "pieces patterns" (de Groot 1965)
# → recall 5 patterns ≈ 25 individual pieces
```

### Dual-task interference
```python
# Demonstrate WM bottleneck
def dual_task(verbal_task, spatial_task):
    """Phonological loop + sketchpad can run parallel.
    Two verbal tasks interfere strongly — same component."""
    pass

# Predicts: reading aloud + math ↓; reading aloud + visual rotation ≈ ok
```

### LLM working memory enhancement (scratchpad)
```python
# Chain-of-thought = externalized WM
def cot_solve(problem):
    prompt = f"""Solve step by step. Use scratchpad <think>...</think>.
Problem: {problem}"""
    # Externalizing intermediate state offloads "WM" into context tokens
    return client.messages.create(...)
```

## 매 결정 기준
| 상황 | Approach |
|---|---|
| Measuring WM capacity | Digit span / N-back / Corsi block |
| Reducing UX cognitive load | Chunking, progressive disclosure |
| Educational design | Worked examples, split-attention avoidance |
| LLM long context | Use scratchpad / CoT, retrieval over re-feeding all |
| ADHD assessment | WM tests as part of battery |

**기본값**: Cowan's 4±1 chunks; chunk + offload to external memory (notes, scratchpad, retrieval).

## 🔗 Graph
- 부모: [[Cognitive-Psychology]]
- 변형: [[Short-Term-Memory]]
- 응용: [[Cognitive Load Theory|Cognitive-Load-Theory]] · [[Chunking]] · [[Attention]]
- Adjacent: [[Long-Term-Memory]] · [[Weak-Central-Coherence-Theory]]

## 🤖 LLM 활용
**언제**: Cognitive load reasoning, UX design, educational scaffolding, modeling LLM context use, ADHD/dementia assessment design.
**언제 X**: Long-term knowledge questions (use LTM / retrieval theories). Procedural skill (use motor memory / striatal learning).

## ❌ 안티패턴
- **WM = STM**: 매 active manipulation 의 difference 의 ignore.
- **"7±2" as universal**: Miller 1956 의 outdated; Cowan 4±1 의 modern, 매 task-dependent.
- **Forcing all info into WM**: 매 cognitive overload — 매 chunk + offload.
- **LLM context = WM literal equivalence**: 매 useful analogy, 매 disanalogous in mechanism (attention ≠ phonological rehearsal).

## 🧪 검증 / 중복
- Verified (Baddeley & Hitch 1974, Cowan 2001, Sweller cognitive load, modern fMRI/EEG meta-analyses).
- 신뢰도 A.

## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — Working memory with Baddeley-Hitch, n-back, LLM analogy |
