TurboQuant: A Spicy OpenReview Session
A Research Paper Moves Markets
In this series, we review NeurIPS, ICLR, AAAI, ICML, and CVPR papers in an approachable way. Our main tool is NotebookLM, which is hacking into our human desire for narratives (improve recall and comprehension). To supplement, I provide brief commentary drawn from my experience as a Senior Research Scientist at Nvidia.
Today’s paper:
ICLR 2026 paper
Commentary
This is one of two papers that have suggested that Google has addressed the memory limitations in large language models. One of the limitations is that it’s difficult to fit the entire KV cache into GPU memory for long context tasks. They propose solving this using an algorithm that is very reminiscent of compressed sensing, which shows the power of randomization in high-dimensional spaces.
Their method randomizes the long input vectors to a Gaussian space, buckets that Gaussian space, and then uses a second stage to correct angle errors for navigating that space. The randomization method lead to significant controversy on the OpenReview, with another paper proposing the method, and denigrated by the Google authors: https://openreview.net/forum?id=tO3ASKZlok
In any case, the payoff is significant in terms of recalling a single sentence from a huge 140,000-token document and high impact in database retrieval. I spoke to the last author, which is usually the senior author, a principal engineer at Google, Vahab Mirrokni. In his and his colleagues’ talks, they suggested that Google had technology in their company internal language model that was 10x more performant than what they exposed externally. These are the types of innovations that would contribute to that improved performance.
NotebookLM podcast and transcript (Google AI generated, lightly edited)
Read full AI transcript
“Right now, uh, the smartest AI models on Earth are effectively suffering from a physical traffic jam.
Oh, absolutely. A massive one.
Yeah. I mean, their processing cores operate at lightning speed, right? But they’re just starving for data because the doorway to their memory banks is simply too small.
It’s the absolute ceiling the industry is hitting right now.
Right. So, to set the stage for you, you have the AI’s vast memory storage,
uh, the HBM or high bandwidth memory
which holds all the context of whatever conver you’re having heavy storage.
Exactly. And then you have the Fram, which is this tiny, incredibly fast workbench where the actual, you know, thinking happens,
right? The processor.
Yeah. So, the processor is ready to work, but pulling massive amounts of data from the HBM onto that tiny RAM workbench is creating this severe bottleneck.
It really is. I mean, you can build a processor with as many cores as you want, but if it spends most of its time sitting idle just waiting for the highdimensional data to squeeze through that narrow doorway, well, your incredibly expensive AI I system just crawls,
right? And if you’ve ever watched an AI assistant suddenly slow down or, you know, start printing text word by agonizing word when you ask it to analyze a giant PDF,
you’re watching this exact memory bottleneck happen in real time.
Exactly. You are feeling the latency of that data transfer.
Which brings us to our mission for today’s deep dive into the source material. We’ve got a really dense cutting edge research paper today titled Turboquant Online Vector Quantization with Near Optimal Distortion. Great.
It’s a fantastic paper.
It is authored by researchers at Google Research, NYU, and Google DeepMind. And we’re going to break down how a clever new mathematical technique manages to compress these massive AI memory structures down to tiny fractions of their original size.
And crucially, it does this entirely on the fly.
Right on the fly. And without making the AI forget what it just read. So, you get a shortcut to understanding the absolute bleeding edge of AI hardware efficiency.
The stakes here really cannot be overstated. I mean, solving this memory bottleneck doesn’t just make your queries faster.
No, it changes the whole game.
It fundamentally changes the economics of how artificial intelligence is deployed. If you can shrink the memory footprint without losing accuracy, you allow massive, highly capable models to run on standard affordable hardware instead of multi-million dollar server farms,
which is huge for well, everyone. So, to understand how Turboquant actually pulls this off, we have to look at how these large language models actually remember things,
right? The mechanics of it.
Yeah, we hear the term KV cache, the key value cache thrown around a lot. But mechanically, what is actually happening in the hardware when an AI is say generating text for you?
Well, most modern LLMs are what we call decoderbased transformers. Okay.
They don’t generate an entire paragraph at once. They predict the very next word or token based on literally everything that came before it.
One word at a time.
Exactly. So, To make sure that next word actually makes sense in context, the model has to constantly look back at the mathematical representations of all those previous words,
right? Because it’s not looking at the English words themselves, right?
Yeah.
No, it doesn’t store the literal words. It stores highdimensional vectors. And those vectors collectively are the key value cache.
And a highdimensional vector, just to be clear for you listening, is essentially a massive list of highly precise floatingoint numbers.
Yes, very precise.
So if you’re feeding the AI an entire her textbook or like a massive codebase that KV cache scales up linearly.
It gets huge,
right? The sheer volume of those floatingoint numbers becomes way too large to quickly move from the HBM storage vault to the SRAMM workbench.
It really does. And you know, this isn’t isolated just to generating text either.
Oh, right. Vector databases.
Exactly. The exact same physics problem applies to vector databases and nearest neighbor search. Imagine an AI searching through a massive legal database to find a specific precedent out of millions of documents.
It has to dig through all of them,
right? And it does this by conducting a nearest neighbor search in a highdimensional space. It takes your query, turns it into a vector, and then calculates the inner products, meaning the mathematical similarities between your query vector and millions of database vectors.
And if all those vectors are stored as these massive high precision numbers, the memory bandwidth required just to read them becomes totally prohibitive.
It grinds the system to a fault.
So the obvious solution is compression, right?
Yeah.
In the AI world, this is called vector quantization or VQ.
Yes.
We basically want to put the AI’s memory on a diet by converting those heavy floating point numbers into simple low bit width integers,
right? Shrinking them down.
But we have to do it while minimizing what’s called distortion. Like think of highdimensional vectors like highly detailed architectural blueprints.
I like that.
We need to turn them into simple lowresolution pixel sketches. Just a few bits of data so they can easily fit through that narrow doorway of the computer chip. But on the other side of the doorway, we still need the builders to know exactly where the walls go. If the distortion is too high, the AI essentially builds a house with a door in the ceiling.
That analogy highlights the core tension perfectly because the goal isn’t just compression, you know, it’s structural preservation,
right?
And if we connect this to the bigger picture, this actually traces all the way back to Claude Shannon’s seinal work on source coding theory in 19 1948.
Wow. 1948.
Yeah. Shannon established that there is an absolute calculable limit to how well you can compress data for any given acceptable level of distortion.
Okay.
It’s mathematically proven and it’s known as the Shannon distortion rate function.
It’s honestly amazing that a physical limit calculated with pencil and paper just after World War II is still the exact theoretical ceiling we are hitting with multi-billion dollar AI clusters today.
It really is wild to think about. And the ultim ultimate goal of any quantization scheme is to get as close to that Shannon limit as physically possible.
But the paper points out that current methods are trapped in a pretty brutal tradeoff, right?
Yeah, they are. So, some methods require heavy offline pre-processing,
meaning they have to stop and think,
right? They have to pause, analyze the entire data set, and build a custom compression dictionary tailored to that specific data. That gets you close to the Shannon limit, sure, but it is incredibly slow,
which completely doesn’t work. If you are chatting with an AI and trying to generate text on the fly.
Exactly.
I mean, you can’t pause to analyze a KV cache that is actively being built word by word. You need an online method that compresses instantly.
Right. But until now, the extremely fast online methods suffered from terrible distortion rates
because they just chopped it up randomly.
Yeah. They chopped up the data too half-hazardly, completely destroying the geometric structure of those vectors.
So, if the offline methods are way too slow and the fast methods just ruin the data. How on earth do you compress a vector you’ve never seen before instantly?
It’s the million-dollar question
because you can’t build a custom dictionary for it. And that leads us to Turboquan’s first major breakthrough, which is the MSE optimized Turboccoin. But I have to admit, when I read how they solved this, it sounded completely counterintuitive to me. The paper says they use a data oblivious algorithm,
meaning it doesn’t care what the input vectors look like at all.
Right? Because the very first step it takes is applying a random rotation matrix to the input vectors. It literally spins the data in this massive highdimensional space.
It does.
Okay, let’s unpack this.
Yeah,
you’re saying that by randomly spinning or scrambling the data, it actually makes it easier to organize. Isn’t that like scrambling a Rubik’s cube and hoping the colors naturally sort themselves?
It totally sounds like that. On a human scale, you know, in three dimensions, yes, it seems like pure chaos,
right?
But the magic of this paper relies on what happens in incredibly high dimensions. We’re talking vectors with hundreds or thousands of dimensions. Okay.
In those spaces, randomness actually creates statistical certainty due to the central limit theorem.
How so?
Well, when you apply a random rotation, you are essentially mixing all the original coordinates together to form each new coordinate.
Okay. So, you are sort of blending the data.
Exactly. You’re blending it. And because each new coordinate is a sum of many independent pieces of the original vector, the central limit theorem dictates that the values will inevitably push toward an average.
Ah,
the math essentially forces each individual coordinate into a highly predictable distribution, specifically a beta distribution.
Okay.
Which as the number of dimensions scales up, beautifully converges into a standard Gaussian distribution.
A classic bell curve.
Exactly. A classic bell curve.
Okay, that makes sense. By randomly spinning the data, you force any weird, chaotic, lopsided data into the exact same predict bell curve shape every single time.
Yes. And here is the truly crucial part. The math proves that distinct coordinates in these randomly rotated vectors become nearly independent of one another.
Meaning they don’t affect each other anymore.
Exactly. The hidden correlations between say coordinate A and coordinate B just vanish.
Which means you don’t need a massive complex compression dictionary to understand the whole vector at once because the coordinates are independent and they all follow that exact same predictable bell curve. You can just compress them one by one.
Yes, you can apply a remarkably simple one-dimensional optimal scalar quantizer to each coordinate separately.
Wow.
Because we know exactly what a standard gshian bell curve looks like, we already know the mathematically perfect way to compress it. The researchers use a continuous k solver, specifically the Lloyd Max algorithm.
And how does that algorithm actually work mechanically?
It basically calculates the op optimal way to slice up a bell curve into discrete buckets.
Okay,
most of the data in a bell curve lives right in the middle bulge, right? So, the Lloyd Max algorithm allocates lots of tight, precise buckets right there in the center.
Makes sense.
And the tails of the curve have very little data, so it creates wider buckets out there. It’s essentially a mathematically perfect pre-calculated cookie cutter.
So, they spin the unknown data to force it into a standard bell curve and then instantly chop it up using this optimal cookie cutter. They don’t have to pause to analyze anything at all.
Yeah.
And the results in the paper for this are stunning.
They really are.
They prove that the expected distortion, the mean squared error or MSE, is within a tiny constant factor of the theoretical Shannolor bound.
It is within a factor of about 2.7 of that absolute theoretical limit defined by Shannon.
That’s incredibly close.
And for very low bit widths, like if you’re doing just one bit per coordinate, it’s about a factor of 1.45 away from the optimal.
Wow. It guarantees near-perfect structural integrity instantly without ever needing to tune itself to the data.
So on the surface, you’d think problem solved. We compressed the architectural blueprint into a sketch, pushed it through the chip, and the resulting vector looks structurally accurate,
right? It has a very low mean squared error.
But the authors discovered a hidden basically fatal flaw when the AI actually tries to use those compressed vectors to do its job.
And this is where the paper moves from brilliant theory to practical. reality because minimizing the mean squared error is fantastic for making the reconstructed vector look generally like the original. But AI models don’t just look at vectors, they compare them.
Right. The inner products we talked about.
Exactly. When conducting a search or generating the next token, the AI computes an inner product to determine the mathematical relationship between two vectors.
And the researchers reveal that MSE optimal quantizers like the one we just described are actually mathematically biased. when estimating those inner products.
Yes, heavily biased.
For example, the paper shows that at a one bit width, there is a massive multiplicative bias of 2 over pi,
which systematically skews the entire calculation. Yeah.
If you are running a nearest neighbor search in a vector database, this bias is totally disastrous.
Here’s where it gets really interesting. To visualize why this is so dangerous, think of it like drawing a perfectly scaled map of a city, but all the compasses point slightly off.
Oh. Perfect analogy.
The distances between the buildings are completely right. That represents your low mean squared error,
right?
But if you try to figure out which direction to walk to get from point A to point B, the inner product, you end up lost,
right?
The directional heading is just biased.
And the danger of that skewed compass is that in a 1500dimensional space, a tiny directional bias doesn’t just get you a little lost,
right? It compounds.
It compounds massively. It means your AI completely misses the correct data and fetches a totally irrelevant piece of information from the database.
Thanks.
Yeah. So, you need a way to correct that compass heading without ruining the perfectly scaled map you just drew.
Which brings us to the second half of their solution. Yeah.
It’s a two-stage approach they call the inner product optimal turbo quant.
Right.
Stage one is just the MSE quantizer we just talked about.
But they do something really clever here. They run it
using one less bit than their total budget.
Yes.
So, if the hardware allows them a budget of say three bits per core, ordinate. They only use two bits to get that low MSE,
leaving them with exactly one bit remaining in their budget to go fix the compass.
Exactly. For stage two, they look at what they call the residual. The residual is just the tiny leftover error from stage one,
just the minuscule difference between the original vector and the newly compressed one.
Right? So they take that residual error and they apply a one bit quantized Johnson Linden Strauss transform to it. The QJL transform.
And the QJL transform is the absolute secret ingredient here.
Yeah.
Because instead of trying to precisely map out that tiny residual error, the QJL uses a random projection to essentially assign it a single bit, literally just a plus one or a minus one sign flip.
Wait, how does a simple plus or minus sign flip fix a complex directional bias across thousands of dimensions?
It works because the mathematics of random projections. When you apply that plus or minus flip across hundreds of dimensions based on a random projection, the math proves that it provides a completely unbiased estimate for inner products.
It just naturally balances out.
It averages out perfectly in high dimensions.
So stage one does the heavy lifting of shrinking the vector and getting the structure right. And stage two uses that single final bit as the qjl compass to perfectly correct the directional heading of the leftover error.
And what’s fascinating here is that this two-step combination yields a perfectly unbiased inner product estimator while still maintaining those near optimal distortion. That’s wild.
It entirely eliminates the need for data specific tuning. Competing offline methods which rely on heavy hesshen matrix calculations take an eternity to compute the sort of directional correction, right?
But turbocon does it instantly on the fly just by spinning the data and applying that one bit residual correction.
I mean, the math is undeniably elegant, but we know theory is one thing and reality is another, right?
Of course,
the researchers obviously had to put this to the test against the state-of-the-art competitors. to see if it actually works in real world AI applications.
And they certainly did. They bypassed simple toy problems and went straight for the most demanding long context tasks available in the industry right now.
Yeah. Let’s look at the needle in a hay stack test.
Oh,
I love this benchmark because it’s just so literal.
It really is.
They took the Llama 3.18B model and they basically hid a single random sentence, the needle, inside a massive document of up to 104,000 tokens, the hay stack.
And for scale for you, listening. 104,000 tokens is roughly the length of a medium-sized novel.
The AI has to ingest the entire book into its working memory. And then the researchers ask it a highly specific question about one single sentence buried somewhere in like chapter 12.
And they force the AI to do this while compressing its KV cache memory down to just 25% of its normal size, a 4x compression ratio.
Right.
So, how did TurboQuan handle it?
Flawlessly. It retrieved the hidden sentence perfectly across the entire 104k context length. It completely outclassed baseline approaches like snap KV, pyramid KV, and KIVI.
Why did those other methods fail, though?
Well, because they rely on either evicting tokens, the guess are unimportant or using less rigorous scalar quantization that ruins the data structure. As the context gets longer, those errors compound, and the AI literally forgets where the needle was.
Wow.
But with Turboquant, the AI’s memory was squeezed to a quarter of its size, but its ability to recall information remained identical to a full uncompressed 16bit cache.
That is incredible. And they didn’t stop at the needle test, right? They ran it through the long bench tasks which test summarizing massive documents, multi-document question answering, and complex code completion.
Yes. And here they used a really clever mixed precision approach.
Oh, right.
They observed that not all memory channels are created equal. So they separated the channels into outliers which contain extreme values that are disproportionately important to the AI’s attention mechanism. and normal non-outlier channels.
Okay. So, treating them differently based on importance.
Exactly. They allocated the outliers three bits of precision and the normal channels just two bits
which results in effective average bit widths of just 2.5 and 3.5 bits per channel.
Right?
And even at those incredibly microscopic bit widths, Turboquant matched the performance of the massive uncompressed 16bit cache.
We also have to highlight their tests on vector databases for nearest neighbor search.
Yeah, the WPedia tests. Right? They used massive real world data sets like DBPedia with 1536dimensional open AI embeddings and the classic glove data sets.
Right? They put it up against heavy hitters in the database world like product quantization or PQ and rabbit Q.
And TurboQuant consistently delivered higher recall ratios, meaning it found the correct nearest neighbors more accurately despite the high compression.
Amazing.
But the truly staggering metric wasn’t just the accuracy. It was the indexing. time.
Oh yeah,
BQ requires you to pause your system and build a custom code book. Rabbit Q isn’t fully vectorized, so it drags heavily on the CPU, but Turbo Quan’s indexing time was virtually zero.
How does it manage zero indexing time? Like, how is that physically possible?
Because the entire algorithm is just a random rotation followed by a scalar lookup.
Oh, right.
It is mathematically simple enough to be fully vectorized, meaning it runs massively in parallel on GPUs at lightning speed. It never pauses to think about the data. just processes it.
Which brings us to the ultimate question for you. If you are a developer building an app or just an everyday user relying on these models, why does it matter that an algorithm beat something called rabbit Q on a DBPedia test?
It matters because this is how we democratize artificial intelligence.
Yes,
right now running an AI with a massive memory one that can read entire code bases or cross reference hundreds of legal contracts at once. requires incredibly expensive high-end server hardware
because of the HPM,
right? The memory bandwidth bottleneck makes it cost prohibitive for most developers to run these models locally. Turboquant fundamentally changes the math of the hardware.
It essentially gives standard hardware the memory capacity of a supercomput.
Exactly. It means we can run massive context models locally incredibly fast. Means vector database searches for retrieval augmented generation where an AI pulls external knowledge into its working memory will have virtually zero indexing delays. Wow.
The AI can instantly pull vast amounts of data without grinding your system to a halt.
Well, we set out today to understand how we could put an AI’s memory on a diet without making it forget. And this paper delivers exactly that.
It really does.
By combining the counterintuitive brilliance of random rotations to achieve near optimal mean squared error and then elegantly fixing the inner product bias with a one-bit residual qjl transform. They have fundamentally solved the major physical limit in modern computing.
It’s a beautifully constructed mathematical solution. I mean, they took a chaotic highdimensional problem, forced it into a predictable shape, and compressed it at the very limits of information theory.
And as we wrap up this deep dive into the source material, looking at how efficiently this algorithm handles complex data leaves me with a lingering thought for you.
Oh,
yeah. If mathematical algorithms can randomly rotate and compress the vast, dizzying complexity of an AI’s knowledge down to just 2.5 bits per channel, without losing a single drop of its meaning. It really makes you wonder about human communication.
That’s a deep rabbit hole.
Think about it. How much of our own language, our endless meetings, our daily data consumption is just redundant noise? Are we operating in exhausting highdimensional spaces when we really only need a few bits of genuine signal to truly understand each other?
That is a profound way to look at it. We spend so much energy transmitting data, but perhaps very little of it is actually essential. information,
something to ponder as you go about your day. Maybe we all need a little turbo quant for our own brains so we can finally fit all this information inside our skulls without the traffic jam. Thanks for joining us and we’ll catch you on the next deep dive.”