---
id: "concept-qjl"
type: "concept"
source_timestamps: ["05:38:00", "07:06:00"]
tags: ["mathematics", "error-correction", "algorithm"]
related: ["concept-turboquant", "concept-polar-quantization", "concept-data-oblivious-algorithm", "framework-turboquant-process"]
definition: "A data-oblivious mathematical error-correction technique used in Turboquant that uses a single bit to fix residual rounding errors, enabling perfect lossless compression."
sources: ["s49-killed-ram-limits"]
sourceVaultSlug: "s49-killed-ram-limits"
originDay: 49
---
# Quantized Johnson-Lindenstrauss (QJL)

Quantized Johnson-Lindenstrauss (QJL) is the **second, critical step** in [[concept-turboquant]].

While [[concept-polar-quantization]] rotates data into a more predictable coordinate system to save space, it inherently introduces tiny residual errors (e.g., rounding a 36.5° angle to 37°). In traditional computing this is acceptable, but in LLMs these tiny errors **compound over thousands of layers** of context, leading to unacceptable hallucinations or degradation in reasoning and attention scores.

QJL acts as a mathematical error-checker that corrects these residual errors using **just a single bit of data**. It effectively eliminates the bias and attention-score degradation that usually accompanies aggressive quantization.

The technique builds on the **Johnson-Lindenstrauss lemma**, a fundamental property of high-dimensional vector spaces stating that random projections approximately preserve pairwise distances. The 'quantized' variant adapts this to discrete bit-level corrections.

Because QJL is a **[[concept-data-oblivious-algorithm]]**, it does not require specific tuning to a particular dataset or LLM architecture; it is a fundamental mathematical property. (Caveat: the paper does include some pragmatic outlier channel handling, so 'data-oblivious' describes the mathematical foundation more than the production implementation.)

QJL is what enables Turboquant to be **lossless** at extreme compression ratios — see [[claim-turboquant-performance]] and the full pipeline at [[framework-turboquant-process]].
