<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/xsl" href="rss.xsl"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>p4r4d0xb0x Blog</title>
        <link>https://ql.gl/en/blog/</link>
        <description>p4r4d0xb0x Blog</description>
        <lastBuildDate>Wed, 19 Aug 2026 00:00:00 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <item>
            <title><![CDATA[S4: How to Read Long Sequences with Structured State Spaces]]></title>
            <link>https://ql.gl/en/blog/4a6889f1/</link>
            <guid>https://ql.gl/en/blog/4a6889f1/</guid>
            <pubDate>Wed, 19 Aug 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[This article examines how the Structured State Space sequence model (S4) structures state space models to handle long dependencies and reduces them to computable Cauchy kernel operations. It distinguishes only the claims confirmed by the arXiv abstract and metadata.]]></description>
            <content:encoded><![CDATA[<p>The bottleneck in long-sequence modeling is not simply that “there are many tokens.” A model must pass signals from the distant past to the current output while preserving parallelism during training and keeping memory movement manageable during inference. <strong>Efficiently Modeling Long Sequences with Structured State Spaces</strong> approaches this problem by addressing both the mathematical properties and the computational structure of state space models (SSMs). The key is not to compute the entire SSM indiscriminately, but to structure the state matrix, diagonalize it stably, and reduce the computation to Cauchy kernel operations.</p>
<p><img decoding="async" loading="lazy" src="https://ql.gl/img/blog/s4-structured-state-spaces/cover.webp" alt="Conceptual diagram showing a long input sequence transformed into a structured state space and kernel computation" class="img_ev3q"></p>
<p>This article is based on the publicly available arXiv abstract and API metadata. Numerical results and components explicitly stated in the abstract are described as “results reported by the paper”; detailed hyperparameters, code implementation, and the complete experimental procedure remain outside the verified scope.</p>
<!-- -->
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="the-problem-long-dependencies-and-computational-cost-at-the-same-time">The Problem: Long Dependencies and Computational Cost at the Same Time<a href="https://ql.gl/en/blog/4a6889f1/#the-problem-long-dependencies-and-computational-cost-at-the-same-time" class="hash-link" aria-label="Direct link to The Problem: Long Dependencies and Computational Cost at the Same Time" title="Direct link to The Problem: Long Dependencies and Computational Cost at the Same Time" translate="no">​</a></h2>
<p>RNNs, CNNs, and Transformers each have variants for handling long dependencies, but the paper raises the problem that existing approaches are difficult to scale to very long sequences of 10,000 steps or more. In particular, the computational and memory burden of global Transformer attention grows with input length, while a conventional SSM may be able to represent long dependencies mathematically but still require too much computation and memory in practice.</p>
<p>A continuous-time SSM can be expressed as follows.</p>
<p>[
x'(t)=Ax(t)+Bu(t), \qquad y(t)=Cx(t)+Du(t)
]</p>
<p>Here, the input (u) updates the internal state (x), and the output (y) is an observation of that state. This formulation suggests the intuition of accumulating a long signal into a compressed state, but when the state dimension is large, matrix operations themselves become the bottleneck.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: state space model (SSM)</div><div class="admonitionContent_BuS1"><p>Plain definition: A model that processes long inputs by continuously updating an internal state that changes over time.</p><p>Example: Instead of rereading an entire diary every time, imagine keeping a single page of notes that is continuously updated with the important information up to today and using it to make tomorrow’s decisions.</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="s4s-core-idea-structuring-the-state-matrix">S4’s Core Idea: Structuring the State Matrix<a href="https://ql.gl/en/blog/4a6889f1/#s4s-core-idea-structuring-the-state-matrix" class="hash-link" aria-label="Direct link to S4’s Core Idea: Structuring the State Matrix" title="Direct link to S4’s Core Idea: Structuring the State Matrix" translate="no">​</a></h2>
<p>S4 proposes a new parameterization that gives structure to the SSM state matrix (A). The concrete device emphasized by the abstract is a <strong>low-rank correction</strong>. The paper explains that this makes it possible to diagonalize (A) stably and, as a result, reduce SSM computation to well-studied Cauchy kernel operations.</p>
<p>This design separates two layers of the problem. The first is which state matrix can represent long-range dependencies. The second is whether that matrix can actually be computed on modern hardware. S4 can be read as an attempt to address the second problem at the level of computational kernels while retaining theoretical expressiveness. However, “efficient” depends on the conditions of a particular implementation, hardware platform, and sequence length, so it should not be generalized into unconditional superiority.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: low-rank correction</div><div class="admonitionContent_BuS1"><p>Plain definition: A method that adjusts the structure of a large matrix by adding information in only a small number of directions, rather than changing the entire matrix.</p><p>Example: Instead of rebuilding every shelf in a library, add signs to a few frequently used aisles so that searching the whole library becomes faster.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: Cauchy kernel</div><div class="admonitionContent_BuS1"><p>Plain definition: A mathematical form for expressing matrix computations efficiently using the difference between particular pairs of values.</p><p>Example: Rather than measuring the distance between every pair of people one by one, apply the same rule to a list of coordinates and calculate many pairwise relationships at once.</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="analyzing-the-papers-structure-and-reported-results">Analyzing the Paper’s Structure and Reported Results<a href="https://ql.gl/en/blog/4a6889f1/#analyzing-the-papers-structure-and-reported-results" class="hash-link" aria-label="Direct link to Analyzing the Paper’s Structure and Reported Results" title="Direct link to Analyzing the Paper’s Structure and Reported Results" translate="no">​</a></h2>
<p>The abstract’s logical flow is: problem statement → possibilities and bottlenecks of basic SSMs → S4’s structural proposal → results on various benchmarks. This is a typical research narrative that proceeds from problem to gap, contribution, and validation. From the abstract alone, it is not possible to establish which detailed variant of IMRaD the paper uses or what baselines and hardware configurations were used for each experiment.</p>
<p>The results reported in the abstract are as follows.</p>
<ul>
<li class="">It reports 91% accuracy on sequential CIFAR-10 without data augmentation or auxiliary losses, claiming a level similar to a larger 2-D ResNet.</li>
<li class="">It reports that S4 substantially closes the gap with Transformers in image and language modeling and generates 60 times faster. The task and implementation conditions must be verified before interpreting this number.</li>
<li class="">The abstract says that S4 achieved the best performance at the time on all Long Range Arena tasks and solved Path-X at length 16k.</li>
</ul>
<p>These results provide evidence that S4 is a general family aimed at long dependencies across multiple modalities, rather than a trick for a single task. Conversely, the abstract alone cannot establish reproducibility, energy cost, memory usage, or comparisons with today’s models.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="practical-implications-kernels-and-state-matter-more-than-linearity-alone">Practical Implications: Kernels and State Matter More Than Linearity Alone<a href="https://ql.gl/en/blog/4a6889f1/#practical-implications-kernels-and-state-matter-more-than-linearity-alone" class="hash-link" aria-label="Direct link to Practical Implications: Kernels and State Matter More Than Linearity Alone" title="Direct link to Practical Implications: Kernels and State Matter More Than Linearity Alone" translate="no">​</a></h2>
<p>The practical lesson from S4 is to look first at <strong>how the computational path runs on hardware</strong>, rather than stopping at the phrase “low complexity.” A model that accumulates a long input into a state may reduce explicit token-pair comparisons in attention, but state updates, kernel generation, and memory layout can become bottlenecks. Before adoption, measure the following:</p>
<ul>
<li class="">Actual throughput and latency, separated between training and inference</li>
<li class="">Memory usage and kernel execution time as sequence length changes</li>
<li class="">Quality-versus-cost curves as state dimension and batch size change</li>
<li class="">Failure modes in tasks that must preserve information from the distant past</li>
</ul>
<p>This perspective also connects to why later SSM research sought to optimize expressiveness and hardware utilization together. It does not mean that S4 solves every long-range information retrieval problem. How the model compresses information into its state and distinguishes conflicting signals require separate evaluation.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="limitations-and-questions-requiring-verification">Limitations and Questions Requiring Verification<a href="https://ql.gl/en/blog/4a6889f1/#limitations-and-questions-requiring-verification" class="hash-link" aria-label="Direct link to Limitations and Questions Requiring Verification" title="Direct link to Limitations and Questions Requiring Verification" translate="no">​</a></h2>
<p>The verified scope of the available material is the paper’s abstract and public metadata. The following therefore remain unverified: the exact parameterization and stability conditions of the low-rank correction, the concrete implementation of the Cauchy kernel, the hardware, baselines, and measurement procedures for each benchmark, the comparison conditions for the 60× generation speed, and failure cases. In particular, a time-dependent statement such as “state of the art on all tasks” describes results at the time of publication, not a universal ranking today.</p>
<p>Before practical adoption, inspect the full paper, code, and reproduction benchmarks. S4’s design is attractive, but systems that require long-sequence quality should validate worst-case lengths and patterns of information loss before relying on average scores.</p>
<p>Another practical question is state lifetime. In batched inference, each sample’s state must be clearly isolated; in streaming, the state passed to the next chunk must be distinguished from the state discarded when a request ends. If this boundary is blurred, information from a previous input can leak into the next request independently of the model’s mathematical stability. The paper’s abstract does not address such service-operation concerns, so they require separate design when connecting S4 to a product.</p>
<p>When evaluating S4, it is also useful to separate benchmarks that feed a long input at once from real chunk-based streaming. The cost structure of the full-sequence parallel training path can differ from that of sequential inference, even for the same model. This distinction prevents kernel efficiency reported by the paper from being confused with latency in an actual application.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/4a6889f1/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://arxiv.org/abs/2111.00396" target="_blank" rel="noopener noreferrer" class="">Efficiently Modeling Long Sequences with Structured State Spaces</a> — license: <code>unknown</code>, retrieved: <code>2026-08-19</code>, source type: <code>original</code>.</li>
<li class="">Image: <a href="https://arxiv.org/abs/2111.00396" target="_blank" rel="noopener noreferrer" class="">Placeholder — cover image based on the original paper not produced</a> — license: <code>unknown-placeholder</code>.</li>
</ul>]]></content:encoded>
            <category>AI</category>
            <category>Research</category>
            <category>Sequence Modeling</category>
            <category>SSM</category>
            <category>Explainer</category>
        </item>
        <item>
            <title><![CDATA[H3: The Memory and Comparison Capabilities SSMs Missed in Language Modeling]]></title>
            <link>https://ql.gl/en/blog/7ecdd9d9/</link>
            <guid>https://ql.gl/en/blog/7ecdd9d9/</guid>
            <pubDate>Wed, 19 Aug 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Hungry Hungry Hippos decomposes the linguistic weaknesses of state space models into token recall and comparison, then explains how H3, FlashConv, and hybrid attention combinations address them.]]></description>
            <content:encoded><![CDATA[<p>State space models (SSMs) can scale almost linearly with sequence length, but that alone does not replace attention in language modeling. <strong>Hungry Hungry Hippos: Towards Language Modeling with State Space Models</strong> does not reduce this gap to vague insufficient expressiveness; it divides the problem into two capabilities. Existing SSMs are weak at accurately recalling earlier tokens and at comparing tokens with one another within a sequence. Building on that diagnosis, the paper proposes the H3 layer, the FlashConv computation method, and hybrid models that retain some attention.</p>
<p><img decoding="async" loading="lazy" src="https://ql.gl/img/blog/h3-language-ssm/cover.webp" alt="Conceptual diagram representing token memory and comparison in an H3 state space layer" class="img_ev3q"></p>
<p>This article is based only on the arXiv abstract and public metadata. The figures and model sizes below are results reported by the paper’s abstract; the detailed experimental settings and implementation reproducibility require checking the full paper.</p>
<!-- -->
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="decomposing-the-problem-into-two-capabilities">Decomposing the Problem into Two Capabilities<a href="https://ql.gl/en/blog/7ecdd9d9/#decomposing-the-problem-into-two-capabilities" class="hash-link" aria-label="Direct link to Decomposing the Problem into Two Capabilities" title="Direct link to Decomposing the Problem into Two Capabilities" translate="no">​</a></h2>
<p>The paper explains that it first investigated the expressiveness gap between SSMs and attention through a synthetic language modeling task. It found that existing SSMs struggled with two things.</p>
<ol>
<li class=""><strong>Recalling an earlier token</strong> — preserving a specific past token in the state when it is needed for the current prediction.</li>
<li class=""><strong>Comparing tokens</strong> — calculating the relationship between the current token and another token in the sequence.</li>
</ol>
<p>This decomposition matters because it prevents “long dependency” from being treated as a single number. The existence of a long-range signal is different from needing to find and compare a particular item among those signals. A compressed SSM state may be suitable for accumulating the former, while selective interactions of the latter kind may require a different structure.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: expressivity</div><div class="admonitionContent_BuS1"><p>Plain definition: The range of patterns a model can distinguish in its input and recall later.</p><p>Example: A summary note may contain the overall plot but still be unable to answer whether a particular word on page 20 is the same as a word on page 80. That difference is a problem of expressivity.</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="h3-deliberately-designing-for-recall-and-comparison">H3: Deliberately Designing for Recall and Comparison<a href="https://ql.gl/en/blog/7ecdd9d9/#h3-deliberately-designing-for-recall-and-comparison" class="hash-link" aria-label="Direct link to H3: Deliberately Designing for Recall and Comparison" title="Direct link to H3: Deliberately Designing for Recall and Comparison" translate="no">​</a></h2>
<p>H3 is an SSM layer newly designed to target the two capabilities language requires. The abstract reports that H3 matches attention on synthetic language tasks and comes within 0.4 PPL of a Transformer on OpenWebText. The important point is that H3 is not presented simply as an approach that uses a larger state. According to the paper’s explanation, the layer design reflects the linguistic requirements of which information to preserve and which relationships to compute.</p>
<p>However, the abstract does not provide every gate, branch, or parameter equation inside H3, nor the contribution of each component. This article therefore does not assert internal implementation details beyond the level of an “SSM layer designed for recall and comparison.”</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: PPL (perplexity)</div><div class="admonitionContent_BuS1"><p>Plain definition: A metric indicating how confidently a language model predicts the next token; lower is usually better.</p><p>Example: In a fill-in-the-blank exercise, confidently narrowing the answer to one or two possibilities produces a low score, while hesitating among dozens produces a high score.</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="flashconv-between-algorithms-and-hardware">FlashConv: Between Algorithms and Hardware<a href="https://ql.gl/en/blog/7ecdd9d9/#flashconv-between-algorithms-and-hardware" class="hash-link" aria-label="Direct link to FlashConv: Between Algorithms and Hardware" title="Direct link to FlashConv: Between Algorithms and Hardware" translate="no">​</a></h2>
<p>The second obstacle identified by the paper is hardware utilization. An SSM can be nearly linear in sequence length and still be slower than a Transformer, because asymptotic operation counts alone do not explain actual execution time. The H3 paper proposes FlashConv: for lengths up to 8K, it uses a fused block FFT algorithm, while for longer inputs the abstract says it introduces a state-passing algorithm that exploits the recurrent nature of SSMs.</p>
<p>The abstract reports a 2× speedup on the Long Range Arena and generation up to 2.4× faster than a Transformer for a hybrid language model. These numbers are results under the benchmark and implementation conditions measured by the paper, not “2× in every environment.” In a real service, GPU generation, batch size, precision, kernel support, and input/output lengths must be fixed together for comparison.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: fused kernel</div><div class="admonitionContent_BuS1"><p>Plain definition: An implementation that combines several computation stages into one hardware kernel to reduce memory round trips.</p><p>Example: Instead of moving ingredients between a cutting board and a bowl several times, mix them in one operation, like preparing a dish in a single step.</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="what-the-hybrid-model-signals">What the Hybrid Model Signals<a href="https://ql.gl/en/blog/7ecdd9d9/#what-the-hybrid-model-signals" class="hash-link" aria-label="Direct link to What the Hybrid Model Signals" title="Direct link to What the Hybrid Model Signals" translate="no">​</a></h2>
<p>An interesting result is the 125M-parameter H3-attention model, which does not remove attention entirely. According to the abstract, this model retained two attention layers and scored 1.0 PPL lower than a Transformer on OpenWebText. The paper also reports that, using FlashConv, it scaled to as many as 2.7B parameters on the Pile and outperformed a Transformer on most SuperGLUE tasks in zero-shot and few-shot evaluations.</p>
<p>These results suggest that role division may be more practical than a binary choice between SSM and Transformer. SSM layers can efficiently carry long flows, while a small number of attention layers handle explicit comparison and selection. But the abstract cannot answer where attention layers should be placed or whether the same benefit holds across other data, model sizes, and hardware.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="analyzing-the-papers-structure-from-diagnosis-to-system">Analyzing the Paper’s Structure: From Diagnosis to System<a href="https://ql.gl/en/blog/7ecdd9d9/#analyzing-the-papers-structure-from-diagnosis-to-system" class="hash-link" aria-label="Direct link to Analyzing the Paper’s Structure: From Diagnosis to System" title="Direct link to Analyzing the Paper’s Structure: From Diagnosis to System" translate="no">​</a></h2>
<p>The abstract’s narrative diagnoses the expressiveness gap with a synthetic task → narrows its causes to recall and comparison → proposes the H3 layer → addresses the execution bottleneck with FlashConv → validates the approach with hybrid models and large-scale training. In other words, it treats “the capabilities language needs” and “the cost of executing those capabilities on hardware” as one connected problem rather than explaining algorithmic design and systems optimization separately.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="practical-implications-and-limitations">Practical Implications and Limitations<a href="https://ql.gl/en/blog/7ecdd9d9/#practical-implications-and-limitations" class="hash-link" aria-label="Direct link to Practical Implications and Limitations" title="Direct link to Practical Implications and Limitations" translate="no">​</a></h2>
<p>When evaluating an SSM-based language model, average perplexity alone is insufficient. Construct separate recall tests that require finding a particular earlier token, comparison tests that distinguish agreement or disagreement between two positions, and worst-case tests at long context lengths. Kernel optimization is also an operational variable independent of model quality, so actual inference throughput and memory usage must be measured.</p>
<p>The available material also leaves clear gaps. The detailed H3 equations and ablations, exact FlashConv kernel and hardware settings, batch sizes and precision for each speed comparison, the full procedure for the 2.7B training run, and comparisons with current models are not confirmed. The paper is therefore more accurately read as research that decomposes failure modes in language modeling and demonstrates the possibility of hybrid designs, not as proof that SSMs are immediately a replacement for Transformers.</p>
<p>From an operational perspective, a hybrid architecture also creates new deployment units. Attention layers use memory and computation for comparisons between particular tokens, while the H3–FlashConv path handles long flows. Which path is the bottleneck may change with input length and batch size, so teams should collect layer-level profiles rather than only a model-wide average. This is why the abstract’s speed figures should not be used directly as a service target; end-to-end latency should be measured again with the same tokenizer and output length.</p>
<p>The character of the evaluation data matters as well. An improvement in recall and comparison on synthetic tasks does not automatically imply the same improvement in long-range discourse and knowledge retrieval over real web text. Conversely, near-Transformer PPL on OpenWebText does not guarantee every downstream task. The synthetic, language-modeling, and SuperGLUE results should be read as different layers of evidence, followed by validation in the target domain.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/7ecdd9d9/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://arxiv.org/abs/2212.14052" target="_blank" rel="noopener noreferrer" class="">Hungry Hungry Hippos: Towards Language Modeling with State Space Models</a> — license: <code>unknown</code>, retrieved: <code>2026-08-19</code>, source type: <code>original</code>.</li>
<li class="">Image: <a href="https://arxiv.org/abs/2212.14052" target="_blank" rel="noopener noreferrer" class="">Placeholder — cover image based on the original paper not produced</a> — license: <code>unknown-placeholder</code>.</li>
</ul>]]></content:encoded>
            <category>AI</category>
            <category>Research</category>
            <category>Language Modeling</category>
            <category>SSM</category>
            <category>Attention</category>
            <category>Explainer</category>
        </item>
        <item>
            <title><![CDATA[Mamba: Approaching Content-Based Reasoning with Selective State Spaces]]></title>
            <link>https://ql.gl/en/blog/1d139737/</link>
            <guid>https://ql.gl/en/blog/1d139737/</guid>
            <pubDate>Wed, 19 Aug 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[This article explains why Mamba targets both long-sequence efficiency and language-modeling performance through selective SSMs that change state-space parameters based on the input and hardware-aware parallel algorithms.]]></description>
            <content:encoded><![CDATA[<p>State space models (SSMs) may process long sequences in linear time, but weaknesses emerge in tasks such as language, where the model must decide what to remember based on token meaning. <strong>Mamba: Linear-Time Sequence Modeling with Selective State Spaces</strong> revisits this problem from the perspective that “the state remains fixed and processes every input by the same rule.” The proposal can be summarized in one sentence: change the SSM parameters according to the input so that information is selectively passed on or forgotten based on the current token.</p>
<p><img decoding="async" loading="lazy" src="https://ql.gl/img/blog/mamba-selective-state-spaces/cover.webp" alt="Mamba state-space flow selectively passing and forgetting information according to input tokens" class="img_ev3q"></p>
<p>This draft uses only claims confirmed by the publicly available arXiv abstract and metadata. The detailed internal block structure, exact kernel implementation, and conditions of each experiment require additional verification against the full paper and code.</p>
<!-- -->
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="the-problem-with-fixed-compression">The Problem with Fixed Compression<a href="https://ql.gl/en/blog/1d139737/#the-problem-with-fixed-compression" class="hash-link" aria-label="Direct link to The Problem with Fixed Compression" title="Direct link to The Problem with Fixed Compression" translate="no">​</a></h2>
<p>Transformer attention computes which past tokens the current token should reference based on the input content. By contrast, the paper diagnoses that conventional SSM families compress long inputs with fixed state-update rules, making content-based reasoning difficult in discrete language. The key issue is not simply length. Before a model can process a million tokens, it must distinguish which information among those tokens has become important to the current judgment.</p>
<p>Mamba proposes that this weakness can be mitigated by generating SSM parameters as functions of the input. The model selectively propagates or forgets information along the sequence according to the current token. This design retains the compression advantage of SSMs while avoiding treating every token as equally important.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: selective SSM</div><div class="admonitionContent_BuS1"><p>Plain definition: A state space model that changes which information remains in its state and which information is discarded according to the input content.</p><p>Example: Instead of summarizing every part of meeting minutes at the same length, keep decisions in bold and compress greetings into a short note.</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="mambas-computational-path">Mamba’s Computational Path<a href="https://ql.gl/en/blog/1d139737/#mambas-computational-path" class="hash-link" aria-label="Direct link to Mamba’s Computational Path" title="Direct link to Mamba’s Computational Path" translate="no">​</a></h2>
<p>Input-dependent parameters help expressiveness, but they prevent the direct use of the efficient convolution used by earlier SSMs. To resolve this tension, the paper explains that it designed a hardware-aware parallel algorithm executed in recurrent mode. In other words, it does not stop at theoretical linearity; it restructures the computation into a form that real devices such as GPUs can execute in parallel.</p>
<p>Mamba integrates a simplified selective SSM into an end-to-end neural network architecture. The abstract explicitly states that it uses neither attention nor MLP blocks. This is less an “attention-reduced Transformer” than an attempt to build a different backbone whose central computational unit is the state update.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: hardware-aware algorithm</div><div class="admonitionContent_BuS1"><p>Plain definition: An algorithm designed by considering not only the number of mathematical operations but also memory movement, parallelism, caches, and kernel execution.</p><p>Example: Rather than carrying the same amount of goods one item at a time, plan the work around the warehouse aisles and cart size so that the goods can be moved in one trip.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: recurrent mode</div><div class="admonitionContent_BuS1"><p>Plain definition: An execution mode that reads inputs one step at a time and passes the previous state to the next state.</p><p>Example: When reading a long book, carry notes from the previous chapter into the next chapter. You do not reopen the entire book each time, but the quality of the notes matters.</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="reported-performance-and-the-boundary-of-interpretation">Reported Performance and the Boundary of Interpretation<a href="https://ql.gl/en/blog/1d139737/#reported-performance-and-the-boundary-of-interpretation" class="hash-link" aria-label="Direct link to Reported Performance and the Boundary of Interpretation" title="Direct link to Reported Performance and the Boundary of Interpretation" translate="no">​</a></h2>
<p>The abstract reports that Mamba achieves 5× higher inference throughput than a Transformer and scales linearly with sequence length. It also describes improved performance on real data up to a length of one million. As a general sequence backbone across multiple modalities, it claims state-of-the-art results at the time in language, audio, and genomics; for language modeling, it reports that Mamba-3B outperforms a Transformer of the same size and matches a Transformer twice its size.</p>
<p>These numbers are strong research results, but they are not unconditional laws of speed. Throughput depends on batch size, precision, hardware, sequence length, and implementation kernels. “Equivalent to twice the size” must likewise be interpreted within the pretraining and downstream-evaluation scope defined by the paper. The abstract alone does not establish the data composition, baseline details, statistical variation, or specific failure cases at long sequence lengths.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="design-questions-from-s4-to-mamba">Design Questions from S4 to Mamba<a href="https://ql.gl/en/blog/1d139737/#design-questions-from-s4-to-mamba" class="hash-link" aria-label="Direct link to Design Questions from S4 to Mamba" title="Direct link to Design Questions from S4 to Mamba" translate="no">​</a></h2>
<p>This work changes the view of SSMs as simply a cheaper computation than attention. S4 made long dependencies more efficient through a structured state matrix and kernel computation; Mamba targets the weakness of content-based reasoning by putting information selection into the state update. But introducing selectivity can sacrifice the benefits of convolution-based parallelization, so Mamba’s algorithmic contribution lies in compensating for that loss with hardware-aware recurrent computation.</p>
<p>The axes of comparison are therefore not just “quadratic versus linear.”</p>
<ul>
<li class=""><strong>Information path</strong>: Does the model explicitly compare past tokens or pass them through a compressed state?</li>
<li class=""><strong>Selectivity</strong>: Does the input content change the rules for remembering and forgetting?</li>
<li class=""><strong>Execution path</strong>: How do theoretical complexity and actual memory movement differ?</li>
<li class=""><strong>Scalability</strong>: Are quality and throughput maintained together at long context lengths?</li>
</ul>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="practical-implications">Practical Implications<a href="https://ql.gl/en/blog/1d139737/#practical-implications" class="hash-link" aria-label="Direct link to Practical Implications" title="Direct link to Practical Implications" translate="no">​</a></h2>
<p>Teams evaluating Mamba-style backbones should first classify the information-access pattern of the task. A state-based model may be a natural fit for work such as long logs or audio, where the input is read by compressing a stream. By contrast, tasks that must find an exact passage in a particular document and compare it with several other locations require separate verification that selective state actually preserves that information.</p>
<p>Evaluation should measure length-dependent throughput, time to first token, persistent-state memory size, and recall and comparison tests at long contexts alongside average scores. In production, teams must manage session boundaries so recurrent state does not mix across requests, and decide how state will be discarded or regenerated after a streaming failure. Because the abstract does not address these operational details, they cannot be assumed from Mamba’s reported research results.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="limitations-and-open-questions">Limitations and Open Questions<a href="https://ql.gl/en/blog/1d139737/#limitations-and-open-questions" class="hash-link" aria-label="Direct link to Limitations and Open Questions" title="Direct link to Limitations and Open Questions" translate="no">​</a></h2>
<p>Key points not confirmed by the available material include the exact equations and stability of selective SSM parameters, the implementation conditions of the hardware-aware parallel algorithm, the comparison environment for the 5× throughput, the data and memory settings of the million-length experiment, and modality-specific baselines and failure cases. The phrase “solves content-based reasoning” should also not be read as meaning that every attention-style search and comparison problem is solved; it is a claim that the weakness identified by the paper can be mitigated through input-dependent state updates.</p>
<p>Before adoption, inspect the paper’s methods and experiments sections and the public implementation, then remeasure on the target hardware with the same length, batch size, and precision. Mamba’s significance is not that it declaratively discards Transformers, but that it combines selective memory and hardware execution into one state-space design problem.</p>
<p>This perspective also affects model selection. On short inputs, the absolute cost of attention is small, so Mamba’s linear scaling may not yield a practical advantage. On long streams, the benefit of a small, constant-sized state may grow, but if the state discards information too aggressively, important clues cannot be recovered. Teams should therefore record quality curves by context length together with information-preservation failures.</p>
<p>Selectivity can also make debugging more difficult. With attention, there are relatively explicit clues about which keys and values a particular output depends on; with a selective state, information is compressed through multiple updates. This difference does not establish that one approach is universally more interpretable, but it is a practical signal that incident analysis and safety evaluation may need additional observability tools. This is an adoption challenge separate from the performance reported by the arXiv abstract.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/1d139737/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://arxiv.org/abs/2312.00752" target="_blank" rel="noopener noreferrer" class="">Mamba: Linear-Time Sequence Modeling with Selective State Spaces</a> — license: <code>unknown</code>, retrieved: <code>2026-08-19</code>, source type: <code>original</code>.</li>
<li class="">Image: <a href="https://arxiv.org/abs/2312.00752" target="_blank" rel="noopener noreferrer" class="">Placeholder — cover image based on the original paper not produced</a> — license: <code>unknown-placeholder</code>.</li>
</ul>]]></content:encoded>
            <category>AI</category>
            <category>Research</category>
            <category>Mamba</category>
            <category>SSM</category>
            <category>Language Modeling</category>
            <category>Explainer</category>
        </item>
        <item>
            <title><![CDATA[Why Does Mamba-2 Resemble the Transformer? Reading SSMs Through SSD]]></title>
            <link>https://ql.gl/en/blog/76b0dce0/</link>
            <guid>https://ql.gl/en/blog/76b0dce0/</guid>
            <pubDate>Wed, 19 Aug 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Following Tri Dao and Albert Gu's Mamba-2 paper, this article explains the connection between state space models and attention, the hardware implications of the SSD algorithm, and the claims that remain unverified.]]></description>
            <content:encoded><![CDATA[<p><img decoding="async" loading="lazy" src="https://ql.gl/img/blog/mamba2-ssd/cover.webp" alt="Conceptual diagram connecting state space models and attention through a structured matrix" class="img_ev3q"></p>
<p>The bottleneck in models that handle long sequences is not simply the number of parameters. Training must process every position in a long sequence in parallel, while generation must read past information for every new token. The Transformer gains powerful global attention, but accepts computation and memory costs that grow with sequence length. State space models (SSMs) in the Mamba family maintain a recurrent state to keep the state size fixed during generation, yet their training and GPU utilization are harder to describe as straightforwardly as the Transformer's.</p>
<p>Tri Dao and Albert Gu's paper does not set these two families up as competing boxes. Its central question is whether SSMs and attention can be expressed in the same structural language. The paper uses structured semiseparable matrices to organize the relationship between the two families, then proposes the core Mamba-2 layer and the SSD algorithm from that perspective. The discussion below is based on the abstract, methods, and experiments in the arXiv paper and HTML; it does not add results from running reproduction code.</p>
<!-- -->
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="the-problem-linear-complexity-alone-is-not-enough">The Problem: Linear Complexity Alone Is Not Enough<a href="https://ql.gl/en/blog/76b0dce0/#the-problem-linear-complexity-alone-is-not-enough" class="hash-link" aria-label="Direct link to The Problem: Linear Complexity Alone Is Not Enough" title="Direct link to The Problem: Linear Complexity Alone Is Not Enough" translate="no">​</a></h2>
<p>A typical SSM can be written as a state update:</p>
<div class="language-text codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#f8f8f2;--prism-background-color:#272822"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="color:#f8f8f2;background-color:#272822"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#f8f8f2"><span class="token plain">h_t = A_t h_{t-1} + B_t x_t</span><br></div><div class="token-line" style="color:#f8f8f2"><span class="token plain"> y_t = C_t^T h_t</span><br></div></code></pre></div></div>
<p>The state <code>h</code> is working memory that compresses past inputs. During generation, the model can pass only this state to the next step instead of revisiting every token. When <code>A</code>, <code>B</code>, and <code>C</code> depend on the input, as in Mamba's selective SSM, the model can control token by token which information is retained or erased. However, updating one token at a time can fail to fully utilize a GPU's matrix-multiplication hardware. Therefore, “linear in sequence length” and “fast on real hardware” must be treated as separate claims.</p>
<p>The paper's perspective is that the same transformation can be viewed in three ways. The recurrent form shows sequential state updates; the quadratic form exposes interactions between all positions as a matrix; and the matrix form structurally connects the two. This connection places SSMs in the same problem space as attention computations, which already have extensive optimization, rather than treating them merely as a new kind of RNN.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explanation: State Space Model (SSM)</div><div class="admonitionContent_BuS1"><p>Simple definition: A sequence model that updates an internal state whenever it receives an input and produces an output from that state.</p><p>Example: Imagine keeping a one-line summary of a conversation in a notebook and consulting only that summary when reading the next sentence. Unlike an ordinary note, the model can learn the rules for summarizing and how much to retain.</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="the-core-of-ssd-a-matrix-structure-connects-two-computation-paths">The Core of SSD: A Matrix Structure Connects Two Computation Paths<a href="https://ql.gl/en/blog/76b0dce0/#the-core-of-ssd-a-matrix-structure-connects-two-computation-paths" class="hash-link" aria-label="Direct link to The Core of SSD: A Matrix Structure Connects Two Computation Paths" title="Direct link to The Core of SSD: A Matrix Structure Connects Two Computation Paths" translate="no">​</a></h2>
<p>The paper shows that an SSM can be represented by a particular semiseparable matrix. This matrix does not store every relationship between positions without structure. It uses structures such as diagonal blocks and low-rank blocks to reduce the parameters and multiplications required. As a result, the same operation can be computed either as a sequential recurrence or as block matrix multiplications.</p>
<p>SSD (State Space Duality) names this duality framework. The important point is not the simplistic claim that “attention is exactly the same as an SSM.” The paper explicitly addresses the relationship between particular SSMs represented by structured matrices and kernel or masking variants of attention—not every form of attention. The intuition in the title is powerful, but its scope is bounded by mathematical conditions.</p>
<p>The execution algorithm divides a sequence into chunks, uses parallel matrix operations within each block, and passes a summarized recurrent state between blocks. This preserves the meaning of the sequential state computation while bringing in the large matrix multiplications that GPUs handle well. The hardware efficiency discussed by the paper comes precisely from being able to choose between these computation paths.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explanation: Semiseparable matrix</div><div class="admonitionContent_BuS1"><p>Simple definition: A structured matrix that may look dense overall, but compresses many blocks of relationships between positions into small low-rank representations.</p><p>Example: Instead of storing a road map for every pair of intersections in a city, store summaries for each district and rules for connections between districts. Necessary route calculations remain possible while storage and computation are reduced.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explanation: Recurrent state</div><div class="admonitionContent_BuS1"><p>Simple definition: A fixed-size internal value passed to the next input instead of the entire past.</p><p>Example: Bring a single page of meeting minutes to the next meeting instead of the full transcript. A shorter record is convenient, but the risk of losing important details must also be managed.</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="mamba-2-changes-more-than-the-algorithm">Mamba-2 Changes More Than the Algorithm<a href="https://ql.gl/en/blog/76b0dce0/#mamba-2-changes-more-than-the-algorithm" class="hash-link" aria-label="Direct link to Mamba-2 Changes More Than the Algorithm" title="Direct link to Mamba-2 Changes More Than the Algorithm" translate="no">​</a></h2>
<p>Alongside the SSD layer, the paper adjusts the design of the Mamba block. It computes data-dependent projections in parallel at the beginning of the block and brings the head structure familiar from multi-head attention into the SSM design space. It also describes a design that reduces synchronization points to make tensor parallelism easier. For sequence parallelism, which divides long sequences across devices, it presents a way to pass the recurrent state between devices.</p>
<p>The practical meaning is that reducing the FLOPs of one new layer is not enough; the entire training system must fit together. Kernels, communication, variable-length batches, and memory layout must align before real latency falls. The paper also discusses avoiding padding for variable-length sequences, but does not guarantee the same effect for every hardware and framework combination.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="paper-structure-and-scope-of-the-evidence">Paper Structure and Scope of the Evidence<a href="https://ql.gl/en/blog/76b0dce0/#paper-structure-and-scope-of-the-evidence" class="hash-link" aria-label="Direct link to Paper Structure and Scope of the Evidence" title="Direct link to Paper Structure and Scope of the Evidence" translate="no">​</a></h2>
<p>The paper introduces the problems of Transformers and SSMs in the Introduction, then reviews SSMs, attention, and structured matrices in the Background. It represents SSMs as matrices, develops the theoretical relationship between structured masked attention and SSD, and then moves to efficient algorithms, the Mamba-2 design, system optimizations, and experiments. The progression is problem → common representation → algorithm → architecture → validation.</p>
<p>The abstract and body report that the core SSD layer is 2–8 times faster than Mamba's selective scan and achieves language-modeling performance competitive with the Transformer. The body includes a crossover with FlashAttention-2 under specific conditions, long-sequence speed comparisons, Pile training and downstream evaluation, scaling laws, and ablations. These numbers are results under the implementation, hardware, batch, and length conditions set by the paper. This article does not run an independent benchmark, so it does not generalize them to “2–8 times faster in every environment.”</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="what-changes-in-practice">What Changes in Practice<a href="https://ql.gl/en/blog/76b0dce0/#what-changes-in-practice" class="hash-link" aria-label="Direct link to What Changes in Practice" title="Direct link to What Changes in Practice" translate="no">​</a></h2>
<ul>
<li class=""><strong>Inference servers:</strong> Maintaining a fixed-size state instead of a full KV cache may simplify memory planning for services with long inputs or many concurrent users. It does not mean that the state preserves every detail of a long context.</li>
<li class=""><strong>Training stack:</strong> SSD's chunkwise and block structure creates opportunities to use GEMM and tensor parallelism. Before adoption, profile kernel implementation and communication costs together.</li>
<li class=""><strong>Model selection:</strong> It is more accurate to view Mamba-2 not as a one-line replacement for the Transformer, but as a layer offering a trade-off between recurrent inference and parallel training.</li>
<li class=""><strong>Evaluation:</strong> In addition to perplexity and downstream scores, measure long-context retrieval, state size, latency and throughput by batch size, and peak memory under identical conditions.</li>
</ul>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="limitations-and-open-questions">Limitations and Open Questions<a href="https://ql.gl/en/blog/76b0dce0/#limitations-and-open-questions" class="hash-link" aria-label="Direct link to Limitations and Open Questions" title="Direct link to Limitations and Open Questions" translate="no">​</a></h2>
<p>The paper presents a deep connection between SSMs and attention, but that connection does not mean an equivalent replacement for all softmax attention. Reported speedups also result from particular optimized implementations, so they must be checked again on new GPUs, with different precisions, small batches, and real serving workloads. Because a recurrent state compresses context, each application must also test what information-loss patterns arise in complex arbitrary retrieval and long-range interactions.</p>
<p>Within the scope supported by the provided materials, Mamba-2's most important contribution is not the slogan “linear complexity.” It is the ability to view the same sequence transformation both as a recurrence and as matrix multiplication, then connect that choice to the language of hardware and distributed training. Quantitative performance requires further verification, but the research direction is clear: a new architecture must explain both the elegance of its equations and the realities of kernels, memory, and communication.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/76b0dce0/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class="">Tri Dao, Albert Gu, “Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality,” arXiv:2405.21060, submitted 2024-05-31, CC BY 4.0. <a href="https://arxiv.org/abs/2405.21060" target="_blank" rel="noopener noreferrer" class="">https://arxiv.org/abs/2405.21060</a></li>
<li class="">HTML full text, arXiv:2405.21060v1, sections 1–9, retrieved 2026-08-19. <a href="https://arxiv.org/html/2405.21060v1" target="_blank" rel="noopener noreferrer" class="">https://arxiv.org/html/2405.21060v1</a></li>
</ul>]]></content:encoded>
            <category>AI</category>
            <category>Research</category>
            <category>SSM</category>
            <category>Mamba</category>
            <category>Transformer</category>
        </item>
        <item>
            <title><![CDATA[Griffin's Compromise: Combining Gated Linear Recurrence with Local Attention]]></title>
            <link>https://ql.gl/en/blog/dd8d73cd/</link>
            <guid>https://ql.gl/en/blog/dd8d73cd/</guid>
            <pubDate>Wed, 19 Aug 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[This article separates the evidence reported by the paper from the open questions of adoption, explaining how Hawk and Griffin combine recurrent-model efficiency with the Transformer's representational power.]]></description>
            <content:encoded><![CDATA[<p><img decoding="async" loading="lazy" src="https://ql.gl/img/blog/griffin-gated-linear-recurrence/cover.webp" alt="Sequence-model architecture where linear recurrence and local attention alternate" class="img_ev3q"></p>
<p>The Transformer became the standard for language modeling through its ability to compare every position directly, but generation requires continually storing past keys and values. Traditional recurrent neural networks (RNNs), by contrast, update one state per token and therefore have low inference cost, but are difficult to parallelize along the time axis and to train at scale. The Griffin paper does not treat this as a choice between two alternatives. It proposes Hawk, a gated linear recurrence, and Griffin, which mixes local attention into Hawk, assigning different time ranges of memory to each component.</p>
<p>The abstract reports that Hawk surpasses reported Mamba performance and that Griffin reaches performance competitive with Llama-2 using more than six times fewer training tokens. It also claims hardware efficiency during training similar to the Transformer, low latency and high throughput during inference, and extrapolation to sequences longer than the training length. This article uses the abstract and the original experimental conditions as evidence; it does not add external reproduction results or new comparisons.</p>
<!-- -->
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="hawk-redesigning-rnn-state-with-gates">Hawk: Redesigning RNN State with Gates<a href="https://ql.gl/en/blog/dd8d73cd/#hawk-redesigning-rnn-state-with-gates" class="hash-link" aria-label="Direct link to Hawk: Redesigning RNN State with Gates" title="Direct link to Hawk: Redesigning RNN State with Gates" translate="no">​</a></h2>
<p>A linear recurrence can be understood as a linear combination of the current input and the previous state. In simplified form, it looks like <code>h_t = a_t ⊙ h_{t-1} + b_t ⊙ x_t</code>. The gates control how much of the past to erase and how much of the new input to write. Hawk puts this idea inside a language-model block, using input-dependent gates and stable normalization to improve trainability.</p>
<p>The two sides of this design are clear. During generation, it reads and writes only the current token and a fixed-size state, so it need not revisit the entire sequence. On the other hand, time-axis recurrence is inherently order-dependent and can make training parallelization difficult. The paper expresses gated linear recurrence in a form computable with a parallel scan, and designs both the implementation and the architecture so the actual model can achieve training hardware efficiency similar to the Transformer's.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explanation: Gated linear recurrence</div><div class="admonitionContent_BuS1"><p>Simple definition: A recurrent computation in which learned gates control the relative contributions of the old state and the new input when they are combined.</p><p>Example: When recording leftover food in a refrigerator, do not discard or preserve every old note equally: erase expired items and give newly purchased items more weight.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explanation: Parallel scan</div><div class="admonitionContent_BuS1"><p>Simple definition: An algorithm that splits an ordered cumulative computation into chunks, processes them in parallel, and then connects the summary states between chunks.</p><p>Example: Instead of having one person add a long list from beginning to end, several people calculate subtotals for ranges and combine them at the end. Each range's result still has to be passed into the next range's computation.</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="griffin-attention-for-recent-memory-recurrence-for-long-range-flow">Griffin: Attention for Recent Memory, Recurrence for Long-Range Flow<a href="https://ql.gl/en/blog/dd8d73cd/#griffin-attention-for-recent-memory-recurrence-for-long-range-flow" class="hash-link" aria-label="Direct link to Griffin: Attention for Recent Memory, Recurrence for Long-Range Flow" title="Direct link to Griffin: Attention for Recent Memory, Recurrence for Long-Range Flow" translate="no">​</a></h2>
<p>Griffin is not simply a stack of Hawk blocks. The paper describes alternating recurrent blocks with local multi-query attention (MQA) blocks. Specifically, it places a residual block using local attention after every two recurrent blocks and gives a default local-attention window of 1024 tokens. Attention directly observes detailed relationships within the latest 1024 tokens, while the recurrent state compresses and carries information from beyond the window.</p>
<p>This combination is not a simple average. Local attention stores a smaller range than a global KV cache, while recurrence passes information outside the window through a fixed state. That creates a design space between “inspect the entire long context with attention” and “compress everything into one vector.” However, which information remains in the window and which is summarized into the state depends on training. Systems that must quote an arbitrary position in a long document precisely need separate evaluation.</p>
<p>The paper says that the residual pattern and MLP block are shared with the Transformer baseline. This matters when interpreting comparisons. Even if the performance difference comes from recurrence and local attention, the tables and experimental section must be checked to determine whether the full block, training recipe, and data composition were identical.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="how-to-read-the-reported-experiments">How to Read the Reported Experiments<a href="https://ql.gl/en/blog/dd8d73cd/#how-to-read-the-reported-experiments" class="hash-link" aria-label="Direct link to How to Read the Reported Experiments" title="Direct link to How to Read the Reported Experiments" translate="no">​</a></h2>
<p>The paper varies model size from 100M to 7B and adds a 14B Griffin to present scaling curves. It describes using the MassiveText dataset, 2048-token sequences, and AdamW. For the relationship between validation loss and training FLOPs, it reports lower loss for Griffin than its Transformer baseline across several budget ranges, while Hawk trails relatively but narrows the gap at larger budgets.</p>
<p>The downstream comparison uses the authors' MQA Transformer baseline, Mamba-3B, and Llama-2. The paper's main point is that Hawk-3B performs more strongly than the reported Mamba-3B, while Griffin-7B and 14B achieve averages competitive with Llama-2. However, the original paper explicitly cautions that the external baselines were trained on different data and token counts. In particular, Llama-2 and Mamba saw substantially more tokens than Griffin, and that fact must accompany any reading of the result.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="a-systems-view-one-fast-token-determines-the-cost-of-the-whole-service">A Systems View: One Fast Token Determines the Cost of the Whole Service<a href="https://ql.gl/en/blog/dd8d73cd/#a-systems-view-one-fast-token-determines-the-cost-of-the-whole-service" class="hash-link" aria-label="Direct link to A Systems View: One Fast Token Determines the Cost of the Whole Service" title="Direct link to A Systems View: One Fast Token Determines the Cost of the Whole Service" translate="no">​</a></h2>
<p>For a Transformer, inference cost grows with the context and KV cache. Griffin's recurrent blocks use a fixed-size state and its local attention uses a bounded window, so it may reduce memory and latency on long sequences. The paper reports low latency and high throughput, but the actual values and favorable conditions depend on hardware, batch size, sequence length, and kernels. In production, measure not only average latency but also time to first token, inter-token latency, throughput at each concurrency level, and state memory.</p>
<p>During training, both parallel scan and local attention can use GPU parallelism. For distributed training, the fact that the paper scales to a 14B model and describes sharding methods is of practical interest. It does not mean that an existing Transformer training stack can be reused unchanged. Checkpointing of recurrent states, sequence-parallel communication, variable-length batch handling, and fused-kernel support must be validated during implementation.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="paper-structure-analysis">Paper Structure Analysis<a href="https://ql.gl/en/blog/dd8d73cd/#paper-structure-analysis" class="hash-link" aria-label="Direct link to Paper Structure Analysis" title="Direct link to Paper Structure Analysis" translate="no">​</a></h2>
<p>The paper contrasts the inference advantages and training difficulties of RNNs with the representational power and long-sequence cost of Transformers in the Introduction. It explains the components of linear recurrence and local attention in the Background, then builds Hawk and defines Griffin by mixing the two blocks. It proceeds through scaling, downstream evaluation, long-sequence extrapolation, and speed and memory evaluation: problem → design → validation. The conclusion emphasizes competitive performance, but the interpretation of which tasks favor which structural choice must be read together with the experimental conditions.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="limitations-and-a-pre-adoption-checklist">Limitations and a Pre-Adoption Checklist<a href="https://ql.gl/en/blog/dd8d73cd/#limitations-and-a-pre-adoption-checklist" class="hash-link" aria-label="Direct link to Limitations and a Pre-Adoption Checklist" title="Direct link to Limitations and a Pre-Adoption Checklist" translate="no">​</a></h2>
<p>First, the preference of a local window for recent information is distinct from the ability to retrieve an exact long-range item. Second, although the recurrent state is small, it has a path for information loss through compression. Third, some of the paper's strong baseline comparisons do not use the same training-token count or dataset, so they should not be translated into absolute superiority. Fourth, the speed advantage reported in the paper does not automatically appear in every inference engine.</p>
<p>If you run experiments, compare the following under identical conditions:</p>
<ul>
<li class="">Prefill and decode latency by context length and batch size</li>
<li class="">Peak state and KV memory as the number of users increases</li>
<li class="">Accuracy separating recent-window questions from long-range associative recall</li>
<li class="">Perplexity and downstream scores under the same token, data, and tuning budgets</li>
<li class="">Recurrent-state consistency during checkpoint recovery and streaming input</li>
</ul>
<p>Griffin's message is not that we should return to RNNs. It proposes placing recurrence, which summarizes long-range information, and attention, which performs precise comparisons over a nearby range, in one model to adjust the boundary between algorithmic efficiency and representational power. The reported performance is promising within the provided materials, but the original paper, code, and benchmarks should be checked before adoption. The first question is whether a service's context-access pattern fits the 1024-token window and state-compression assumptions.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/dd8d73cd/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class="">Soham De et al., “Griffin: Mixing Gated Linear Recurrences with Local Attention for Efficient Language Models,” arXiv:2402.19427, submitted 2024-02-29, CC BY 4.0. <a href="https://arxiv.org/abs/2402.19427" target="_blank" rel="noopener noreferrer" class="">https://arxiv.org/abs/2402.19427</a></li>
<li class="">HTML full text, arXiv:2402.19427v1, sections 1–6, retrieved 2026-08-19. <a href="https://arxiv.org/html/2402.19427v1" target="_blank" rel="noopener noreferrer" class="">https://arxiv.org/html/2402.19427v1</a></li>
</ul>]]></content:encoded>
            <category>AI</category>
            <category>Research</category>
            <category>RNN</category>
            <category>Attention</category>
            <category>Efficient Inference</category>
        </item>
        <item>
            <title><![CDATA[RWKV-5 Eagle and RWKV-6 Finch: Expanding the State into a Matrix and Making Recurrence Dynamic]]></title>
            <link>https://ql.gl/en/blog/2a987eb6/</link>
            <guid>https://ql.gl/en/blog/2a987eb6/</guid>
            <pubDate>Wed, 19 Aug 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[This article explains, with evidence from the original paper, how Eagle and Finch retain RWKV-4's efficient inference path while adding matrix states, multiple heads, and data-dependent recurrence.]]></description>
            <content:encoded><![CDATA[<p><img decoding="async" loading="lazy" src="https://ql.gl/img/blog/rwkv-eagle-finch/cover.webp" alt="Conceptual diagram of RWKV time-mixing blocks and matrix-state updates" class="img_ev3q"></p>
<p>The Transformer's approach to long context is powerful, but generation incurs the cost of storing and reading past keys and values. RWKV computes an attention-like weighted average as a recurrence, aiming to retain time-axis parallelism during training while using a fixed-size state per token during generation. The paper “Eagle and Finch” extends RWKV-4 in two stages. Eagle (RWKV-5) expands a vector state into a multi-head matrix state, while Finch (RWKV-6) makes decay and token shift input-dependent.</p>
<p>The abstract reports competitive results across several benchmarks after training four Eagle models (0.46B–7.5B) and two Finch models (1.6B and 3.1B). It also introduces a multilingual corpus with 1.12 trillion tokens, a tokenizer based on greedy matching, and models and code released under Apache 2.0. This article is based on the structure and abstract of arXiv 2404.05892v4 and does not expand “competitive” into a claim of universal victory for any particular model.</p>
<!-- -->
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="rwkv-4s-starting-point-turning-attention-into-a-decaying-recurrence">RWKV-4's Starting Point: Turning Attention into a Decaying Recurrence<a href="https://ql.gl/en/blog/2a987eb6/#rwkv-4s-starting-point-turning-attention-into-a-decaying-recurrence" class="hash-link" aria-label="Direct link to RWKV-4's Starting Point: Turning Attention into a Decaying Recurrence" title="Direct link to RWKV-4's Starting Point: Turning Attention into a Decaying Recurrence" translate="no">​</a></h2>
<p>RWKV's time mixing accumulates past key-value information together with decay. It gives the current input a separate bonus, while receptance controls how much of the accumulated value is read. Comparing this with the <code>k^T v</code> state update in linear attention makes the intuition clear. At each step, the model computes only the accumulated state and the receptance corresponding to the current query, rather than revisiting the entire past.</p>
<p>The system-level advantage is that there are two computation modes. When training on a complete sequence, a time-parallel implementation provides parallelism; when generating one token at a time, the model updates its state. The original paper's table describes RWKV-4/5/6 as a family with O(1) state and time cost with respect to sequence length during inference. However, O(1) ignores model dimension and head count, and actual speed is determined by matrix multiplications, memory access, and kernel implementation.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explanation: Recurrence</div><div class="admonitionContent_BuS1"><p>Simple definition: A cyclic computation that reuses part of the current result when processing the next input.</p><p>Example: Instead of recalculating a ledger's balance from every transaction each day, apply today's deposits and withdrawals to yesterday's balance. It is fast, but the previous records must be summarized into one balance.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explanation: Decay</div><div class="admonitionContent_BuS1"><p>Simple definition: A learnable attenuation factor that reduces the influence of a past state over time.</p><p>Example: Gradually erase old notes on a classroom board so recent material is easier to see. If the notes fade too quickly, long-term information disappears.</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="eagle-expanding-vector-memory-into-matrix-memory">Eagle: Expanding Vector Memory into Matrix Memory<a href="https://ql.gl/en/blog/2a987eb6/#eagle-expanding-vector-memory-into-matrix-memory" class="hash-link" aria-label="Direct link to Eagle: Expanding Vector Memory into Matrix Memory" title="Direct link to Eagle: Expanding Vector Memory into Matrix Memory" translate="no">​</a></h2>
<p>Eagle's largest change is that each head maintains a <code>k^T v</code> state in matrix form rather than as a vector. The paper describes multi-headed matrix-valued states, per-head LayerNorm, SiLU attention gating, and removal of the receptance sigmoid as key changes. The state update can be read approximately as follows:</p>
<div class="language-text codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#f8f8f2;--prism-background-color:#272822"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="color:#f8f8f2;background-color:#272822"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#f8f8f2"><span class="token plain">s' = diag(w) · s + k^T · v</span><br></div><div class="token-line" style="color:#f8f8f2"><span class="token plain">wkv' = s + diag(u) · k^T · v</span><br></div></code></pre></div></div>
<p>The paper explains that <code>w</code> is parameterized as <code>exp(-exp(ω))</code>, placing each channel's decay value between 0 and 1. The current token's contribution is multiplied by <code>u</code>, giving it a weight different from the accumulated past. Receptance reads the state like a query, while the SiLU gate controls the flow of the output. This design lets the state preserve richer relationships between keys and values instead of merely storing a channel-wise sum.</p>
<p>Here, saying that “expressive power increased” is a structural interpretation: the state has more degrees of freedom and more varied input-output transformations. It is not a guarantee that accuracy will rise on every task. The paper evaluates Eagle and Finch across several benchmarks, but the fit between state size and data distribution can differ by application.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explanation: Matrix-valued state</div><div class="admonitionContent_BuS1"><p>Simple definition: An internal state that accumulates past information as a matrix with relationships between rows and columns, rather than as a single number or vector.</p><p>Example: Instead of keeping only a list for each person, maintain a “person–role” table. It can express richer connections, but storage and computation increase.</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="finch-making-recurrence-respond-to-the-input">Finch: Making Recurrence Respond to the Input<a href="https://ql.gl/en/blog/2a987eb6/#finch-making-recurrence-respond-to-the-input" class="hash-link" aria-label="Direct link to Finch: Making Recurrence Respond to the Input" title="Direct link to Finch: Making Recurrence Respond to the Input" translate="no">​</a></h2>
<p>Building on Eagle, Finch makes token shift and decay data-dependent. Eagle's token shift mixes the current and previous inputs with a learned linear interpolation; Finch adds an additional correction computed from the input. The paper also presents a method that uses a LoRA-like form to adjust the decay vector according to context. Thus, even for the same channel, how long the past is retained can vary with the input situation.</p>
<p>This change targets the limitations of fixed decay. Some information should be remembered briefly, while other information must be carried across a long context. Dynamic recurrence delegates that choice to the data. At the same time, it may increase implementation complexity, instability risk, and the cost of parallel training. The paper gives concrete formulas, but that does not mean the dynamic path is as efficient as the fixed path on every kind of hardware.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="multilingual-data-and-the-tokenizer-are-also-part-of-the-architecture">Multilingual Data and the Tokenizer Are Also Part of the Architecture<a href="https://ql.gl/en/blog/2a987eb6/#multilingual-data-and-the-tokenizer-are-also-part-of-the-architecture" class="hash-link" aria-label="Direct link to Multilingual Data and the Tokenizer Are Also Part of the Architecture" title="Direct link to Multilingual Data and the Tokenizer Are Also Part of the Architecture" translate="no">​</a></h2>
<p>The paper covers more than block equations. It introduces RWKV World v2, a public multilingual dataset with 1.12 trillion tokens, and the RWKV World Tokenizer. The tokenizer is described as using Trie-based greedy matching, with the authors aiming to handle underrepresented languages and code more effectively. This is why model performance should not be read as an architecture-only result: data composition, tokenization efficiency, and the number of training tokens all contribute.</p>
<p>The paper trains four Eagle models and two Finch models, evaluating English and multilingual text, associative recall, music, and vision-language tasks. Benchmark scores in the tables must be read together with model size, training data, and evaluation protocol. For a multilingual service, measure tokens per unit of information, long-sentence retrieval, and code-mixed input separately in Korean and the target languages.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="paper-structure-and-practical-interpretation">Paper Structure and Practical Interpretation<a href="https://ql.gl/en/blog/2a987eb6/#paper-structure-and-practical-interpretation" class="hash-link" aria-label="Direct link to Paper Structure and Practical Interpretation" title="Direct link to Paper Structure and Practical Interpretation" translate="no">​</a></h2>
<p>The paper contrasts quadratic attention in Transformers with RNN inference efficiency in the Introduction, then explains the evolution of linear attention, AFT, and RWKV-4 in the Background. It proceeds through the Eagle/Finch architecture, detailed methods, tokenizer and dataset, pretrained models, and experiments in language modeling, speed, and multimodality. The flow defines the bottleneck in existing structures, presents the staged Eagle → Finch changes, and then validates the data, model, and application scope.</p>
<p>Operationally, RWKV's key point is not that it stores an unlimited context, but that it maintains a fixed-size state that is convenient for streaming. For agents handling long-running input or local inference, a state-memory model may be simpler than a KV cache. However, reusing or branching a state differs from the Transformer's ability to read a specific past token again. Product design should make checkpoint-to-state compatibility, different lengths within a batch, and state-initialization policy explicit.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="limitations-and-what-to-check">Limitations and What to Check<a href="https://ql.gl/en/blog/2a987eb6/#limitations-and-what-to-check" class="hash-link" aria-label="Direct link to Limitations and What to Check" title="Direct link to Limitations and What to Check" translate="no">​</a></h2>
<p>First, the paper's “competitive performance” means broad evaluation, not that it surpasses Transformers on every model, language, and task. Second, releasing models under Apache 2.0 improves reproducibility, but the dataset's actual composition and usage conditions should be checked again in the paper and release repository. Third, O(1) inference notation describes complexity with respect to sequence length; it does not guarantee low absolute memory or compute when the matrix state becomes large. Fourth, dynamic decay does not automatically solve long-term memory. The balance between retention and forgetting depends on the evaluation data.</p>
<p>Before adoption, check the following:</p>
<ul>
<li class="">Average tokenizer token count in the target languages and code</li>
<li class="">Prefill and decode throughput under identical batch size, precision, and hardware</li>
<li class="">Peak memory as state size and concurrent request count change</li>
<li class="">Separate accuracy for recent memory, long-range retrieval, and order changes</li>
<li class="">Versions and licenses of the public inference/training code and model checkpoints</li>
</ul>
<p>The direction shown by Eagle and Finch is not a declaration for either RNNs or Transformers. It is an incremental design that enriches the state into a matrix and makes recurrent decay respond to inputs while preserving state-based efficiency during generation. Within the scope supported by the provided materials, it is an attractive alternative, but real performance and cost must be measured together with model size, tokenizer, kernels, and workload context. In particular, it is safer to first verify what a fixed-size state preserves and discards than to talk about “infinite context.”</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/2a987eb6/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class="">Bo Peng et al., “Eagle and Finch: RWKV with Matrix-Valued States and Dynamic Recurrence,” arXiv:2404.05892v4, submitted 2024-04-08, revised 2024-09-26, CC BY 4.0. <a href="https://arxiv.org/abs/2404.05892" target="_blank" rel="noopener noreferrer" class="">https://arxiv.org/abs/2404.05892</a></li>
<li class="">HTML full text, arXiv:2404.05892v4, sections 1–9 and appendices, retrieved 2026-08-19. <a href="https://arxiv.org/html/2404.05892v4" target="_blank" rel="noopener noreferrer" class="">https://arxiv.org/html/2404.05892v4</a></li>
<li class="">RWKV project links listed by the paper (models, training, inference); availability and license should be rechecked before deployment. <a href="https://huggingface.co/RWKV" target="_blank" rel="noopener noreferrer" class="">https://huggingface.co/RWKV</a></li>
</ul>]]></content:encoded>
            <category>AI</category>
            <category>Research</category>
            <category>RWKV</category>
            <category>RNN</category>
            <category>Multilingual</category>
        </item>
        <item>
            <title><![CDATA[xLSTM: How to Scale Recurrent Memory Again]]></title>
            <link>https://ql.gl/en/blog/4d111147/</link>
            <guid>https://ql.gl/en/blog/4d111147/</guid>
            <pubDate>Wed, 19 Aug 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[xLSTM redesigns LSTM gating and memory structures from the perspective of scaling modern language models. Based on the public abstract and metadata, this article examines the roles of sLSTM and mLSTM, the meaning of parallelization and memory state, and performance conditions that remain unverified.]]></description>
            <content:encoded><![CDATA[<p>LSTM introduced gates and memory to handle long-range dependencies, but in the era of large language models it was overtaken by the Transformer's parallel self-attention. xLSTM asks a simple question: can LSTM remain competitive at the scale of billions of parameters if it is combined with modern stabilization techniques and hardware-friendly computation rather than discarded? The answer presented in the paper's abstract is not to simply make the old LSTM larger, but to scale the gating and memory updates themselves.</p>
<p><img decoding="async" loading="lazy" src="https://ql.gl/img/blog/xlstm-recurrent-memory/cover.webp" alt="Conceptual diagram connecting recurrent memory cells with a matrix state" class="img_ev3q"></p>
<!-- -->
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="the-problem-recurrence-provides-memory-but-makes-scaling-difficult">The problem: Recurrence provides memory but makes scaling difficult<a href="https://ql.gl/en/blog/4d111147/#the-problem-recurrence-provides-memory-but-makes-scaling-difficult" class="hash-link" aria-label="Direct link to The problem: Recurrence provides memory but makes scaling difficult" title="Direct link to The problem: Recurrence provides memory but makes scaling difficult" translate="no">​</a></h2>
<p>A conventional recurrent model processes tokens one at a time and passes the state from one timestep to the next. This means it does not need to reread the entire past on every step. On the other hand, dependencies along the time axis limit training parallelization, and a simple memory state has difficulty preserving many kinds of information at once. Transformer attention addresses this by directly connecting multiple positions, but its KV cache and memory usage grow with long inputs.</p>
<p>xLSTM does not treat this tension only as a binary choice between “recurrent models and Transformers.” Its central goal is to preserve LSTM's stable memory mechanism while also providing a path that can be parallelized during training and a richer state representation. The contributions visible in the public abstract have three axes. First, exponential gating together with normalization and stabilization techniques. Second, sLSTM, which uses scalar memory, and mLSTM, which uses matrix memory. Third, a way to place these cells inside a residual-block backbone and stack them into xLSTM blocks and architectures.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="core-mechanisms">Core mechanisms<a href="https://ql.gl/en/blog/4d111147/#core-mechanisms" class="hash-link" aria-label="Direct link to Core mechanisms" title="Direct link to Core mechanisms" translate="no">​</a></h2>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="1-exponential-gating-and-stabilization">1. Exponential gating and stabilization<a href="https://ql.gl/en/blog/4d111147/#1-exponential-gating-and-stabilization" class="hash-link" aria-label="Direct link to 1. Exponential gating and stabilization" title="Direct link to 1. Exponential gating and stabilization" translate="no">​</a></h3>
<p>LSTM gates control how much new information is written and how much of the previous state is retained. xLSTM extends the gates into exponential form. Because an exponential can turn small input differences into large ratio differences, it can provide expressive selection rules, but it also risks exploding or vanishing values. The paper therefore describes introducing suitable normalization and stabilization techniques alongside it. The important point is not that “exponential gating alone makes the model better,” but that controlling the dynamic range of the gates is part of the design as a whole.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: gating</div><div class="admonitionContent_BuS1"><p>Simple definition: A control mechanism that determines how much of newly arriving information and previously stored information a neural network should let through.</p><p>Example: It is like a valve that lets a cook decide how much flavor from ingredients already in the pot to keep and how much of a new ingredient to mix in.</p></div></div>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="2-slstm-extending-scalar-state">2. sLSTM: extending scalar state<a href="https://ql.gl/en/blog/4d111147/#2-slstm-extending-scalar-state" class="hash-link" aria-label="Direct link to 2. sLSTM: extending scalar state" title="Direct link to 2. sLSTM: extending scalar state" translate="no">​</a></h3>
<p>sLSTM uses scalar memory and scalar updates while adding new memory mixing. The important interpretation is that this is not merely a wider version of the existing structure. It changes how multiple information flows are mixed, seeking more flexible updates even with a limited state. However, the public abstract does not establish the exact mixing equations, gate parameterization, or where stabilization terms are implemented. This article therefore treats sLSTM as a structural axis proposed by the paper, not as an implementation whose detailed equations have been independently verified.</p>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="3-mlstm-matrix-memory-and-covariance-updates">3. mLSTM: matrix memory and covariance updates<a href="https://ql.gl/en/blog/4d111147/#3-mlstm-matrix-memory-and-covariance-updates" class="hash-link" aria-label="Direct link to 3. mLSTM: matrix memory and covariance updates" title="Direct link to 3. mLSTM: matrix memory and covariance updates" translate="no">​</a></h3>
<p>mLSTM turns memory into a matrix and uses a covariance update rule. If a scalar state passes along one kind of summary, a matrix state has more room to store relationships among input features. The phrase “covariance update” points toward accumulating relationships between new inputs and the existing state as a statistical structure. This choice may help remember recurring patterns or associations in context, but it may also increase state dimensions and computation, which must be considered together.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: covariance update</div><div class="admonitionContent_BuS1"><p>Simple definition: A method for recording how two pieces of information vary together and updating that record when a new observation arrives.</p><p>Example: It is like keeping a daily record of the relationship between umbrella sales and rainy weather, then adjusting the sales forecast when it rains today.</p></div></div>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="4-integration-into-residual-blocks">4. Integration into residual blocks<a href="https://ql.gl/en/blog/4d111147/#4-integration-into-residual-blocks" class="hash-link" aria-label="Direct link to 4. Integration into residual blocks" title="Direct link to 4. Integration into residual blocks" translate="no">​</a></h3>
<p>The xLSTM cell is integrated into a residual-block backbone rather than being an isolated old-style recurrent layer. A residual connection splits the input between a transformation path and a skip path, preserving routes for information and gradients to flow through a deep network. This integration is a practical way to place LSTM memory updates inside the stacked structure of modern deep models. The paper's title and abstract report that this configuration compares favorably with Transformers and SSMs in performance and scaling, but the detailed conditions and numbers of those comparisons cannot be established from the metadata alone.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="the-papers-claims-and-the-evidence-boundary">The paper's claims and the evidence boundary<a href="https://ql.gl/en/blog/4d111147/#the-papers-claims-and-the-evidence-boundary" class="hash-link" aria-label="Direct link to The paper's claims and the evidence boundary" title="Direct link to The paper's claims and the evidence boundary" translate="no">​</a></h2>
<p>The paper starts from the constant error carousel and gating in 1990s LSTMs, then presents the parallelization-centered direction created by Transformers as context. Its methodology introduces exponential gating, sLSTM, mLSTM, and xLSTM blocks; its experiments are summarized in the abstract as comparing these extensions favorably with modern Transformers and State Space Models in performance and scaling. This supports the claim that the paper conducted experiments, but determining the datasets, hardware, model sizes, and statistical significance behind the conclusion requires reviewing the full paper and code.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="practical-implications">Practical implications<a href="https://ql.gl/en/blog/4d111147/#practical-implications" class="hash-link" aria-label="Direct link to Practical implications" title="Direct link to Practical implications" translate="no">​</a></h2>
<ul>
<li class=""><strong>Inference state</strong>: Because a recurrent model maintains a per-token state, it can have different memory and bandwidth characteristics from an attention model's full KV cache on long inputs. The actual benefit depends on state size, kernel implementation, and batch size.</li>
<li class=""><strong>Training parallelization</strong>: The fully parallelizable nature of mLSTM is intended to reduce the sequential training weakness of recurrent models. It does not mean that the same throughput is guaranteed at every sequence length and on every piece of hardware.</li>
<li class=""><strong>Evaluation design</strong>: Perplexity alone is not enough to judge the value of a memory structure. Long-range memory, state tracking, long context, and recurring patterns should be evaluated separately.</li>
</ul>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="limitations-and-open-questions">Limitations and open questions<a href="https://ql.gl/en/blog/4d111147/#limitations-and-open-questions" class="hash-link" aria-label="Direct link to Limitations and open questions" title="Direct link to Limitations and open questions" translate="no">​</a></h2>
<p>This draft is based on the arXiv abstract and metadata. The public material does not establish the detailed gate equations, exact benchmark numbers, training cost, latency on a specific GPU, or memory usage at long context lengths. The conclusion that xLSTM “replaces Transformers” is not justified by these materials alone. Before adoption, the original methodology, experiment tables, and reproduction conditions in the public code should be checked. In particular, the balance between the representational capacity of matrix memory and the cost of updating the state must be measured again for each model size.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/4d111147/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://arxiv.org/abs/2405.04517" target="_blank" rel="noopener noreferrer" class="">xLSTM: Extended Long Short-Term Memory</a> — license: <code>unknown</code>, retrieved: <code>2026-08-19</code>, source type: <code>original</code></li>
<li class="">Image: Placeholder — original technical cover to be created — license: <code>placeholder-original</code></li>
</ul>]]></content:encoded>
            <category>AI</category>
            <category>Deep Learning</category>
            <category>Recurrent Model</category>
            <category>Research</category>
            <category>Explainer</category>
        </item>
        <item>
            <title><![CDATA[Mamba-3: Connecting Linear Inference to Practical Sequence-Modeling Quality]]></title>
            <link>https://ql.gl/en/blog/14e25d3e/</link>
            <guid>https://ql.gl/en/blog/14e25d3e/</guid>
            <pubDate>Wed, 19 Aug 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Mamba-3 seeks to improve both efficiency and state-tracking ability from a state-space perspective through better recurrence, complex-valued state updates, and multi-input/multi-output I/O. This article analyzes the design and evidence boundary, focusing on the 1.5B results stated in the paper's abstract.]]></description>
            <content:encoded><![CDATA[<p>When processing long contexts, Transformer costs appear as growing attention computation and the memory burden of the KV cache. Linear models offer a better cost structure in theory, but can lose quality in state tracking and hardware efficiency. This is the gap Mamba-3 targets. Rather than treating “linear complexity” as a slogan, the paper redesigns recurrence and state updates around the idea that actual data movement during inference and the expressiveness of the state matter.</p>
<p><img decoding="async" loading="lazy" src="https://ql.gl/img/blog/mamba3-improved-sequence-modeling/cover.webp" alt="Conceptual diagram of state-space recurrence and multiple input/output paths" class="img_ev3q"></p>
<!-- -->
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="why-linear-is-not-enough">Why linear is not enough<a href="https://ql.gl/en/blog/14e25d3e/#why-linear-is-not-enough" class="hash-link" aria-label="Direct link to Why linear is not enough" title="Direct link to Why linear is not enough" translate="no">​</a></h2>
<p>A State Space Model (SSM) compresses an input sequence into a fixed-size state, updates that state at each timestep, and produces outputs. In the idealized account, its computation grows linearly with sequence length and the state needed during decoding remains constant. But if the state is too simple, it may miss state-tracking tasks such as “what value appeared at which position?” Theoretical operation counts and actual speed on a GPU are also separate questions. Many small recurrent updates can cause substantial memory reads and writes; hardware utilization can therefore be low even when the arithmetic count is small.</p>
<p>Mamba-3 starts from an inference-first perspective. In other words, its design target is not merely a structure that is convenient to train, but also the latency and state size of the token-by-token decode path. The abstract presents three methodological improvements aimed at different bottlenecks.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="three-improvements">Three improvements<a href="https://ql.gl/en/blog/14e25d3e/#three-improvements" class="hash-link" aria-label="Direct link to Three improvements" title="Direct link to Three improvements" translate="no">​</a></h2>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="1-more-expressive-recurrence-from-ssm-discretization">1. More expressive recurrence from SSM discretization<a href="https://ql.gl/en/blog/14e25d3e/#1-more-expressive-recurrence-from-ssm-discretization" class="hash-link" aria-label="Direct link to 1. More expressive recurrence from SSM discretization" title="Direct link to 1. More expressive recurrence from SSM discretization" translate="no">​</a></h3>
<p>The first is a more expressive recurrence derived from SSM discretization. Converting a continuous-time system into token-level updates determines the time interval and state transition. Instead of leaving that transition as a simple fixed rule, Mamba-3 expands the recurrence so the state can accumulate input more finely. The abstract alone does not establish the equation for each coefficient or which parameters are learned, but the direction is clear: improve how the state is represented while retaining the cost profile of a linear model.</p>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="2-complex-valued-state-updates">2. Complex-valued state updates<a href="https://ql.gl/en/blog/14e25d3e/#2-complex-valued-state-updates" class="hash-link" aria-label="Direct link to 2. Complex-valued state updates" title="Direct link to 2. Complex-valued state updates" translate="no">​</a></h3>
<p>The second is a complex-valued state update rule. Complex-valued states can use two kinds of information—magnitude and phase—creating more room to represent repetition, periodicity, and ordering relationships. This representation is especially relevant to tasks where position and change matter, such as state tracking. Complex arithmetic is not equally efficient on every hardware platform, however. Measured latency depends on whether the implementation is decomposed into real and imaginary paths and how effectively the kernels are fused.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: State Space Model (SSM)</div><div class="admonitionContent_BuS1"><p>Simple definition: A model that continually summarizes important information from a long input into a small state and uses that state to produce the next output instead of storing everything.</p><p>Example: Rather than rewatching a long movie for every scene, it keeps updating a one-page plot summary and uses it to understand what comes next.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: discretization</div><div class="admonitionContent_BuS1"><p>Simple definition: The process of converting the rules of a continuously changing system into rules that a computer can calculate one step at a time.</p><p>Example: Instead of calculating a car's position and speed at every instant, it is like recording them in a table once every second.</p></div></div>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="3-mimo-multiple-inputs-and-outputs-without-increasing-decode-latency">3. MIMO: multiple inputs and outputs without increasing decode latency<a href="https://ql.gl/en/blog/14e25d3e/#3-mimo-multiple-inputs-and-outputs-without-increasing-decode-latency" class="hash-link" aria-label="Direct link to 3. MIMO: multiple inputs and outputs without increasing decode latency" title="Direct link to 3. MIMO: multiple inputs and outputs without increasing decode latency" translate="no">​</a></h3>
<p>The third is a formalization of multi-input, multi-output (MIMO). Instead of handling one input stream and one output, it groups multiple input/output relationships to increase expressiveness. The paper's abstract describes MIMO as a way to improve model performance without increasing decode latency. It is safer to read this not as “computation does not increase at all,” but as a design that uses more information within the latency budget of the same decode path. The actual cost, including state size and kernel implementation, must be checked in the full paper.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="results-stated-in-the-abstract">Results stated in the abstract<a href="https://ql.gl/en/blog/14e25d3e/#results-stated-in-the-abstract" class="hash-link" aria-label="Direct link to Results stated in the abstract" title="Direct link to Results stated in the abstract" translate="no">​</a></h2>
<p>The paper reports improvements in retrieval, state tracking, and downstream language modeling. At 1.5B parameters, Mamba-3 is reported in the abstract to have downstream average accuracy 0.6 percentage points higher than Gated DeltaNet, described as the next-best model; the MIMO variant adds another 1.2 points, for a total gain of 1.8 points. The paper also reports that in state-size experiments Mamba-3 achieved similar perplexity with half the state size of the earlier Mamba-2.</p>
<p>These numbers are useful, but they are summarized without all conditions. The abstract does not reveal which task set produced the average accuracy, what training recipe and token count the baseline used, or the actual conditions for latency and memory measurements. Therefore, the correct wording is not that Mamba-3 is “always 1.8 points better,” but that the paper reported this difference under its stated evaluation setup.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="the-papers-logical-structure">The paper's logical structure<a href="https://ql.gl/en/blog/14e25d3e/#the-papers-logical-structure" class="hash-link" aria-label="Direct link to The paper's logical structure" title="Direct link to The paper's logical structure" translate="no">​</a></h2>
<p>The public metadata and abstract follow the sequence of problem statement → limitations of linear models → three design improvements → evaluation on retrieval, state tracking, and language modeling. This is not an analysis of the complete IMRaD structure, which requires the full paper; it is the argument structure visible in the abstract. The key point is that the three methodological elements are positioned to address different weaknesses: expressiveness, state tracking, and decode efficiency.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="implications-from-a-systems-perspective">Implications from a systems perspective<a href="https://ql.gl/en/blog/14e25d3e/#implications-from-a-systems-perspective" class="hash-link" aria-label="Direct link to Implications from a systems perspective" title="Direct link to Implications from a systems perspective" translate="no">​</a></h2>
<ul>
<li class=""><strong>Inference cost</strong>: A fixed-state structure for long sequences can create a different memory profile from a KV cache. Whether it is advantageous on GPUs must be measured through state size and data movement.</li>
<li class=""><strong>Evaluation</strong>: Perplexity, retrieval, and state tracking should be considered together. An average language-model score alone cannot explain differences in how a model remembers.</li>
<li class=""><strong>Deployment</strong>: Complex-valued states and MIMO can affect the numerical format of model files, kernel support, and quantization strategy. These implementation details are not present in the public abstract.</li>
</ul>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="limitations-and-open-questions">Limitations and open questions<a href="https://ql.gl/en/blog/14e25d3e/#limitations-and-open-questions" class="hash-link" aria-label="Direct link to Limitations and open questions" title="Direct link to Limitations and open questions" translate="no">​</a></h2>
<p>The quantitative claims in this article are limited to what is stated in the arXiv abstract. Reproduction requires checking the experiment tables, model and data scales, hardware, and throughput and peak-memory measurements. It is also unknown whether the perplexity comparison with Mamba-2 used identical training conditions, or whether “half the state size” directly translates into a reduction in total memory. Before adoption, decode benchmarks should be run across context lengths, batch sizes, and concurrent-user counts, along with verification of state-reset behavior during failures.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/14e25d3e/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://arxiv.org/abs/2603.15569" target="_blank" rel="noopener noreferrer" class="">Mamba-3: Improved Sequence Modeling using State Space Principles</a> — license: <code>unknown</code>, retrieved: <code>2026-08-19</code>, source type: <code>original</code></li>
<li class="">Image: Placeholder — original technical cover to be created — license: <code>placeholder-original</code></li>
</ul>]]></content:encoded>
            <category>AI</category>
            <category>Mamba</category>
            <category>State-Space Model</category>
            <category>Inference</category>
            <category>Research</category>
            <category>Explainer</category>
        </item>
        <item>
            <title><![CDATA[Hidden State Poisoning: When Mamba's Efficient State Becomes an Attack Surface]]></title>
            <link>https://ql.gl/en/blog/390c6aee/</link>
            <guid>https://ql.gl/en/blog/390c6aee/</guid>
            <pubDate>Wed, 19 Aug 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Hidden State Poisoning Attacks against Mamba-based Language Models analyzes how a short trigger can overwrite the hidden state of Mamba-family models and break information retrieval. Centered on HiSPA and RoBench-25, this article explains the relationship between efficient state and the security boundary within the scope of the original abstract.]]></description>
            <content:encoded><![CDATA[<p>The appeal of the Mamba family is its efficiency in processing long sequences with a fixed-size state. But that compressed state can itself become a security boundary. <em>Hidden State Poisoning Attacks against Mamba-based Language Models</em> studies Hidden State Poisoning Attacks (HiSPA), a phenomenon in which a particular short input phrase partially overwrites the model's hidden state and breaks its ability to retrieve stored information. Based on the abstract and public metadata, this article organizes the attack concept, reported evaluations, and operational questions that need to be checked.</p>
<p><img decoding="async" loading="lazy" src="https://ql.gl/img/blog/hidden-state-poisoning-mamba/cover.webp" alt="Conceptual diagram of an attack path that overwrites a Mamba hidden state" class="img_ev3q"></p>
<!-- -->
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="the-asymmetry-created-by-state-compression">The asymmetry created by state compression<a href="https://ql.gl/en/blog/390c6aee/#the-asymmetry-created-by-state-compression" class="hash-link" aria-label="Direct link to The asymmetry created by state compression" title="Direct link to The asymmetry created by state compression" translate="no">​</a></h2>
<p>Transformer models leave previous tokens relatively directly in the KV cache, and new tokens can refer to multiple positions through attention. A State Space Model (SSM) such as Mamba processes inputs sequentially and updates a limited hidden state. This reduces memory and computation, but it also means that past information is mixed through state updates. An attacker can insert a short phrase into that update path, making important information from an otherwise normal context difficult to reach in later outputs.</p>
<p>The paper's “partial amnesia” does not mean that the model forgets everything. It is a collapse or weakening of the ability to retrieve some information after a particular attack trigger. This distinction matters because the attack can be induced by a short phrase inserted into the input sequence, rather than by a training phase that changes the model parameters. Input filtering, context isolation, state resets, and validation of retrieved results therefore all become relevant defense layers.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: hidden state</div><div class="admonitionContent_BuS1"><p>Simple definition: A bundle of numbers that a model keeps internally so that what it has read so far can be passed to the next computation.</p><p>Example: It is like a one-page plot summary kept while reading a book. If someone erases or replaces an important part of that note, the understanding of the next scene changes.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: attack trigger</div><div class="admonitionContent_BuS1"><p>Simple definition: A short input pattern designed to cause a particular behavior or failure.</p><p>Example: Just as a specific button combination in a game can activate a hidden move, a particular phrase in a sentence can affect how a model updates its state.</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="the-hispa-attack-model">The HiSPA attack model<a href="https://ql.gl/en/blog/390c6aee/#the-hispa-attack-model" class="hash-link" aria-label="Direct link to The HiSPA attack model" title="Direct link to The HiSPA attack model" translate="no">​</a></h2>
<p>The abstract defines HiSPA as a phenomenon in which “a specific short input phrase irreversibly overwrites the hidden state.” Here, “irreversible” can be interpreted to mean that during the continuing sequential execution, simply providing the next normal inputs may not automatically restore the original information. The abstract does not establish the exact attack-generation procedure, the distribution of trigger lengths, or how much the attacker must know about the target information and the model internals.</p>
<p>The paper reports proposing RoBench-25, a benchmark for evaluating information retrieval when HiSPA is present. The benchmark attempts to make the attack a repeatable evaluation problem rather than a single anecdote. Security evaluation should separate whether the trigger worked from how much normal-input quality was preserved. The specific scores and baselines, however, require checking the experiments in the full paper.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="what-the-reported-results-mean">What the reported results mean<a href="https://ql.gl/en/blog/390c6aee/#what-the-reported-results-mean" class="hash-link" aria-label="Direct link to What the reported results mean" title="Direct link to What the reported results mean" translate="no">​</a></h2>
<p>The abstract reports that SSM vulnerabilities were confirmed on RoBench-25 and that Jamba-1.7-Mini, a 52B hybrid SSM–Transformer, also collapsed under some HiSPA triggers. It reports no such collapse for a pure Transformer in the same comparison. The abstract further states that HiSPA triggers substantially weakened Jamba on the Open-Prompt-Injections benchmark, while the same effect was not observed for the pure Transformer.</p>
<p>These results must not be expanded into “Transformers are safe.” They are observations limited to the attack type and model set evaluated by the paper, and they do not rule out other input attacks, data poisoning, or tool misuse. The more important message is that architecture-specific state updates can change the scope of an attack's impact. The abstract also states that the theoretical and empirical analysis was extended to Mamba-2 and the Mamba-2-based Nemotron-3-Nano hybrid.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="interpretability-and-possible-defenses">Interpretability and possible defenses<a href="https://ql.gl/en/blog/390c6aee/#interpretability-and-possible-defenses" class="hash-link" aria-label="Direct link to Interpretability and possible defenses" title="Direct link to Interpretability and possible defenses" translate="no">​</a></h2>
<p>The paper analyzes patterns appearing in Mamba's hidden layers during HiSPA as part of an interpretability study and proposes using them to build mitigation systems. This direction suggests inspecting states directly or detecting anomalous changes and blocking the input, but the public abstract does not verify the actual detector, false-positive rate, latency cost, or which layers are inspected.</p>
<p>In practice, the following questions are a reasonable starting point.</p>
<ul>
<li class="">Do external documents or user prompts enter the same execution path as the model's persistent state?</li>
<li class="">Are per-request states isolated, and is state reset when the trust boundary changes?</li>
<li class="">Are source, authority, and integrity checked before retrieved results or system instructions are incorporated into state?</li>
<li class="">When an anomalous trigger is detected, does the system fail open or fail closed?</li>
</ul>
<p>In agent systems especially, state contamination can affect not only answer quality but also tool-call selection and the scope of data access. The HiSPA abstract does not directly prove effects on tool execution, so this should remain an open question that follows reasonably from security design rather than a claim established by the paper.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="the-papers-structure-and-evidence-boundary">The paper's structure and evidence boundary<a href="https://ql.gl/en/blog/390c6aee/#the-papers-structure-and-evidence-boundary" class="hash-link" aria-label="Direct link to The paper's structure and evidence boundary" title="Direct link to The paper's structure and evidence boundary" translate="no">​</a></h2>
<p>The public abstract proceeds from the efficiency of SSMs and the underexplored problem of adversarial robustness to the definition of HiSPA, RoBench-25, model-specific results, and an interpretability-based mitigation direction. Its structure is problem → attack definition → evaluation → defense clue. This article does not revalidate the full threat model and appendix of the 29-page paper, so it does not provide every condition needed to reproduce the attack.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="limitations-and-operational-conclusion">Limitations and operational conclusion<a href="https://ql.gl/en/blog/390c6aee/#limitations-and-operational-conclusion" class="hash-link" aria-label="Direct link to Limitations and operational conclusion" title="Direct link to Limitations and operational conclusion" translate="no">​</a></h2>
<p>First, the abstract does not give the exact attack success rate, information-retrieval scores, or trigger-generation cost. Second, the fact that a Transformer did not fail in this experiment does not mean that every Transformer is immune. Third, additional verification is needed to determine which information types and context lengths are most affected by “partial amnesia.” Adopters should therefore not judge security from architecture choice alone; they should add trigger regression tests similar to RoBench-25 to their own state-management, retrieval, and tool-calling pipelines.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/390c6aee/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://arxiv.org/abs/2601.01972" target="_blank" rel="noopener noreferrer" class="">Hidden State Poisoning Attacks against Mamba-based Language Models</a> — license: <code>unknown</code>, retrieved: <code>2026-08-19</code>, source type: <code>original</code></li>
<li class="">Image: Placeholder — original security diagram to be created — license: <code>placeholder-original</code></li>
</ul>]]></content:encoded>
            <category>AI</category>
            <category>Security</category>
            <category>Mamba</category>
            <category>Adversarial Robustness</category>
            <category>Research</category>
            <category>Explainer</category>
        </item>
        <item>
            <title><![CDATA[Resona: Using Retrieval to Improve Context Copying in Linear Recurrent Models]]></title>
            <link>https://ql.gl/en/blog/23360387/</link>
            <guid>https://ql.gl/en/blog/23360387/</guid>
            <pubDate>Wed, 19 Aug 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Resona is a framework that retrieves needed information from the input context and reinjects it into a linear recurrent language model. Based on the paper's abstract, this article examines the bottleneck in context copying, the meaning of combining retrieval with recurrence, and the evaluation, cost, and evidence that must be checked before practical adoption.]]></description>
            <content:encoded><![CDATA[<p>A linear recurrent model updates a small state as it reads tokens, offering a different choice from a Transformer in computation and memory cost for long inputs. But it reveals a weakness when it must find and reproduce a specific fact that is already in context. “Copy the string seen a moment ago exactly” is a different problem from summarizing everything into a compressed state. Resona proposes a simple and extensible framework that seeks to close this gap through retrieval.</p>
<p><img decoding="async" loading="lazy" src="https://ql.gl/img/blog/resona-context-copying/cover.webp" alt="Conceptual diagram of retrieving relevant tokens from input context and copying them into a linear recurrent state" class="img_ev3q"></p>
<!-- -->
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="summarizing-context-and-copying-it-are-different-tasks">Summarizing context and copying it are different tasks<a href="https://ql.gl/en/blog/23360387/#summarizing-context-and-copying-it-are-different-tasks" class="hash-link" aria-label="Direct link to Summarizing context and copying it are different tasks" title="Direct link to Summarizing context and copying it are different tasks" translate="no">​</a></h2>
<p>A linear recurrent model computes a new state and output from the input at each timestep and the previous state. The fact that its state size does not grow with input length can be useful for inference. But it cannot preserve every detail of the context at the same precision. Names, numbers, and arbitrary strings can disappear during compression into a small state when the task requires recovering the original text exactly rather than understanding its meaning.</p>
<p>Transformers are strong at looking directly at relevant positions through attention. A linear recurrent model, by contrast, must rely on its already-compressed state if it has no dedicated path for querying the entire past. Resona starts by acknowledging this structural difference. Rather than claiming to turn the model into a Transformer, it assists the recurrent model by finding necessary fragments within the provided input context and making them available for use.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: linear recurrent model</div><div class="admonitionContent_BuS1"><p>Simple definition: A model that reads a long sentence while updating a memory of fixed size one step at a time.</p><p>Example: Instead of spreading an entire book across a desk, it keeps writing what it has read onto a single summary card while continuing to the next page.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: retrieval</div><div class="admonitionContent_BuS1"><p>Simple definition: The process of finding a relevant part of the input and providing it to the model again for the current question.</p><p>Example: When answering an exam question, it is like finding the relevant page in the index instead of rereading the entire textbook.</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="resonas-core-design">Resona's core design<a href="https://ql.gl/en/blog/23360387/#resonas-core-design" class="hash-link" aria-label="Direct link to Resona's core design" title="Direct link to Resona's core design" translate="no">​</a></h2>
<p>The core stated in the paper's abstract is to add a linear recurrent model the ability to integrate information retrieved from the provided input context. The input can therefore be understood as having two paths. The base path reads tokens sequentially and updates the state. The retrieval path finds context fragments related to the current need, allowing the model to use that information more directly. The exact layer location, retrieval index, scoring function, and training objective cannot be established from the abstract alone.</p>
<p>An important point is that retrieval here is not necessarily a feature that applies only to an external knowledge base. Resona's abstract says that it retrieves information from the “provided input context.” In other words, the target is content already included in the document or conversation. This differs from the usual image of RAG: it is closer to re-addressing the current input than to bringing in a new external document.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="why-it-can-help-with-context-copying">Why it can help with context copying<a href="https://ql.gl/en/blog/23360387/#why-it-can-help-with-context-copying" class="hash-link" aria-label="Direct link to Why it can help with context copying" title="Direct link to Why it can help with context copying" translate="no">​</a></h2>
<p>Context copying can be divided into three steps. First, locate the relevant position. Second, connect the located content to the state or output path. Third, generate the original text as accurately as possible. A pure linear recurrent model can encounter the limits of its compressed state in the first and second steps. By selecting relevant positions again through retrieval, Resona reduces the burden of having to remember every token in the same way.</p>
<p>The abstract explains that this approach aims for tailored behavior suited to different task requirements. Some problems require understanding the overall flow; others require copying a single line of an identifier. Retrieval signals let the model focus on part of the context according to the task. If retrieval is inaccurate, however, the system can copy the wrong fragment. Performance evaluation should therefore include retrieval recall, robustness to incorrect retrieval, and handling of duplicate or conflicting information alongside any claim of improved model quality.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="evaluation-reported-by-the-paper">Evaluation reported by the paper<a href="https://ql.gl/en/blog/23360387/#evaluation-reported-by-the-paper" class="hash-link" aria-label="Direct link to Evaluation reported by the paper" title="Direct link to Evaluation reported by the paper" translate="no">​</a></h2>
<p>The abstract reports that Resona was applied to multiple linear recurrent models and that improvements were observed on both synthetic tasks and real-world natural-language tasks. The reported improvements concern in-context learning and language-modeling ability in particular. This suggests that the framework may be a general-purpose method applicable to several linear recurrent models rather than a trick for one specific model.</p>
<p>The public abstract does not include the model list, dataset names, absolute scores, retrieval cost, or improvement margins over the baseline. It therefore cannot support claims that Resona “outperforms Transformers on every recurrent model” or that “adding retrieval solves context problems.” Exact comparisons require the original experiment tables and implementation. In particular, success on a synthetic copying benchmark does not by itself guarantee performance on real documents containing contradictions, noise, and long instructions.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="implications-from-a-systems-and-product-perspective">Implications from a systems and product perspective<a href="https://ql.gl/en/blog/23360387/#implications-from-a-systems-and-product-perspective" class="hash-link" aria-label="Direct link to Implications from a systems and product perspective" title="Direct link to Implications from a systems and product perspective" translate="no">​</a></h2>
<ul>
<li class=""><strong>Memory and latency</strong>: Even if the recurrent state is small, a retrieval index and top-k candidate management add cost. Total system cost must include the retrieval data structure and memory movement, not only model computation.</li>
<li class=""><strong>Quality observability</strong>: Do not evaluate only the answer; record which context fragments were selected. When the evidence is wrong, it is difficult to distinguish a generation error from a retrieval error without that trace.</li>
<li class=""><strong>Security boundary</strong>: If a malicious instruction is mixed into the input context, the retriever may select it as relevant information. Source, authority, and instruction priority must be checked both before and after retrieval.</li>
<li class=""><strong>Adoption strategy</strong>: Instead of placing every long document into recurrent state indiscriminately, it is more reasonable to A/B-test paths where copying matters separately from paths where semantic summarization matters.</li>
</ul>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="analysis-of-the-papers-structure">Analysis of the paper's structure<a href="https://ql.gl/en/blog/23360387/#analysis-of-the-papers-structure" class="hash-link" aria-label="Direct link to Analysis of the paper's structure" title="Direct link to Analysis of the paper's structure" translate="no">​</a></h2>
<p>The argument visible in the abstract proceeds from the efficiency of linear recurrent models to their context-retrieval gap, then to the Resona framework and evaluation across multiple models and synthetic and natural-language tasks. It presents the problem and contribution first, then evaluates the possibility of generalization. The actual Methods, Results, and Discussion organization and the concrete implementation of the retrieval module require reading the full paper.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="limitations-and-open-questions">Limitations and open questions<a href="https://ql.gl/en/blog/23360387/#limitations-and-open-questions" class="hash-link" aria-label="Direct link to Limitations and open questions" title="Direct link to Limitations and open questions" translate="no">​</a></h2>
<p>Resona focuses on finding and using information that is already present in the input more effectively. Problems where the input contains no fact, where multiple sources conflict, or where fresh external knowledge is required need a separate retrieval system. Error propagation at the moment retrieved results are combined into state, along with privacy-retention policies, also requires review. Because the public abstract provides no quantitative figures, this article's conclusion remains directional. Before adoption, the original code, experimental conditions, memory use, and latency should be checked, and regression tests should cover retrieval failure, contaminated context, and conflicting information.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/23360387/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://arxiv.org/abs/2503.22913" target="_blank" rel="noopener noreferrer" class="">Resona: Improving Context Copying in Linear Recurrence Models with Retrieval</a> — license: <code>unknown</code>, retrieved: <code>2026-08-19</code>, source type: <code>original</code></li>
<li class="">Image: Placeholder — original technical cover to be created — license: <code>placeholder-original</code></li>
</ul>]]></content:encoded>
            <category>AI</category>
            <category>Retrieval</category>
            <category>Recurrent Model</category>
            <category>Language Model</category>
            <category>Research</category>
            <category>Explainer</category>
        </item>
        <item>
            <title><![CDATA[Is a Fixed-Size Hidden State Memory, or Compression?]]></title>
            <link>https://ql.gl/en/blog/ac4b2e1e/</link>
            <guid>https://ql.gl/en/blog/ac4b2e1e/</guid>
            <pubDate>Wed, 19 Aug 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[This article distinguishes fixed-size recurrent hidden states as memory devices versus information compression. It explains the role of state through S4, Mamba, RWKV, and Resona, while treating Qdrant and Statey separately as external-memory contexts.]]></description>
            <content:encoded><![CDATA[<p><img decoding="async" loading="lazy" src="https://ql.gl/img/blog/topic-hidden-state-memory/cover.webp" alt="cover placeholder" class="img_ev3q"></p>
<!-- -->
<p>Calling a recurrent model’s hidden state “memory” is convenient, but taking the term literally causes us to miss an important distinction. A hidden state acts like memory in the sense that it passes previous input to the next computation. Usually, however, it does not retain past tokens in their original form. Within a fixed number of dimensions, it updates statistics and traces learned to be useful for the current objective. A more precise description is therefore <strong>an objective-specific compressed state</strong>.</p>
<p>This distinction is not wordplay. If some information must be recovered exactly, an external store or attention may be necessary; other information may be adequately represented by summarized dynamics alone. When reading S4, Mamba, RWKV, and Resona, we should therefore ask not “how much does it store?” but “what state transformation is learned for which query?”</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="three-meanings-of-state-memory-and-compression">Three meanings of state, memory, and compression<a href="https://ql.gl/en/blog/ac4b2e1e/#three-meanings-of-state-memory-and-compression" class="hash-link" aria-label="Direct link to Three meanings of state, memory, and compression" title="Direct link to Three meanings of state, memory, and compression" translate="no">​</a></h2>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: hidden state</div><div class="admonitionContent_BuS1"><p>The internal representation held by a model at the current position in a sequence. It is used to process the next input, and in a recurrent architecture it is updated from the previous state and the new input.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: compressed representation</div><div class="admonitionContent_BuS1"><p>A representation that is smaller than the original data while trying to preserve as much information as possible for a particular task. The training objective determines what is preserved.</p></div></div>
<p>A general recurrent update can be simplified as <code>h_t = f(h_{t-1}, x_t)</code>. If the dimensionality of <code>h_t</code> does not grow with sequence length, then a long input is passing through a bottleneck of constant size. This bottleneck is both an advantage and a constraint. A small state makes inference memory and transfer volume predictable, but it can also cause different pasts to collide by mapping them near the same state. There is no guarantee that such collisions can be completely avoided in information-theoretic terms.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="s4-why-a-fixed-state-is-more-than-a-simple-summary">S4: why a fixed state is more than a simple summary<a href="https://ql.gl/en/blog/ac4b2e1e/#s4-why-a-fixed-state-is-more-than-a-simple-summary" class="hash-link" aria-label="Direct link to S4: why a fixed state is more than a simple summary" title="Direct link to S4: why a fixed state is more than a simple summary" translate="no">​</a></h2>
<p>S4 is research aimed at modeling long sequences efficiently through a structured state space model. The paper starts from continuous-time linear systems, addresses long-range dependencies, and proposes a computationally tractable sequence layer using HiPPO-family initialization and structured matrices.</p>
<p><strong>What the source says:</strong> S4 presents an SSM layer for modeling long-range dependencies together with an efficient computational structure, and reports strong performance on several long-context benchmarks.</p>
<p><strong>Interpretation:</strong> S4’s state should not be understood merely as a “summary of the most recent few tokens.” Its linear dynamics can be designed to respond to past inputs across multiple time scales. Even so, it differs from a database that stores the original text in a searchable form. The state has meaning only within a particular computational path and is not guaranteed to answer a request to retrieve an arbitrary sentence verbatim.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="mamba-remembering-selectively-and-forgetting-selectively">Mamba: remembering selectively and forgetting selectively<a href="https://ql.gl/en/blog/ac4b2e1e/#mamba-remembering-selectively-and-forgetting-selectively" class="hash-link" aria-label="Direct link to Mamba: remembering selectively and forgetting selectively" title="Direct link to Mamba: remembering selectively and forgetting selectively" translate="no">​</a></h2>
<p>Mamba introduces input-dependent selectivity into an SSM. In the language of the abstract, the model adjusts how much information it propagates or forgets according to the input content. This makes the hidden state not a passive compression buffer but a dynamic filter with a learned write-and-forget policy.</p>
<p>Here, “remembering” must be separated into the fact that data enters the state and the fact that it can later be reconstructed in exactly the desired form. Mamba’s ability to process long dependencies on a particular benchmark does not mean that every past token is preserved. What remains are features useful for the function demanded by the benchmark. This difference is central to separating recurrent state from searchable memory.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="rwkv-combining-the-intuition-of-attention-with-recurrent-execution">RWKV: combining the intuition of attention with recurrent execution<a href="https://ql.gl/en/blog/ac4b2e1e/#rwkv-combining-the-intuition-of-attention-with-recurrent-execution" class="hash-link" aria-label="Direct link to RWKV: combining the intuition of attention with recurrent execution" title="Direct link to RWKV: combining the intuition of attention with recurrent execution" translate="no">​</a></h2>
<p>The RWKV family explores structures that retain the intuition of weighted aggregation similar to attention while being executable recurrently. Public descriptions of the RWKV papers pursue parallel training together with efficient recurrent inference.</p>
<p><strong>Source and interpretation:</strong> RWKV demonstrates the design possibility that a recurrent state can represent weighted accumulation over the past. But an accumulated state is not infinite memory. Within the summary space determined by the state dimension and update rule, the model retains information needed for its next prediction. Since multiple pasts may map to the same state, calling it a memory that guarantees exact retrieval would be an overstatement.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="resona-an-expanded-context-requiring-source-verification">Resona: an expanded context requiring source verification<a href="https://ql.gl/en/blog/ac4b2e1e/#resona-an-expanded-context-requiring-source-verification" class="hash-link" aria-label="Direct link to Resona: an expanded context requiring source verification" title="Direct link to Resona: an expanded context requiring source verification" translate="no">​</a></h2>
<p>Resona is a research name designated for inclusion in this group in connection with fixed states, iterative inference, or memory-efficient sequence processing. However, the evidence available in the current writing environment does not include the paper’s exact arXiv identifier and full abstract. We therefore do not assert specific performance numbers or detailed mechanisms for Resona.</p>
<p>In this article, the context provided by Resona is marked <strong>unverified</strong>. Writing that it “remembers longer” or “solves compression loss” based on the name alone would violate source-bounded writing principles. Claims should be expanded only after the exact paper link, abstract, and experimental conditions have been checked.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="external-memory-context-qdrant-and-statey-are-a-different-layer">External-memory context: Qdrant and Statey are a different layer<a href="https://ql.gl/en/blog/ac4b2e1e/#external-memory-context-qdrant-and-statey-are-a-different-layer" class="hash-link" aria-label="Direct link to External-memory context: Qdrant and Statey are a different layer" title="Direct link to External-memory context: Qdrant and Statey are a different layer" translate="no">​</a></h2>
<p>Qdrant is a vector database that stores vectors and provides similarity search. As confirmed in the earlier article, Statey describes itself as a shared database that reads and writes structured records within a chat. Neither is the same kind of “internal state” as a recurrent hidden state.</p>
<p><strong>Context confirmed for Qdrant and Statey:</strong> External stores do not leave data only within the fixed dimensionality of a session or model; they make it possible to search later or read it again as structured records. Qdrant emphasizes embedding similarity search, while Statey emphasizes MCP-based record sharing through different interfaces.</p>
<p><strong>Interpretation:</strong> External memory increases storage capacity and retrievability, but it requires operations for write permissions, search quality, latency, data isolation, and deletion policy. A hidden state, by contrast, is passed very quickly during request processing, but it disappears when the session ends and is difficult to audit or recover without separate storage. Even if both are called “memory,” their trust boundaries and failure modes differ.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="what-belongs-where-in-practice">What belongs where in practice?<a href="https://ql.gl/en/blog/ac4b2e1e/#what-belongs-where-in-practice" class="hash-link" aria-label="Direct link to What belongs where in practice?" title="Direct link to What belongs where in practice?" translate="no">​</a></h2>
<ul>
<li class=""><strong>Hidden state:</strong> Summaries of recent context, continuous signals, and state tracking for streaming input—information that needs to be updated at every token.</li>
<li class=""><strong>Search memory:</strong> Facts, documents, and user preferences for which the original text or supporting evidence must be retrieved later. Search keys and permissions must be designed together.</li>
<li class=""><strong>Structured records:</strong> Operational data such as state, ownership, and change history that requires exact fields and auditing.</li>
</ul>
<p>This separation is not only a model-performance issue. Compression loss in a hidden state is reflected in the task loss, whereas external memory can inject incorrect writes or poisoned search results into the model. In other words, compression is a representational risk, while external memory is a data-governance risk.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="conclusion-and-limitations">Conclusion and limitations<a href="https://ql.gl/en/blog/ac4b2e1e/#conclusion-and-limitations" class="hash-link" aria-label="Direct link to Conclusion and limitations" title="Direct link to Conclusion and limitations" translate="no">​</a></h2>
<p>A fixed-size hidden state is used like memory, but in essence it is closer to a learned, objective-specific compressed state. S4 shows long-range dynamics, Mamba selective retention and forgetting, and RWKV a combination of recurrent execution and weighted aggregation. They all share the property of transforming the past into a bounded representation, but none promises exact storage or arbitrary search. Specific claims about Resona remain unverified until its identifier and abstract are checked.</p>
<p>Qdrant and Statey are examples of a separate layer: external memory. When using internal model state together with an external store, it must be explicit what is a summary and what is the original, who can read and write it, and how deletion and recovery work.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/ac4b2e1e/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://arxiv.org/abs/2111.00396" target="_blank" rel="noopener noreferrer" class="">S4: Structured State Space for Sequence Modeling</a> — abstract-level claims; retrieved: <code>2026-08-19</code>.</li>
<li class=""><a href="https://arxiv.org/abs/2312.00752" target="_blank" rel="noopener noreferrer" class="">Mamba: Linear-Time Sequence Modeling with Selective State Spaces</a> — abstract-level claims; retrieved: <code>2026-08-19</code>.</li>
<li class=""><a href="https://arxiv.org/abs/2305.13048" target="_blank" rel="noopener noreferrer" class="">RWKV: Reinventing RNNs for the Transformer Era</a> — abstract-level claims; retrieved: <code>2026-08-19</code>.</li>
<li class=""><a href="https://arxiv.org/search/?query=Resona&amp;searchtype=all" target="_blank" rel="noopener noreferrer" class="">Resona — arXiv search context</a> — exact paper identity and claims unverified at draft time.</li>
<li class=""><a href="https://qdrant.tech/" target="_blank" rel="noopener noreferrer" class="">Qdrant</a> — external vector-search context; retrieved: <code>2026-08-19</code>.</li>
<li class=""><a href="https://www.statey.ai/" target="_blank" rel="noopener noreferrer" class="">Statey</a> — external record/database context; retrieved: <code>2026-08-19</code>.</li>
<li class="">Image: cover placeholder; no final image asset is asserted.</li>
</ul>]]></content:encoded>
            <category>Research</category>
            <category>AI</category>
            <category>LLM</category>
            <category>SSM</category>
            <category>Memory</category>
            <category>Explainer</category>
        </item>
        <item>
            <title><![CDATA[Is Recurrent State a New Attack Surface?]]></title>
            <link>https://ql.gl/en/blog/9fb6baf2/</link>
            <guid>https://ql.gl/en/blog/9fb6baf2/</guid>
            <pubDate>Wed, 19 Aug 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[This article treats recurrent state and agent memory as security boundaries. It connects Mamba, Hidden State Poisoning, trajeckt, and Valmis while separating paper evidence from product and security context to examine the risks of state poisoning, reuse, and data flows.]]></description>
            <content:encoded><![CDATA[<p><img decoding="async" loading="lazy" src="https://ql.gl/img/blog/topic-recurrent-state-security/cover.webp" alt="cover placeholder" class="img_ev3q"></p>
<!-- -->
<p>In Transformer systems, security discussions have centered on prompts, tool arguments, retrieved documents, and output filters. Operating recurrent or SSM-family systems adds another question: who creates the hidden state passed to the model’s next input, how long is it retained, and across which boundaries is it reused?</p>
<p>This question does not mean that “recurrent state is inherently vulnerable.” The mere existence of state does not establish an attack. But if state persists across sessions, is updated by mixing inputs with different trust levels, or affects authorization decisions for tool calls, it should be treated as both a new security asset and an attack surface. The papers and projects below address different layers, so they should not be equated directly.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="turning-state-poisoning-into-a-threat-model">Turning state poisoning into a threat model<a href="https://ql.gl/en/blog/9fb6baf2/#turning-state-poisoning-into-a-threat-model" class="hash-link" aria-label="Direct link to Turning state poisoning into a threat model" title="Direct link to Turning state poisoning into a threat model" translate="no">​</a></h2>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: state poisoning</div><div class="admonitionContent_BuS1"><p>A threat in which an attacker plants malicious or misleading information in internal state through input or stored records, then attempts to steer the model’s behavior in a desired direction on later, otherwise normal inputs.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: provenance</div><div class="admonitionContent_BuS1"><p>Information that tracks where data came from and which transformations it underwent. In security, it is important for preventing data from different sources from being treated with the same level of trust.</p></div></div>
<p>If a general recurrent update is written as <code>h_t = f(h_{t-1}, x_t)</code>, there are three possible attack points. First, when malicious <code>x_t</code> is recorded into the state. Second, when contaminated <code>h_t</code> is used for a later decision. Third, when the state crosses to another user, session, or tool. This model does not prove an attack mathematically, but it provides a checklist for design review.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="what-mambas-selectivity-implies-for-security">What Mamba’s selectivity implies for security<a href="https://ql.gl/en/blog/9fb6baf2/#what-mambas-selectivity-implies-for-security" class="hash-link" aria-label="Direct link to What Mamba’s selectivity implies for security" title="Direct link to What Mamba’s selectivity implies for security" translate="no">​</a></h2>
<p>Mamba proposes a selective SSM that adjusts state-space parameters according to the input, selectively propagating or forgetting information. The paper abstract claims efficient sequence modeling and content-dependent state updates, not a security mechanism.</p>
<p><strong>What the source says:</strong> Mamba targets linear scaling and input selectivity on long sequences and reports performance across multiple tasks.</p>
<p><strong>Security interpretation:</strong> Selective updates are not an authentication mechanism that distinguishes useful information from information planted by an attacker. Instead, because there is now a function deciding what remains in the state, there is greater reason to audit and validate state updates. We should check which tokens significantly change the state, whether state controls sensitive tool calls, and whether it is initialized at session boundaries. The Mamba paper alone cannot support a claim that a specific poisoning attack succeeds; that part is unverified.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="hidden-state-poisoning-evidence-that-requires-direct-verification">Hidden State Poisoning: evidence that requires direct verification<a href="https://ql.gl/en/blog/9fb6baf2/#hidden-state-poisoning-evidence-that-requires-direct-verification" class="hash-link" aria-label="Direct link to Hidden State Poisoning: evidence that requires direct verification" title="Direct link to Hidden State Poisoning: evidence that requires direct verification" translate="no">​</a></h2>
<p>“Hidden State Poisoning” is a designated source directly related to this article’s threat model. The arXiv abstract reports HiSPA and the RoBench-25 evaluation, in which a short trigger contaminates hidden states in Mamba-family models and weakens information retrieval. However, details such as the attack procedure, success rate, and scope of vulnerability across specific models require additional review of the paper’s body and experiments, so this article treats them only cautiously.</p>
<p>What can safely be said beyond the verified scope is a conceptual question. If external input accumulates in a hidden state and later affects decision-making, input filtering alone may not be sufficient. Once the state itself is trusted, an attacker gains persistence that can affect multiple later steps rather than just a single input. This is not a reproduction of the paper’s result, but an <strong>analytical hypothesis</strong> applying the threat indicated by its title to recurrent systems.</p>
<p>When a precise source is available, the items to verify include the method of state access, outputs observable to the attacker, whether the state is initialized, attack persistence, and the baselines used in defense experiments.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="agent-security-context-how-trajeckt-handles-state">Agent security context: how trajeckt handles state<a href="https://ql.gl/en/blog/9fb6baf2/#agent-security-context-how-trajeckt-handles-state" class="hash-link" aria-label="Direct link to Agent security context: how trajeckt handles state" title="Direct link to Agent security context: how trajeckt handles state" translate="no">​</a></h2>
<p>trajeckt is described as a gateway that, rather than allowing each agent tool call independently, checks pre-sealed allowed trajectories and data flows during execution. The repository documentation gives a database-read → summarize → external-transfer flow as an example, blocking the final exfiltration in a multi-step sequence.</p>
<p>This design does not claim to inspect recurrent hidden state itself. It does, however, provide an important security principle: manage trajectories and provenance outside the agent instead of trusting only the agent’s reported current context or internal plan. Even if recurrent state is poisoned, limiting tool permissions and data sinks through external policy can reduce the blast radius.</p>
<p><strong>Limitation:</strong> As the trajeckt documentation states, semantic attacks, attacks hidden inside allowed causal paths, and issues that cannot replace existing RBAC and argument validation remain. Trajectory enforcement must therefore not be interpreted as proof of hidden-state integrity.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="valmis-trust-boundaries-created-by-isolation-and-proxies">Valmis: trust boundaries created by isolation and proxies<a href="https://ql.gl/en/blog/9fb6baf2/#valmis-trust-boundaries-created-by-isolation-and-proxies" class="hash-link" aria-label="Direct link to Valmis: trust boundaries created by isolation and proxies" title="Direct link to Valmis: trust boundaries created by isolation and proxies" translate="no">​</a></h2>
<p>The Valmis repository emphasizes container isolation, credential protection through a proxy, agent memory and embeddings, and multi-step workflows. Here, memory is described not as recurrent hidden state but as an external memory layer using pgvector and embeddings.</p>
<p>This distinction matters for security. External memory permits the design of search and write permissions, database audit logs, tenant separation, and deletion policies. Runtime hidden state, by contrast, lives inside the model’s computation graph, making the same forms of access control and forensics difficult. Valmis’s proxy prevents the agent from directly seeing raw credentials, but the proxy and host become new trust centers—an existing limitation noted in the earlier article.</p>
<p><strong>Boundary between source and interpretation:</strong> The Valmis README describes a security-oriented architecture but does not prove an external security audit or defense against hidden-state poisoning. This article does not exaggerate product features into evidence of attack prevention.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="operational-checklist-for-a-new-attack-surface">Operational checklist for a “new attack surface”<a href="https://ql.gl/en/blog/9fb6baf2/#operational-checklist-for-a-new-attack-surface" class="hash-link" aria-label="Direct link to Operational checklist for a “new attack surface”" title="Direct link to Operational checklist for a “new attack surface”" translate="no">​</a></h2>
<ol>
<li class=""><strong>Lifetime:</strong> Is state reused across requests, users, or tenants? The safer default is to initialize it at session boundaries.</li>
<li class=""><strong>Provenance:</strong> Do trusted system events and user text enter the same update path? Provenance should be recorded separately.</li>
<li class=""><strong>Authorization:</strong> Does state directly determine tool selection, external writes, or credential use? If so, do not authorize based on state alone; add an external policy.</li>
<li class=""><strong>Observability:</strong> Can the magnitude, cause, and timing of state changes be recorded? Logging the raw state can create a new leak of sensitive information, so consider hashes, statistics, and sampling.</li>
<li class=""><strong>Recovery:</strong> If contamination is suspected, can the state be discarded and regenerated from a verified checkpoint?</li>
<li class=""><strong>Separation from external memory:</strong> Are records in a search database and ephemeral hidden state being treated as if they had the same trust level?</li>
</ol>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="conclusion-and-limitations">Conclusion and limitations<a href="https://ql.gl/en/blog/9fb6baf2/#conclusion-and-limitations" class="hash-link" aria-label="Direct link to Conclusion and limitations" title="Direct link to Conclusion and limitations" translate="no">​</a></h2>
<p>Recurrent state does not automatically become a vulnerability, but persistence, opacity, and influence over authorization provide sufficient reason to model it as a new attack surface. Mamba demonstrates the technical possibility of selective state updates but provides no security guarantee. Hidden State Poisoning points to a direct threat hypothesis, although its precise bibliography and experiments are not verified in this draft. trajeckt provides a context for limiting harm through trajectory and data-flow controls outside the agent, while Valmis illustrates trust boundaries involving containers, proxies, and external memory.</p>
<p>The practical conclusion is therefore not the simplistic prescription to encrypt all state. It is to separate the state’s lifetime and provenance, revalidate sensitive actions through external policy, and build a structure in which contaminated state can be discarded and recovered. In particular, the attack details and model-specific reproducibility of Hidden State Poisoning, as well as Valmis’s real-world operational security, remain unverified until the original sources and code are reviewed further.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/9fb6baf2/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://arxiv.org/abs/2312.00752" target="_blank" rel="noopener noreferrer" class="">Mamba: Linear-Time Sequence Modeling with Selective State Spaces</a> — abstract-level claims; retrieved: <code>2026-08-19</code>.</li>
<li class=""><a href="https://arxiv.org/search/?query=Hidden+State+Poisoning&amp;searchtype=all" target="_blank" rel="noopener noreferrer" class="">Hidden State Poisoning — arXiv search context</a> — exact paper identity, attack details, and evaluation unverified at draft time.</li>
<li class=""><a href="https://github.com/beebeeVB/trajeckt/" target="_blank" rel="noopener noreferrer" class="">beebeeVB/trajeckt</a> — repository README/documentation context; retrieved: <code>2026-08-19</code>.</li>
<li class=""><a href="https://github.com/valmishq/valmis" target="_blank" rel="noopener noreferrer" class="">valmishq/valmis</a> — repository README context; retrieved: <code>2026-08-19</code>.</li>
<li class="">Agent memory security context: external memory poisoning/provenance concerns are analysis context, not a claim of a single identified paper; exact source set unverified.</li>
<li class="">Image: cover placeholder; no final image asset is asserted.</li>
</ul>]]></content:encoded>
            <category>Research</category>
            <category>Security</category>
            <category>AI</category>
            <category>LLM</category>
            <category>Recurrent</category>
            <category>Agents</category>
            <category>Explainer</category>
        </item>
        <item>
            <title><![CDATA[Does SSM Replace the Transformer, or Do They Divide the Work?]]></title>
            <link>https://ql.gl/en/blog/a7c32433/</link>
            <guid>https://ql.gl/en/blog/a7c32433/</guid>
            <pubDate>Wed, 19 Aug 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[This article reads the competition between state space models and Transformers as a question of division of labor rather than structural replacement. Based on the abstracts and publicly stated claims of Mamba, Griffin, Jamba, and Mamba-3, it organizes the trade-offs among long contexts, generation, and hardware efficiency.]]></description>
            <content:encoded><![CDATA[<p><img decoding="async" loading="lazy" src="https://ql.gl/img/blog/topic-ssm-transformer-or-hybrid/cover.webp" alt="cover placeholder" class="img_ev3q"></p>
<!-- -->
<p>The debate over sequence models after the Transformer is often translated into the language of dethroning. “Is SSM next?” and “Is attention finished?” are easy questions to understand, but they are not sufficient for real system design. The more precise question is which computation should be assigned to which layer. The best architecture changes depending on whether the system must process a long input all at once, generate tokens one by one, revisit every previous token, or simply update a fixed-size state.</p>
<p>The conclusion of this article is that the publicly available evidence at the abstract level is not enough to say that SSMs will fully replace Transformers. At the same time, interpreting SSMs as an independent option in the parts of a system where Transformer costs grow, or as a component of a hybrid that uses both structures, fits the direction of multiple studies. Below, we separate the claims made by the sources from this article’s interpretations.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="first-distinguish-attention-from-state">First, distinguish attention from state<a href="https://ql.gl/en/blog/a7c32433/#first-distinguish-attention-from-state" class="hash-link" aria-label="Direct link to First, distinguish attention from state" title="Direct link to First, distinguish attention from state" translate="no">​</a></h2>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: state space model (SSM)</div><div class="admonitionContent_BuS1"><p>An SSM is a family of models that updates an internal state while reading input and produces output from that state. The central intuition is that a long sequence is summarized into a fixed-size or bounded-size dynamic state.</p><p>Everyday example: instead of spreading the transcript of a long meeting across a desk, imagine the facilitator continually updating a single page of notes with the key points so far.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: self-attention</div><div class="admonitionContent_BuS1"><p>A mechanism that calculates how much each token should reference other tokens. The ability to look directly at past tokens is its strength and, with long contexts, a source of computational and memory cost.</p></div></div>
<p>Transformer attention provides direct token-to-token access. This is useful for selectively checking the relationship between two words that are far apart in the context. In autoregressive generation, however, the past keys and values must be cached, and as the context grows, the cache and memory bandwidth become important costs. SSM families take a different path. They update a state at every step and leave in that state the information needed for the next computation. Rather than preserving the past as-is, they transform it through dynamics learned by the model.</p>
<p>This difference is not a personality comparison in which “SSMs have good memory and attention is bad.” The issue is which information must be queried in a form close to the original, and which information can safely be summarized.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="mamba-redesigning-the-computation-path-rather-than-merely-replacing-it">Mamba: redesigning the computation path rather than merely replacing it<a href="https://ql.gl/en/blog/a7c32433/#mamba-redesigning-the-computation-path-rather-than-merely-replacing-it" class="hash-link" aria-label="Direct link to Mamba: redesigning the computation path rather than merely replacing it" title="Direct link to Mamba: redesigning the computation path rather than merely replacing it" translate="no">​</a></h2>
<p>The Mamba paper proposes a selective state space model in which state-space parameters are adjusted selectively according to the input. In the abstract, the authors explain that selectivity allows an SSM to remember or forget information according to the input content, with the goal of linear scaling and fast inference on long sequences. This differs from the picture of a fixed linear filter processing every token in the same way.</p>
<p><strong>What the source says:</strong> Mamba combines a selective SSM with a hardware-aware algorithm and reports linear scaling with sequence length across modalities including language, audio, and genomics. It also includes comparisons with Transformers, but the abstract alone cannot support a generalization of superiority across all scales, datasets, and hardware.</p>
<p><strong>Interpretation:</strong> Mamba’s significance is less that it discards attention than that it demonstrates how computations that do not require direct token-by-token reference can be converted into state updates. This path is attractive for tasks such as streaming input, long-context preprocessing, and tracking repetitive patterns, where a “summary state so far” is useful. Conversely, tasks centered on accurately quoting the original text or freely combining arbitrary tokens may still benefit from direct-access structures.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="griffin-a-compromise-between-recurrence-and-local-attention">Griffin: a compromise between recurrence and local attention<a href="https://ql.gl/en/blog/a7c32433/#griffin-a-compromise-between-recurrence-and-local-attention" class="hash-link" aria-label="Direct link to Griffin: a compromise between recurrence and local attention" title="Direct link to Griffin: a compromise between recurrence and local attention" translate="no">​</a></h2>
<p>Google’s Griffin was proposed as a family of hybrid models combining gated linear recurrences with local attention. The combination itself is an important signal. The research question is not “choose either attention or recurrence,” but rather to place long-range summarization, where linear recurrence is strong, and short-range interaction, where local attention is strong, within one model.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: local attention</div><div class="admonitionContent_BuS1"><p>A method that computes attention only over a recent, limited window rather than the entire context. It is a compromise intended to preserve precise relationships among nearby tokens while reducing overall cost.</p></div></div>
<p><strong>Boundary between source and interpretation:</strong> Griffin’s abstract reports competitive properties for language modeling and long-context evaluation. It does not prescribe replacing every Transformer block with recurrence. It is safer to read the work as opening a design space in which different computations handle interactions over different time ranges.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="jamba-hybrid-architectures-move-from-research-idea-to-system-configuration">Jamba: hybrid architectures move from research idea to system configuration<a href="https://ql.gl/en/blog/a7c32433/#jamba-hybrid-architectures-move-from-research-idea-to-system-configuration" class="hash-link" aria-label="Direct link to Jamba: hybrid architectures move from research idea to system configuration" title="Direct link to Jamba: hybrid architectures move from research idea to system configuration" translate="no">​</a></h2>
<p>Jamba was released as a language-model architecture combining Transformer and Mamba-family layers. In the public description, the key elements are a mixture of attention and Mamba layers, along with MoE for adjusting model capacity and inference cost. This example shows that division of labor can be a choice in an actual model configuration, not merely a theoretical metaphor.</p>
<p>Jamba can be interpreted as assigning attention to portions that need direct access to all information, while Mamba layers handle long sequences through a linear state path. However, the optimal layer ratio and the exact way bottlenecks shift for each task depend on model size and implementation. Results from a paper or product page should not be read as guarantees for a different deployment environment.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="the-question-posed-by-mamba-3-is-theoretical-linearity-enough">The question posed by Mamba-3: is theoretical linearity enough?<a href="https://ql.gl/en/blog/a7c32433/#the-question-posed-by-mamba-3-is-theoretical-linearity-enough" class="hash-link" aria-label="Direct link to The question posed by Mamba-3: is theoretical linearity enough?" title="Direct link to The question posed by Mamba-3: is theoretical linearity enough?" translate="no">​</a></h2>
<p>Mamba-3 improves sequence modeling using state-space principles and proposes exponential-trapezoidal discretization, complex-valued state updates, and MIMO SSMs. The provided paper summary explains that MIMO is designed to increase decoding FLOPs under a memory bottleneck and thereby improve hardware utilization. In other words, it emphasizes that real latency is not determined by the notation “linear complexity” alone.</p>
<p><strong>Numbers reported by the source:</strong> The evidence-pack summary states that at the 1.5B scale, base Mamba-3 achieved an average downstream improvement of 0.6 percentage points over a strong linear layer, while MIMO added approximately 1.2 percentage points. It also reports up to four times more decoding FLOPs than Mamba-2 at the same state size, with similar actual latency.</p>
<p><strong>Limitation:</strong> These numbers come from specific experimental conditions. Without checking the hardware model, kernel version, batch size, and exact evaluation suite, we cannot conclude that “SSMs are always faster.” Mamba-3 is evidence that substantial design space remains inside SSMs, not evidence that Transformers should universally be discarded.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="so-how-should-the-work-be-divided">So how should the work be divided?<a href="https://ql.gl/en/blog/a7c32433/#so-how-should-the-work-be-divided" class="hash-link" aria-label="Direct link to So how should the work be divided?" title="Direct link to So how should the work be divided?" translate="no">​</a></h2>
<p>In practice, three arrangements are possible.</p>
<ol>
<li class=""><strong>SSM-centered:</strong> Consider this when the input is extremely long, streaming or low-memory inference matters, and the relevant past can be maintained as a summary state.</li>
<li class=""><strong>Attention-centered:</strong> Consider this when precisely revisiting arbitrary past tokens or directly combining sparse relationships within the context is the priority.</li>
<li class=""><strong>Hybrid:</strong> Assign nearby relationships to local attention, long-range accumulation to recurrence/SSM, and global reference at selected layers to attention. Jamba and Griffin are concrete examples of this direction.</li>
</ol>
<p>This choice is not only about model architecture. Training parallelism, the KV cache, kernel support, batch processing, quality evaluation, and state recovery after failures must also be evaluated. SSMs have state. Consequently, how state is isolated and stored between requests becomes an operational question that differs from the Transformer case.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="conclusion-and-limitations">Conclusion and limitations<a href="https://ql.gl/en/blog/a7c32433/#conclusion-and-limitations" class="hash-link" aria-label="Direct link to Conclusion and limitations" title="Direct link to Conclusion and limitations" translate="no">​</a></h2>
<p>An SSM is less a “successor” to the Transformer than another axis along which sequence computation can be decomposed. Mamba shows a selective state path, Griffin a combination of recurrence and local attention, Jamba a hybrid language model, and Mamba-3 the potential for quality and hardware improvements within SSMs. The conservative conclusion supported jointly by this evidence is not a “single winner,” but a division of labor according to workload.</p>
<p>This article, however, is limited to the abstracts and public summaries of each paper. Full experiment tables, implementation-specific memory use, proprietary optimizations in commercial models, and task-specific failure cases were not verified and remain unverified. Before adoption, attention-only, SSM-only, and hybrid systems should be compared directly under identical data, hardware, and batch conditions.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/a7c32433/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://arxiv.org/abs/2312.00752" target="_blank" rel="noopener noreferrer" class="">Mamba: Linear-Time Sequence Modeling with Selective State Spaces</a> — abstract-level claims; retrieved: <code>2026-08-19</code>.</li>
<li class=""><a href="https://arxiv.org/abs/2402.19427" target="_blank" rel="noopener noreferrer" class="">Griffin: Mixing Gated Linear Recurrences with Local Attention for Efficient Language Models</a> — abstract-level claims; retrieved: <code>2026-08-19</code>.</li>
<li class=""><a href="https://arxiv.org/abs/2403.19887" target="_blank" rel="noopener noreferrer" class="">Jamba: A Hybrid Transformer-Mamba Language Model</a> — abstract-level claims; retrieved: <code>2026-08-19</code>.</li>
<li class=""><a href="https://arxiv.org/abs/2603.15569" target="_blank" rel="noopener noreferrer" class="">Mamba-3: Improved Sequence Modeling Using State Space Principles</a> — paper summary/evidence pack; retrieved: <code>2026-08-19</code>.</li>
<li class="">Image: cover placeholder; no final image asset is asserted.</li>
</ul>]]></content:encoded>
            <category>Research</category>
            <category>AI</category>
            <category>LLM</category>
            <category>SSM</category>
            <category>Transformer</category>
            <category>Explainer</category>
        </item>
        <item>
            <title><![CDATA[A Paper Roadmap for Understanding Surrogate Gradients]]></title>
            <link>https://ql.gl/en/blog/d657d100/</link>
            <guid>https://ql.gl/en/blog/d657d100/</guid>
            <pubDate>Mon, 13 Jul 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[A reading order covering SNN modeling, backpropagation, STDP, SpikeProp, ANN-to-SNN conversion, SuperSpike, SLAYER, and STBP to understand surrogate gradients, which train the discontinuous spikes of spiking neural networks through backpropagation.]]></description>
            <content:encoded><![CDATA[<p>Surrogate gradients are a detour connecting spiking neural networks, or SNNs, with the training tools of modern deep learning. The forward pass uses real spikes, while the backward pass uses a differentiable fake gradient. That sounds simple in one sentence, but properly understanding the idea requires three pieces of background.</p>
<p>First, why are spiking neurons discontinuous dynamical systems? Second, why does backpropagation require differentiability? Third, how were SNNs trained before surrogate gradients, and what prevented those methods from progressing?</p>
<!-- -->
<p><img decoding="async" loading="lazy" alt="Dark glass terminal roadmap from spiking neuron models to backpropagation and surrogate gradients" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAwIiBoZWlnaHQ9IjYzMCIgdmlld0JveD0iMCAwIDEyMDAgNjMwIiByb2xlPSJpbWciIGFyaWEtbGFiZWxsZWRieT0idGl0bGUgZGVzYyI+CiAgPHRpdGxlIGlkPSJ0aXRsZSI+U3Vycm9nYXRlIEdyYWRpZW50IHBhcGVyIHJvYWRtYXAgY292ZXI8L3RpdGxlPgogIDxkZXNjIGlkPSJkZXNjIj5BIGRhcmsgZ2xhc3MgdGVybWluYWwgc3R5bGUgcm9hZG1hcCBmcm9tIHNwaWtpbmcgbmV1cm9uIG1vZGVscyB0byBiYWNrcHJvcGFnYXRpb24gYW5kIHN1cnJvZ2F0ZSBncmFkaWVudHMuPC9kZXNjPgogIDxyZWN0IHdpZHRoPSIxMjAwIiBoZWlnaHQ9IjYzMCIgZmlsbD0iIzBhMGUxNCIvPgogIDxnIG9wYWNpdHk9IjAuMjgiIHN0cm9rZT0iIzI0MmYzZCIgc3Ryb2tlLXdpZHRoPSIxIj4KICAgIDxwYXRoIGQ9Ik0wIDEwNWgxMjAwTTAgMjEwaDEyMDBNMCAzMTVoMTIwME0wIDQyMGgxMjAwTTAgNTI1aDEyMDAiLz4KICAgIDxwYXRoIGQ9Ik0xMjAgMHY2MzBNMjQwIDB2NjMwTTM2MCAwdjYzME00ODAgMHY2MzBNNjAwIDB2NjMwTTcyMCAwdjYzME04NDAgMHY2MzBNOTYwIDB2NjMwTTEwODAgMHY2MzAiLz4KICA8L2c+CiAgPHJlY3QgeD0iOTIiIHk9IjgyIiB3aWR0aD0iMTAxNiIgaGVpZ2h0PSI0NjYiIHJ4PSIyNCIgZmlsbD0iIzE3MjEyYiIgb3BhY2l0eT0iMC43MiIgc3Ryb2tlPSIjMmFhM2VmIiBzdHJva2Utb3BhY2l0eT0iMC4yOCIvPgogIDxyZWN0IHg9IjEyNiIgeT0iMTE4IiB3aWR0aD0iOTQ4IiBoZWlnaHQ9IjcwIiByeD0iMTQiIGZpbGw9IiMxNzIxMmIiIG9wYWNpdHk9IjAuOTUiIHN0cm9rZT0iIzI0MmYzZCIvPgogIDxjaXJjbGUgY3g9IjE2MiIgY3k9IjE1MyIgcj0iOCIgZmlsbD0iI2VmNTM1MCIvPgogIDxjaXJjbGUgY3g9IjE5MCIgY3k9IjE1MyIgcj0iOCIgZmlsbD0iI2UwYjMzMyIvPgogIDxjaXJjbGUgY3g9IjIxOCIgY3k9IjE1MyIgcj0iOCIgZmlsbD0iIzRkY2Q1ZSIvPgogIDx0ZXh0IHg9IjI1MiIgeT0iMTYxIiBmaWxsPSIjYWFhYWFhIiBmb250LWZhbWlseT0iSW9zZXZrYSBUZXJtLCBGaXJhIENvZGUsIG1vbm9zcGFjZSIgZm9udC1zaXplPSIyNCI+Li9yZWFkIC0tc3Vycm9nYXRlLWdyYWRpZW50IC0tYmFja2dyb3VuZDwvdGV4dD4KICA8dGV4dCB4PSIxMjYiIHk9IjI2MCIgZmlsbD0iI2ZmZmZmZiIgZm9udC1mYW1pbHk9IkdvdGhhbSwgSW50ZXIsIHNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iNDgiIGZvbnQtd2VpZ2h0PSI4MDAiPlN1cnJvZ2F0ZSBHcmFkaWVudDwvdGV4dD4KICA8dGV4dCB4PSIxMjYiIHk9IjMxNCIgZmlsbD0iIzZhYjJmMiIgZm9udC1mYW1pbHk9Iklvc2V2a2EgVGVybSwgRmlyYSBDb2RlLCBtb25vc3BhY2UiIGZvbnQtc2l6ZT0iMzAiPnBhcGVyIHJvYWRtYXAgZm9yIHNwaWtpbmcgbmV1cmFsIG5ldHdvcmtzPC90ZXh0PgogIDxnIGZvbnQtZmFtaWx5PSJJb3NldmthIFRlcm0sIEZpcmEgQ29kZSwgbW9ub3NwYWNlIiBmb250LXNpemU9IjI0IiBmaWxsPSIjZTRlY2YyIj4KICAgIDx0ZXh0IHg9IjE1OCIgeT0iNDAwIj5zcGlrZSBtb2RlbHM8L3RleHQ+CiAgICA8cGF0aCBkPSJNMzQ2IDM5MmgxMTAiIHN0cm9rZT0iIzRkY2Q1ZSIgc3Ryb2tlLXdpZHRoPSI0IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KICAgIDxwYXRoIGQ9Ik00NDQgMzgwbDIyIDEyLTIyIDEyIiBmaWxsPSJub25lIiBzdHJva2U9IiM0ZGNkNWUiIHN0cm9rZS13aWR0aD0iNCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CiAgICA8dGV4dCB4PSI1MDIiIHk9IjQwMCI+YmFja3Byb3A8L3RleHQ+CiAgICA8cGF0aCBkPSJNNjUyIDM5MmgxMTAiIHN0cm9rZT0iIzRkY2Q1ZSIgc3Ryb2tlLXdpZHRoPSI0IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KICAgIDxwYXRoIGQ9Ik03NTAgMzgwbDIyIDEyLTIyIDEyIiBmaWxsPSJub25lIiBzdHJva2U9IiM0ZGNkNWUiIHN0cm9rZS13aWR0aD0iNCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CiAgICA8dGV4dCB4PSI4MDgiIHk9IjQwMCI+c3Vycm9nYXRlIGdyYWRpZW50czwvdGV4dD4KICA8L2c+CiAgPGcgc3Ryb2tlPSIjMmFhM2VmIiBzdHJva2Utd2lkdGg9IjQiIGZpbGw9Im5vbmUiIG9wYWNpdHk9IjAuOSI+CiAgICA8cGF0aCBkPSJNMTU0IDQ4Nmg0MGwxOC03NiAzNCAxMzQgMzItOThoNTQiLz4KICAgIDxwYXRoIGQ9Ik00NjggNDg2YzQ4LTg0IDExMi04NCAxNjAgMCIvPgogICAgPHBhdGggZD0iTTgyMCA0ODZoNDJ2LTcyaDQwdjcyaDQydi03Mmg0MHY3Mmg0MiIvPgogIDwvZz4KICA8dGV4dCB4PSIxMjYiIHk9IjUzMCIgZmlsbD0iI2FhYWFhYSIgZm9udC1mYW1pbHk9Iklvc2V2a2EgVGVybSwgRmlyYSBDb2RlLCBtb25vc3BhY2UiIGZvbnQtc2l6ZT0iMjIiPi8vIExJRiDCtyBCUFRUIMK3IFNURFAgwrcgU3VwZXJTcGlrZSDCtyBTTEFZRVIgwrcgU1RCUDwvdGV4dD4KPC9zdmc+Cg==" width="1200" height="630" class="img_ev3q"></p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="the-target-paper-to-read">The target paper to read<a href="https://ql.gl/en/blog/d657d100/#the-target-paper-to-read" class="hash-link" aria-label="Direct link to The target paper to read" title="Direct link to The target paper to read" translate="no">​</a></h2>
<p>The target paper is Neftci, Mostafa, and Zenke's <em>Surrogate Gradient Learning in Spiking Neural Networks</em>. Rather than proposing "one new algorithm," this article reads more like a review that explains the problems of SNN training step by step. Its arXiv abstract makes the same point: SNNs are difficult to train because they are binary and dynamical, and surrogate gradients provide a flexible and efficient way around that problem.</p>
<p>Readers generally get stuck in three places.</p>
<ol>
<li class="">Why does the spike function produce dead gradients during backpropagation?</li>
<li class="">What does BPTT propagate through a neural network's time axis?</li>
<li class="">Why does training work with a surrogate derivative that is not the "true derivative"?</li>
</ol>
<p>The roadmap below is therefore arranged in <strong>dependency order</strong>, not chronological order.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: Surrogate gradient</div><div class="admonitionContent_BuS1"><p>A method that inserts a differentiable substitute for a nondifferentiable spike function only during backpropagation so that weights can be updated.</p><p>Example: A real traffic light switches suddenly from red to green, but a driving simulator can smooth the boundary to provide feedback that you "should have stopped a little sooner."</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="step-1-a-spiking-neuron-is-a-dynamical-system-not-a-function">Step 1: A spiking neuron is a dynamical system, not a function<a href="https://ql.gl/en/blog/d657d100/#step-1-a-spiking-neuron-is-a-dynamical-system-not-a-function" class="hash-link" aria-label="Direct link to Step 1: A spiking neuron is a dynamical system, not a function" title="Direct link to Step 1: A spiking neuron is a dynamical system, not a function" translate="no">​</a></h2>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="gerstner--kistler-spiking-neuron-models">Gerstner &amp; Kistler, Spiking Neuron Models<a href="https://ql.gl/en/blog/d657d100/#gerstner--kistler-spiking-neuron-models" class="hash-link" aria-label="Direct link to Gerstner &amp; Kistler, Spiking Neuron Models" title="Direct link to Gerstner &amp; Kistler, Spiking Neuron Models" translate="no">​</a></h3>
<p>This is one of the best starting points for SNNs. It organizes foundational terms such as leaky integrate-and-fire, the spike-response model, refractory periods, and synaptic current. This layer is necessary to read membrane potential <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>u</mi><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">u(t)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal">u</span><span class="mopen">(</span><span class="mord mathnormal">t</span><span class="mclose">)</span></span></span></span>, thresholds, and resets naturally in surrogate-gradient papers.</p>
<p>The key point is that an SNN neuron is not simply a node computing <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>y</mi><mo>=</mo><mi>f</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">y = f(x)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.625em;vertical-align:-0.1944em"></span><span class="mord mathnormal" style="margin-right:0.0359em">y</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.1076em">f</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mclose">)</span></span></span></span>. It accumulates input current over time, emits a spike when its membrane potential exceeds a threshold, and then resets its state. The output spike behaves approximately like a Heaviside step function.</p>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="izhikevich-simple-model-of-spiking-neurons">Izhikevich, Simple Model of Spiking Neurons<a href="https://ql.gl/en/blog/d657d100/#izhikevich-simple-model-of-spiking-neurons" class="hash-link" aria-label="Direct link to Izhikevich, Simple Model of Spiking Neurons" title="Direct link to Izhikevich, Simple Model of Spiking Neurons" translate="no">​</a></h3>
<p>The Izhikevich model demonstrates a good balance between the biological detail of Hodgkin–Huxley-style models and the computational efficiency of LIF-style models. Reading this paper builds an intuition that "there is not one spike model; its level of abstraction depends on its purpose."</p>
<p>From the surrogate-gradient perspective, the differences matter. Regardless of the neuron model, the training bottleneck is similar: The instant at which a spike occurs is discontinuous, and a computation graph containing that event is not smooth like an ordinary ANN.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="step-2-backpropagation-pushes-the-chain-rule-through-a-computation-graph">Step 2: Backpropagation pushes the chain rule through a computation graph<a href="https://ql.gl/en/blog/d657d100/#step-2-backpropagation-pushes-the-chain-rule-through-a-computation-graph" class="hash-link" aria-label="Direct link to Step 2: Backpropagation pushes the chain rule through a computation graph" title="Direct link to Step 2: Backpropagation pushes the chain rule through a computation graph" translate="no">​</a></h2>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="rumelhart-hinton-williams-learning-representations-by-back-propagating-errors">Rumelhart, Hinton, Williams, Learning representations by back-propagating errors<a href="https://ql.gl/en/blog/d657d100/#rumelhart-hinton-williams-learning-representations-by-back-propagating-errors" class="hash-link" aria-label="Direct link to Rumelhart, Hinton, Williams, Learning representations by back-propagating errors" title="Direct link to Rumelhart, Hinton, Williams, Learning representations by back-propagating errors" translate="no">​</a></h3>
<p>This is the classic backpropagation paper. It should be read because it gives the most compressed account of why deep learning needs gradients. The effect of the loss on each weight is calculated by multiplying the local derivatives of each layer. In other words, differentiable components must be linked by the chain rule.</p>
<p>That is exactly where SNNs encounter a problem. For spike output <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>s</mi><mo>=</mo><mi>H</mi><mo stretchy="false">(</mo><mi>u</mi><mo>−</mo><mi>ϑ</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">s = H(u - \vartheta)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em"></span><span class="mord mathnormal">s</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.0813em">H</span><span class="mopen">(</span><span class="mord mathnormal">u</span><span class="mspace" style="margin-right:0.2222em"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal">ϑ</span><span class="mclose">)</span></span></span></span>, the derivative is almost always zero away from the threshold and undefined at the threshold. The gradient does not flow for most of the time and breaks mathematically at the important moment.</p>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="werbos-backpropagation-through-time">Werbos, Backpropagation through time<a href="https://ql.gl/en/blog/d657d100/#werbos-backpropagation-through-time" class="hash-link" aria-label="Direct link to Werbos, Backpropagation through time" title="Direct link to Werbos, Backpropagation through time" translate="no">​</a></h3>
<p>An SNN is a recurrent dynamical system with a time axis. Ordinary backpropagation is therefore insufficient; BPTT over a computation graph unrolled through time is required. Werbos's BPTT paper provides the background for understanding how recurrent state receives credit assignment over time.</p>
<p>This is why "temporal credit assignment" repeatedly appears in surrogate-gradient papers. A spike affects not only the current loss, but also later membrane potentials and future spikes.</p>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="bengio-et-al-estimating-or-propagating-gradients-through-stochastic-neurons">Bengio et al., Estimating or Propagating Gradients Through Stochastic Neurons<a href="https://ql.gl/en/blog/d657d100/#bengio-et-al-estimating-or-propagating-gradients-through-stochastic-neurons" class="hash-link" aria-label="Direct link to Bengio et al., Estimating or Propagating Gradients Through Stochastic Neurons" title="Direct link to Bengio et al., Estimating or Propagating Gradients Through Stochastic Neurons" translate="no">​</a></h3>
<p>Although this is not an SNN paper, it is crucial for understanding surrogate gradients. It asks how to estimate gradients when training hard nonlinearities or stochastic binary neurons. The straight-through estimator appears here.</p>
<p>Broadly speaking, SNN surrogate gradients belong to this family of ideas. The forward pass retains a hard decision, while the backward pass carries a useful gradient signal. This opens the view that a "signal usable for learning" matters more than an "exact derivative."</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: Straight-through estimator</div><div class="admonitionContent_BuS1"><p>An approximation that retains a hard discrete decision in the forward pass but lets the gradient pass through during backpropagation as if the decision were an identity or smooth function.</p><p>Example: The exam result is reported only as pass or fail, but study feedback also says how many points short the student was.</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="step-3-understand-snn-training-before-surrogate-gradients">Step 3: Understand SNN training before surrogate gradients<a href="https://ql.gl/en/blog/d657d100/#step-3-understand-snn-training-before-surrogate-gradients" class="hash-link" aria-label="Direct link to Step 3: Understand SNN training before surrogate gradients" title="Direct link to Step 3: Understand SNN training before surrogate gradients" translate="no">​</a></h2>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="bi--poo-spike-timing-dependent-plasticity">Bi &amp; Poo, Spike-Timing-Dependent Plasticity<a href="https://ql.gl/en/blog/d657d100/#bi--poo-spike-timing-dependent-plasticity" class="hash-link" aria-label="Direct link to Bi &amp; Poo, Spike-Timing-Dependent Plasticity" title="Direct link to Bi &amp; Poo, Spike-Timing-Dependent Plasticity" translate="no">​</a></h3>
<p>STDP frequently appears as a biological learning principle for SNNs. A synapse strengthens or weakens according to the time difference between presynaptic and postsynaptic spikes. This paper shows why SNNs evolved alongside "local learning rules."</p>
<p>Its limits are also clear from the perspective of deep supervised learning. STDP is natural for local spike timing, but it does not directly solve global credit assignment—how a loss several layers later should assign responsibility to an earlier synapse.</p>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="bohte-kok-la-poutré-spikeprop">Bohte, Kok, La Poutré, SpikeProp<a href="https://ql.gl/en/blog/d657d100/#bohte-kok-la-poutr%C3%A9-spikeprop" class="hash-link" aria-label="Direct link to Bohte, Kok, La Poutré, SpikeProp" title="Direct link to Bohte, Kok, La Poutré, SpikeProp" translate="no">​</a></h3>
<p>SpikeProp is an early supervised-SNN paper that attempted error backpropagation over spike timing. It shows that even before surrogate gradients, researchers tried to make spike time a differentiable object for learning.</p>
<p>SpikeProp-style methods, however, depend heavily on spike-time representations and particular conditions. Modern deep SNNs need more general learning rules for layers, convolutions, recurrent structures, and event streams.</p>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="diehl-et-al-fast-classifying-high-accuracy-spiking-deep-networks">Diehl et al., Fast-classifying, high-accuracy spiking deep networks<a href="https://ql.gl/en/blog/d657d100/#diehl-et-al-fast-classifying-high-accuracy-spiking-deep-networks" class="hash-link" aria-label="Direct link to Diehl et al., Fast-classifying, high-accuracy spiking deep networks" title="Direct link to Diehl et al., Fast-classifying, high-accuracy spiking deep networks" translate="no">​</a></h3>
<p>This paper represents the ANN-to-SNN conversion approach. It first trains an ordinary ANN, then converts it to an SNN by interpreting activations as firing rates. The approach was practical because it avoided the difficulty of training an SNN directly while retaining the advantages of an ANN that trains well.</p>
<p>Conversion can, however, limit the benefits of latency and temporal coding. It readily relies on rate approximations instead of making active use of spike timing, and maintaining performance at low timestep counts is difficult. Surrogate gradients matter because they expand the path toward training an SNN directly as an SNN.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="step-4-core-papers-in-the-surrogate-gradient-family">Step 4: Core papers in the surrogate-gradient family<a href="https://ql.gl/en/blog/d657d100/#step-4-core-papers-in-the-surrogate-gradient-family" class="hash-link" aria-label="Direct link to Step 4: Core papers in the surrogate-gradient family" title="Direct link to Step 4: Core papers in the surrogate-gradient family" translate="no">​</a></h2>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="zenke--ganguli-superspike">Zenke &amp; Ganguli, SuperSpike<a href="https://ql.gl/en/blog/d657d100/#zenke--ganguli-superspike" class="hash-link" aria-label="Direct link to Zenke &amp; Ganguli, SuperSpike" title="Direct link to Zenke &amp; Ganguli, SuperSpike" translate="no">​</a></h3>
<p>SuperSpike is essential reading. It uses a surrogate gradient to train deterministic integrate-and-fire neurons with supervised learning in a multilayer network. Its arXiv abstract describes deriving a voltage-based three-factor learning rule through a surrogate-gradient approach.</p>
<p>The important point is not to "smooth the spike function and change the forward pass too." The forward spike remains unchanged. Instead, a meaningful pseudo-derivative is defined only near the threshold during the backward pass. This makes it possible to train nonlinear tasks over spike-timing patterns.</p>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="shrestha--orchard-slayer">Shrestha &amp; Orchard, SLAYER<a href="https://ql.gl/en/blog/d657d100/#shrestha--orchard-slayer" class="hash-link" aria-label="Direct link to Shrestha &amp; Orchard, SLAYER" title="Direct link to Shrestha &amp; Orchard, SLAYER" translate="no">​</a></h3>
<p>As the name "spike layer error reassignment" suggests, SLAYER is a training framework that reassigns errors across layers and time. As emphasized in the arXiv abstract, it handles both the nondifferentiability of the spike-generation function and temporal credit assignment. Its GPU implementation and convolutional-SNN experiments also demonstrate that surrogate-gradient methods can grow into practical tools for training deep SNNs.</p>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="wu-et-al-spatio-temporal-backpropagation">Wu et al., Spatio-Temporal Backpropagation<a href="https://ql.gl/en/blog/d657d100/#wu-et-al-spatio-temporal-backpropagation" class="hash-link" aria-label="Direct link to Wu et al., Spatio-Temporal Backpropagation" title="Direct link to Wu et al., Spatio-Temporal Backpropagation" translate="no">​</a></h3>
<p>STBP has a clear perspective of propagating through both spatial and temporal domains. The Frontiers abstract explains that an approximate derivative resolves the nondifferentiability of spike activity, combining layer-by-layer spatial propagation with a timing-dependent temporal domain.</p>
<p>This is a useful paper for viewing an SNN as a temporal signal-processing model rather than merely "an ANN with spikes attached."</p>
<h3 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="bellec-et-al-long-short-term-memory-and-learning-to-learn-in-networks-of-spiking-neurons">Bellec et al., Long short-term memory and learning-to-learn in networks of spiking neurons<a href="https://ql.gl/en/blog/d657d100/#bellec-et-al-long-short-term-memory-and-learning-to-learn-in-networks-of-spiking-neurons" class="hash-link" aria-label="Direct link to Bellec et al., Long short-term memory and learning-to-learn in networks of spiking neurons" title="Direct link to Bellec et al., Long short-term memory and learning-to-learn in networks of spiking neurons" translate="no">​</a></h3>
<p>The LSNN paper shows that a recurrent SNN combined with BPTT and adaptation can achieve capabilities approaching an LSTM. Its abstract identifies a lack of optimization as one reason RSNNs had underperformed ANNs and explains that powerful optimization such as BPTT can approximate functional contributions.</p>
<p>Viewing surrogate gradients only as a "classification trick" is too narrow. This paper reveals a path from SNN training toward memory, adaptation, and learning to learn.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="step-5-return-to-the-target-review">Step 5: Return to the target review<a href="https://ql.gl/en/blog/d657d100/#step-5-return-to-the-target-review" class="hash-link" aria-label="Direct link to Step 5: Return to the target review" title="Direct link to Step 5: Return to the target review" translate="no">​</a></h2>
<p>Returning now to Neftci, Mostafa, and Zenke's review makes its structure much clearer.</p>
<ul>
<li class="">Spikes are binary and dynamical, making them harder to train than ordinary ANNs.</li>
<li class="">Local plasticity is biologically natural but insufficient for deep supervised objectives.</li>
<li class="">Conversion is practical but can limit the benefits of spike timing and low latency.</li>
<li class="">A surrogate derivative preserves event-driven spikes in the forward pass while opening the gradient bottleneck in the backward pass.</li>
</ul>
<p>The core of surrogate gradients is therefore not "perfectly modeling the brain." More precisely, it is <strong>an interface that brings event-driven SNNs as a computational model into the gradient-based optimization ecosystem</strong>.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="reading-order-summary">Reading-order summary<a href="https://ql.gl/en/blog/d657d100/#reading-order-summary" class="hash-link" aria-label="Direct link to Reading-order summary" title="Direct link to Reading-order summary" translate="no">​</a></h2>
<table><thead><tr><th style="text-align:right">Order</th><th>Paper</th><th>Why read it</th></tr></thead><tbody><tr><td style="text-align:right">1</td><td>Gerstner &amp; Kistler, <em>Spiking Neuron Models</em></td><td>Learn the language of LIF, thresholds, resets, and spike trains</td></tr><tr><td style="text-align:right">2</td><td>Izhikevich, <em>Simple Model of Spiking Neurons</em></td><td>Understand the abstraction levels of neuron models</td></tr><tr><td style="text-align:right">3</td><td>Rumelhart et al., <em>Back-propagating errors</em></td><td>Understand the original form of gradient learning</td></tr><tr><td style="text-align:right">4</td><td>Werbos, <em>Backpropagation through time</em></td><td>Understand credit assignment over time</td></tr><tr><td style="text-align:right">5</td><td>Bengio et al., <em>Stochastic neurons and hard non-linearities</em></td><td>Understand straight-through estimators and learning with hard decisions</td></tr><tr><td style="text-align:right">6</td><td>Bi &amp; Poo, <em>STDP</em></td><td>Understand the benefits and limits of local plasticity</td></tr><tr><td style="text-align:right">7</td><td>Bohte et al., <em>SpikeProp</em></td><td>Review an early attempt at supervised spike learning</td></tr><tr><td style="text-align:right">8</td><td>Diehl et al., <em>ANN-to-SNN conversion</em></td><td>Understand the practical path before direct training</td></tr><tr><td style="text-align:right">9</td><td>Zenke &amp; Ganguli, <em>SuperSpike</em></td><td>Understand the core implementation of surrogate derivatives</td></tr><tr><td style="text-align:right">10</td><td>SLAYER, STBP, LSNN</td><td>Understand deep, temporal, and recurrent SNN extensions</td></tr><tr><td style="text-align:right">11</td><td>Neftci et al., <em>Surrogate Gradient Learning in SNNs</em></td><td>Integrate the entire progression through the review</td></tr></tbody></table>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="questions-to-keep-in-mind-while-reading">Questions to keep in mind while reading<a href="https://ql.gl/en/blog/d657d100/#questions-to-keep-in-mind-while-reading" class="hash-link" aria-label="Direct link to Questions to keep in mind while reading" title="Direct link to Questions to keep in mind while reading" translate="no">​</a></h2>
<ol>
<li class="">Does this paper view spikes as rates or as timing?</li>
<li class="">Is the learning signal local, or does it come from a global loss?</li>
<li class="">Does it explicitly handle temporal credit assignment?</li>
<li class="">Does it preserve spikes in the forward pass and approximate only the backward pass?</li>
<li class="">How well does it align with the event-driven advantages of neuromorphic hardware?</li>
</ol>
<p>Keeping these five questions in mind reveals that surrogate gradients are not merely a "differentiation trick," but a design option for training SNNs as practical AI models.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/d657d100/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://arxiv.org/abs/1901.09948" target="_blank" rel="noopener noreferrer" class="">Neftci, Mostafa, Zenke, <em>Surrogate Gradient Learning in Spiking Neural Networks</em></a> — license: <code>unknown</code>, retrieved: <code>2026-07-13</code></li>
<li class=""><a href="https://arxiv.org/abs/1705.11146" target="_blank" rel="noopener noreferrer" class="">Zenke &amp; Ganguli, <em>SuperSpike: Supervised Learning in Multilayer Spiking Neural Networks</em></a> — license: <code>unknown</code>, retrieved: <code>2026-07-13</code></li>
<li class=""><a href="https://arxiv.org/abs/1810.08646" target="_blank" rel="noopener noreferrer" class="">Shrestha &amp; Orchard, <em>SLAYER: Spike Layer Error Reassignment in Time</em></a> — license: <code>unknown</code>, retrieved: <code>2026-07-13</code></li>
<li class=""><a href="https://arxiv.org/abs/1803.09574" target="_blank" rel="noopener noreferrer" class="">Bellec et al., <em>Long short-term memory and learning-to-learn in networks of spiking neurons</em></a> — license: <code>unknown</code>, retrieved: <code>2026-07-13</code></li>
<li class=""><a href="https://arxiv.org/abs/1308.3432" target="_blank" rel="noopener noreferrer" class="">Bengio et al., <em>Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computation</em></a> — license: <code>unknown</code>, retrieved: <code>2026-07-13</code></li>
<li class=""><a href="https://www.nature.com/articles/323533a0" target="_blank" rel="noopener noreferrer" class="">Rumelhart, Hinton, Williams, <em>Learning representations by back-propagating errors</em></a> — license: <code>unknown</code>, retrieved: <code>2026-07-13</code></li>
<li class=""><a href="https://doi.org/10.1109/5.58337" target="_blank" rel="noopener noreferrer" class="">Werbos, <em>Backpropagation through time: what it does and how to do it</em></a> — license: <code>unknown</code>, retrieved: <code>2026-07-13</code></li>
<li class=""><a href="https://neuronaldynamics.epfl.ch/online/index.html" target="_blank" rel="noopener noreferrer" class="">Gerstner &amp; Kistler, <em>Spiking Neuron Models</em></a> — license: <code>unknown</code>, retrieved: <code>2026-07-13</code></li>
<li class=""><a href="https://www.izhikevich.org/publications/spikes.htm" target="_blank" rel="noopener noreferrer" class="">Izhikevich, <em>Simple Model of Spiking Neurons</em></a> — license: <code>unknown</code>, retrieved: <code>2026-07-13</code></li>
<li class=""><a href="https://doi.org/10.1523/JNEUROSCI.18-24-10464.1998" target="_blank" rel="noopener noreferrer" class="">Bi &amp; Poo, <em>Synaptic Modifications in Cultured Hippocampal Neurons</em></a> — license: <code>unknown</code>, retrieved: <code>2026-07-13</code></li>
<li class=""><a href="https://doi.org/10.1016/S0925-2312(01)00658-0" target="_blank" rel="noopener noreferrer" class="">Bohte, Kok, La Poutré, <em>Error-backpropagation in temporally encoded networks of spiking neurons</em></a> — license: <code>unknown</code>, retrieved: <code>2026-07-13</code></li>
<li class=""><a href="https://arxiv.org/abs/1502.03114" target="_blank" rel="noopener noreferrer" class="">Diehl et al., <em>Fast-classifying, high-accuracy spiking deep networks through weight and threshold balancing</em></a> — license: <code>unknown</code>, retrieved: <code>2026-07-13</code></li>
<li class=""><a href="https://www.frontiersin.org/journals/neuroscience/articles/10.3389/fnins.2018.00331/full" target="_blank" rel="noopener noreferrer" class="">Wu et al., <em>Spatio-Temporal Backpropagation for Training High-performance Spiking Neural Networks</em></a> — license: <code>unknown</code>, retrieved: <code>2026-07-13</code></li>
<li class="">Image: <a href="https://ql.gl/en/assets/files/cover-4819af83fc4e5aebe49f742d9aa75357.svg/" target="_blank" class="">Self-authored Surrogate Gradient paper roadmap cover diagram</a> — license: <code>original</code></li>
</ul>]]></content:encoded>
            <category>AI</category>
            <category>Neuromorphic</category>
            <category>SNN</category>
            <category>Research</category>
            <category>Explainer</category>
        </item>
        <item>
            <title><![CDATA[HiPPO: Recurrent Memory with Optimal Polynomial Projections — A Paper Commentary]]></title>
            <link>https://ql.gl/en/blog/d3b70ba2/</link>
            <guid>https://ql.gl/en/blog/d3b70ba2/</guid>
            <pubDate>Sat, 11 Jul 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[A step-by-step explanation of how the HiPPO framework reformulates recurrent neural-network memory as online function approximation, including the intuition, mathematics, and experimental advantages of the LegS (Scaled Legendre) update.]]></description>
            <content:encoded><![CDATA[<p><img decoding="async" loading="lazy" src="https://ql.gl/en/assets/images/cover-d27c348672e7238072632de3cea8c109.webp" width="1200" height="670" class="img_ev3q"></p>
<p>Based on the paper "HiPPO: Recurrent Memory with Optimal Polynomial Projections," this article explains the motivation, mathematical intuition, central method—continuous-time ODEs and discretization—major results, and limitations of the authors' HiPPO framework step by step. Beyond a simple summary, the goal is to let non-specialists follow why this perspective is needed, what intuition solves the problem, and how the equations and algorithm connect.</p>
<!-- -->
<p>Throughout the document, the paper reframes the "memory problem" as a problem of online function approximation. This brings two main benefits. First, several techniques used empirically in traditional RNNs, LSTMs, and GRUs—including sliding windows, gating, and LMUs—can be understood within one theoretical framework. Second, once an appropriate measure of the "importance of the past" is defined, the corresponding optimal update can be derived in closed form: as an ODE in continuous time and a linear recurrence in discrete time.</p>
<p>Let us examine the details in order.</p>
<p>Problem and motivation</p>
<p>The central challenge in sequential data such as language, sensor streams, and medical time series is "how to compress an arbitrarily long past into a limited state, or memory, in real time." Existing approaches commonly rely on one of two options: (1) a fixed-length sliding window that remembers only the most recent <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>T</mi></mrow><annotation encoding="application/x-tex">T</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.1389em">T</span></span></span></span>, or (2) a priority scheme such as exponential decay that treats recent history as more important. These methods are sensitive to timescale, such as changes in sampling rate, and can suffer sharp performance drops under distribution shifts, such as signals with different frequencies. Many models also have weak theoretical guarantees against vanishing or exploding gradients when learning long-range dependencies.</p>
<p>HiPPO starts from a simple idea: Treat "memory" as the coefficients of an optimal approximation over the past interval of some function <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>f</mi><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">f(t)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.1076em">f</span><span class="mopen">(</span><span class="mord mathnormal">t</span><span class="mclose">)</span></span></span></span>. Projecting a past signal into an <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>N</mi></mrow><annotation encoding="application/x-tex">N</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.109em">N</span></span></span></span>-dimensional basis and storing and updating only its coefficients produces a compressed representation of history. This view connects naturally to approximation theory and makes clear that the optimal projection changes with the measure used to define the importance of the past.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: HiPPO</div><div class="admonitionContent_BuS1"><p>Simple definition: HiPPO stands for "High-order Polynomial Projection Operators." It is a mathematical framework that projects a past signal onto a polynomial basis under a time-varying measure and updates the optimal coefficients in real time.
Everyday example: It resembles a rule on a smartphone that decides whether to emphasize only the last few minutes or summarize the entire call history.</p></div></div>
<p>Core idea: Online function approximation and polynomial projection</p>
<p>The framework can be summarized in three steps. First, for each point in time <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>t</mi></mrow><annotation encoding="application/x-tex">t</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6151em"></span><span class="mord mathnormal">t</span></span></span></span>, choose a measure <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>μ</mi><mi>t</mi></msub></mrow><annotation encoding="application/x-tex">\mu_t</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.625em;vertical-align:-0.1944em"></span><span class="mord"><span class="mord mathnormal">μ</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.2806em"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em"><span class="pstrut" style="height:2.7em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">t</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em"><span></span></span></span></span></span></span></span></span></span> that quantifies "importance" over a past interval such as <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><mo>−</mo><mi mathvariant="normal">∞</mi><mo separator="true">,</mo><mi>t</mi><mo stretchy="false">]</mo></mrow><annotation encoding="application/x-tex">(-\infty,t]</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mopen">(</span><span class="mord">−</span><span class="mord">∞</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em"></span><span class="mord mathnormal">t</span><span class="mclose">]</span></span></span></span> or <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">[</mo><mi>t</mi><mo>−</mo><mi>θ</mi><mo separator="true">,</mo><mi>t</mi><mo stretchy="false">]</mo></mrow><annotation encoding="application/x-tex">[t-\theta,t]</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mopen">[</span><span class="mord mathnormal">t</span><span class="mspace" style="margin-right:0.2222em"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.0278em">θ</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em"></span><span class="mord mathnormal">t</span><span class="mclose">]</span></span></span></span>. Second, select a family of orthogonal polynomials under that measure as the basis. The optimal coefficients of the orthogonal projection of past signal <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>f</mi></mrow><annotation encoding="application/x-tex">f</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em"></span><span class="mord mathnormal" style="margin-right:0.1076em">f</span></span></span></span> onto the basis then have a closed-form inner-product expression. Third, differentiate these coefficients with respect to time, exchanging differentiation and integration, and the coefficient vector <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>c</mi><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo><mo>∈</mo><msup><mi mathvariant="double-struck">R</mi><mi>N</mi></msup></mrow><annotation encoding="application/x-tex">c(t)\in\mathbb{R}^N</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal">c</span><span class="mopen">(</span><span class="mord mathnormal">t</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">∈</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:0.8413em"></span><span class="mord"><span class="mord mathbb">R</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8413em"><span style="top:-3.063em;margin-right:0.05em"><span class="pstrut" style="height:2.7em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.109em">N</span></span></span></span></span></span></span></span></span></span></span> is found to satisfy a linear ODE:</p>
<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mfrac><mrow><mi>d</mi><mi>c</mi><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo></mrow><mrow><mi>d</mi><mi>t</mi></mrow></mfrac><mo>=</mo><mi>A</mi><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo><mi>c</mi><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo><mo>+</mo><mi>B</mi><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo><mi>f</mi><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">{d c(t) \over d t} = A(t) c(t) + B(t) f(t)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.355em;vertical-align:-0.345em"></span><span class="mord"><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.01em"><span style="top:-2.655em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">d</span><span class="mord mathnormal mtight">t</span></span></span></span><span style="top:-3.23em"><span class="pstrut" style="height:3em"></span><span class="frac-line" style="border-bottom-width:0.04em"></span></span><span style="top:-3.485em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">d</span><span class="mord mathnormal mtight">c</span><span class="mopen mtight">(</span><span class="mord mathnormal mtight">t</span><span class="mclose mtight">)</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.345em"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span></span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal">A</span><span class="mopen">(</span><span class="mord mathnormal">t</span><span class="mclose">)</span><span class="mord mathnormal">c</span><span class="mopen">(</span><span class="mord mathnormal">t</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2222em"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.0502em">B</span><span class="mopen">(</span><span class="mord mathnormal">t</span><span class="mclose">)</span><span class="mord mathnormal" style="margin-right:0.1076em">f</span><span class="mopen">(</span><span class="mord mathnormal">t</span><span class="mclose">)</span></span></span></span></p>
<p>The optimal coefficient update can thus be implemented as simple linear dynamics, and discretization turns it into an efficient recurrence.</p>
<p>This perspective matters because several existing techniques, including LMUs and gated RNNs, can be derived as special choices within HiPPO. The framework therefore supplies a unified theory for "how memory should be designed."</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: Orthogonal polynomials</div><div class="admonitionContent_BuS1"><p>Simple definition: A sequence of polynomials mutually orthogonal under a particular measure, or weighting. Expanding a function in this basis allows its coefficients to be computed without mutual interference.
Everyday example: It resembles decomposing an image with mutually orthogonal color filters, each capturing non-overlapping information.</p></div></div>
<p>Mathematical intuition and ODE derivation</p>
<p>More concretely, let space <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>G</mi></mrow><annotation encoding="application/x-tex">G</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal">G</span></span></span></span> be the space of polynomials with degree below <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>N</mi></mrow><annotation encoding="application/x-tex">N</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.109em">N</span></span></span></span>. The optimal projection of any past function can then be represented by inner products with the orthogonal-polynomial basis. Because the measure <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>μ</mi><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">\mu(t)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal">μ</span><span class="mopen">(</span><span class="mord mathnormal">t</span><span class="mclose">)</span></span></span></span> varies over time, the basis itself may change with time. Differentiating both the changing basis and the boundary of the inner product, whose upper integration limit is <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>t</mi></mrow><annotation encoding="application/x-tex">t</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6151em"></span><span class="mord mathnormal">t</span></span></span></span>, naturally produces a linear differential equation for <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>c</mi><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">c(t)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal">c</span><span class="mopen">(</span><span class="mord mathnormal">t</span><span class="mclose">)</span></span></span></span>. The important intuition is that "differentiation introduces the current input <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>f</mi><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">f(t)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.1076em">f</span><span class="mopen">(</span><span class="mord mathnormal">t</span><span class="mclose">)</span></span></span></span> as a source term, while previous coefficients are recombined linearly through matrix <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>A</mi></mrow><annotation encoding="application/x-tex">A</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal">A</span></span></span></span>."</p>
<p>This linear ODE is useful in two ways. First, the continuous-time representation permits analysis of fundamental properties such as equivalence under timescale changes and gradient bounds. Second, numerically stable discretization techniques such as the bilinear transform and zero-order hold produce recurrences directly applicable to real sequential data. Alongside the continuous derivation, the paper discusses several discretization methods and states that numerically stable methods were used in the experiments.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: Projection operator</div><div class="admonitionContent_BuS1"><p>Simple definition: An operator that maps a function or vector onto a given subspace, turning it into the closest representation with minimum error.
Everyday example: It resembles an editing rule that summarizes a long passage into a few key sentences; the summary represents the original as well as possible.</p></div></div>
<p>Special cases and a new update: From LMU to HiPPO-LegS (Scaled Legendre)</p>
<p>The paper rederives existing techniques from several choices of measure within the HiPPO framework and proposes new mechanisms. Representative cases include:</p>
<ul>
<li class="">
<p>LegT (Translated Legendre): This measure gives uniform weight to a fixed-length sliding window <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">[</mo><mi>t</mi><mo>−</mo><mi>θ</mi><mo separator="true">,</mo><mi>t</mi><mo stretchy="false">]</mo></mrow><annotation encoding="application/x-tex">[t-\theta,t]</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mopen">[</span><span class="mord mathnormal">t</span><span class="mspace" style="margin-right:0.2222em"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.0278em">θ</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em"></span><span class="mord mathnormal">t</span><span class="mclose">]</span></span></span></span>. The coefficient update becomes an LTI, or linear time-invariant, ODE with constant matrices <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>A</mi></mrow><annotation encoding="application/x-tex">A</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal">A</span></span></span></span> and <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>B</mi></mrow><annotation encoding="application/x-tex">B</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.0502em">B</span></span></span></span>, rigorously deriving the previously proposed Legendre Memory Unit update from first principles. Because an LMU summarizes the past through a fixed-length window, the window size <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>θ</mi></mrow><annotation encoding="application/x-tex">\theta</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em"></span><span class="mord mathnormal" style="margin-right:0.0278em">θ</span></span></span></span> is required as a hyperparameter.</p>
</li>
<li class="">
<p>LagT (Laguerre-type): This case emphasizes recent history through an exponentially decaying measure, producing different <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>A</mi></mrow><annotation encoding="application/x-tex">A</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal">A</span></span></span></span> and <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>B</mi></mrow><annotation encoding="application/x-tex">B</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.0502em">B</span></span></span></span> matrices according to exponential integration weights.</p>
</li>
<li class="">
<p>LegS (Scaled Legendre): One of the paper's central new ideas gives uniform weight to the entire interval <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">[</mo><mn>0</mn><mo separator="true">,</mo><mi>t</mi><mo stretchy="false">]</mo></mrow><annotation encoding="application/x-tex">[0,t]</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mopen">[</span><span class="mord">0</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em"></span><span class="mord mathnormal">t</span><span class="mclose">]</span></span></span></span> while scaling it so that the "window expands over time." The resulting update considers the entire past without a fixed window size or hyperparameter. The discrete recurrence this produces, including Equation (4) of the paper, is equivariant to timescale changes such as compression or expansion of the input.</p>
</li>
</ul>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: LegS (Scaled Legendre)</div><div class="admonitionContent_BuS1"><p>Simple definition: A memory update based on a scaled Legendre family that uniformly considers the entire past up to time <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>t</mi></mrow><annotation encoding="application/x-tex">t</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6151em"></span><span class="mord mathnormal">t</span></span></span></span>. It summarizes all history without a fixed window size.
Everyday example: It works like a time-lapse that automatically expands its view over time to retain the flow of an entire trip rather than showing only the most recent ten seconds.</p></div></div>
<p>Why LegS matters—theoretical properties</p>
<p>The paper demonstrates several theoretical advantages of LegS.</p>
<ul>
<li class="">
<p>Timescale robustness: HiPPO-LegS coefficients remain equivariant when a signal is compressed or expanded, for example by changing the sampling rate. Formally, if <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>h</mi><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo><mo>=</mo><mi>f</mi><mo stretchy="false">(</mo><mi>α</mi><mi>t</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">h(t)=f(\alpha t)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal">h</span><span class="mopen">(</span><span class="mord mathnormal">t</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.1076em">f</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.0037em">α</span><span class="mord mathnormal">t</span><span class="mclose">)</span></span></span></span>, then <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">hippo</mi><mo>⁡</mo><mo stretchy="false">(</mo><mi>h</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo><mo>=</mo><mi mathvariant="normal">hippo</mi><mo>⁡</mo><mo stretchy="false">(</mo><mi>f</mi><mo stretchy="false">)</mo><mo stretchy="false">(</mo><mi>α</mi><mi>t</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">\operatorname{hippo}(h)(t)=\operatorname{hippo}(f)(\alpha t)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mop"><span class="mord mathrm">hippo</span></span><span class="mopen">(</span><span class="mord mathnormal">h</span><span class="mclose">)</span><span class="mopen">(</span><span class="mord mathnormal">t</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mop"><span class="mord mathrm">hippo</span></span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.1076em">f</span><span class="mclose">)</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.0037em">α</span><span class="mord mathnormal">t</span><span class="mclose">)</span></span></span></span>. Intuitively, LegS always views history in terms of its "relative position up to the current time" and therefore does not depend on an absolute unit of time.</p>
</li>
<li class="">
<p>Computational efficiency: Updating an <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>N</mi></mrow><annotation encoding="application/x-tex">N</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.109em">N</span></span></span></span>-dimensional state generally requires an <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>O</mi><mo stretchy="false">(</mo><msup><mi>N</mi><mn>2</mn></msup><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">O(N^2)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.0641em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.0278em">O</span><span class="mopen">(</span><span class="mord"><span class="mord mathnormal" style="margin-right:0.109em">N</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em"><span style="top:-3.063em;margin-right:0.05em"><span class="pstrut" style="height:2.7em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mclose">)</span></span></span></span> matrix multiplication, but the special structure of LegS matrix <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>A</mi></mrow><annotation encoding="application/x-tex">A</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal">A</span></span></span></span> supports fast multiplication algorithms under all common discretization methods. The paper proves that this matrix structure enables efficient implementations.</p>
</li>
<li class="">
<p>Bounds on gradients and approximation error: Because the HiPPO framework begins with an optimal-projection problem, it can derive quantitative guarantees on approximation error. The ODE representation also provides upper bounds on gradient flow. These properties offer clues for partially mitigating vanishing and exploding gradients in long-range dependency learning.</p>
</li>
</ul>
<p>Experimental results and their meaning</p>
<p>The paper reports the following central experimental results, quoted in the evidence pack:</p>
<ul>
<li class="">
<p>Permuted MNIST benchmark: HiPPO-LegS achieved 98.3% accuracy without a hyperparameter, surpassing the previous RNN-based state of the art by more than one point and reportedly remaining competitive even with Transformer-style models using global context. This suggests it can capture long-range dependencies stably beyond a short memory window.</p>
</li>
<li class="">
<p>Trajectory classification, a new task robust to timescale changes and missing data: LegS reportedly delivered absolute performance improvements of 25–40% over RNN and neural ODE families. The result shows that when the timescale distribution changes between training and evaluation, LegS equivariance translates into improved generalization.</p>
</li>
<li class="">
<p>Scalability validation: The paper claims that HiPPO-based operations can reconstruct online signals quickly and accurately across millions of timesteps. Implementation details and hyperparameters are available in the code repository at <a href="https://github.com/HazyResearch/hippo-code" target="_blank" rel="noopener noreferrer" class="">https://github.com/HazyResearch/hippo-code</a>.</p>
</li>
</ul>
<p>Limitations and uncertainty</p>
<p>As with every paper, several limitations and unverified points remain.</p>
<ul>
<li class="">
<p>Experimental reproduction and details: The evidence pack reports central results such as 98.3% and the major experimental design, but a summary alone cannot fully recover the hyperparameter-tuning process, initialization sensitivity, per-task learning curves, or statistical significance. Because the code repository is public, its implementation details should be consulted.</p>
</li>
<li class="">
<p>Sensitivity to discretization: Converting a continuous-time ODE into discrete time is sensitive to numerical stability. The paper states that it uses stable discretization techniques, but the selected method and step-size policy can affect performance in practice.</p>
</li>
<li class="">
<p>Limits on expressivity: HiPPO approximates history with a polynomial basis. Signals that are highly irregular or contain many abrupt changes may incur error from the polynomial approximation itself. The paper analyzes trade-offs through different measures but does not claim unconditional superiority for every signal type.</p>
</li>
</ul>
<p>Practical implications</p>
<p>Several conclusions follow from research and engineering perspectives. First, measure-based memory design is worth considering for problems where learning long-range dependencies matters, including sensor data, biosignals, and some language tasks. Second, if the timescale may change in the data-collection environment, for example through sampling-frequency changes, a scale-invariant mechanism such as LegS improves the stability of model generalization. Third, introducing a mechanism with theoretical guarantees such as gradient bounds creates room to improve optimization stability, making validation in real large-scale training pipelines the next task.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: LMU (Legendre Memory Unit)</div><div class="admonitionContent_BuS1"><p>Simple definition: An LMU is a memory unit that summarizes history within a fixed-length sliding window using a Legendre polynomial basis. HiPPO rederives it as a special case of the LegT measure.
Everyday example: It remembers only a fixed period, like a device that continuously calculates the mean temperature over the last hour.</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="analysis-of-the-papers-structure">Analysis of the paper's structure<a href="https://ql.gl/en/blog/d3b70ba2/#analysis-of-the-papers-structure" class="hash-link" aria-label="Direct link to Analysis of the paper's structure" title="Direct link to Analysis of the paper's structure" translate="no">​</a></h2>
<p>(1) Identifying and mapping IMRaD</p>
<p>Based on the supplied evidence pack and detected headings, the paper clearly contains some elements of the typical IMRaD structure—Introduction, Methods, Results, and Discussion—but does not fully match the conventional form. Specifically:</p>
<ul>
<li class="">Introduction: A clear "1 Introduction" section presents the problem and purpose, including a unified framework and timescale independence in time-series data.</li>
<li class="">Methods: "Section 2 The HiPPO Framework" and its subsections 2.1–2.5 serve as the methods, covering continuous-time derivation, discretization, and instances under multiple measures. Mathematical contributions such as Definition 1, the ODE derivation, and derivations of matrices <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>A</mi></mrow><annotation encoding="application/x-tex">A</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal">A</span></span></span></span> and <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>B</mi></mrow><annotation encoding="application/x-tex">B</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.0502em">B</span></span></span></span> for particular measures are concentrated here.</li>
<li class="">Results: The experiments in Section 4 and theoretical results proved in Section 3 belong to the results. Central reported outcomes include permuted-MNIST performance, the trajectory-classification task, and timescale-robustness experiments.</li>
<li class="">Discussion: No explicit "Discussion" section appears in the detected structure. Instead, the paper places related work between methods and results and puts extensive analyses, proofs, and additional experiments in appendices. The conventional IMRaD "Discussion" is therefore either merged into the results or distributed across the conclusion and appendix.</li>
</ul>
<p>The IMRaD classification is consequently "partially follows": Introduction, Methods, and Results are present, but a separate Discussion is absent or distributed.</p>
<p>(2) Logical flow from the big picture to the details</p>
<p>The structural flow is direct and logically consistent: problem → gap → contribution. More specifically:</p>
<ul>
<li class="">Problem statement in the Introduction: Presents the memory problem in sequential data and the limits of existing methods, including the need for priors about timescale and a lack of theoretical guarantees.</li>
<li class="">Conceptual reframing at the beginning of Methods: Redefines memory as "online function approximation" and introduces the choice of measure for assigning importance to the past as the central concept. It explains why a polynomial basis is used through the closed-form coefficient representation of orthogonal polynomials.</li>
<li class="">Mathematical development deeper in Methods: Moves toward implementation-level details by connecting basis selection, differentiation of inner products, ODE derivation, and discretization to an algorithmic recurrence. It recovers existing techniques such as LMUs as special cases and derives new mechanisms such as LegS.</li>
<li class="">Theoretical and experimental validation in Results: Proves and reports the mechanism's theoretical properties—equivariance, computational complexity, and gradient bounds—and experimental superiority in separate sections.</li>
</ul>
<p>The progression begins with "why this method is needed," proceeds to "how it is formed" through a mathematical derivation, and ends with "whether it is useful in practice" through experiments. Detailed proofs and comparisons are placed in the appendix, designing the paper's flow to guide readers step by step from the big picture to the details.</p>
<p>End.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/d3b70ba2/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://arxiv.org/pdf/2008.07669" target="_blank" rel="noopener noreferrer" class="">HiPPO: Recurrent Memory with Optimal Polynomial Projections</a> — license: <code>unknown</code>, retrieved: <code>2026-07-11</code>.</li>
<li class="">Image: <a href="https://ql.gl/en/assets/files/cover-d27c348672e7238072632de3cea8c109.webp/" target="_blank" class="">AI-generated cover image via OpenRouter</a> — license: <code>ai-generated-original</code>.</li>
</ul>]]></content:encoded>
            <category>Research</category>
            <category>AI</category>
            <category>Explainer</category>
        </item>
        <item>
            <title><![CDATA[The Legendre Transform: Intuition, Examples, and the Thermodynamic Connection]]></title>
            <link>https://ql.gl/en/blog/3551c399/</link>
            <guid>https://ql.gl/en/blog/3551c399/</guid>
            <pubDate>Fri, 10 Jul 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[A detailed explanation of the Legendre transform's intuitive meaning and mathematical definition, how it works through a harmonic-potential example, and its connection to partition functions and free energy through the Laplace transform. Each core idea follows a step-by-step problem–intuition–meaning progression.]]></description>
            <content:encoded><![CDATA[<p><img decoding="async" loading="lazy" src="https://ql.gl/en/assets/images/cover-1ef0e95548d417e01a7aa73ac013c8cf.webp" width="1200" height="670" class="img_ev3q"></p>
<!-- -->
<p>The Legendre transform is a standard tool for "reexpressing the information carried by a function from the perspective of another control variable, or covariable." This article explains step by step why the tool is needed, how it works through intuition and equations, and why it matters in physics, especially statistical thermodynamics. Each step uses concrete examples and analogies where possible to build an intuitive grasp of the core concept.</p>
<p>A common first question about the Legendre transform is simple: "What do we gain by introducing a different variable instead of the original one, and is the original information lost?" Answering it requires examining two points. First, is the original function sufficiently convex for a one-to-one correspondence between its derivative and its original variable? Second, which variable is easier to handle experimentally or theoretically? The following sections treat these questions more rigorously and use the geometric intuition of a tangent and its intercept to show why the formula arises naturally.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="1-problem-setup-and-geometric-intuition">1. Problem setup and geometric intuition<a href="https://ql.gl/en/blog/3551c399/#1-problem-setup-and-geometric-intuition" class="hash-link" aria-label="Direct link to 1. Problem setup and geometric intuition" title="Direct link to 1. Problem setup and geometric intuition" translate="no">​</a></h2>
<p>Problem: Suppose quantity <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>F</mi></mrow><annotation encoding="application/x-tex">F</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.1389em">F</span></span></span></span> depends on independent variable <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi></mrow><annotation encoding="application/x-tex">x</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em"></span><span class="mord mathnormal">x</span></span></span></span>, so <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>F</mi><mo>=</mo><mi>F</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">F=F(x)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.1389em">F</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.1389em">F</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mclose">)</span></span></span></span>. In practice, however, its slope <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>s</mi><mo>=</mo><mi>d</mi><mi>F</mi><mi mathvariant="normal">/</mi><mi>d</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">s=dF/dx</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em"></span><span class="mord mathnormal">s</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal">d</span><span class="mord mathnormal" style="margin-right:0.1389em">F</span><span class="mord">/</span><span class="mord mathnormal">d</span><span class="mord mathnormal">x</span></span></span></span> may be easier to measure or control than <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi></mrow><annotation encoding="application/x-tex">x</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em"></span><span class="mord mathnormal">x</span></span></span></span> itself. We then want a new representation <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>G</mi><mo stretchy="false">(</mo><mi>s</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">G(s)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal">G</span><span class="mopen">(</span><span class="mord mathnormal">s</span><span class="mclose">)</span></span></span></span> whose independent variable is <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>s</mi></mrow><annotation encoding="application/x-tex">s</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em"></span><span class="mord mathnormal">s</span></span></span></span>. The key requirement is that mapping <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi><mo>↦</mo><mi>s</mi></mrow><annotation encoding="application/x-tex">x\mapsto s</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.522em;vertical-align:-0.011em"></span><span class="mord mathnormal">x</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">↦</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:0.4306em"></span><span class="mord mathnormal">s</span></span></span></span> have an inverse. Mathematically, a convexity condition such as</p>
<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mfrac><mrow><msup><mi>d</mi><mn>2</mn></msup><mi>F</mi></mrow><mrow><mi>d</mi><msup><mi>x</mi><mn>2</mn></msup></mrow></mfrac><mo>&gt;</mo><mn>0</mn></mrow><annotation encoding="application/x-tex">\frac{d^2 F}{dx^2} &gt; 0</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.3629em;vertical-align:-0.345em"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.0179em"><span style="top:-2.655em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">d</span><span class="mord mtight"><span class="mord mathnormal mtight">x</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.7463em"><span style="top:-2.786em;margin-right:0.0714em"><span class="pstrut" style="height:2.5em"></span><span class="sizing reset-size3 size1 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span></span></span></span><span style="top:-3.23em"><span class="pstrut" style="height:3em"></span><span class="frac-line" style="border-bottom-width:0.04em"></span></span><span style="top:-3.394em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight"><span class="mord mathnormal mtight">d</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8913em"><span style="top:-2.931em;margin-right:0.0714em"><span class="pstrut" style="height:2.5em"></span><span class="sizing reset-size3 size1 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mord mathnormal mtight" style="margin-right:0.1389em">F</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.345em"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">&gt;</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:0.6444em"></span><span class="mord">0</span></span></span></span></p>
<p>makes <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>s</mi></mrow><annotation encoding="application/x-tex">s</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em"></span><span class="mord mathnormal">s</span></span></span></span> and <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi></mrow><annotation encoding="application/x-tex">x</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em"></span><span class="mord mathnormal">x</span></span></span></span> correspond one to one.</p>
<p>Geometric intuition: Draw a tangent at a point on the original function <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>F</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">F(x)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.1389em">F</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mclose">)</span></span></span></span>. The tangent's slope is <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>s</mi></mrow><annotation encoding="application/x-tex">s</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em"></span><span class="mord mathnormal">s</span></span></span></span>. Define the point where the tangent meets the <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>y</mi></mrow><annotation encoding="application/x-tex">y</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.625em;vertical-align:-0.1944em"></span><span class="mord mathnormal" style="margin-right:0.0359em">y</span></span></span></span> axis, at <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi><mo>=</mo><mn>0</mn></mrow><annotation encoding="application/x-tex">x=0</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em"></span><span class="mord mathnormal">x</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:0.6444em"></span><span class="mord">0</span></span></span></span>, as <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo>−</mo><mi>G</mi></mrow><annotation encoding="application/x-tex">-G</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7667em;vertical-align:-0.0833em"></span><span class="mord">−</span><span class="mord mathnormal">G</span></span></span></span>. The tangent equation gives</p>
<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mfrac><mrow><mi>F</mi><mo>−</mo><mo stretchy="false">(</mo><mo>−</mo><mi>G</mi><mo stretchy="false">)</mo></mrow><mi>x</mi></mfrac><mo>=</mo><mi>s</mi></mrow><annotation encoding="application/x-tex">\frac{F - (-G)}{x} = s</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.355em;vertical-align:-0.345em"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.01em"><span style="top:-2.655em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">x</span></span></span></span><span style="top:-3.23em"><span class="pstrut" style="height:3em"></span><span class="frac-line" style="border-bottom-width:0.04em"></span></span><span style="top:-3.485em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight" style="margin-right:0.1389em">F</span><span class="mbin mtight">−</span><span class="mopen mtight">(</span><span class="mord mtight">−</span><span class="mord mathnormal mtight">G</span><span class="mclose mtight">)</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.345em"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:0.4306em"></span><span class="mord mathnormal">s</span></span></span></span></p>
<p>and therefore</p>
<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>G</mi><mo>=</mo><mi>s</mi><mi>x</mi><mo>−</mo><mi>F</mi><mi mathvariant="normal">.</mi></mrow><annotation encoding="application/x-tex">G = s x - F.</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal">G</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:0.6667em;vertical-align:-0.0833em"></span><span class="mord mathnormal">s</span><span class="mord mathnormal">x</span><span class="mspace" style="margin-right:0.2222em"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em"></span></span><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.1389em">F</span><span class="mord">.</span></span></span></span></p>
<p>The important point is that once <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi></mrow><annotation encoding="application/x-tex">x</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em"></span><span class="mord mathnormal">x</span></span></span></span> has become a function of <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>s</mi></mrow><annotation encoding="application/x-tex">s</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em"></span><span class="mord mathnormal">s</span></span></span></span>, the precise definition of <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>G</mi></mrow><annotation encoding="application/x-tex">G</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal">G</span></span></span></span> is</p>
<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>G</mi><mo stretchy="false">(</mo><mi>s</mi><mo stretchy="false">)</mo><mo>=</mo><mi>s</mi><mtext> </mtext><mi>x</mi><mo stretchy="false">(</mo><mi>s</mi><mo stretchy="false">)</mo><mo>−</mo><mi>F</mi><mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em">(</mo><mi>x</mi><mo stretchy="false">(</mo><mi>s</mi><mo stretchy="false">)</mo><mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em">)</mo><mi mathvariant="normal">.</mi></mrow><annotation encoding="application/x-tex">G(s) = s\, x(s) - F\bigl(x(s)\bigr).</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal">G</span><span class="mopen">(</span><span class="mord mathnormal">s</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal">s</span><span class="mspace" style="margin-right:0.1667em"></span><span class="mord mathnormal">x</span><span class="mopen">(</span><span class="mord mathnormal">s</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2222em"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em"></span></span><span class="base"><span class="strut" style="height:1.2em;vertical-align:-0.35em"></span><span class="mord mathnormal" style="margin-right:0.1389em">F</span><span class="mopen"><span class="delimsizing size1">(</span></span><span class="mord mathnormal">x</span><span class="mopen">(</span><span class="mord mathnormal">s</span><span class="mclose">)</span><span class="mclose"><span class="delimsizing size1">)</span></span><span class="mord">.</span></span></span></span></p>
<p>This is not a simple substitution but "repackaging the same information." Under sufficient convexity, applying the Legendre transform again recovers the original function.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: Legendre transform</div><div class="admonitionContent_BuS1"><p>Simple definition: A mathematical procedure that transforms a function <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>F</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">F(x)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.1389em">F</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mclose">)</span></span></span></span> into a new function <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>G</mi><mo stretchy="false">(</mo><mi>s</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">G(s)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal">G</span><span class="mopen">(</span><span class="mord mathnormal">s</span><span class="mclose">)</span></span></span></span> whose independent variable is its derivative <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>s</mi><mo>=</mo><mi>d</mi><mi>F</mi><mi mathvariant="normal">/</mi><mi>d</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">s=dF/dx</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em"></span><span class="mord mathnormal">s</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal">d</span><span class="mord mathnormal" style="margin-right:0.1389em">F</span><span class="mord">/</span><span class="mord mathnormal">d</span><span class="mord mathnormal">x</span></span></span></span>.
Everyday example: It resembles describing terrain in terms of its slope on a contour map rather than the original elevation. The description is reorganized around the location of each particular slope instead of the terrain's height.</p></div></div>
<p>Why is this reexpression useful? Consider a situation in engineering or experimentation where it is easy to control or measure the force applied to a system, but difficult to handle the corresponding position directly. A representation using force as the independent variable—such as the Legendre transform of a potential for an elastic system—is then more natural. This perspective connects directly to the practical reason for moving between "energy representations" and "free-energy representations" in thermodynamics.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="2-harmonic-potential-examplewhat-information-the-transform-preserves-or-loses">2. Harmonic potential example—what information the transform preserves or loses<a href="https://ql.gl/en/blog/3551c399/#2-harmonic-potential-examplewhat-information-the-transform-preserves-or-loses" class="hash-link" aria-label="Direct link to 2. Harmonic potential example—what information the transform preserves or loses" title="Direct link to 2. Harmonic potential example—what information the transform preserves or loses" translate="no">​</a></h2>
<p>As a concrete example, consider the harmonic potential</p>
<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>U</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>=</mo><mstyle scriptlevel="0" displaystyle="false"><mfrac><mn>1</mn><mn>2</mn></mfrac></mstyle><mi>k</mi><mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em">(</mo><mi>x</mi><mo>−</mo><msub><mi>x</mi><mi>min</mi><mo>⁡</mo></msub><msup><mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em">)</mo><mn>2</mn></msup><mi mathvariant="normal">.</mi></mrow><annotation encoding="application/x-tex">U(x) = \tfrac{1}{2}k\bigl(x - x_{\min}\bigr)^2.</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1.2em;vertical-align:-0.35em"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8451em"><span style="top:-2.655em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">2</span></span></span></span><span style="top:-3.23em"><span class="pstrut" style="height:3em"></span><span class="frac-line" style="border-bottom-width:0.04em"></span></span><span style="top:-3.394em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">1</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.345em"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mord mathnormal" style="margin-right:0.0315em">k</span><span class="mopen"><span class="delimsizing size1">(</span></span><span class="mord mathnormal">x</span><span class="mspace" style="margin-right:0.2222em"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em"></span></span><span class="base"><span class="strut" style="height:1.404em;vertical-align:-0.35em"></span><span class="mord"><span class="mord mathnormal">x</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3175em"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em"><span class="pstrut" style="height:2.7em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mop mtight"><span class="mtight">m</span><span class="mtight">i</span><span class="mtight">n</span></span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em"><span></span></span></span></span></span></span><span class="mclose"><span class="mclose"><span class="delimsizing size1">)</span></span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:1.054em"><span style="top:-3.3029em;margin-right:0.05em"><span class="pstrut" style="height:2.7em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mord">.</span></span></span></span></p>
<p>If an external force <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>f</mi></mrow><annotation encoding="application/x-tex">f</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em"></span><span class="mord mathnormal" style="margin-right:0.1076em">f</span></span></span></span> is applied, equilibrium requires the sum of the internal force derived from the potential and the external force to be zero. The force from the potential is <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo>−</mo><mi>d</mi><mi>U</mi><mi mathvariant="normal">/</mi><mi>d</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">-dU/dx</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord">−</span><span class="mord mathnormal">d</span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mord">/</span><span class="mord mathnormal">d</span><span class="mord mathnormal">x</span></span></span></span>, so static equilibrium is</p>
<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo>−</mo><mfrac><mrow><mi>d</mi><mi>U</mi></mrow><mrow><mi>d</mi><mi>x</mi></mrow></mfrac><mo>+</mo><mi>f</mi><mo>=</mo><mn>0</mn><mspace width="1em"></mspace><mo>⇒</mo><mspace width="1em"></mspace><mfrac><mrow><mi>d</mi><mi>U</mi></mrow><mrow><mi>d</mi><mi>x</mi></mrow></mfrac><mo>=</mo><mi>f</mi><mi mathvariant="normal">.</mi></mrow><annotation encoding="application/x-tex">-\frac{dU}{dx} + f = 0\quad\Rightarrow\quad \frac{dU}{dx} = f.</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.2251em;vertical-align:-0.345em"></span><span class="mord">−</span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8801em"><span style="top:-2.655em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">d</span><span class="mord mathnormal mtight">x</span></span></span></span><span style="top:-3.23em"><span class="pstrut" style="height:3em"></span><span class="frac-line" style="border-bottom-width:0.04em"></span></span><span style="top:-3.394em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">d</span><span class="mord mathnormal mtight" style="margin-right:0.109em">U</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.345em"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mspace" style="margin-right:0.2222em"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em"></span></span><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em"></span><span class="mord mathnormal" style="margin-right:0.1076em">f</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:0.6444em"></span><span class="mord">0</span><span class="mspace" style="margin-right:1em"></span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:1em"></span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1.2251em;vertical-align:-0.345em"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8801em"><span style="top:-2.655em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">d</span><span class="mord mathnormal mtight">x</span></span></span></span><span style="top:-3.23em"><span class="pstrut" style="height:3em"></span><span class="frac-line" style="border-bottom-width:0.04em"></span></span><span style="top:-3.394em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">d</span><span class="mord mathnormal mtight" style="margin-right:0.109em">U</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.345em"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em"></span><span class="mord mathnormal" style="margin-right:0.1076em">f</span><span class="mord">.</span></span></span></span></p>
<p>Solving gives</p>
<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi><mo stretchy="false">(</mo><mi>f</mi><mo stretchy="false">)</mo><mo>=</mo><mfrac><mi>f</mi><mi>k</mi></mfrac><mo>+</mo><msub><mi>x</mi><mi>min</mi><mo>⁡</mo></msub><mi mathvariant="normal">.</mi></mrow><annotation encoding="application/x-tex">x(f) = \frac{f}{k} + x_{\min}.</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal">x</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.1076em">f</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1.2772em;vertical-align:-0.345em"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.9322em"><span style="top:-2.655em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight" style="margin-right:0.0315em">k</span></span></span></span><span style="top:-3.23em"><span class="pstrut" style="height:3em"></span><span class="frac-line" style="border-bottom-width:0.04em"></span></span><span style="top:-3.4461em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight" style="margin-right:0.1076em">f</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.345em"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mspace" style="margin-right:0.2222em"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em"></span></span><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em"></span><span class="mord"><span class="mord mathnormal">x</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3175em"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em"><span class="pstrut" style="height:2.7em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mop mtight"><span class="mtight">m</span><span class="mtight">i</span><span class="mtight">n</span></span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em"><span></span></span></span></span></span></span><span class="mord">.</span></span></span></span></p>
<p>Now call the Legendre transform of <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>U</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">U(x)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mclose">)</span></span></span></span> by the name <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>V</mi><mo stretchy="false">(</mo><mi>f</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">V(f)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.2222em">V</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.1076em">f</span><span class="mclose">)</span></span></span></span>. By definition,</p>
<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>V</mi><mo stretchy="false">(</mo><mi>f</mi><mo stretchy="false">)</mo><mo>=</mo><mi>f</mi><mtext> </mtext><mi>x</mi><mo stretchy="false">(</mo><mi>f</mi><mo stretchy="false">)</mo><mo>−</mo><mi>U</mi><mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em">(</mo><mi>x</mi><mo stretchy="false">(</mo><mi>f</mi><mo stretchy="false">)</mo><mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em">)</mo><mi mathvariant="normal">.</mi></mrow><annotation encoding="application/x-tex">V(f) = f\, x(f) - U\bigl(x(f)\bigr).</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.2222em">V</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.1076em">f</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.1076em">f</span><span class="mspace" style="margin-right:0.1667em"></span><span class="mord mathnormal">x</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.1076em">f</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2222em"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em"></span></span><span class="base"><span class="strut" style="height:1.2em;vertical-align:-0.35em"></span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mopen"><span class="delimsizing size1">(</span></span><span class="mord mathnormal">x</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.1076em">f</span><span class="mclose">)</span><span class="mclose"><span class="delimsizing size1">)</span></span><span class="mord">.</span></span></span></span></p>
<p>Direct calculation, after simple algebraic rearrangement, gives</p>
<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>V</mi><mo stretchy="false">(</mo><mi>f</mi><mo stretchy="false">)</mo><mo>=</mo><mfrac><mn>1</mn><mn>2</mn></mfrac><mfrac><msup><mi>f</mi><mn>2</mn></msup><mi>k</mi></mfrac><mo>+</mo><mi>f</mi><msub><mi>x</mi><mi>min</mi><mo>⁡</mo></msub><mi mathvariant="normal">.</mi></mrow><annotation encoding="application/x-tex">V(f) = \frac{1}{2}\frac{f^2}{k} + f x_{\min}.</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.2222em">V</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.1076em">f</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1.415em;vertical-align:-0.345em"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8451em"><span style="top:-2.655em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">2</span></span></span></span><span style="top:-3.23em"><span class="pstrut" style="height:3em"></span><span class="frac-line" style="border-bottom-width:0.04em"></span></span><span style="top:-3.394em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">1</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.345em"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.07em"><span style="top:-2.655em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight" style="margin-right:0.0315em">k</span></span></span></span><span style="top:-3.23em"><span class="pstrut" style="height:3em"></span><span class="frac-line" style="border-bottom-width:0.04em"></span></span><span style="top:-3.4461em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight"><span class="mord mathnormal mtight" style="margin-right:0.1076em">f</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8913em"><span style="top:-2.931em;margin-right:0.0714em"><span class="pstrut" style="height:2.5em"></span><span class="sizing reset-size3 size1 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.345em"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mspace" style="margin-right:0.2222em"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em"></span></span><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em"></span><span class="mord mathnormal" style="margin-right:0.1076em">f</span><span class="mord"><span class="mord mathnormal">x</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3175em"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em"><span class="pstrut" style="height:2.7em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mop mtight"><span class="mtight">m</span><span class="mtight">i</span><span class="mtight">n</span></span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em"><span></span></span></span></span></span></span><span class="mord">.</span></span></span></span></p>
<p>After the transform, we can also verify that</p>
<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi><mo stretchy="false">(</mo><mi>f</mi><mo stretchy="false">)</mo><mo>=</mo><mfrac><mrow><mi>d</mi><mi>V</mi></mrow><mrow><mi>d</mi><mi>f</mi></mrow></mfrac><mi mathvariant="normal">.</mi></mrow><annotation encoding="application/x-tex">x(f) = \frac{dV}{df}.</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal">x</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.1076em">f</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1.3612em;vertical-align:-0.4811em"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8801em"><span style="top:-2.655em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight" style="margin-right:0.1076em">df</span></span></span></span><span style="top:-3.23em"><span class="pstrut" style="height:3em"></span><span class="frac-line" style="border-bottom-width:0.04em"></span></span><span style="top:-3.394em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">d</span><span class="mord mathnormal mtight" style="margin-right:0.2222em">V</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.4811em"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mord">.</span></span></span></span></p>
<p>Two observations are important in this example.</p>
<ul>
<li class="">The Legendre transform preserves information by reexpressing the position-slope pair <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><mi>x</mi><mo separator="true">,</mo><mi>s</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">(x, s)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em"></span><span class="mord mathnormal">s</span><span class="mclose">)</span></span></span></span> as a slope-position pair <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><mi>s</mi><mo separator="true">,</mo><mi>x</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">(s, x)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mopen">(</span><span class="mord mathnormal">s</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em"></span><span class="mord mathnormal">x</span><span class="mclose">)</span></span></span></span>. Applying the transform twice recovers the original function.</li>
<li class="">If the original <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>U</mi></mrow><annotation encoding="application/x-tex">U</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.109em">U</span></span></span></span> is instead written only as <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>U</mi><mo stretchy="false">[</mo><mi>x</mi><mo stretchy="false">(</mo><mi>f</mi><mo stretchy="false">)</mo><mo stretchy="false">]</mo></mrow><annotation encoding="application/x-tex">U[x(f)]</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mopen">[</span><span class="mord mathnormal">x</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.1076em">f</span><span class="mclose">)]</span></span></span></span> in terms of <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>f</mi></mrow><annotation encoding="application/x-tex">f</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em"></span><span class="mord mathnormal" style="margin-right:0.1076em">f</span></span></span></span>, information in a constant term—here <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>x</mi><mi>min</mi><mo>⁡</mo></msub></mrow><annotation encoding="application/x-tex">x_{\min}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em"></span><span class="mord"><span class="mord mathnormal">x</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3175em"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em"><span class="pstrut" style="height:2.7em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mop mtight"><span class="mtight">m</span><span class="mtight">i</span><span class="mtight">n</span></span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em"><span></span></span></span></span></span></span></span></span></span>—may be lost. A simple substitution and a formal Legendre transform therefore differ in information preservation.</li>
</ul>
<p>The example clearly demonstrates both "why a precisely defined transform is necessary" and "which information is preserved or removed in the transformation." This distinction should be considered when deciding which variable to use as a controllable parameter in practice.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="3-the-connection-to-the-laplace-transform-and-statistical-thermodynamicsa-shift-toward-the-partition-function">3. The connection to the Laplace transform and statistical thermodynamics—a shift toward the partition function<a href="https://ql.gl/en/blog/3551c399/#3-the-connection-to-the-laplace-transform-and-statistical-thermodynamicsa-shift-toward-the-partition-function" class="hash-link" aria-label="Direct link to 3. The connection to the Laplace transform and statistical thermodynamics—a shift toward the partition function" title="Direct link to 3. The connection to the Laplace transform and statistical thermodynamics—a shift toward the partition function" translate="no">​</a></h2>
<p>Although it is not mathematically identical to the Legendre transform, the Laplace transform plays a conceptually similar role in statistical thermodynamics. Given the microstate density <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>W</mi><mo stretchy="false">(</mo><mi>U</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">W(U)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.1389em">W</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mclose">)</span></span></span></span>, the phase-space volume of states whose internal energy is near <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>U</mi></mrow><annotation encoding="application/x-tex">U</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.109em">U</span></span></span></span>, the partition function is defined by</p>
<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>Z</mi><mo stretchy="false">(</mo><mi>β</mi><mo stretchy="false">)</mo><mo>=</mo><mo>∫</mo><mi>W</mi><mo stretchy="false">(</mo><mi>U</mi><mo stretchy="false">)</mo><mtext> </mtext><msup><mi>e</mi><mrow><mo>−</mo><mi>β</mi><mi>U</mi></mrow></msup><mtext> </mtext><mi>d</mi><mi>U</mi><mo separator="true">,</mo></mrow><annotation encoding="application/x-tex">Z(\beta) = \int W(U)\, e^{-\beta U} \, dU,</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.0715em">Z</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.0528em">β</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1.1552em;vertical-align:-0.3061em"></span><span class="mop op-symbol small-op" style="margin-right:0.1945em;position:relative;top:-0.0006em">∫</span><span class="mspace" style="margin-right:0.1667em"></span><span class="mord mathnormal" style="margin-right:0.1389em">W</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.1667em"></span><span class="mord"><span class="mord mathnormal">e</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8491em"><span style="top:-3.063em;margin-right:0.05em"><span class="pstrut" style="height:2.7em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mathnormal mtight" style="margin-right:0.0528em">β</span><span class="mord mathnormal mtight" style="margin-right:0.109em">U</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.1667em"></span><span class="mord mathnormal">d</span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mpunct">,</span></span></span></span></p>
<p>where <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>β</mi><mo>=</mo><mo stretchy="false">(</mo><msub><mi>k</mi><mi>B</mi></msub><mi>T</mi><msup><mo stretchy="false">)</mo><mrow><mo>−</mo><mn>1</mn></mrow></msup></mrow><annotation encoding="application/x-tex">\beta = (k_B T)^{-1}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em"></span><span class="mord mathnormal" style="margin-right:0.0528em">β</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1.0641em;vertical-align:-0.25em"></span><span class="mopen">(</span><span class="mord"><span class="mord mathnormal" style="margin-right:0.0315em">k</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3283em"><span style="top:-2.55em;margin-left:-0.0315em;margin-right:0.05em"><span class="pstrut" style="height:2.7em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.0502em">B</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em"><span></span></span></span></span></span></span><span class="mord mathnormal" style="margin-right:0.1389em">T</span><span class="mclose"><span class="mclose">)</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em"><span style="top:-3.063em;margin-right:0.05em"><span class="pstrut" style="height:2.7em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mtight">1</span></span></span></span></span></span></span></span></span></span></span></span>. The partition function is a function whose independent variable is temperature, or <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>β</mi></mrow><annotation encoding="application/x-tex">\beta</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em"></span><span class="mord mathnormal" style="margin-right:0.0528em">β</span></span></span></span>, and describes a system from the "temperature rather than energy" perspective.</p>
<p>Using the Bromwich integral, the inverse Laplace transform rewrites <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>W</mi><mo stretchy="false">(</mo><mi>U</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">W(U)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.1389em">W</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mclose">)</span></span></span></span> as</p>
<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>W</mi><mo stretchy="false">(</mo><mi>U</mi><mo stretchy="false">)</mo><mo>=</mo><mfrac><mn>1</mn><mrow><mn>2</mn><mi>π</mi><mi>i</mi></mrow></mfrac><msub><mo>∫</mo><mi>C</mi></msub><mi>Z</mi><mo stretchy="false">(</mo><mi>β</mi><mo stretchy="false">)</mo><mtext> </mtext><msup><mi>e</mi><mrow><mi>β</mi><mi>U</mi></mrow></msup><mtext> </mtext><mi>d</mi><mi>β</mi><mo separator="true">,</mo></mrow><annotation encoding="application/x-tex">W(U) = \frac{1}{2\pi i} \int_C Z(\beta)\, e^{\beta U} \, d\beta,</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.1389em">W</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1.2049em;vertical-align:-0.3558em"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8451em"><span style="top:-2.655em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">2</span><span class="mord mathnormal mtight" style="margin-right:0.0359em">π</span><span class="mord mathnormal mtight">i</span></span></span></span><span style="top:-3.23em"><span class="pstrut" style="height:3em"></span><span class="frac-line" style="border-bottom-width:0.04em"></span></span><span style="top:-3.394em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">1</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.345em"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mspace" style="margin-right:0.1667em"></span><span class="mop"><span class="mop op-symbol small-op" style="margin-right:0.1945em;position:relative;top:-0.0006em">∫</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1225em"><span style="top:-2.3442em;margin-left:-0.1945em;margin-right:0.05em"><span class="pstrut" style="height:2.7em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.0715em">C</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.3558em"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.1667em"></span><span class="mord mathnormal" style="margin-right:0.0715em">Z</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.0528em">β</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.1667em"></span><span class="mord"><span class="mord mathnormal">e</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8491em"><span style="top:-3.063em;margin-right:0.05em"><span class="pstrut" style="height:2.7em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight" style="margin-right:0.0528em">β</span><span class="mord mathnormal mtight" style="margin-right:0.109em">U</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.1667em"></span><span class="mord mathnormal">d</span><span class="mord mathnormal" style="margin-right:0.0528em">β</span><span class="mpunct">,</span></span></span></span></p>
<p>where path <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>C</mi></mrow><annotation encoding="application/x-tex">C</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.0715em">C</span></span></span></span> is a suitably selected line in the complex plane. The partition function also connects to Helmholtz free energy <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>F</mi></mrow><annotation encoding="application/x-tex">F</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.1389em">F</span></span></span></span>. Defining <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="script">F</mi><mo>≡</mo><mi>β</mi><mi>F</mi></mrow><annotation encoding="application/x-tex">\mathcal{F} \equiv \beta F</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathcal" style="margin-right:0.0993em">F</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">≡</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em"></span><span class="mord mathnormal" style="margin-right:0.0528em">β</span><span class="mord mathnormal" style="margin-right:0.1389em">F</span></span></span></span> gives <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>Z</mi><mo stretchy="false">(</mo><mi>β</mi><mo stretchy="false">)</mo><mo>=</mo><msup><mi>e</mi><mrow><mo>−</mo><mi mathvariant="script">F</mi><mo stretchy="false">(</mo><mi>β</mi><mo stretchy="false">)</mo></mrow></msup></mrow><annotation encoding="application/x-tex">Z(\beta) = e^{-\mathcal{F}(\beta)}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.0715em">Z</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.0528em">β</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:0.888em"></span><span class="mord"><span class="mord mathnormal">e</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.888em"><span style="top:-3.063em;margin-right:0.05em"><span class="pstrut" style="height:2.7em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mathcal mtight" style="margin-right:0.0993em">F</span><span class="mopen mtight">(</span><span class="mord mathnormal mtight" style="margin-right:0.0528em">β</span><span class="mclose mtight">)</span></span></span></span></span></span></span></span></span></span></span></span>, so the expression above becomes</p>
<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>W</mi><mo stretchy="false">(</mo><mi>U</mi><mo stretchy="false">)</mo><mo>=</mo><mfrac><mn>1</mn><mrow><mn>2</mn><mi>π</mi><mi>i</mi></mrow></mfrac><msub><mo>∫</mo><mi>C</mi></msub><msup><mi>e</mi><mrow><mo>−</mo><mi mathvariant="script">F</mi><mo stretchy="false">(</mo><mi>β</mi><mo stretchy="false">)</mo><mo>+</mo><mi>β</mi><mi>U</mi></mrow></msup><mtext> </mtext><mi>d</mi><mi>β</mi><mi mathvariant="normal">.</mi></mrow><annotation encoding="application/x-tex">W(U) = \frac{1}{2\pi i} \int_C e^{-\mathcal{F}(\beta) + \beta U}\, d\beta.</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.1389em">W</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1.2438em;vertical-align:-0.3558em"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8451em"><span style="top:-2.655em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">2</span><span class="mord mathnormal mtight" style="margin-right:0.0359em">π</span><span class="mord mathnormal mtight">i</span></span></span></span><span style="top:-3.23em"><span class="pstrut" style="height:3em"></span><span class="frac-line" style="border-bottom-width:0.04em"></span></span><span style="top:-3.394em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">1</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.345em"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mspace" style="margin-right:0.1667em"></span><span class="mop"><span class="mop op-symbol small-op" style="margin-right:0.1945em;position:relative;top:-0.0006em">∫</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1225em"><span style="top:-2.3442em;margin-left:-0.1945em;margin-right:0.05em"><span class="pstrut" style="height:2.7em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.0715em">C</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.3558em"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.1667em"></span><span class="mord"><span class="mord mathnormal">e</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.888em"><span style="top:-3.063em;margin-right:0.05em"><span class="pstrut" style="height:2.7em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">−</span><span class="mord mathcal mtight" style="margin-right:0.0993em">F</span><span class="mopen mtight">(</span><span class="mord mathnormal mtight" style="margin-right:0.0528em">β</span><span class="mclose mtight">)</span><span class="mbin mtight">+</span><span class="mord mathnormal mtight" style="margin-right:0.0528em">β</span><span class="mord mathnormal mtight" style="margin-right:0.109em">U</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.1667em"></span><span class="mord mathnormal">d</span><span class="mord mathnormal" style="margin-right:0.0528em">β</span><span class="mord">.</span></span></span></span></p>
<p>For a large system, such as one containing a large number <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>N</mi></mrow><annotation encoding="application/x-tex">N</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.109em">N</span></span></span></span> of particles, <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="script">F</mi></mrow><annotation encoding="application/x-tex">\mathcal{F}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathcal" style="margin-right:0.0993em">F</span></span></span></span> and <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>U</mi></mrow><annotation encoding="application/x-tex">U</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.109em">U</span></span></span></span> generally grow together as <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>O</mi><mo stretchy="false">(</mo><mi>N</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">O(N)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.0278em">O</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.109em">N</span><span class="mclose">)</span></span></span></span>. The integral then follows the general principle that it is "dominated near the maximum of the exponent," known as the saddle-point approximation or Laplace's method. In other words, the greatest contribution comes from a neighborhood of <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>β</mi></mrow><annotation encoding="application/x-tex">\beta</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em"></span><span class="mord mathnormal" style="margin-right:0.0528em">β</span></span></span></span> satisfying</p>
<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mfrac><mi mathvariant="normal">∂</mi><mrow><mi mathvariant="normal">∂</mi><mi>β</mi></mrow></mfrac><mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em">(</mo><mi>β</mi><mi>U</mi><mo>−</mo><mi mathvariant="script">F</mi><mo stretchy="false">(</mo><mi>β</mi><mo stretchy="false">)</mo><mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em">)</mo><mo>=</mo><mn>0</mn><mspace width="1em"></mspace><mo>⇒</mo><mspace width="1em"></mspace><mi>U</mi><mo>=</mo><mfrac><mrow><mi mathvariant="normal">∂</mi><mi mathvariant="script">F</mi></mrow><mrow><mi mathvariant="normal">∂</mi><mi>β</mi></mrow></mfrac><mi mathvariant="normal">.</mi></mrow><annotation encoding="application/x-tex">\frac{\partial}{\partial\beta}\bigl(\beta U - \mathcal{F}(\beta)\bigr) = 0 \quad\Rightarrow\quad U = \frac{\partial\mathcal{F}}{\partial\beta}.</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.3612em;vertical-align:-0.4811em"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8801em"><span style="top:-2.655em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight" style="margin-right:0.0556em">∂</span><span class="mord mathnormal mtight" style="margin-right:0.0528em">β</span></span></span></span><span style="top:-3.23em"><span class="pstrut" style="height:3em"></span><span class="frac-line" style="border-bottom-width:0.04em"></span></span><span style="top:-3.394em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight" style="margin-right:0.0556em">∂</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.4811em"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mopen"><span class="delimsizing size1">(</span></span><span class="mord mathnormal" style="margin-right:0.0528em">β</span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mspace" style="margin-right:0.2222em"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em"></span></span><span class="base"><span class="strut" style="height:1.2em;vertical-align:-0.35em"></span><span class="mord mathcal" style="margin-right:0.0993em">F</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.0528em">β</span><span class="mclose">)</span><span class="mclose"><span class="delimsizing size1">)</span></span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:0.6444em"></span><span class="mord">0</span><span class="mspace" style="margin-right:1em"></span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:1em"></span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1.3612em;vertical-align:-0.4811em"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8801em"><span style="top:-2.655em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight" style="margin-right:0.0556em">∂</span><span class="mord mathnormal mtight" style="margin-right:0.0528em">β</span></span></span></span><span style="top:-3.23em"><span class="pstrut" style="height:3em"></span><span class="frac-line" style="border-bottom-width:0.04em"></span></span><span style="top:-3.394em"><span class="pstrut" style="height:3em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight" style="margin-right:0.0556em">∂</span><span class="mord mathcal mtight" style="margin-right:0.0993em">F</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.4811em"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mord">.</span></span></span></span></p>
<p>Using the maximum of the exponential term then gives</p>
<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>W</mi><mo stretchy="false">(</mo><mi>U</mi><mo stretchy="false">)</mo><mo>≈</mo><mi>exp</mi><mo>⁡</mo><mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em">[</mo><mi>β</mi><mi>U</mi><mo>−</mo><mi mathvariant="script">F</mi><mo stretchy="false">(</mo><mi>β</mi><mo stretchy="false">)</mo><mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em">]</mo><msub><mo fence="false" stretchy="true" minsize="1.2em" maxsize="1.2em">∣</mo><mrow><mi>β</mi><mo>=</mo><mi>β</mi><mo stretchy="false">(</mo><mi>U</mi><mo stretchy="false">)</mo></mrow></msub><mo separator="true">,</mo></mrow><annotation encoding="application/x-tex">W(U) \approx \exp\bigl[\beta U - \mathcal{F}(\beta)\bigr]\big|_{\beta=\beta(U)},</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathnormal" style="margin-right:0.1389em">W</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">≈</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:1.2em;vertical-align:-0.35em"></span><span class="mop">exp</span><span class="mopen"><span class="delimsizing size1">[</span></span><span class="mord mathnormal" style="margin-right:0.0528em">β</span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mspace" style="margin-right:0.2222em"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em"></span></span><span class="base"><span class="strut" style="height:1.4247em;vertical-align:-0.5747em"></span><span class="mord mathcal" style="margin-right:0.0993em">F</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.0528em">β</span><span class="mclose">)</span><span class="mclose"><span class="delimsizing size1">]</span></span><span class="mord"><span class="mord"><span class="delimsizing mult"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.85em"><span style="top:-2.85em"><span class="pstrut" style="height:3.2em"></span><span style="width:0.333em;height:1.2em"><svg xmlns="http://www.w3.org/2000/svg" width="0.333em" height="1.2em" viewBox="0 0 333 1200"><path d="M145 15 v585 v0 v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v0 v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v0 v585 h43z"></path></svg></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.35em"><span></span></span></span></span></span></span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1253em"><span style="top:-2.3003em;margin-right:0.05em"><span class="pstrut" style="height:2.7em"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight" style="margin-right:0.0528em">β</span><span class="mrel mtight">=</span><span class="mord mathnormal mtight" style="margin-right:0.0528em">β</span><span class="mopen mtight">(</span><span class="mord mathnormal mtight" style="margin-right:0.109em">U</span><span class="mclose mtight">)</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.5747em"><span></span></span></span></span></span></span><span class="mpunct">,</span></span></span></span></p>
<p>and taking the logarithm, with entropy defined as <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="script">S</mi><mo>=</mo><mi>ln</mi><mo>⁡</mo><mi>W</mi></mrow><annotation encoding="application/x-tex">\mathcal{S}=\ln W</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathcal" style="margin-right:0.075em">S</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:0.6944em"></span><span class="mop">ln</span><span class="mspace" style="margin-right:0.1667em"></span><span class="mord mathnormal" style="margin-right:0.1389em">W</span></span></span></span>, yields</p>
<p><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="script">F</mi><mo stretchy="false">(</mo><mi>β</mi><mo stretchy="false">)</mo><mo>=</mo><mi>β</mi><mi>U</mi><mo>−</mo><mi mathvariant="script">S</mi><mi mathvariant="normal">.</mi></mrow><annotation encoding="application/x-tex">\mathcal{F}(\beta) = \beta U - \mathcal{S}.</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em"></span><span class="mord mathcal" style="margin-right:0.0993em">F</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.0528em">β</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em"></span><span class="mord mathnormal" style="margin-right:0.0528em">β</span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mspace" style="margin-right:0.2222em"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em"></span></span><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathcal" style="margin-right:0.075em">S</span><span class="mord">.</span></span></span></span></p>
<p>This returns to the classical relationship <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>F</mi><mo>=</mo><mi>U</mi><mo>−</mo><mi>T</mi><mi>S</mi></mrow><annotation encoding="application/x-tex">F = U - T S</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.1389em">F</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:0.7667em;vertical-align:-0.0833em"></span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mspace" style="margin-right:0.2222em"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em"></span></span><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.1389em">T</span><span class="mord mathnormal" style="margin-right:0.0576em">S</span></span></span></span>, remembering that <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="script">F</mi><mo>=</mo><mi>β</mi><mi>F</mi></mrow><annotation encoding="application/x-tex">\mathcal{F}=\beta F</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathcal" style="margin-right:0.0993em">F</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em"></span><span class="mord mathnormal" style="margin-right:0.0528em">β</span><span class="mord mathnormal" style="margin-right:0.1389em">F</span></span></span></span>. In summary, the Laplace and partition-function perspective connects energy-fixed, or microcanonical, descriptions with temperature-fixed, or canonical, descriptions. For a large system, the saddle-point approximation makes the two representations dually related like a Legendre transform.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: Laplace transform</div><div class="admonitionContent_BuS1"><p>Simple definition: An operation that converts a function, such as an energy distribution, into a representation in another variable, such as inverse temperature, using an exponentially weighted sum or integral.
Everyday example: It resembles converting a signal from the time domain to the frequency domain, in a context similar to a Fourier transform. It reveals the same kind of information from another perspective.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: Partition function</div><div class="admonitionContent_BuS1"><p>Simple definition: The weighted sum—strictly, an exponentially weighted integral—of every state a system can occupy at a given inverse temperature <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>β</mi></mrow><annotation encoding="application/x-tex">\beta</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em"></span><span class="mord mathnormal" style="margin-right:0.0528em">β</span></span></span></span>. It is a central tool for computing temperature-dependent macroscopic quantities.
Everyday example: Imagine weighting the probability of ordering each restaurant menu item by its price, or energy, and summing the values to describe the overall ordering pattern. The partition function is that sum.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: Helmholtz free energy</div><div class="admonitionContent_BuS1"><p>Simple definition: A measure of the energy available for work at a fixed temperature, commonly defined as <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>F</mi><mo>=</mo><mi>U</mi><mo>−</mo><mi>T</mi><mi>S</mi></mrow><annotation encoding="application/x-tex">F = U - T S</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.1389em">F</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:0.7667em;vertical-align:-0.0833em"></span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mspace" style="margin-right:0.2222em"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em"></span></span><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.1389em">T</span><span class="mord mathnormal" style="margin-right:0.0576em">S</span></span></span></span>.
Everyday example: It resembles subtracting required expenses—the disorder cost represented by entropy—from a budget, or total assets, to find the money actually available to spend.</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="4-summary-and-practical-implications">4. Summary and practical implications<a href="https://ql.gl/en/blog/3551c399/#4-summary-and-practical-implications" class="hash-link" aria-label="Direct link to 4. Summary and practical implications" title="Direct link to 4. Summary and practical implications" translate="no">​</a></h2>
<ul>
<li class="">The Legendre transform is the standard tool when we want to "change the perspective of a variable without losing information." Geometrically, it can be understood as taking the tangent intercept of the original function.</li>
<li class="">The controlled variable matters in real physical problems, such as force versus position or temperature versus energy. Choosing the appropriate dual representation simplifies analysis and calculation. The harmonic-potential example demonstrates this clearly: When force is the natural control variable, the Legendre transform of the potential is more convenient.</li>
<li class="">In statistical thermodynamics, the Laplace transform, through the partition function, connects the density of microstates with a temperature-based representation. For a large system, the saddle-point approximation produces the familiar relationship between free energy and entropy, <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>F</mi><mo>=</mo><mi>U</mi><mo>−</mo><mi>T</mi><mi>S</mi></mrow><annotation encoding="application/x-tex">F=U-TS</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.1389em">F</span><span class="mspace" style="margin-right:0.2778em"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em"></span></span><span class="base"><span class="strut" style="height:0.7667em;vertical-align:-0.0833em"></span><span class="mord mathnormal" style="margin-right:0.109em">U</span><span class="mspace" style="margin-right:0.2222em"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em"></span></span><span class="base"><span class="strut" style="height:0.6833em"></span><span class="mord mathnormal" style="margin-right:0.1389em">T</span><span class="mord mathnormal" style="margin-right:0.0576em">S</span></span></span></span>. The connection is functionally similar to the Legendre transform: It describes the same physical information from the perspective of different variables.</li>
</ul>
<p>Note: This post is based on the statphys Dokuwiki page "Mathematics: Legendre Transform," revised February 6, 2026, its examples, and the 2009 paper by R. K. P. Zia et al. cited there. The source is an educational summary; consult that literature and relevant textbooks for rigorous proof details. In particular, the summary on that page may not cover every rigorous condition related to the Bromwich integral and saddle-point approximation, so readers should verify them against the original and additional literature.</p>
<p>References:</p>
<ul>
<li class="">R. K. P. Zia, Edward F. Redish, and Susan R. McKay, "Making Sense of the Legendre Transform," Am. J. Phys. 77, 614 (2009), arXiv:0806.1147.</li>
<li class="">statphys Dokuwiki: Mathematics: Legendre Transform (source page)</li>
</ul>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/3551c399/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://statphys.pknu.ac.kr/dokuwiki/doku.php?id=%EC%88%98%ED%95%99%3A%EB%A5%B4%EC%9E%A5%EB%93%9C%EB%A5%B4_%EB%B3%80%ED%99%98" target="_blank" rel="noopener noreferrer" class="">Mathematics: Legendre Transform (statphys Dokuwiki)</a> — license: <code>CC Attribution-Noncommercial-Share Alike 4.0 International</code>, retrieved: <code>2026-07-10</code>.</li>
<li class="">Image: <a href="https://ql.gl/en/assets/files/cover-1ef0e95548d417e01a7aa73ac013c8cf.webp/" target="_blank" class="">AI-generated cover image via OpenRouter</a> — license: <code>ai-generated-original</code>.</li>
</ul>]]></content:encoded>
            <category>Research</category>
            <category>Explainer</category>
            <category>AI</category>
        </item>
        <item>
            <title><![CDATA[Mathematics for Computer Science (MCS) — Structure and Core Concepts]]></title>
            <link>https://ql.gl/en/blog/0667fd2f/</link>
            <guid>https://ql.gl/en/blog/0667fd2f/</guid>
            <pubDate>Tue, 07 Jul 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[An analysis of the purpose, core concepts such as proof methods, axioms, and induction, organization, and logical progression of MIT's Mathematics for Computer Science course notes (Lehman, Leighton, Meyer, 2018). It summarizes the table of contents and excerpts in the evidence pack while stating uncertainties.]]></description>
            <content:encoded><![CDATA[
<p><img decoding="async" loading="lazy" src="https://ql.gl/en/assets/images/cover-f23e4fe9b239649776aff5dfe9308045.webp" width="1200" height="670" class="img_ev3q"></p>
<p>This article presents a technical and academic overview of the purpose and core concepts of MIT's <em>Mathematics for Computer Science</em> course notes (Lehman, Leighton, Meyer, 2018), based on an evidence pack excerpted from the public PDF. The analysis relies on the provided table of contents and major excerpts—the preface, part of Chapter 1, and the broader table of contents—and explicitly marks as uncertain any details that could not be checked against the complete source.</p>
<p>Summary: the text aims to analyze computer-science problems using mathematical models and proof methods, as stated in the source: "This text explains how to use mathematical models and methods to analyze problems that arise in computer science." It progresses systematically through foundational techniques such as proofs, induction, and the axiomatic method. The table of contents is broadly organized into I. Proofs, II. Structures, III. Counting, IV. Probability, and V. Recurrences, showing a flow from foundations through structures and constructions to applications in probability and recurrence.</p>
<p>Key supporting quotations from the excerpts: the supplied preface and table of contents include statements such as "Proofs play a central role." Part I introduces proof techniques including the Well Ordering Principle and induction, while Part IV presents practical techniques such as The Four-Step Method for probability.</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: proof</div><div class="admonitionContent_BuS1"><p>Plain definition: a sequence of logical steps showing that a mathematical proposition is true.
Everyday example: it resembles using the supporting clauses in a contract one by one to explain the parties' agreement and reach a conclusion.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: axiom</div><div class="admonitionContent_BuS1"><p>Plain definition: a basic premise or principle accepted without further proof, on top of which other propositions are proved.
Everyday example: it is like accepting from the outset that "a die has six faces" when defining the rules of a game.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: induction</div><div class="admonitionContent_BuS1"><p>Plain definition: a method for proving a statement across a repeated structure such as the natural numbers by showing a base case and then showing that if any step holds, the next step also holds.
Everyday example: to explain how to climb a staircase, if you can climb the first stair and can climb the next stair whenever you can climb any given stair, you can conclude that you can climb every stair.</p></div></div>
<p>Main observations based on the provided evidence:</p>
<ul>
<li class="">
<p>Purpose and scope: judging from the preface and the table of contents, the goal is to formalize propositions commonly encountered in computer science and enable proof techniques to be applied to practical work such as program and system verification. The excerpts state "Proofs play a central role" and refer to using mathematical models and methods to analyze problems arising in computer science.</p>
</li>
<li class="">
<p>Systematic progression: the excerpted table of contents moves from proof and logic in Part I (Chapters 1–8), through structures such as number theory and graphs in Part II (Chapters 9–13), to counting in Part III, probability in Part IV (Chapters 17–21), and recurrences in Part V. The progression from foundational theory to data types and structures, then to computation, probability, and recurrence, is clear.</p>
</li>
<li class="">
<p>Theory and practice together: excerpts from the preface and Chapter 1 emphasize theoretical rigor through axioms and proofs alongside practical applications such as program and hardware verification, including an example involving CPU-chip verification. This suggests that the work is not simply a mathematics textbook but course notes aimed at computer-science applications.</p>
</li>
</ul>
<p>Uncertainty: the supplied evidence contains only parts of the much larger PDF—the preface, Chapter 1, and portions of the table of contents. The evidence pack may therefore omit the precise placement of detailed proofs, examples, exercises, or details from the latest revision.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="analysis-of-the-document-structure">Analysis of the Document Structure<a href="https://ql.gl/en/blog/0667fd2f/#analysis-of-the-document-structure" class="hash-link" aria-label="Direct link to Analysis of the Document Structure" title="Direct link to Analysis of the Document Structure" translate="no">​</a></h2>
<ul>
<li class="">
<p>IMRaD classification: this document does not follow the standard research-paper structure of Introduction, Methods, Results, and Discussion. According to the detected structure, sections resembling an Introduction and Methods—proof techniques and mathematical methods—clearly exist, and some applied examples or resulting theorems can partly be viewed as Results. However, no separate synthesis, comparison, or limitations section corresponding to Discussion was detected in the evidence pack. The overall structure instead follows textbook-specific parts: Proofs, Structures, Counting, Probability, and Recurrences. In summary: Introduction—present; Methods—present across many chapters as proof techniques; Results—partial through applications and examples; Discussion—no clear standalone section.</p>
</li>
<li class="">
<p>Logical flow from the big picture to details: the text is organized from establishing foundational concepts, through introducing techniques, to applications and specialized subjects. Chapter 1 introduces proof, axioms, and propositions, followed by reasoning tools and techniques in Chapter 2 on well ordering and Chapter 5 on induction. Chapters 3 and 4 then build on them with formulas of logic and mathematical data types. Part II covers fundamental structures such as number theory and graphs, while Parts III–V expand into applications in counting, probability, and recurrences. Each chapter assumes definitions and techniques introduced earlier and progressively increases complexity, helping learners systematically develop problem-solving ability. The excerpted chapter order—proof methods, mathematical data types, induction and state machines, recursive data types, infinite sets, number theory and graphs, counting, probability, and recurrences—is evidence of this progressive design.</p>
</li>
</ul>
<p>Finally, because this is closer to course notes or a textbook than a research paper, it is reasonable for readers to interpret its educational logic as connecting two axes: learning methodology through proof techniques and applying them to verification and algorithm analysis.</p>
<p>Sources</p>
<ul>
<li class="">Original: Eric Lehman, F. Thomson Leighton, Albert R. Meyer, <em>Mathematics for Computer Science</em>, revised 2018. Public PDF: <a href="https://courses.csail.mit.edu/6.042/spring18/mcs.pdf" target="_blank" rel="noopener noreferrer" class="">https://courses.csail.mit.edu/6.042/spring18/mcs.pdf</a> (Creative Commons Attribution-ShareAlike 3.0). This post summarizes and analyzes the supplied evidence pack—the table of contents and excerpts—and may contain detailed discrepancies from the complete source.</li>
</ul>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/0667fd2f/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://courses.csail.mit.edu/6.042/spring18/mcs.pdf" target="_blank" rel="noopener noreferrer" class="">Mathematics for Computer Science — MIT course notes (Eric Lehman, Tom Leighton, Albert R. Meyer, 2018)</a> — license: <code>CreativeCommons-Attribution-ShareAlike-3.0</code>, retrieved: <code>2026-07-07</code>.</li>
<li class="">Image: <a href="https://ql.gl/en/assets/files/cover-f23e4fe9b239649776aff5dfe9308045.webp/" target="_blank" class="">AI-generated cover image via OpenRouter</a> — license: <code>ai-generated-original</code>.</li>
</ul>]]></content:encoded>
            <category>Research</category>
            <category>TIL</category>
            <category>AI</category>
            <category>Explainer</category>
        </item>
        <item>
            <title><![CDATA[Textbooks Are All You Need — Improving Small Code LLMs with High-Quality Textbook Data]]></title>
            <link>https://ql.gl/en/blog/a3babb9c/</link>
            <guid>https://ql.gl/en/blog/a3babb9c/</guid>
            <pubDate>Tue, 07 Jul 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[A summary and analysis of Microsoft Research's Textbooks Are All You Need. It examines how the 1.3B-parameter code LLM phi-1 substantially improved HumanEval and MBPP performance through textbook-quality data and a small synthetic exercise dataset, along with the method's limitations.]]></description>
            <content:encoded><![CDATA[<p><img decoding="async" loading="lazy" src="https://ql.gl/en/assets/images/cover-e4993ec4e96756fd97e311571d816738.webp" width="1200" height="670" class="img_ev3q"></p>
<p>Microsoft Research's <em>Textbooks Are All You Need</em> focuses on phi-1, a small 1.3B-parameter LLM specialized for code, and experimentally shows that curated textbook-quality data and a small synthetic exercise dataset can achieve strong code-generation performance without scaling models and data to enormous sizes. The central reported results, based on the paper's abstract and main-text summary, are that phi-1 achieves 50.6% pass@1 on HumanEval and 55.5% on MBPP while using approximately 6B tokens of filtered web data, fewer than 1B tokens of synthetic textbook data, and approximately 180M tokens for finetuning.</p>
<!-- -->
<p>This post summarizes and analyzes the paper based on its abstract and major sections from the selected chunks and quotations. The authors note that the source does not disclose some details of synthetic-data generation, constraining reproducibility. The analysis below is therefore explicitly an interpretation based on the supplied evidence pack and detected structure.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="main-points">Main Points<a href="https://ql.gl/en/blog/a3babb9c/#main-points" class="hash-link" aria-label="Direct link to Main Points" title="Direct link to Main Points" translate="no">​</a></h2>
<ul>
<li class="">Goal: improve code-generation performance through high-quality data selection and a small synthetic exercise dataset without greatly increasing model or compute scale.</li>
<li class="">Data composition: a pipeline consisting of roughly 6B tokens from a filtered code-language corpus, including filtered portions of The Stack and Stack Overflow; fewer than 1B tokens of textbook-style text synthesized with GPT-3.5; and approximately 180M tokens of synthetic CodeExercises.</li>
<li class="">Results: phi-1—1.3B parameters and exposure to approximately 50B tokens—reports 50.6% pass@1 on HumanEval and 55.5% on MBPP. The pretrained-only phi-1-base also achieved 29%, while the 350M-parameter phi-1-small reported approximately 45%, emphasizing the influence of data quality.</li>
<li class="">Methodological characteristics: the model architecture is relatively standard, using a decoder-only Transformer, FlashAttention, and related techniques. The authors attribute the principal performance gains to the combination of data selection and synthetic textbooks and exercises.</li>
</ul>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: HumanEval</div><div class="admonitionContent_BuS1"><p>Plain definition: HumanEval is a benchmark of Python programming problems based on function descriptions, or docstrings, used to evaluate an LLM's code-generation ability.
Everyday example: it resembles a coding test in which you receive a function description and must complete the function.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: pass@1</div><div class="admonitionContent_BuS1"><p>Plain definition: a metric measuring the probability that a model generates a correct, passing answer on its first attempt.
Everyday example: it can be viewed as the pass rate for solving a coding test with a single submission.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: scaling laws</div><div class="admonitionContent_BuS1"><p>Plain definition: empirically observed relationships describing how model performance improves as resources such as parameter count, data volume, and computation increase.
Everyday example: it resembles the tendency for scores to improve as study time increases, though not at a constant rate.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: finetuning</div><div class="admonitionContent_BuS1"><p>Plain definition: additional training of a pretrained model on a small dataset tailored to a specific purpose, such as a type of problem, to improve performance.
Everyday example: it resembles preparing someone with general English skills for an interview through targeted mock interviews.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: emergent properties</div><div class="admonitionContent_BuS1"><p>Plain definition: new abilities or characteristics that suddenly appear after a change in model scale or training procedure but were not visible before.
Everyday example: it resembles a friend suddenly seeming to understand a particular field far better than before.</p></div></div>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="data-design-and-experimental-evidence">Data Design and Experimental Evidence<a href="https://ql.gl/en/blog/a3babb9c/#data-design-and-experimental-evidence" class="hash-link" aria-label="Direct link to Data Design and Experimental Evidence" title="Direct link to Data Design and Experimental Evidence" translate="no">​</a></h2>
<p>The paper's central claim is that "improving data to textbook quality can produce high performance with much smaller models and fewer tokens." The supporting elements are as follows.</p>
<ul>
<li class="">Filtering: GPT-4 annotated 100k samples to select samples with high educational value from large code corpora such as The Stack. A random-forest classifier based on code embeddings was then trained to filter the larger sample collection, according to Chunk 3.</li>
<li class="">Synthetic textbooks: GPT-3.5 generated fewer than 1B tokens of Python textbook material with examples and explanations. Topic and audience constraints were used to encourage reasoning and algorithmic thinking, according to Chunk 5.</li>
<li class="">Synthetic exercise data: finetuning on approximately 180M tokens of exercises in a docstring-completion format produced a substantial observed improvement on HumanEval, according to Chunks 2, 5, and 6.</li>
</ul>
<p>The source presents experimental evidence that filtering itself is necessary—for example, filtered data achieved higher HumanEval performance at the same number of training steps—and reports competitive performance with a small model and fewer tokens, quoting figures in Chunk 4. However, it explicitly states that some details of synthetic-data generation were not disclosed: "we omit some details of the synthetic data generation, for proprietary reasons." This limits reproducibility.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="implementation-details-architecture-and-training">Implementation Details: Architecture and Training<a href="https://ql.gl/en/blog/a3babb9c/#implementation-details-architecture-and-training" class="hash-link" aria-label="Direct link to Implementation Details: Architecture and Training" title="Direct link to Implementation Details: Architecture and Training" translate="no">​</a></h2>
<ul>
<li class="">Architecture: a decoder-only Transformer with standard techniques including FlashAttention, parallel MHA and MLP blocks, and rotary position embeddings, according to Chunk 6.</li>
<li class="">Training: sequence length 2048, fp16, AdamW, and linear-warmup-linear-decay. Phi-1-base achieved 29% on HumanEval after approximately 36k steps, corresponding to exposure to around 50B tokens, and subsequent finetuning on CodeExercises raised the final result above 50%, according to Chunk 6.</li>
</ul>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="limitations-and-uncertainty">Limitations and Uncertainty<a href="https://ql.gl/en/blog/a3babb9c/#limitations-and-uncertainty" class="hash-link" aria-label="Direct link to Limitations and Uncertainty" title="Direct link to Limitations and Uncertainty" translate="no">​</a></h2>
<ul>
<li class="">Sensitive details of synthetic data, including prompts and some filtering criteria, were not disclosed, making complete reproduction difficult. The paper itself acknowledges this.</li>
<li class="">The paper focuses on the narrow task of code generation, primarily short Python functions. Generalization to natural-language understanding or more complex software-engineering tasks requires further validation.</li>
<li class="">A separate section discusses possible contamination of downstream benchmarks such as HumanEval, but the supplied evidence pack contains only some results from that analysis. A complete judgment requires checking the full source, which states, "we study possible contamination ..."</li>
</ul>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="analysis-of-the-paper-structure">Analysis of the Paper Structure<a href="https://ql.gl/en/blog/a3babb9c/#analysis-of-the-paper-structure" class="hash-link" aria-label="Direct link to Analysis of the Paper Structure" title="Direct link to Analysis of the Paper Structure" translate="no">​</a></h2>
<ul>
<li class="">
<p>IMRaD classification: according to the detected headings and supplied chunks, the paper has the main elements of IMRaD but does not completely follow it:</p>
<ul>
<li class="">Introduction: present in Section 1, presenting the problem and motivation around data quality and scaling laws.</li>
<li class="">Methods or Materials and Methods: present in Section 2, "Training details and the importance of high-quality data," which describes data selection, synthetic-data generation, model architecture, and training settings.</li>
<li class="">Results: present in Section 3 on emergent properties and in Figure 2.1 and performance tables, reporting HumanEval and MBPP performance and the effects of filtering and finetuning.</li>
<li class="">Discussion: no explicit Discussion heading was detected. Some discussion of alternative benchmarks, contamination checks, and related issues is distributed across Sections 4 and 5. The paper therefore partially follows IMRaD, but a complete standalone Discussion block is either absent or mixed with results.</li>
</ul>
</li>
<li class="">
<p>Logical flow from big picture to detail: the paper forms a coherent problem-gap-contribution structure:</p>
<ol>
<li class="">Big picture in the Introduction: it presents the convention of improving performance through Transformers and scaling laws, then offers data quality as an alternative axis to establish the research motivation, based on the quotation in Chunk 1.</li>
<li class="">Methods: it diagnoses why existing code datasets are educationally weak, including non-self-contained snippets and boilerplate, then presents the filtering process and the design of synthetic textbooks and exercises, including dataset composition and methods for encouraging diversity, based on Chunks 3–5.</li>
<li class="">Results: it uses figures and tables to show how curated data and small-scale finetuning substantially improved HumanEval and MBPP performance, based on Chunk 2 and Figure 2.1.</li>
<li class="">Subsequent discussion and validation in Sections 4–5: it addresses alternative benchmarks, contamination, and the disclosure boundary around synthetic data, presenting limitations and future directions through the cited evidence.</li>
</ol>
<p>This structure flows naturally from problem statement, through a data-centric solution and experimental evidence, to limitations and further validation. Each section progressively tests the hypothesis introduced earlier: that data quality changes performance. The detected structure also shows that Discussion is not clearly separated into its own section and is partly mixed with results.</p>
</li>
</ul>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="practical-implications">Practical Implications<a href="https://ql.gl/en/blog/a3babb9c/#practical-implications" class="hash-link" aria-label="Direct link to Practical Implications" title="Direct link to Practical Implications" translate="no">​</a></h2>
<ul>
<li class="">Prioritize data engineering: when building a code LLM, data-selection and synthesis strategies can substantially reduce model and compute budgets while still producing a large effect.</li>
<li class="">Small models can achieve practical performance: with appropriately designed data and finetuning, a 1.3B-class model can achieve competitive performance on widely used benchmarks.</li>
<li class="">Mind reproducibility: undisclosed elements of synthetic-data generation and possible contamination are risks that must be checked and addressed in practical adoption.</li>
</ul>
<p>Sources</p>
<ul>
<li class="">Original: Suriya Gunasekar et al., <em>Textbooks Are All You Need</em>, Microsoft Research (arXiv preprint). PDF: <a href="https://arxiv.org/pdf/2306.11644" target="_blank" rel="noopener noreferrer" class="">https://arxiv.org/pdf/2306.11644</a></li>
</ul>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/a3babb9c/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://arxiv.org/pdf/2306.11644" target="_blank" rel="noopener noreferrer" class="">Textbooks Are All You Need</a> — license: <code>unknown</code>, retrieved: <code>2026-07-07</code>.</li>
<li class="">Image: <a href="https://ql.gl/en/assets/files/cover-e4993ec4e96756fd97e311571d816738.webp/" target="_blank" class="">AI-generated cover image via OpenRouter</a> — license: <code>ai-generated-original</code>.</li>
</ul>]]></content:encoded>
            <category>Research</category>
            <category>LLM</category>
            <category>AI</category>
            <category>Explainer</category>
        </item>
        <item>
            <title><![CDATA[AgentsCAD: Automated Design for Manufacturing of FDM Parts — Multi-Agent LLM Reasoning and Geometric Feature Recognition]]></title>
            <link>https://ql.gl/en/blog/01427437/</link>
            <guid>https://ql.gl/en/blog/01427437/</guid>
            <pubDate>Mon, 06 Jul 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[A technical review of AgentsCAD: research that automates design-for-manufacturing (DFAM) modifications for FDM by combining STEP B-Rep parsing, overhang detection, GraphSAGE-based semantic label injection, multi-agent LLM reasoning with Claude Sonnet, and GPT-4o visual verification. It also states the uncertainty where evidence is limited.]]></description>
            <content:encoded><![CDATA[<p><img decoding="async" loading="lazy" src="https://ql.gl/en/assets/images/cover-c66011d47ed25a8a8fa13763654cd328.webp" width="1200" height="675" class="img_ev3q"></p>
<p>AgentsCAD proposes a pipeline that combines geometric feature recognition with multi-agent LLM reasoning agents to automatically diagnose design-for-manufacturing (DFAM) requirements for Fused Deposition Modeling (FDM) parts and generate modification recommendations. Based on the arXiv abstract and public metadata, this post provides a technical summary of the system architecture, core techniques, and the birdhouse example described in the paper, while clearly marking details that cannot be verified from the available evidence.</p>
<!-- -->
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="summary--core-components-reported-in-the-paper">Summary — Core Components Reported in the Paper<a href="https://ql.gl/en/blog/01427437/#summary--core-components-reported-in-the-paper" class="hash-link" aria-label="Direct link to Summary — Core Components Reported in the Paper" title="Direct link to Summary — Core Components Reported in the Paper" translate="no">​</a></h2>
<p>The AgentsCAD pipeline, summarized from the abstract, consists of the following stages:</p>
<ul>
<li class="">Input: parse a B-Rep (boundary representation) model from a STEP file.</li>
<li class="">Defect detection: detect overhangs of 45° or greater.</li>
<li class="">Topology construction: build a face-adjacency topology graph.</li>
<li class="">Optional semantic label injection: annotate the graph with semantic geometric features predicted by a GraphSAGE model trained on MFCAD++ (approximately 59,665 parts).</li>
<li class="">Design reasoning: a design-reasoning agent based on Claude Sonnet generates modification recommendations such as reorientation, fillets, and chamfers.</li>
<li class="">Verification: a GPT-4o vision-language verifier inspects rendered views to confirm geometric integrity.</li>
<li class="">Output: a modified STEP file and a human-readable report.</li>
</ul>
<p>According to the abstract, in a test on a birdhouse model the system was partially successful at diagnosing overhangs, selecting defect-mitigation strategies, and proposing physically plausible modifications.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="technical-commentary">Technical Commentary<a href="https://ql.gl/en/blog/01427437/#technical-commentary" class="hash-link" aria-label="Direct link to Technical Commentary" title="Direct link to Technical Commentary" translate="no">​</a></h2>
<ol>
<li class="">Input data and representation</li>
</ol>
<ul>
<li class="">STEP / B-Rep: the paper states that it parses STEP files and uses B-Rep (boundary representation) information. Because B-Rep directly represents faces, boundaries, and vertices, it is better suited than a simple mesh to continuous geometric operations such as fillet computation and face-adjacency inspection.</li>
</ul>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: B-Rep</div><div class="admonitionContent_BuS1"><p>Plain definition: a CAD representation that describes an object's surface in terms of faces, edges, and vertices.
Everyday example: it is like defining every face and edge separately when folding a paper model into the shape of a house.</p></div></div>
<ol start="2">
<li class="">Overhang detection and physical constraints</li>
</ol>
<ul>
<li class="">AgentsCAD diagnoses overhangs using a 45° threshold, as stated in the abstract. This is related to the need for support structures in FDM printing.</li>
<li class="">The abstract reports that the system <em>proposes</em> suitable mitigation strategies such as reorientation, fillets, and chamfers. It does not, however, provide quantitative evidence that every proposed modification was validated against printer-specific process variables such as material, temperature, and geometric tolerances. Physical print tests and parameter tuning are therefore required before use in the field.</li>
</ul>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: Overhang</div><div class="admonitionContent_BuS1"><p>Plain definition: geometry in which a new layer extends beyond a certain angle without support from the layer below during printing.
Everyday example: it resembles leaving a plate hanging halfway off a table, with nothing supporting the exposed underside.</p></div></div>
<ol start="3">
<li class="">Graph-based geometric topology and GraphSAGE</li>
</ol>
<ul>
<li class="">AgentsCAD constructs a face-adjacency graph and uses its topology. This graph structure serves as a useful intermediate representation when combining geometric relationships—such as which faces touch—with an LLM.</li>
<li class="">The abstract states that GraphSAGE is trained on the MFCAD++ dataset of 59,665 parts and injects semantic feature labels. This appears intended to supplement semantic information that traditional geometric algorithms have difficulty capturing.</li>
</ul>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: GraphSAGE</div><div class="admonitionContent_BuS1"><p>Plain definition: a method for learning graph-node embeddings by sampling and aggregating the features of neighboring nodes to construct each node's representation.
Everyday example: it is like predicting a friend's food preferences by consulting a sample of their friends' tastes and aggregating that neighboring information.</p></div></div>
<ol start="4">
<li class="">Multi-agent LLM reasoning and the verification loop</li>
</ol>
<ul>
<li class="">The main differentiator is the use of a multi-agent LLM system to translate between geometry and language. The abstract reports using Claude Sonnet as the design-reasoning agent and GPT-4o as the vision-language verifier.</li>
<li class="">This combination forms a loop that (1) describes structural defects in language, (2) converts language instructions back into geometric modification proposals, and (3) uses rendering-based inspection to verify the integrity of the modifications.</li>
</ul>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: LLM (Large Language Model)</div><div class="admonitionContent_BuS1"><p>Plain definition: a neural-network model trained on large volumes of text to generate and understand language.
Everyday example: think of it as a highly automated writing assistant that has read many books and documents and can produce human-like sentences.</p></div></div>
<ol start="5">
<li class="">Outputs and human-readable reports</li>
</ol>
<ul>
<li class="">The abstract states that the system outputs a modified STEP file and a human-readable report. This is a practical arrangement that combines automation with the ability for a designer to review the result and make manual adjustments.</li>
</ul>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="application-and-validation-scope--an-evidence-based-interpretation">Application and Validation Scope — An Evidence-Based Interpretation<a href="https://ql.gl/en/blog/01427437/#application-and-validation-scope--an-evidence-based-interpretation" class="hash-link" aria-label="Direct link to Application and Validation Scope — An Evidence-Based Interpretation" title="Direct link to Application and Validation Scope — An Evidence-Based Interpretation" translate="no">​</a></h2>
<p>The abstract briefly reports results from testing on a birdhouse model. Specifically, it says that "the system accurately diagnosed overhangs, selected suitable mitigation strategies, and proposed physically plausible modifications." The following uncertainties remain:</p>
<ul>
<li class="">The abstract does not include quantitative performance metrics such as accuracy or false-positive and false-negative rates, actual print success rates, or improvement in mechanical strength after modification.</li>
<li class="">The available metadata does not reveal details of GraphSAGE training such as hyperparameters, accuracy, and validation splits, nor implementation details of the LLM agents' prompting or chain of steps.</li>
</ul>
<p>This post is therefore a summary and analysis based on the paper's abstract and page metadata. Reproducing the implementation or applying it in production requires consulting the full paper and any code or data released by the authors.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="practical-implications-and-limitations">Practical Implications and Limitations<a href="https://ql.gl/en/blog/01427437/#practical-implications-and-limitations" class="hash-link" aria-label="Direct link to Practical Implications and Limitations" title="Direct link to Practical Implications and Limitations" translate="no">​</a></h2>
<ul>
<li class="">Significance: AgentsCAD is a meaningful attempt to bridge the gap between design and manufacturing by combining CAD's structural representation, B-Rep, with an LLM's natural-language reasoning. Combining topology graphs with machine-learning-based semantic labels can give the LLM more accurate context for its recommendations.</li>
<li class="">Limitation: an abstract-level report is insufficient to assess experimental reproducibility, including parameters, data preprocessing, and rendering-pipeline configuration. Successful FDM output depends on many process parameters such as material, printer settings, and support strategy, so field experiments are essential.</li>
</ul>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="conclusion-and-recommended-resources">Conclusion and Recommended Resources<a href="https://ql.gl/en/blog/01427437/#conclusion-and-recommended-resources" class="hash-link" aria-label="Direct link to Conclusion and Recommended Resources" title="Direct link to Conclusion and Recommended Resources" translate="no">​</a></h2>
<p>AgentsCAD is an interesting approach to automating DFAM work by connecting geometric feature recognition with multi-agent LLMs. For deeper technical reproduction, I recommend the following:</p>
<ul>
<li class="">Review the full paper to verify the experimental procedure, hyperparameters, and dataset details; the abstract alone is insufficient.</li>
<li class="">If the authors have released code, models, or data, reproduce and validate the end-to-end pipeline on a simple case similar to the birdhouse.</li>
<li class="">To evaluate the effect of the proposed modifications on actual FDM output, perform physical inspection after printing, including dimensional accuracy, mechanical strength, and surface quality.</li>
</ul>
<p>Note: this post was written from the arXiv abstract and public metadata. Consult the original PDF and materials provided by the authors for the full text and implementation details.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/01427437/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://arxiv.org/abs/2607.02448v1" target="_blank" rel="noopener noreferrer" class="">AgentsCAD: Automated Design for Manufacturing of FDM Parts via Multi-Agent LLM Reasoning and Geometric Feature Recognition</a> — license: <code>CC BY 4.0</code>, retrieved: <code>2026-07-06</code>.</li>
<li class="">Image: <a href="https://ql.gl/en/assets/files/cover-c66011d47ed25a8a8fa13763654cd328.webp/" target="_blank" class="">AI-generated cover image via OpenRouter</a> — license: <code>ai-generated-original</code>.</li>
</ul>]]></content:encoded>
            <category>AI</category>
            <category>LLM</category>
            <category>Automation</category>
            <category>Research</category>
            <category>Explainer</category>
        </item>
        <item>
            <title><![CDATA[Best AI Agent Red Teaming Tools in 2026: Features, Limitations, and Adoption Considerations]]></title>
            <link>https://ql.gl/en/blog/edbc94f6/</link>
            <guid>https://ql.gl/en/blog/edbc94f6/</guid>
            <pubDate>Mon, 06 Jul 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[A comparison and evaluation framework for agentic AI red-teaming tools in 2026. It focuses on integrated security and quality, agent-native testing, vulnerability-response pipelines, and organizational process, while stating the scope and limitations of the source material.]]></description>
            <content:encoded><![CDATA[<p>Based on the provided article published on June 4, 2026, this post summarizes and analyzes nine major AI agent red-teaming tools and the key questions practitioners should consider. The material is organized around each product's strengths and limitations and four evaluation axes important to agentic AI testing: integrating security and quality, agent-native support, the vulnerability-response flow, and product versus process. The source describes each tool and its limitations, but some implementation details such as internal architecture, exact detection rates, and cost data are not included in the public evidence; those gaps are stated below.</p>
<!-- -->
<p><img decoding="async" loading="lazy" src="https://ql.gl/en/assets/images/cover-3d2fc5fa601fe75cb08c75a2a7043190.webp" width="1200" height="675" class="img_ev3q"></p>
<p>Key takeaways:</p>
<ul>
<li class="">Agentic AI creates vulnerabilities that single prompt-response model testing cannot expose. When selecting a tool, verify whether it targets models—single-turn—or agents with multiple turns, tool calls, and state management.</li>
<li class="">Treating security and quality issues, such as overly eager responses or excessive refusal, separately can produce conflicting operational decisions. Tools that evaluate both together are more practical.</li>
<li class="">Tools that only detect issues have very different long-term value from tools that support a flow from detection to prioritization, regression testing, and runtime guardrails.</li>
<li class="">The key differentiator is an organization's management and operational ability to embed a tool in its processes—including domain knowledge, task assignment, and CI/CD integration—rather than merely installing a product.</li>
</ul>
<p>Key preserved images and discussion from the source:</p>
<p><img decoding="async" loading="lazy" src="https://cdn.prod.website-files.com/601d6f7e527cf16fd11a1aae/6942c6ea461790c2e41ab56a_OWASP%20agentic%202026.png" alt="OWASP top 10 for agentic applications 2026" class="img_ev3q">
This image visualizes a prioritized risk list for agentic applications in 2026, the OWASP Top 10 for agents. Why it matters: agent-specific risks such as goal hijacking and tool misuse differ from single-turn model vulnerabilities, changing how tools must be evaluated.</p>
<p><img decoding="async" loading="lazy" src="https://cdn.prod.website-files.com/601d6f7e527cf16fd11a1aae/698dc291484bd14db95d5944_CoT%20Forgery.png" alt="CoT Forgery: The Chain-of-Thought vulnerability in LLM security" class="img_ev3q">
The Chain-of-Thought (CoT) forgery image illustrates an attack that exploits a model's internal reasoning. Why it matters: some evaluation pipelines use an LLM judge for meta-evaluation, where CoT vulnerabilities can reduce evaluation accuracy and make the design of meta-verification important.</p>
<p><img decoding="async" loading="lazy" src="https://cdn.prod.website-files.com/601d6f7e527cf16fd11a1aae/6a21cacf68089ad85d560efd_Top%209%20AI%20agents%20red%20teaming.png" alt="Best AI agent red teaming tools in 2026 to detect vulnerabilities" class="img_ev3q">
The source's comparison image of the top nine tools shows each product's positioning at a glance. Why it matters: it is a starting point for deciding which axes matter in tool selection, including agent-native support, CI/CD integration, guardrails, and open-source availability.</p>
<p>Caution: the source compares each tool's features, strengths, and limitations, but it does not provide every independent performance metric, such as detection and false-positive rates, or detailed real-world customer cases. This document is therefore a source-grounded summary and interpretation, and an internal PoC and reproduction test are recommended before adoption.</p>
<p>Core evaluation framework, summarized from the source</p>
<ol>
<li class="">
<p>Does it evaluate security and quality together?</p>
<ul>
<li class="">Beyond prompt-injection and extraction tests, it must detect quality issues such as hallucination, sycophancy, and over-refusal to reveal real-world trade-offs.</li>
</ul>
</li>
<li class="">
<p>Is it a model-level tool or an agentic tool?</p>
<ul>
<li class="">Agent testing requires "global evaluation" of tool calls, call arguments, and interaction history, as well as "global simulation" of multi-turn scenarios with mocked tool responses and system state. A single-turn model scanner misses much of the agent risk.</li>
</ul>
</li>
<li class="">
<p>Does it provide a post-detection pipeline?</p>
<ul>
<li class="">A flow from vulnerability to prioritized task, regression test, and runtime guardrail or patch enables actual improvement. A report-only tool makes continuous assurance difficult.</li>
</ul>
</li>
<li class="">
<p>Does it treat the tool as a product or a process?</p>
<ul>
<li class="">Tools are more effective when they incorporate domain knowledge, such as regulatory and business risks, into configuration and provide role-appropriate organizational workflows.</li>
</ul>
</li>
</ol>
<p>Tool summaries from the source</p>
<ul>
<li class="">Giskard: integrates security and quality, supports agent-native evaluation, and provides a vulnerability-to-task, regression, and guardrail pipeline. Its EU base in France offers a data-sovereignty consideration. The OSS version, however, omits some enterprise features.</li>
<li class="">Promptfoo: a developer-friendly tool centered on CI/CD. Its acquisition by OpenAI in 2025 raises concerns about neutrality. It is strong in CLI- and DevOps-oriented use cases.</li>
<li class="">NVIDIA Garak: a broad library of static probes at the model level, covering more than 120 categories. It is limited in agent and multi-turn simulation.</li>
<li class="">PyRIT from Microsoft: an Azure-friendly framework with strengths in attack-orchestration design, but limited agent-behavior mocking and collaboration features.</li>
<li class="">DeepTeam from Confident AI: integrates red teaming with runtime guardrails. Its Python API makes it suitable for engineering-led deployment.</li>
<li class="">Splx AI: provides a full cycle from red teaming through automated mitigation, including prompt hardening, to runtime guardrails. Its acquisition and integration history creates uncertainty around the product roadmap.</li>
<li class="">Mindgard, Lasso, and HiddenLayer: respectively strong in managed services, asset inventory and attack-surface mapping, and extension of an existing security stack. They are generally reported to be relatively weaker at quality testing such as hallucination detection.</li>
</ul>
<p>Practical checklist</p>
<ul>
<li class="">Agent or model: if your service performs tool calls, manages state, or has multi-turn interactions, verify agent-native support.</li>
<li class="">Integrated security and quality: prefer tools that compare and analyze both in the same scan to minimize user-experience degradation caused by false positives.</li>
<li class="">Vulnerability-handling flow: determine whether the output is only a report or connects to CI/CD regression, task creation, and runtime guardrails.</li>
<li class="">Organizational integration: verify that collaboration UI and workflows let domain experts create scenarios and set priorities.</li>
<li class="">Governance and sovereignty: when regulations require EU data residency or supply-chain controls, review the provider's legal and geographic location.</li>
</ul>
<p>Term explainers</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: Agentic AI</div><div class="admonitionContent_BuS1"><p>Plain definition: rather than simply answering a prompt, agentic AI calls external tools or maintains and updates state to perform work autonomously.
Everyday example: a chatbot that automatically reads email, analyzes attachments, and adds a draft event to a calendar.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: OWASP LLM Top 10, agentic variant</div><div class="admonitionContent_BuS1"><p>Plain definition: the OWASP LLM Top 10 is a framework that prioritizes risks in LLM and agent applications; the 2026 edition adds agent-specific risks.
Everyday example: just as web development uses a list of common threats such as SQL injection to prioritize testing, the OWASP list for agents indicates which attacks to test first.</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Term explainer: MCP (Model Control Plane / tool and MCP server context)</div><div class="admonitionContent_BuS1"><p>Plain definition: in this article, MCP refers to a control plane, server, or interface an agent uses for tool calls or communication with external services. Misconfigured MCP can cause excessive permission requests and exposure of sensitive data.
Everyday example: it resembles a central smart-home hub controlling lights and heating; if the hub is misconfigured, every connected device can be at risk.</p></div></div>
<p>Conclusion and limitations</p>
<p>The source maps the strengths and weaknesses of each tool and the 2026 market, repeatedly emphasizing agent-native testing and the detection-to-remediation-to-regression-to-runtime-guard flow. It does not, however, disclose quantitative performance metrics such as detection and false-positive rates, deeply reproducible customer cases, or detailed cost structures for each product. Before adoption, run an internal PoC to confirm that a tool works effectively in your environment.</p>
<p>Note: this document summarizes and interprets the provided HTML source. Technical details or newer updates outside the source require separate verification.</p>
<h2 class="anchor anchorTargetHideOnScrollNavbar_vjPI" id="sources">Sources<a href="https://ql.gl/en/blog/edbc94f6/#sources" class="hash-link" aria-label="Direct link to Sources" title="Direct link to Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://www.giskard.ai/knowledge/best-ai-agent-red-teaming-tools-in-2026-understanding-features-functions-and-solutions" target="_blank" rel="noopener noreferrer" class="">Best AI agent red teaming tools in 2026: understanding features, functions and solutions</a> — license: <code>unknown</code>, retrieved: <code>2026-07-06</code>.</li>
<li class="">Image: <a href="https://ql.gl/en/assets/files/cover-3d2fc5fa601fe75cb08c75a2a7043190.webp/" target="_blank" class="">AI-generated cover image via OpenRouter</a> — license: <code>ai-generated-original</code>.</li>
</ul>]]></content:encoded>
            <category>Security</category>
            <category>AI</category>
            <category>LLM</category>
            <category>Research</category>
            <category>Explainer</category>
        </item>
    </channel>
</rss>