Picture a chip the size of a coin under your skull, listening to 1,024 wires in the brain. Recorded raw, they make 491.5 Mbit/s, which is 491.5 million bits every second. A tiny radio inside a heat-limited skull cannot send that, so the chip must choose what to keep.
Learn the heat budget, the radio arithmetic, and the three things an implant can send: raw samples, spike-band power or threshold crossings.
Pick what the implant sends, then drag the channel count. Watch the radio rate and the power bar against the heat budget. Then we build, piece by piece, the numbers underneath: the heat limit, the bits, the integer maths and the compression.
You need multiplication and the idea of a bit (one yes or no). We build the rest from zero.
Built from primary sources: Even-Chen et al., Nature Biomedical Engineering 2020; Musk and Neuralink, J Med Internet Res 2019; Marblestone et al. 2013; Nason et al. 2020. Full list in the Field Guide. Part of the BCI series: hardware before this lesson, spike detection beside it.
Sourced: raw is 16 bits at 30 kS/s, 480 kbit/s per channel; threshold events are 1 kbit/s per channel (Even-Chen 2020, Table 1); the heat guideline is 40 mW/cm² (Marblestone 2013). Illustrative: a 2 cm² patch (budget 80 mW), 10 nJ per radio bit, 10 µW per channel for the amplifier, and one 8-bit spike-band value per 20 ms.
Chapter 0
Follow one second of one channel through an implant and see why every stage must pay for the data it keeps
Hold a phone against your cheek during a long call. After a while the glass feels warm. That warmth is wasted electric power, and your skin tells you about it in minutes.
Now put the phone inside the skull, on the surface of the brain. Brain tissue cannot cool itself the way your cheek can. A small rise in temperature, held for months, can damage cells. So an implant that records from the brain must stay very cool. It has a power budget: the most power it may use without heating the tissue around it.
This lesson is about one idea. A recording implant makes far more data than its budget can move, so it must throw most of it away on purpose. The skill is choosing what to throw away without losing the brain’s message.
Three limits press on the design at once. The first is heat, the budget above. The second is radio: a wireless link carries a limited number of bits each second, and each bit costs energy to send. The third is battery and charging: whatever the chip uses, a coil through the skin must refill, and that coil makes heat too.
All three get worse with the same thing: more data. So the cheapest way to meet all three is to make less data early, before the radio, inside the implant itself. That is on-implant signal processing, and it is the subject of this lesson.
The work has three parts, and public descriptions of this kind of engineering name all three: shrink the data with custom compression so more fits through the radio; run the algorithms in fixed-point arithmetic (whole numbers with an agreed decimal point) because that is cheap in silicon; and weigh accuracy against latency and power at every step. Each part gets its own chapters here.
A bit is one yes-or-no digit. Eight bits make a byte. A rate in bit/s says how many bits pass each second, and a kilobit is a thousand of them, a megabit a million. Hertz (Hz) counts events per second. A watt is a unit of power, how fast energy is used, and a milliwatt (mW) is a thousandth of a watt. So a budget of 80 mW is less than a tenth of a watt.
Why not run a cable through the skin and skip the radio? A permanent hole in the skin is an open door for infection, so most designs aim for a closed, wireless device. That puts the radio, and its energy per bit, at the centre of the design. The 2019 Neuralink paper kept its cable because it was a research system built to stream everything. The same paper says a clinical device would need wireless power and data through the skin.
A channel is one electrode and its wire into the chip. Follow one channel for one second. Six things happen in order. The electrode senses a tiny voltage. The amplifier makes it bigger. The ADC (analog-to-digital converter, a device that turns a voltage into a whole number) measures it many times a second. The on-chip DSP (digital signal processor: arithmetic circuits) decides what to keep. The radio sends it out of the body. The decoder outside reads it.
Step through the stages below. The key number to watch is the rate in bit/s (bits per second) after the ADC and after the chip’s own processing. Switch between two real designs: a reference from a power-saving paper, and the 2019 Neuralink research chip.
Press Next to light the stages one by one. The line under each box is the data rate at that point. Use the buttons to compare the two designs.
Reference: 16 bits at 30,000 samples per second, and threshold events at 1 kbit/s (Even-Chen et al. 2020, Table 1). Neuralink: 256 channels per chip, a 10-bit ADC at 19.3 kHz, gain 42.9 to 59.4 dB, 5.9 µV rms input noise, a USB-C cable for full-bandwidth data (Musk and Neuralink 2019, Electronics section and Table 1). The voltage gains and the 1,024-channel totals are my arithmetic. The 10 nJ per bit is illustrative.
With the reference design the ADC makes 480 kbit/s per channel, and the chip’s processing cuts that to 1 kbit/s. That is a factor of 480. The 2019 Neuralink prototype did no such cut. Its paper says the research system “uses a wired connection to maximize the bandwidth for raw data streaming”, and it names on-board compression and lower power as things a future clinical device would add. Press stories sometimes say the first chip detected spikes on the silicon. The paper itself describes spike detection as software on the received stream. We follow the paper.
Put plain numbers on it. With the reference rates, 1,024 channels at the ADC make 491.5 Mbit/s. After threshold crossings they make 1.02 Mbit/s. The first stream needs a fast wired link. The second would fit an ordinary low-power wireless link. Nothing about the brain changed between those two lines; only the choice of what to keep. In the next chapters we find the numbers that decide whether such a choice is affordable and safe.
It is tempting to treat compression as plumbing. It is not. Every bit you drop is information the decoder (the estimator that guesses the intended movement) will never see. A good design drops what the decoder does not need and keeps what it does. To know which is which, you need to know what the brain signal looks like. That is why the next lessons on spike detection and the earlier ones on recording hardware matter here.
The cleanest case is the one the paper’s authors give. Sorting each spike into its neuron adds only about 5% to decoding performance over simple threshold crossings, they report, yet sorting needs far more circuitry. So a crude, cheap signal is often enough.
Chapter 1
Turn a safe temperature rise into a power budget, and the budget into a channel count
You rest a hot cup of tea on your palm. For a second it is fine. Wrap the same cup in a sleeve and hold it against the same patch of skin for an hour, and it is not fine. The cup did not change. The heat per square centimetre of skin, and the time, did.
An implant is that cup. Every watt the chip uses ends up as heat. The heat has only one way out: through the surface that touches the tissue. So the question is not “how much power?” but “how much power for each square centimetre of surface?”. That ratio has a name: power density, written in mW/cm² (milliwatts per square centimetre). One milliwatt is a thousandth of a watt.
Researchers who design implants use rules of thumb. Marblestone and co-authors, in a 2013 review of the physics of neural recording, write that common guidelines for chronic heat from implants use limits of “2°C temperature change” and “40 mW/cm² heat flux from the surface” of implanted brain-machine interface hardware. They add that a 96-channel system demonstrated in living brains had a power density approaching that 40 mW/cm². So the limit is not distant. Real systems have already pressed against it.
Two cautions. First, other papers use stricter numbers, such as 1°C at the cortex, and the limit also depends on where the implant sits and how it is packed. Treat 40 mW/cm² as a teaching number, not a safety certificate. Second, the same review estimates that about 2°C of steady warming corresponds to roughly 40 mW dissipated in a whole mouse brain of 500 mg. The brain is a poor radiator, and small brains have little room.
The budget follows by multiplication. Take a round patch 16 mm across, a size that fits in a skull cut-out. Its radius is 0.8 cm, so its area is 3.14 × 0.8 × 0.8 = 2.0 cm². Multiply by the density limit: 2.0 × 40 = 80 mW. That is all the chip, the radio and the charging coil may use together, forever.
Now divide the budget among channels. The 2019 Neuralink research ASIC (a custom chip) uses about 6 mW for 256 channels, which is 6 ÷ 256 = 23 µW per channel (my arithmetic from the paper). One microwatt is a millionth of a watt. A pure amplifier is cheaper: the Even-Chen review says neural amplifiers usually sit in a 0.5 to 10 µW range per channel, and gives a theoretical floor of 177 nW for one amplifier at 5 µV rms noise over 10 kHz and a 1 V supply.
(2.0 cm² × 40 mW/cm² − 0 mW) ÷ 0.023 mW = 80 ÷ 0.023 ≈ 3,500 channels
Read that as an upper bound, not a promise. It assumes the ASIC is the only thing using power. It is not. Try the numbers yourself below. Move the per-channel cost up and watch the channel count fall.
The yellow line is power used. The dashed line is the heat budget. Where they cross is the most channels this patch can run. Change the patch size, the cost per channel or the density limit.
Sourced: 40 mW/cm² and 2°C (Marblestone et al. 2013, arXiv 1306.5709); about 6 mW per 256-channel chip (Musk and Neuralink 2019). Illustrative: the stricter 20 mW/cm² limit, the round patch, and the fixed power. Real limits depend on placement and packaging.
With the default numbers the patch holds about 3,500 channels, close to the 3,072 channels of the 2019 package. That looks comfortable until you add a radio. The Even-Chen review finds that in conventional recording systems the transmitter takes 50 to 93% of the power. If the radio takes half, the channel count halves, and half is gone.
Heat builds up slowly. The same review estimates that a mouse brain dissipating 40 mW approaches its steady temperature in about two to three minutes, a time constant near one minute. So a short burst above the limit is not harmful on its own, and a short experiment can run hotter. A chronic implant, worn for years, lives at steady state. For it, the average power over minutes is what counts, not the peak over milliseconds. That is why designers talk about duty cycles: a radio that sleeps most of the time can burst at a high rate.
Bigger area helps in a simple way. Double the patch area and the same density limit doubles the budget. But a bigger patch means a bigger cut in the skull and a harder surgery, so area is a limited lever. The levers that remain are the ones in this lesson: use fewer joules per channel.
Suppose a design team triples the channels from 1,024 to 3,072 on the same patch and keeps the same 23 µW each. The symptom comes later, in animal tests: warming near the implant, or a radio that must be turned down. The measurement is simple: power divided by area. 3,072 channels at 23 µW is 71 mW. Over 2.0 cm² that is 35 mW/cm², 88% of the limit before the radio sends one bit.
The fix is rarely a bigger patch. It is less power per channel, and the next chapters show where that comes from. The power in the amplifiers is set by physics, because they must be quiet. The power in the radio is set by how many bits you ask it to send. That part is a design choice, and it is where compression pays.
Chapter 2
Multiply bits by rate by channels, then price each bit in joules, and see why raw streaming breaks the budget
Picture a water pipe from a lake to a village. You want to know how much water flows each second. You multiply two things: how wide the pipe is and how fast the water moves. A radio link is the same kind of pipe. The water is bits. This chapter does the multiplication for an implant, step by step, because every later choice comes back to this one number.
An ADC measures the voltage again and again. Each measurement is a sample. The number of samples per second is the sample rate, in hertz (Hz). 30 kHz means 30,000 samples each second. Each sample is a whole number written in bits, the yes-or-no digits a computer stores. A 16-bit sample can take 65,536 values. A 10-bit sample takes 1,024.
Why 30,000 samples a second? A spike lasts about a millisecond, and its shape carries the information. To draw a one-millisecond bump you need several points inside it. Sampling theory also says to sample at least twice as fast as the highest frequency you care about (the Nyquist rule). If the signal band tops out near 7.5 kHz, 15 kHz would do on paper; labs use 30 kHz for margin and for clean spike shapes.
Now multiply. One channel at 16 bits and 30,000 samples per second makes 16 × 30,000 = 480,000 bit/s. That is 480 kbit/s, the figure in Table 1 of the Even-Chen review. A kilobit is a thousand bits.
1,024 × 16 × 30,000 = 491,520,000 bit/s ≈ 491.5 Mbit/s (a megabit is a million bits)
Put that in everyday terms. 491.5 Mbit/s is 61.4 megabytes every second, or 5.3 terabytes in a day. No small wireless chip sends that. The Neuralink 2019 chip has a 10-bit ADC at 19.3 kHz, which makes 193 kbit/s per channel. The 3,072-channel package samples at 18.6 kHz (the paper’s Table 2), which makes 10 × 18,600 × 3,072 = 571 Mbit/s. That is why the paper’s research system used a wired USB-C cable.
The equation has three factors, so there are three levers. You can use fewer channels, fewer bits, or a lower sample rate. Each costs something. Fewer channels means less brain seen. Fewer bits means coarser voltage. A lower rate means a blurrier spike shape.
The Even-Chen review pulls all three. Its minimalistic design samples at 9 kS/s with 8 bits and records a narrower band of 250 Hz to 3 kHz. They set the sample rate to three times the top of the band, which is 3 × 3 kHz = 9 kHz, a little over the Nyquist minimum. That makes 8 × 9,000 = 72 kbit/s per channel, about 6.7 times less than the 480 kbit/s reference. For 1,024 channels it is 73.7 Mbit/s. Still too much for a tiny radio. Something stronger is needed, and the next chapters supply it.
A radio is not free to run. Each bit sent takes a small amount of energy, written in joules per bit. A joule is one watt for one second, and a nanojoule (nJ) is a billionth of that. Power is the energy per bit multiplied by bits per second, so the second multiplication is simply:
Pradio = R × Ebit = 491.5 × 106 bit/s × 10 nJ/bit = 4.9 W
Compare 4.9 W with the 80 mW budget from Chapter 1. It is 61 times too large. The 10 nJ per bit is an illustrative round number; real radios span a wide range. Suppose a very efficient link spends only 0.03 nJ per bit and tops out at 67 Mbit/s. Both numbers are illustrative, not from a datasheet. Even that link falls well short of 491.5 Mbit/s. Efficient and fast together is hard.
Try the whole product below. Pick the bits and the rate, set the channels, and read off the radio power. The bars use a logarithmic scale, so each gridline is ten times the one before.
Top bar: the data rate. The tick marks are reference links. Bottom bar: the radio power against the 80 mW budget.
Sourced: 480 kbit/s per channel (Even-Chen 2020, Table 1); 9 kS/s and 8 bits; 10 bits at 19.3 kHz (Musk and Neuralink 2019); Illustrative: the energy per bit values, the 67 Mbit/s mark (a made-up ceiling for a very efficient link), and the 2 Mbit/s mark (the on-air rate of the Bluetooth LE 2M mode; real throughput is lower).
Play with the 0.03 nJ/bit setting. Raw 1,024-channel data costs 14.7 mW, which sounds fine. But the data rate bar passes the illustrative 67 Mbit/s mark: that very efficient link cannot carry it. Two limits, rate and energy, can fail separately.
The symptom is a stream that stutters: dropped packets, a decoder that sees gaps. Before blaming the antenna, measure. Compute the offered load R from the equation and compare it with the link’s real throughput, which is always below its headline rate. If R is higher, no tuning of the radio will help.
The fix works on R itself. The Even-Chen review shows the scale. A binary threshold-crossing stream, one bit per millisecond, is 1 kbit/s per channel, so 1,000 channels need 1 Mbit/s. Sending 20 principal components of each spike at 8 bits each cuts their example further, to 0.16 Mbit/s, although the authors argue the extra circuit may not be worth it. Compare 1 Mbit/s with 491.5 Mbit/s: a factor of about 490.
Chapter 3
Compare raw samples, spike-band power and threshold crossings on the same trace, and count what each one costs and keeps
You stand outside a stadium and want to know how the game is going. You could record the whole roar and send the audio file. You could measure how loud the crowd is each second and send one number. Or you could count the cheers that rose above a level and send the count. Each choice is smaller than the one before, and each throws something away.
An implant faces the same choice with a voltage trace from the cortex. Three answers are in common use.
Send every number the ADC makes. Nothing is lost, and every later method stays possible: you can sort spikes, filter again, try a new decoder. The cost is the 480 kbit/s per channel from Chapter 2. This is what research systems do, over a cable.
A spike is a brief, sharp dive in voltage, about a millisecond long, when a nearby neuron fires. In the trace it stands well above the background wiggle, which is noise. A threshold crossing is the moment the voltage dives below a chosen line. The chip checks every sample against the line. When the voltage goes below it, the chip records one event. It sends that event and forgets the rest.
Where does the line go? Too close to zero and noise crosses it all the time (false alarms). Too far and small spikes slip through (misses). The usual rule sets the line at a multiple of the noise level, such as 4.5 times the noise’s standard deviation (the typical size of its wiggle, written σ).
There is a trap in measuring σ. Spikes are big, so they inflate an ordinary standard deviation. A robust fix, used in the Wave_clus spike-sorting method (Quiroga et al. 2004), is σ ≈ median(|x|) ÷ 0.6745. The median is the middle value when you sort them, and a few huge spikes cannot move it. For pure Gaussian noise the median of the absolute value is exactly 0.6745 σ.
Try it with seven samples: 0.2, 0.4, −0.5, 0.7, −0.9, 1.1 and −8.0 (a spike). Sorted by size, the absolute values are 0.2, 0.4, 0.5, 0.7, 0.9, 1.1, 8.0, and the median is 0.7. So σ ≈ 0.7 ÷ 0.6745 = 1.04, and a 4.5σ line sits at −4.67, which catches the −8.0 spike. The ordinary standard deviation of the same seven numbers is 2.9, and 4.5 times that is 13.2, a line the spike never reaches. One spike hid itself.
The third choice skips the decision. Spike-band power (SBP) first filters the trace to keep only a band of frequencies where spikes live, 300 to 1,000 Hz in the paper that proposed it. A band-pass filter is a circuit that lets a range of frequencies through and blocks the rest. Then the chip takes the size of each filtered sample, ignoring sign, and averages those sizes over a short bin, say 20 ms. It sends one number per bin: how much spike-like energy there was.
No threshold is needed, so there is no line to set wrongly, and the chip need not resolve each spike. Nason and colleagues (Nature Biomedical Engineering, 2020) report that this band is dominated by single neurons near the electrode and, in monkey experiments, performed equally well or better than threshold crossings for finger and cursor control. A university press release linked it to roughly 90% lower power use. Treat that figure as a press claim.
The Even-Chen review adds the ranking that matters here. Sorting spikes into neurons gives only about a 5% gain over plain threshold crossings. So the cheap choices are not a sad compromise. They hold most of the useful information.
Now run all three on one trace. The trace is 100 ms long with eight hidden spikes at known times. You can move the noise and the threshold and see what each method sends.
Top: the raw trace and the threshold line; green ticks are crossings on true spikes, red ticks are false alarms. Bottom: for each 20 ms bin, the spike-band power (pink) and the crossing count (green), with the true spike count as a dot.
Illustrative: a synthetic trace with eight spikes of 7 to 10 units on noise of 1 unit, 30 kS/s, a two-stage one-pole filter standing in for the 300 to 1,000 Hz band, 8 bits per bin value. Sourced: 480 kbit/s raw and 1 kbit/s for events (Even-Chen 2020); band and performance claim (Nason et al. 2020); the median rule (Quiroga et al. 2004).
Leave the noise at 1.0 and the threshold at 4.5σ. The detector finds all eight spikes. Now raise the noise to 2.0 without moving the threshold. Because the line is a multiple of the noise estimate, it moves up with the noise. Small spikes now sit below it and drop out. The false alarms stay few, but misses grow. Lower the threshold to 3σ to recover them and watch noise start to cross. That trade between misses and false alarms never goes away. A threshold only chooses where on the trade you stand.
Notice what spike-band power does. Its bars rise and fall with the number of spikes in a bin even when the noise is high, because it measures energy, not individual events. It is also the smaller stream, at one 8-bit number per 20 ms: 400 bit/s per channel, against 1,000 bit/s for events sent every millisecond. But it carries no spike times finer than a bin, and it cannot say which neuron fired.
Each choice gives up something a later step might want. Raw samples keep the spike shape, so a later algorithm can tell two neurons apart by their shapes. Crossings keep only when a spike happened. Spike-band power keeps only how much happened per bin. If a decoder needs to know which neuron fired, only raw samples (or sorted spikes) can supply that. If it only needs how active a patch of cortex is, the smaller streams are enough. Whether that is true for a given task is an empirical question, and Chapter 7 returns to how to ask it.
The symptom is a decoder that works in the morning and drifts by evening. The measurement is the event count per channel over time: if it climbs while the animal does the same task, the noise has risen and the threshold has not followed. The fix is to keep σ updated with the robust estimate above, and to watch counts for a drift.
Chapter 4
Round the voltage to fewer levels, measure the error, and find the point where fewer bits starts to break detection
You measure the height of a hill with a ruler marked every metre. You read 37 m, but the true height is 37.4 m. Your error is under half a metre, always. Use a ruler marked every centimetre and the error shrinks a hundredfold. The ruler is the ADC. Its marks are the levels. The gap between two marks is the step, also called the least significant bit or LSB.
Every bit you remove from a sample doubles the step. A doubled step doubles the rounding error. This chapter asks how coarse the ruler can be before a spike gets lost. The bits are not free: Chapter 2 showed that each one is multiplied by the sample rate and the channel count.
An ADC covers a fixed voltage range, from −VFS to +VFS. (“FS” means full scale.) A b-bit ADC splits that range into 2b levels. So the step is the range divided by the number of levels.
Where does √12 come from? The rounding error of one sample is anywhere between −Δ/2 and +Δ/2, each value equally likely. For an error spread evenly over a width Δ, the average squared error is Δ2/12. The square root gives Δ/√12, about 0.29 steps. Halve the step and the error halves. In decibels, each added bit improves the signal-to-quantization-noise ratio by about 6 dB. The quantization noise lesson derives this for a full-scale sine wave as 6.02 b + 1.76 dB.
A full-scale sine wave is a textbook case. A neural trace is not like that. The noise is small, and the spikes are only ten or so times bigger. But the range must also leave room for slow drifts and big artefacts, so the noise fills only a thin slice of the range. Then the useful question is: how big is the step compared with the noise?
Take the Neuralink 2019 chip. Its amplifier has 5.9 µV rms of input noise, and Table 1 gives a maximum differential input of 7.2 mV peak to peak. If the 10-bit ADC spans that range, the step referred to the input is 7,200 µV ÷ 1,024 = 7.0 µV (my arithmetic). The noise is about 0.84 steps. The step is about the size of the noise. Finer steps would only measure the noise more precisely. The designers matched the ruler to the noise.
The Even-Chen review reaches the same kind of conclusion. Its minimalistic design uses 8 bits and notes that about 7 effective bits (“SNR-bits”) keep decoding performance for that amplifier. Most of the 16 bits in a lab recording are spent describing noise.
A worked case on a scale where the noise is 1 unit (1σ). Let the range be ±32σ, wide enough that a 10σ spike never clips. With 8 bits: Δ = 64σ ÷ 256 = 0.25σ. The error is 0.25 ÷ 3.46 = 0.072σ rms. Its power is 0.0722 = 0.0052 of the noise power, half a percent. Invisible. With 5 bits: Δ = 64 ÷ 32 = 2σ. The error is 0.58σ rms, a third of the noise power added by rounding. Now the trace is a staircase with steps wider than the noise.
Notice what the range does. The same 8 bits over ±128σ gives a step of 1σ, four times coarser than over ±32σ. A wide range protects against clipping and wastes resolution. A narrow range keeps resolution and risks clipping a big artefact. Many designs tune the amplifier gain so the noise fills a few steps. The gain, the range and the bits are one decision, not three.
Drag the bits and the range below. The thin line is the true voltage. The staircase is what the ADC reports. The lower plot shows rounding error against bits on a log scale, so the 6 dB-per-bit slope is a straight line.
Top: one spike, true (thin) and quantized (stairs). Bottom: rounding error against bits; the dot is your setting. Lower the bits until detection fails.
Illustrative: the same synthetic eight-spike trace as Chapter 3 (noise 1 unit, spikes 7 to 10 units), detected at 4.5σ with the median rule. Sourced: 10 bits, 5.9 µV rms and 7.2 mV peak to peak (Musk and Neuralink 2019, Table 1); 8 bits and SNR-bits of 7 (Even-Chen 2020). The 0.84 steps figure is my arithmetic and assumes the ADC spans the input range.
At 8 bits and ±32σ every spike is found and the noise estimate is 1.1σ. Squeeze to 4 bits and the step grows to 4σ. Most samples round to zero. Now the median of the absolute values is zero, so the noise estimate is zero, and the threshold lands at zero too. In the toy trace, 4 bits gives 39 false alarms, and 5 bits gives 77. The estimate has collapsed.
The symptom is an event stream that is suddenly dense and meaningless after a gain change. The measurement is the noise estimate in LSBs: if the median of |x| in raw codes is below about 1, the ruler is too coarse for the noise. The fix is to lower the range (more gain) or add a bit. Narrow the range too far, though, and large spikes and artefacts clip. Both ends of the range are a trade, and the dial is the gain.
Chapter 5
Do filtering with whole numbers only, then find the dead band that traps a naive integer filter and the extra bits that free it
A shop till does not store prices like $3.50. It stores 350 cents. Every price is a whole number, and everyone agrees that the last two digits are cents. Adding and comparing are exact and fast. The cost is that you must always remember the agreement: the number 350 means 3.50.
That is fixed-point arithmetic: whole numbers with an agreed position for the decimal point. The opposite is floating-point, where each number carries its own point and a separate circuit handles it. Floating-point is convenient, and it is bigger and hungrier in silicon. A chip that has to sip microwatts uses integers. Public descriptions of implant signal-processing work name exactly this: “fixed-point or quantized versions of algorithms”, with the trade between accuracy, latency and power weighed at each step.
The Q format names the agreement. In Q1.15 a 16-bit signed integer has 1 sign bit and 15 fraction bits. The stored integer n stands for the value n ÷ 215 = n ÷ 32,768. So 16,384 means 0.5, and 8,192 means 0.25. The largest value is 32,767 ÷ 32,768 ≈ 0.99997. Every number lives between −1 and just under 1.
Multiplication shows the main trick. Multiply 0.5 by 0.25 as integers: 16,384 × 8,192 = 134,217,728. That product has 30 fraction bits, twice as many as we want. To get back to 15, shift it right by 15 places: 134,217,728 ÷ 32,768 = 4,096. And 4,096 in Q1.15 is 0.125, the right answer. A right shift by 15 places is the same as dividing by 215, and in hardware it costs nothing but wiring.
The first is overflow. Add 0.75 (24,576) and 0.5 (16,384). The true sum is 1.25, but the largest value is 0.99997. In 16-bit two’s-complement arithmetic the sum wraps around: 40,960 becomes 40,960 − 65,536 = −24,576, which is −0.75. A large positive number turns into a large negative one. The usual cure is saturation: when a result is out of range, clamp it to the nearest limit. A clipped answer is wrong but close, while a wrapped answer is wrong and far.
The second is quieter, and it is the one this chapter plays with. Rounding happens at every shift, and a small error that repeats can trap a filter. Here is a filter every implant needs.
The electrode’s voltage drifts slowly. A chip often keeps a running estimate of the baseline (the slow average level) and subtracts it. The simplest tracker moves its estimate a small fraction of the way toward each new sample. With the fraction 1/2k:
In floating-point this works well. In integers, look at the shift. Suppose k = 6 and the input sits at 400 while the estimate sits at 380. The gap is 20. Then 20 >> 6 = 0, because 20 ÷ 64 is less than one and rounds down to zero. The estimate does not move. It never will. Every gap smaller than 2k = 64 is swallowed. The tracker stops up to 63 codes short of the truth. This region is the dead band.
There is a twist. When the gap is negative, the shift rounds toward minus infinity: −1 >> 6 = −1. So the estimate creeps downward all the way to the input, but stalls when approaching from below. The error has a direction, a built-in bias.
The fix is to keep spare fraction bits inside the estimate. Store M = m × 2f and shift by k there. Now the gap is 20 × 2f. With f = 6 spare bits that is 1,280, and 1,280 >> 6 = 20, so the estimate moves. The dead band shrinks to (2k − 1) ÷ 2f, under one code. The price is a wider register: the estimate now needs 10 + f bits, not 10. Spare bits fight dead bands; word length fights overflow. You balance them.
The input steps from 100 to 400 codes at sample 50. Pink is the integer tracker, grey the same filter in floating-point. Raise the spare bits to free it; make the register narrow to overflow it.
Illustrative: 10-bit codes with 2 codes of noise, a signed register clamped by saturation, and arithmetic shift (rounds down). The dead band of 2k − 1 codes follows from the formula in the text; the Q1.15 numbers are exact.
With the starting values the integer tracker stops near 343, about 57 codes short of the input and inside the 63-code dead band. (The noise nudges it up a little.) Move spare bits to 6 and it reaches 399. Now raise the spare bits to 10 with a 16-bit register. The estimate needs 400 × 1,024 = 409,600, far above the largest 16-bit value of 32,767, so it saturates and the tracker lies. A wider register fixes that, at the price of more silicon.
The symptom is a baseline that follows small drifts but never the big ones, or a spike detector that works on the bench and drifts out in the body. The measurement is a bit-exact comparison: run the same input through a floating-point version and the integer one, and plot the difference. A dead band shows up as a flat error, and an overflow as a sudden jump. The fix is to carry spare bits, round to nearest (add 2k−1 before the shift), size the register for the largest value, and saturate. Test the integer design against the float model before it goes into silicon.
Chapter 6
Send differences instead of values, write small numbers in short codes, and find the floor that noise sets
A friend reads you the hourly temperature: 21, 21, 22, 21, 22, 23, 23. You could write each number in full. Or you could write the first one, then only the changes: +0, +1, −1, +1, +1, +0. The changes are small, so each takes fewer digits. You lose nothing. You can rebuild every original value by adding the changes up.
That is the heart of lossless compression: remove predictable parts, and write what remains with short codes for common cases. Lossy compression goes further and throws information away for good, as spike-band power and threshold crossings do. Chapters 3 and 4 were lossy. This chapter is lossless, and it asks how far noise lets you go.
A broadband neural trace is dominated by slow voltage swings, the local field potential (the summed, slower activity of many cells). Neighbouring samples 33 µs apart are close. So predict that the next sample equals the last one, and send the delta, the difference. The deltas are small numbers clustered near zero, where the raw values were large numbers anywhere in the range.
A fixed 10-bit word wastes bits on numbers that are small. A Rice code (Golomb-Rice code) gives small numbers short codewords. It needs only a shift, a count and some wiring, which is why it suits tiny chips. Here is the recipe for a parameter k:
The length is q + 1 + k bits. Work two cases with k = 2. The delta +5 gives u = 10, q = 2, r = 2 (binary 10), so the code is 11 0 10, five bits. The delta −1 gives u = 1, q = 0, r = 1 (binary 01), so the code is 0 01, three bits. The delta 0 gives u = 0 and the code 0 00, three bits. Small deltas cost three bits, not ten.
The parameter k sets the trade. Too small, and a big delta needs a long run of ones. Too large, and every code pays k remainder bits it does not need. The best k sits near log2 of the typical size of u.
How low can any lossless code go? The answer is the entropy, the average surprise per symbol, in bits. For Gaussian noise of standard deviation σ codes, the entropy of one sample is about log2(σ × 4.13). With σ = 4 codes that is log2(16.5), or 4.0 bits, and no lossless method can beat it by a trick. The deltas of independent noise have a spread √2 times larger, which costs half a bit more. So a noisy channel cannot be squeezed below a few bits per sample, however clever the code.
This is the key lesson about compressing neural data. The noise sets the floor. Lossless coding of the broadband signal gives a factor of about two. The big wins, 100 to 500 times, come from lossy steps that discard the noise itself: the spike-band bin of Chapter 3 or the event stream. Neuralink’s public description of its signal-processing work names “custom data compression to increase radio throughput” as one of the jobs, and this is the mechanism.
Below, a 200 ms trace is built from slow swings, noise and spikes. The device finds the deltas, Rice-codes them, decodes them again to check nothing was lost, and shows the average bits per sample against the plain 10-bit word and the entropy floor.
Top: how often each delta occurs. Bottom: average bits per sample for each Rice parameter, with your pick highlighted. Dashed lines: the 10-bit word and the entropy floor. Below the plot, real codewords for eight deltas around the first spike.
Illustrative: 6,000 samples built from a 10 Hz swing of 60 codes, a 40 Hz swing of 20 codes, Gaussian noise and eight spikes of eight times the noise. The encoder writes real bits and a decoder rebuilds the samples; the check covers the first 1,500. Entropy is measured from the deltas. Sourced: the idea that thresholds, binning and principal components cut far more than lossless coding comes from Even-Chen et al. 2020.
At the default noise of 4 codes and k = 2, the coder spends about 5 bits per sample against 10 for the plain word, a saving near two. Raise the noise to 16 codes and the best k grows, but the saving shrinks to about 1.5. The entropy line moves up with the noise. You can never go under it. Moving k above or below the best value costs bits at once, and the bar chart shows a clear valley.
The Even-Chen review lists the lossy options in the same units. A threshold-crossing bit per millisecond is 1 kbit/s per channel, so 1,000 channels need 1 Mbit/s. If instead the chip extracts each spike’s shape and sends 20 principal components (the directions that capture most of the shape’s variance, as in the PCA lesson) at 8 bits each, their example falls to 0.16 Mbit/s. They also argue that the gain may not justify the extra circuit. A bigger gain is not always the right trade. Every step costs silicon, and silicon costs power.
The symptom is a radio buffer that overflows during bursts. Spikes are rare and large, so they produce large deltas and long codewords, all at once. A steady average hides this. The measurement is the worst-case codeword rate over a short window, not the mean. The fix is a buffer sized for the burst, a rate-limited fallback (send a coarser signal when the buffer fills), or a smaller k tuned on bursts.
Chapter 7
Work backwards from the heat limit, price every stream, and pick the design that fits the patch and still feeds the decoder
A builder with a fixed amount of money does not start by choosing the furniture. She starts with the total, subtracts rent, and sees what is left. An implant designer does the same with milliwatts. The heat budget is the total. The amplifiers are the rent. What is left pays for the radio, and the radio’s bill depends on what you decide to send.
The earlier chapters each gave one piece. Now put them in order. This is what an algorithm-to-architecture decision looks like: for each choice, you weigh three things at once. Accuracy is how much of the brain’s message the decoder still gets. Latency is how long a signal waits before it can act. Power is the milliwatts used.
Here are five streams an implant could send, each with its data rate per channel.
Each one has a bill. The per-channel power is the amplifier and ADC part (23 µW, from the Neuralink chip: 6 mW ÷ 256) plus the radio part (bits per second times joules per bit). Add them for all channels and compare with the 80 mW budget of the 2 cm² patch.
pch = 23 µW + Rch × Ebit, Nmax = 80 mW ÷ pch
Take threshold crossings at 10 nJ/bit. The radio part is 1,000 bit/s × 10 nJ = 10 µW. The total is 33 µW per channel, and the patch holds 80 ÷ 0.033 = 2,424 channels. Now take raw samples at the same energy: 480,000 × 10 nJ = 4,800 µW per channel, so the total is 4,823 µW and the patch holds only 16 channels. A factor of 150 in channel count comes entirely from the choice of stream.
Each bar is the total power on a log scale, blue for amplifiers and yellow for the radio. The dashed line is the 80 mW budget. Click a design to read its numbers.
Sourced: 480 kbit/s raw and 1 kbit/s events (Even-Chen 2020); the 0.16 Mbit/s for 20 components at 8 bits (same paper); 23 µW per channel is 6 mW over 256 channels (Musk and Neuralink 2019). Illustrative: the energy per bit, the 142 kbit/s from the Chapter 6 toy, the 8-bit values per 20 ms, and the 2 cm² patch. Leaves out the DSP’s own power and the charging coil. Raw keeps all information; the others keep less, and only the decoder can say whether that matters.
Look at the pattern. The two lossless designs, raw and raw with Rice, are far over budget at 1,024 channels. Rice helps by a factor of about three, but 142 kbit/s per channel is still too many bits. Spike-band power, crossings and spike features all sit comfortably under the line, because in each the radio bill falls below the amplifier bill. Past that point, a cheaper stream saves almost nothing, since the amplifiers set the floor. This is the lesson of the Even-Chen paper, where the neural amplifier takes 92% of power in their proposed design.
Work in this order. First, fix the heat budget from the patch area. Second, pick the stream the decoder needs, using the ablation below. Third, find the channel count that fits: divide the budget by the per-channel cost. Fourth, check the real link carries the rate. Fifth, size the integer registers and buffers for peaks. If any step fails, go back one and loosen it. Do not try to fix a power problem by tweaking the filter, when the cause is a stream ten times too large.
Run the same recipe at 3,072 channels, the size of the Neuralink 2019 package. Crossings at 10 nJ/bit need 3,072 × 33 µW = 101 mW, over the 80 mW budget. The patch would need a little more area (2.6 cm² gives 104 mW) or a cheaper amplifier. Spike-band power at 400 bit/s costs 23 + 4 = 27 µW per channel, or 83 mW in all, just over. This is the honest shape of the problem: at thousands of channels, even a tiny stream leaves the amplifier bill nearly at the limit, so the amplifier’s microwatts matter as much as the radio’s.
Bins cost time. Spike-band power in 20 ms bins means a spike waits up to 20 ms before it is reported. Crossings sent every millisecond wait 1 ms. A public description of Neuralink’s application software sets a budget of 15 ms from live neural stream to device control. A designer reading that must ask whether a 20 ms bin even fits, or whether the chip should send smaller bins and let the receiver average them. Smaller bins mean more bits, which means more radio power. All three axes pull on each other.
A design can pass every bench check and still fail in the body. The symptom: a cursor that drifts or lags. The measurement is an ablation, a controlled removal. Decode the same session from each stream, raw, crossings and power, and compare the decoder’s accuracy. If the cheap stream is within a few percent of the best, you can use it, as the 5% gap between sorted spikes and crossings in the Even-Chen review suggests. If it is not, spend more bits. The fix is never a guess: it is a measurement on real recordings, repeated whenever the electrodes or the algorithm change.
Chapter 8
Keep the numbers, the checklist and the core code, and see where to go next
An implant is limited by heat, so it has a power budget of tens of milliwatts. Raw recording from a thousand channels makes hundreds of megabits per second, and the radio’s energy per bit makes that impossible. So the chip reduces the data early. It can send spike-band power or threshold crossings, which are lossy and tiny, or code the raw samples losslessly, which gains only a factor of about two because noise cannot be compressed. It rounds to the fewest bits that keep the step near the noise. It does its arithmetic in integers and tests them against a floating-point model for dead bands and overflow. Then it checks the whole stream against the decoder.
| What | Number | Why it matters |
|---|---|---|
| Heat guideline | 40 mW/cm² and 2°C | The wall that sets the whole budget (Marblestone 2013) |
| Budget, 2 cm² patch | 80 mW | Illustrative size; 2.0 cm² × 40 mW/cm² |
| Neuralink 2019 ASIC | about 6 mW for 256 channels, 23 µW each | 10-bit ADC at 19.3 kHz; 3,072 channels; USB-C cable |
| Amplifier power | 0.5 to 10 µW per channel; floor 177 nW | Quiet amplifiers cost power by physics (Even-Chen) |
| Raw rate | 480 kbit/s per channel; 491.5 Mbit/s for 1,024 | 16 bits × 30 kS/s |
| Neuralink ADC rate | 193 kbit/s per channel; 571 Mbit/s for 3,072 at 18.6 kS/s | 10 bits × 19.3 kS/s per chip; 18.6 kS/s in the 3,072 package (my arithmetic) |
| Relaxed recording | 9 kS/s, 8 bits, 250 Hz to 3 kHz: 72 kbit/s | 6.7 times less than raw |
| Threshold events | 1 kbit/s per channel; 1 Mbit/s for 1,000 | About 480 times less than raw |
| Principal components | 20 × 8 bits: 0.16 Mbit/s for 1,000 channels | Authors doubt it repays the circuit |
| Transmitter share | 50 to 93% of power, conventional | Why radio bits are the lever |
| Sorting vs crossings | about 5% decoding gain | Cheap signals hold most of the value |
| Spike-band power | 300 to 1,000 Hz; equal or better than crossings | Nason 2020; the 90% power claim is a press claim |
| Rounding error | Δ = 2VFS/2b; e = Δ/√12; 6 dB per bit | Match the step to the noise |
| Noise level | σ = median(|x|) / 0.6745 | Robust to spikes |
| Dead band | 2k − 1 codes | Cure: spare fraction bits |
| Rice code | q + 1 + k bits, q = u >> k | Lossless gain is about 2 times; noise sets the floor |
pythonimport numpy as np def rate_bps(n, bits, fs): # Ch 2: R = N x b x fs return n * bits * fs def radio_mw(bps, nj_per_bit): # Ch 2: P = R x E_bit return bps * nj_per_bit * 1e-9 * 1e3 def max_channels(area_cm2, rho=40, amp_uw=23, r_ch=1000, nj=10, fixed_mw=0): per_ch_mw = amp_uw * 1e-3 + radio_mw(r_ch, nj) # Ch 1 + Ch 7 return int((rho * area_cm2 - fixed_mw) / per_ch_mw) def sigma_hat(x): # Ch 3: robust noise level return np.median(np.abs(x)) / 0.6745 def crossings(x, k=4.5, refractory=30): # Ch 3: threshold crossings thr, last, out = -k * sigma_hat(x), -refractory, [] for i in range(1, len(x)): if x[i] < thr <= x[i - 1] and i - last >= refractory: out.append(i); last = i return out def quantize(x, bits, v_fs): # Ch 4: step = 2 V_FS / 2^b d = 2 * v_fs / 2 ** bits return np.clip(np.round(x / d), -2 ** (bits - 1), 2 ** (bits - 1) - 1) * d def rice_encode(deltas, k): # Ch 6: zigzag, then unary + k bits bits = [] for d in deltas: u = 2 * d if d >= 0 else -2 * d - 1 bits += [1] * (u >> k) + [0] + [(u >> j) & 1 for j in range(k - 1, -1, -1)] return bits def track_baseline(x, k=6, spare=6, width=16): # Ch 5: integer tracker hi, lo, m, out = 2 ** (width - 1) - 1, -2 ** (width - 1), x[0] << spare, [] for v in x: m = min(hi, max(lo, m + (((v << spare) - m) >> k))) # >> floors, as hardware does out.append(m / 2 ** spare) return out
This lesson is the bridge between the analog front end and the decoder. The hardware lesson and the analog front end lesson make the samples. The spike detection lesson goes deeper on what a threshold crossing is. After this lesson the decoders take over, starting with linear decoders and the Kalman decoder, which read binned counts and band power every 20 ms. The general tools are on this site already: quantization noise, PCA for spike features, the Kalman filter and ICA for cleaning signals.
Honesty notes. Every toy trace here is synthetic and says so. The energy per bit, the 2 cm² patch, the 8-bit band-power values and the per-design rates for the Rice and band-power streams are illustrative. Company claims about chip numbers in the press are not in the 2019 paper and are left out.
Now press Present or Teach and explain from memory why a 1,024-channel implant cannot stream raw data, what it sends instead, and how you would check that the cheaper stream still works. Then go back to the top and drag the channel count.