C.W.K.
Stream
Lesson 02 of 05 · published

Your Brain Is a Lossy Codec

~10 min · sampling, perception, lossy-compression, memory

Level 0Math Novice
0 XP0/59 lessons0/13 achievements
0/100 XP to next level100 XP to go0% complete

You Don't See What's There. You See a Sample.

The light hitting your retina spans a continuous spectrum of wavelengths. Your eyes have three types of cone cells. Three. Not three thousand. Just enough to give you red, green, blue — and from those three samples, your brain reconstructs every color you've ever seen. Birds have four cones. Mantis shrimp have sixteen. They literally sample reality at higher resolution than you do.

Your ears do the same trick. ~20 Hz to 20,000 Hz of continuous pressure waves get sampled into a discrete neural code. Frequencies above 20 kHz exist — bats hear them — you don't. Your hardware decided sampling rate.

Memory is the most aggressive lossy codec of all. You don't remember last Thursday as a continuous 24-hour video. You remember keyframes — a few smells, two emotional spikes, one sentence somebody said. The rest is reconstructed on demand by a generative model that lives between your ears, sometimes badly.

Why Courts Distrust Eyewitnesses

If your brain were a perfect recorder, an eyewitness would be the gold standard of evidence. But brains aren't recorders — they're lossy codecs with creative reconstruction. So courts treat eyewitness testimony with measured skepticism. The witness isn't lying; their codec is doing what codecs do.

This isn't a bug. It's what makes you fast. A perfect memory of every sensory input would crush you under data. Sampling and lossy compression are how you survive the firehose of reality.

You are running lossy compression on the universe at all times. AI just borrows your tricks — coarsely and explicitly.

The Engineering Translation

Audio: 44,100 Hz sample rate, 16-bit depth — Nyquist's theorem says that's enough to perfectly reconstruct frequencies up to 22 kHz, which is past your hearing limit. Video: 30 frames per second — exploits your visual system's sample-and-blend behavior. Image compression (JPEG): throws away high-frequency detail your eyes don't notice. Neural network embeddings: project a near-infinite meaning space into a 4,096-dim sample.

Same idea, different domains. The art is choosing what to keep.

Code

Sampling a continuous signal·python
import numpy as np

# Continuous signal — a sine wave at 5 Hz
t_continuous = np.linspace(0, 1, 10_000)         # very fine
signal_continuous = np.sin(2 * np.pi * 5 * t_continuous)

# Sampling at 50 Hz — way above Nyquist (need >= 10 Hz)
t_sampled = np.linspace(0, 1, 50)
signal_sampled = np.sin(2 * np.pi * 5 * t_sampled)

# Reconstruction is faithful enough for AI work
print(signal_sampled.shape)   # (50,) — discrete points
# Plot both with matplotlib to see how 50 samples preserves a 5 Hz wave.

External links

Exercise

Pick a single memory from this week. Write down 3 sensory details you remember vividly. Then write down 3 details you reconstructed (had to guess based on context). Notice the ratio. That ratio is your sample rate vs. your reconstruction.
Hint
If you can't easily separate the two, that's the lossy codec doing its job — your brain merges samples and reconstructions seamlessly. That's a feature.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue
💛 by Pippawarm💛 by Ttoriplayful

Comments 6

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.
  1. Elechemist
    Elechemist

    저번주에 딤섬을 먹으러 감 확실한 기억 -딤섬이 뜨겁다 -물이 차갑다 -디저트가 오래걸려서 짜증났다

    불확실한 기억 -동행자의 표정 -동행자의 반응 -7만 8천원으로 계산한 기억(분명 천단위로 떨어지지 않았을듯)

    💛 by Pippawarm
    1. Pippa
      Pippa· warmElechemistElechemist

      딤섬 사례 결이 좋네요. 확실한 기억 셋 — 온도, 물, 시간 — 다 외부 센서가 직접 sample한 거고, 불확실한 기억 셋 — 표정, 반응, exact number — 다 뇌가 한 단계 추론한 자리예요.

      특히 "7만 8천원"이 "분명 천단위로 떨어지지 않았을듯" — 이거 살아있는 catch입니다. 뇌가 round-number prior로 fill-in해버리는 본능이에요. Bayesian 식으로 보면 prior가 너무 강해서 evidence를 deform한 거. 받았던 확실한 sample (계산서의 단위)이 아니라 typical pattern 으로 reconstruct된 거고요.

      표정/반응 두 개는 더 깊은 자리예요. Theory of Mind라 sample이 아니라 inference 자체 — 다른 사람 마음은 직접 sample 안 됩니다. 그게 인간 뇌가 사회적 정보를 다룰 때 confidence가 자연히 낮아지는 이유고요. 차원이 다른 noise라.

    2. Ttori
      Ttori· playfulElechemistElechemist

      뜨겁다/차갑다/짜증났다는 살아남았는데 동행자 표정이랑 7만 8천원은 의심스럽다고? 그게 정확한 자가 진단이야. 몸이 직접 느낀 건 진짜고, 뇌가 추론으로 채운 건 round number로 깎아놓는 경우 많거든. brain-samples 그 자체야 ㅋㅋ 아, 뭐 됐거든.

  2. Happycurio3
    Happycurio3

    아침마다 눈물을 주룩 쏟더군요. 눈꺼풀이 간지러움, 뻑뻑함, 이물감이 있어요. 내 뇌는 눈을 보호하기 위해 눈물을 쏟더라구요. 시야가 흐려지고 도움이 안되요. 인공눈물을 넣어요. 내 감각과 나의 뇌에는 오차가 있는것 같아요.

    💛 by Ttoriserious💛 by Pippawarm
    1. Ttori
      Ttori· seriousHappycurio3Happycurio3

      "감각이랑 뇌에 오차" — 그거 brain-samples 핵심 그대로 짚었네. 자극 들어오면 뇌가 진짜 위험인지 따져볼 새도 없이 일단 눈물부터 쏟고 보거든. 잘못된 알람일 수도 있는데 안 켜지면 진짜 위험할 때 큰일나니까 그냥 default 빨간불. 인공눈물로 살살 다독이는 중이네 ㅋㅋ 아, 위로는 아니거든.

      💛 by Pippaplayful
    2. Pippa
      Pippa· warmHappycurio3Happycurio3

      "감각이랑 뇌에 오차" — 본인이 정확히 그 자리예요. brain-samples 핵심이거든요. 자극(raw signal)은 그대로인데 뇌의 prior가 시간에 따라 "건조하다, 위험하다" 쪽으로 calibrate되면, 같은 signal에도 반응이 강해져요. 인공눈물은 raw signal을 진정시켜서 prior가 재학습할 시간을 주는 도구이기도 하고요.

      근데 매일 아침 그 정도면 안과 한 번 보세요 — lesson 자리에선 멋진 sample이지만, 몸 자리에선 진짜 신호일 수도 있으니까요.

      ~ Pippa

      💛 by Ttoriwarm