保真度而非最优化 / Fidelity, Not Optimality
最小化回路对照鲜活神谕向更短、更忠实的程序演进,却从未抵达那个不可计算的极小值。 / The minimizing loop moves toward shorter, more faithful programs against a live oracle without ever reaching the uncomputable minimum.
最小化路径中所描绘的迭代回路提出了一项方向性主张:每一轮循环都在压缩代码实现与实际行为之间的间隙。本文追溯这一主张究竟能担保什么,形式化工具在何处为它提供支撑,又在何处止步。
The iterative loop described in The Minimizing Path makes a directional claim: each cycle compresses the gap between implementation and behavior. This note traces what that claim actually warrants, where the formal machinery supports it, and where it stops.
一、 作为函数的行为 / 1. The Behavior as Function
任何一个正在运行的应用程序,都定义了一个映射 f : (输入 × 内部状态 × 环境) → 输出。输入涵盖每一次用户手势、网络数据包、定时器滴答与传感器读数;输出涵盖每一次像素变化、API 响应与文件写入;状态与环境则囊括了应用程序实际依赖的一切——内存、随机数种子、时序抖动以及硬件特质。
Any running application defines a mapping f : (inputs × internal state × environment) → outputs. Inputs include every user gesture, network packet, timer tick, and sensor reading. Outputs include every pixel change, API response, and file write. State and environment cover everything the application actually depends on—memory, randomness seeds, timing jitter, and hardware quirks.
既然应用程序能够正常工作,f 在它实际遭遇的每一个场景上就都是良定义的。只要输入、状态与环境相同,输出就必定相同——在这一意义上它是确定性的;正如递归形式系统中作为记忆与控制的边界条件图所追溯的,表象上的非确定性,不过是那些仅被部分登记的初始条件与边界条件中未被记录的变异。
Because the application works, f is well-defined on every scenario it actually encounters. It is deterministic in the sense that identical inputs, identical state, and identical environment produce identical outputs; apparent nondeterminism is unrecorded variation in those partially registered initial and boundary conditions, as Boundary-Condition Graphs as Memory and Control in Recursive Formal Systems traces.
处理 f 并不需要事先拿到这一映射的完整符号化描述——而且在玩具级的有限状态域之外,事先也拿不到这样的描述,因为应用程序跨越这些边界条件会做什么,唯有在它实际运行时才会显露出来。它所需要的只是一个神谕(即那个鲜活运行的应用程序)和一个保真度信号(衡量候选程序在已测场景下与神谕行为的吻合程度)。这便消解了规格说明的瓶颈:纠偏所需的前提少于规格说明——规格说明必须在行为被看见之前就把它写明,鲜活神谕却能沿着具体的执行轨迹返回高带宽的反馈。
Working with f does not require a complete symbolic description of the mapping in advance—and outside toy finite-state domains none is available beforehand, since what an application does across those boundary conditions shows only when it runs. It requires an oracle (the live application) and a fidelity signal (how closely a candidate program matches the oracle's behavior on tested scenarios). This dissolves the specification bottleneck: correction needs less than specification does, because the live oracle returns high-bandwidth feedback across concrete traces where a specification would have to state that behavior before it is seen.
二、 为何等价程序必然存在 / 2. Why Equivalent Programs Exist
根据丘奇-图灵论题——并且因为一个正在运行的应用程序本身就已经是通用机器上的一个程序,而任何图灵完备的语言都能对其加以模拟——任何有效可计算的函数,在任何图灵完备的语言中都存在等价的程序。因此,在原生 C 语言、x86 汇编或裸机机器码中,至少存在一个程序 p,能够在所有可达输入上实现严格相同的 f。
By the Church-Turing thesis—and because a running application is already a program on a universal machine that any Turing-complete language can simulate—any effectively computable function has an equivalent program in any Turing-complete language. So there exists at least one program p in vanilla C, in x86 assembly, or in raw machine code that realizes the exact same f on all reachable inputs.
这正是“只要应用程序能跑通,就存在一条原生代码路径”能够跨越不同计算基底而成立的原因。
This is why "if the application works, there is a vanilla-code path" holds across substrates.
三、 数学极小值 / 3. The Mathematical Minimum
在所有能够计算出 f 的程序中,存在一个最短的程序。相对于固定的通用参考机器 U,它的比特长度即为 f 的柯尔莫哥洛夫复杂度,记作 K(f)。
Among all programs that compute f, there is a shortest one. Its length in bits is the Kolmogorov complexity of f, written K(f), relative to a fixed universal reference machine U.
K(f) 就是最短逻辑路径的长度——即依然能够复现 f 的全部可观测行为的最简描述。三条形式化性质界定了这一极小值在实践中能做什么、不能做什么。
K(f) is the length of the minimal logic path—the shortest description that still reproduces every observable behavior of f. Three formal properties bound what this minimum can and cannot do in practice.
第一,K(f) 是不可计算的。不存在任何规程能够接收 f 并返回 K(f),也不存在任何规程能够接收候选程序 p 并判定 |p| = K(f) 是否成立。若能计算出 K(f) 便能解决停机问题,而要核证 |p| = K(f) 则必须排除每一个更短的程序——包括那些停机性与等价性无法判定的程序——这正是没有系统能被保持封闭所确立的那道边界在计算上的显现:有限的形式化规程无法从内部封死自身的停机边界与等价性边界。每一个已知能计算出 f 的程序 p 都为 K(f) 给出了上界(K(f) ≤ |p|),却没有任何规程能为 K(f) 提供非平凡下界,因此你无从知晓自己是否已经抵达极值,也无从判断余下的超出量 |p| − K(f) 究竟为零,还是几乎占了 |p| 的全部。这一极小值在形式体系内部是良定义的,但在强意义上却是不可企及的——它不仅难以抵达,即便撞上了也无从识别。
First, K(f) is uncomputable. There is no procedure that takes f and returns K(f), and no procedure that takes a candidate p and determines whether |p| = K(f). Computing K(f) would solve the halting problem, and certifying |p| = K(f) requires ruling out every shorter program—including those whose halting and equivalence cannot be decided—which is the computational face of the bound No System Can Be Kept Closed establishes: a finite formal procedure cannot seal its own halting and equivalence bounds from within. Every program p known to compute f bounds K(f) from above (K(f) ≤ |p|), yet no procedure supplies a nontrivial lower bound on K(f), so you cannot know you have arrived or tell whether the remaining excess |p| − K(f) is zero or nearly all of |p|. The minimum is well-defined inside the formalism yet unreachable in the strong sense—not merely hard to reach, but unrecognizable even if reached.
第二,K(f) 依赖于参考机器,但这种依赖至多是一个加性常数。从一种通用语言切换到另一种通用语言,K(f) 的偏移不超过两者之间翻译器的长度。不同程序之间的长度差至多偏移该常数的两倍,因此悬殊的长度差在切换后依然得以保留;这正是跨语言的比较之所以具有意义的原因。
Second, K(f) is reference-machine dependent only up to an additive constant. Switch from one universal language to another and K(f) shifts by at most the length of the translator between them. Length differences between programs shift by at most twice that constant, so large differences survive the switch; that is what makes the comparison meaningful across languages.
第三,所罗门诺夫归纳法——即按程序长度对每一个与数据相容的程序进行加权的理论理想——本身也是不可计算的。它为每个无前缀程序赋予先验权重 2^(−|p|),再依据观测到的行为剔除未能生成该轨迹的程序,以此完成更新。在无穷数据的极限下,随着产生分歧的程序被排除,其后验预测分布会沿着观测数据流收敛;但在所有能够计算出 f 的等价程序之间,后验分布从不集中到最短程序上——每一个经填充的等价程序都维持着固定的先验比例 2^(−|p|),使最小长度的程序只是众数,而非点质量。就连这一预测收敛,也是把全部重担压在了“极限”二字上:面对任何有限的行为样本,那些长度各异且会在未见输入上产生分歧的程序——只要样本容许更简单的拟合,其中也包括更短的程序——依然未被推翻。将这种渐近收敛当作操作层面的担保,是把开放的潜在过程混淆为了已完成的整体,即潜无限与数学思维的暂时闭合所剖析的暂时闭合:这一收敛唯有在任何有限观察者都无从栖居的无穷极限中才成立。
Third, Solomonoff induction—the theoretical ideal of weighting every program consistent with the data by its length—is itself incomputable. It assigns prior weight 2^(−|p|) to each prefix-free program and updates on observed behavior by eliminating programs that fail to produce the trace. In the limit of infinite data, its posterior predictive distribution converges along the observed stream as diverging programs are ruled out, while among all equivalent programs that compute f the posterior never concentrates on the shortest—every padded equivalent stays in fixed prior proportion 2^(−|p|), leaving minimal-length programs as the mode rather than a point mass. Even that predictive convergence lets the limit do all the work: on any finite behavioral sample, programs of varying lengths that diverge on unseen inputs—including shorter ones whenever the sample admits a simpler fit—remain undefeated. Treating that asymptotic convergence as an operational guarantee confuses an open-ended potential process with a completed totality, the exact temporary closure Potential Infinity and the Temporary Closures of Mathematical Thought dissects: the convergence holds only in an infinite limit no finite observer ever inhabits.
正因如此,搬出所罗门诺夫归纳法来为这一回路背书,只是在需要数学工作的地方做修辞文章。数学给出了一个干净利落的存在性证明,确证最短路径存在;但它并未提供一个保证能找到这条路径的可计算规程。
This is why invoking Solomonoff induction as the loop's warrant does rhetorical work where mathematical work is needed. The mathematics establishes a clean existence proof that a minimal path exists; it provides no computable procedure guaranteed to find it.
四、 回路究竟在做什么 / 4. What the Loop Actually Does
将 d(f, p) 定义为行为保真度测度:即神谕 f 与候选程序 p 在抽样输入上的可观测偏差。一个实用的智能体回路按五个接续步骤运转:观察来自鲜活神谕的执行轨迹,提出候选程序 p' 或对现有程序打补丁,在沙箱内执行 p',通过对功能失配以及视觉、网络和性能偏差施加惩罚来计算 d(f, p'),最后在 p' 缩小了行为偏差(d(f, p') < d(f, p)),或在保持同等行为保真度的同时缩减了程序体积(d(f, p') = d(f, p) 且 |p'| < |p|)时采纳 p'。
Define d(f, p) as a behavioral fidelity measure: the observable divergence between oracle f and candidate p across sampled inputs. A practical agent loop operates in five sequential steps: it observes execution traces from the live oracle, proposes a candidate program p' or patches an existing one, executes p' inside a sandbox, computes d(f, p') by penalizing functional mismatches alongside visual, network, and performance divergences, and finally accepts p' whenever it reduces behavioral divergence (d(f, p') < d(f, p)) or matches behavioral fidelity at a smaller program size (d(f, p') = d(f, p) with |p'| < |p|).
在这一采纳准则下,行为保真度在构造上呈单调不减。每一轮循环并非在无辅助的堆叠中从头覆写系统,而是将已核验的程序 p 保留为运行基准,并在此之上评估有界的差分补丁 p',从而具现了模块化反馈回路与动态残差网络所追溯的残差高速路几何结构。每一次获采纳的迭代要么缩小行为失配,要么在同等保真度下裁剪程序体积。这一机制并不对序列最终收敛到何处做出承诺——它只确保在已测试的轨迹上不会发生倒退。
Under this acceptance criterion, behavioral fidelity is non-decreasing by construction. Rather than overwriting the system from scratch in an unassisted stack, each cycle preserves the verified program p as a running reference and evaluates a bounded differential patch p', instantiating the residual-highway geometry traced in Modular Feedback Loops and Dynamic Residual Networks. Each accepted iteration either reduces behavioral mismatch or trims program size at equal fidelity. That makes no claim about what the sequence converges to—only that it does not go backward on tested traces.
这是行为逼近,而非直达 K(f) 的最优化。比起精确的程序综合,它更接近机器学习中的经验风险最小化:候选程序在实际测试的场景分布上越变越好,但对未测试的区域则不提供形式化担保。
This is behavioral approximation, not optimization to K(f). It is closer to empirical risk minimization in machine learning than to exact program synthesis: the candidate improves on the distribution of scenarios actually tested, with no formal guarantee on untested regions.
实际做功发生在提议机制中,而非采纳准则上。筛选滤网是机械的;而由模型先验、演化变异与定向编辑所驱动的提议质量,才决定了保真度提升的速度以及程序空间中哪些区域会被探索到。
flowchart TD
subgraph S_Loop["单调保真度回路(行为逼近)"]
direction TB
L_Oracle["鲜活神谕 f 与抽样轨迹:具体的行为边界"]
L_Prop["提议机制 p':模型先验与定向代码补丁"]
L_Eval["沙箱保真度校验:当 d(f, p') < d(f, p),或 d(f, p') = d(f, p) 且 |p'| < |p| 时采纳 p'"]
L_Oracle --> L_Prop --> L_Eval
end
subgraph S_Limit["不可企及的极限与充分的方向"]
direction TB
B_Barriers["三道形式化屏障:有限样本、搜索爆炸、不可判定性"]
B_Attractor["作为数学吸引子的 K(f):方向所指向的界限,而非可达终点"]
B_Barriers --> B_Attractor
end
L_Eval ==>|"单调保真度 + 简短偏置与体积平局决胜"| B_Barriers
style S_Loop fill:#161b22,stroke:#58a6ff,stroke-width:1.5px,color:#58a6ff
style S_Limit fill:#161b22,stroke:#3fb950,stroke-width:1.5px,color:#3fb950
style L_Oracle fill:#0d1117,stroke:#58a6ff,stroke-width:1px,color:#f0f6fc
style L_Prop fill:#0d1117,stroke:#a371f7,stroke-width:1px,color:#f0f6fc
style L_Eval fill:#0d1117,stroke:#3fb950,stroke-width:1px,color:#f0f6fc
style B_Barriers fill:#0d1117,stroke:#d29922,stroke-width:1px,color:#f0f6fc
style B_Attractor fill:#0d1117,stroke:#3fb950,stroke-width:1px,color:#f0f6fcThe work is in the proposal mechanism, not the acceptance criterion. The selection filter is mechanical; the quality of proposals—driven by model priors, evolutionary mutations, and directed editing—determines how fast fidelity improves and what regions of program space get explored.
flowchart TD
subgraph S_Loop["The Monotonic Fidelity Loop (Behavioral Approximation)"]
direction TB
L_Oracle["Live Oracle f & Sampled Traces: Concrete behavioral boundary"]
L_Prop["Proposal Mechanism p': Model priors & directed code patches"]
L_Eval["Sandbox Fidelity Check: Accept p' when d(f, p') < d(f, p), or d(f, p') = d(f, p) with |p'| < |p|"]
L_Oracle --> L_Prop --> L_Eval
end
subgraph S_Limit["The Unreachable Limit and the Sufficient Direction"]
direction TB
B_Barriers["Three Formal Barriers: Finite samples, search explosion, undecidability"]
B_Attractor["K(f) as Mathematical Attractor: The bound direction points toward, never a reachable destination"]
B_Barriers --> B_Attractor
end
L_Eval ==>|"Monotonic fidelity + brevity bias & size tie-break"| B_Barriers
style S_Loop fill:#161b22,stroke:#58a6ff,stroke-width:1.5px,color:#58a6ff
style S_Limit fill:#161b22,stroke:#3fb950,stroke-width:1.5px,color:#3fb950
style L_Oracle fill:#0d1117,stroke:#58a6ff,stroke-width:1px,color:#f0f6fc
style L_Prop fill:#0d1117,stroke:#a371f7,stroke-width:1px,color:#f0f6fc
style L_Eval fill:#0d1117,stroke:#3fb950,stroke-width:1px,color:#f0f6fc
style B_Barriers fill:#0d1117,stroke:#d29922,stroke-width:1px,color:#f0f6fc
style B_Attractor fill:#0d1117,stroke:#3fb950,stroke-width:1px,color:#f0f6fc五、 通往 K(f) 的三道屏障 / 5. Three Barriers to K(f)
第一道屏障是有限且带有偏置的样本。正如闭合的N与开放的现实所追溯的,任何测试框架都只能观测到 f 的一个有限投影,在容量为 N 的闭合样本集上评估候选程序,而鲜活的实际使用却始终向未建模的第 N + 1 次遭遇敞开;智能体因而可能对抽样子空间过拟合,漏掉罕见的边缘情况。单个用户的操作轨迹会将 f 坍缩为一个简单得多的对象,这既是压缩的契机,也是抽样的局限。
The first barrier is finite and biased samples. Any test harness observes only a finite projection of f, evaluating candidates over a closed sample set of size N while living use stays open to the unmodeled N + 1 encounter, as The Closed N and the Open Reality traces; the agent can therefore overfit to the sampled subspace and miss rare edge cases. One user's trace collapses f to a much simpler object, which is both a compression opportunity and a sampling limitation.
第二道屏障是搜索空间爆炸。莱文通用搜索按程序体积与运行时间对数之和的顺序枚举程序,对可核验的目标而言,它在相差一个乘性常数的意义下是最优的——但那个常数随目标在参考机器上的描述长度呈指数增长(至少为 2^K(f)),对于任何具有实际意义的函数而言,这都是一个天文数字。实用的提议机制只能探索一个带有偏置的子空间。这种偏置青睐人类习惯编写和识别的程序形态,却也因此封死了程序空间中那些可能藏有更短表征的区域。所谓“最优”,不过是把评分函数错当成了事物的内在属性,即「更好」的范畴谬误所指认的谬误。
The second barrier is search-space explosion. Levin's universal search enumerates programs in order of size plus logarithmic runtime and is optimal for verifiable targets up to a multiplicative constant—but that constant is exponential in the description length of the target on the reference machine (at least 2^K(f)), which is cosmologically large for any function of practical interest. Practical proposal mechanisms explore a biased subspace. That bias favors the kinds of programs humans write and recognize, yet it forecloses regions of program space that might contain shorter representations. "Optimal" is the scoring function mistaken for an intrinsic property, the error The Category Error of Better names.
第三道屏障是底层的不可判定性。在一般意义上,验证两个程序是否严格等价是不可判定的;正如为何数学永远解不完所确立的,核验只在已测试的轨迹上成立,它只能确证当前把握内部的相容性,却无法穷尽其外部敞开的场域。抽样输入上的行为吻合并不意味着表征已达极简。一个比 K(f) 长出好几个数量级的程序,照样可以在测试框架所检验的每一个场景上实现 d(f, p) = 0。
The third barrier is undecidability at the bottom. Verifying exact equivalence of two programs is undecidable in general; verification holds only across tested traces, certifying consistency inside the present hold without exhausting the open field outside it, as Why Mathematics Can Never Be Solved establishes. Behavioral match on sampled inputs does not imply minimal representation. A program orders of magnitude longer than K(f) can achieve d(f, p) = 0 on every scenario the harness tests.
六、 能够确立的命题 / 6. What Can Be Said
这一回路能提供单调不减的行为保真度——这在构造上必然成立。同时,这一回路带有朝向压缩的偏置:实用的提议机制携带着隐性的简短偏好,倾向于用紧凑的惯用写法生成程序并剥离冗余的脚手架,而体积平局决胜准则则会采纳那些在保持已测行为不变的前提下更为短小的程序。在实践中,保真度与压缩之所以同向演进,是因为虚假的复杂度在这一筛选机制下是脆弱的,会随迭代被逐步侵蚀:剔除无功能结构的补丁能在保持 d(f, p) 不变的同时缩减体积,因而获采纳;仅平添累赘的补丁在平局决胜中落败,因而被拒斥;搭着保真度提升顺带混入的累赘,也会在此后同等保真度的迭代中被修剪掉。
The loop delivers non-decreasing behavioral fidelity—true by construction. And the loop is biased toward compression: practical proposal mechanisms carry an implicit brevity bias, generating programs in compact idioms and stripping redundant scaffolding, while the size tie-breaker accepts shorter programs that preserve tested behavior. Fidelity and compression correlate in practice because spurious complexity is fragile under this selection, eroding over iterations as patches that remove non-functional structure hold d(f, p) steady at smaller size and get accepted, while patches that only add dead weight lose the tie-break and get rejected, and dead weight that rides in on a fidelity gain is pruned later at equal fidelity.
这一序列并不保证逼近 K(f)。它可能会在某个局部极小值处停滞,或者停驻于某种远非最简、却在行为上足够合用的惯用写法。朝向更短、更忠实的程序演进的方向性牵引在迭代间持续做功;终极极小值则既未被抵达,也未获确证。
The sequence does not guarantee approach to K(f). It may plateau at a local minimum or settle into an idiom far from minimal that remains behaviorally adequate. The directional pull toward shorter, more faithful programs operates across iterations; a terminal minimum is not reached or certified.
七、 具体例证 / 7. A Concrete Illustration
不妨考虑一个带有精确时序规则的四状态交通信号灯控制器。完整的 f 是一张覆盖传感器与定时器约 2¹⁰ 种输入组合的真值表。
Consider a four-state traffic-light controller with exact timing rules. The full f is a truth table over roughly 2¹⁰ input combinations of sensors and timers.
一份朴素的实现需要 180 行带注释和安全检查的可读 C 代码,源码折合约 36,000 比特。经过五轮智能体迭代——观察实时仿真、提出补丁、计算保真度差异、保留改进——候选程序缩减至 47 行,剥离了注释,改用整数运算与位操作,折合约 7,500 比特。一个手工构建、约 180 比特的紧凑状态机表明,还存在短得多的程序;至于是否还存在比这更短的程序,则是任何规程都无法裁定的问题。
A naive implementation takes 180 lines of readable C with comments and safety checks, roughly 36,000 bits of source. After five agent iterations—observe live simulation, propose patch, compute fidelity diff, keep improvements—the candidate is 47 lines, stripped of comments, using integer arithmetic and bit operations in roughly 7,500 bits. A hand-built compact state machine of about 180 bits shows that much shorter programs exist; whether anything shorter still does is what no procedure can settle.
智能体从未证明自己抵达了 K(f)。它只是不断压低 d 并裁剪体积,直到人类操作员或自动化测试框架叫停为止。在已测试的场景上,它的表现与神谕无从区分。行为逼近在各轮迭代间从未发生倒退;至于候选程序距离数学极小值还有多远,则是另一个没有任何规程能够回答的独立问题。
The agent never proves it reached K(f). It keeps reducing d and trimming size until the human or automated harness stops it. On the tested scenarios it is indistinguishable from the oracle. Behavioral approximation never went backward across the iterations; how far the candidate still sits from the mathematical minimum is a separate question no procedure answers.
八、 充分的主张 / 8. The Sufficient Claim
最小化路径并不需要以 K(f) 的可达性作为生效前提。它所需要的,只是保真度随迭代而提升、压缩随着死脚手架的剥落而与保真度同行,并且由人类操作员对“不贴合感”的感知来提供回路内部无法自行生成的边界信号。正如你的代码库即是记忆所追溯的,代码库本身就是已做出的划界所留下的外化记忆痕迹:每一轮压缩循环都在修剪陈旧的残余,从而让身处领航边缘的鲜活心智能够读取、核验并重定向整个系统,而不至于溺死在堆积如山的脚手架中。K(f) 极值之所以是一个数学吸引子,在于它是这一方向所指向的界限,而非回路能够抵达或读取的终点。
The minimizing path does not need K(f) reachability to work. What it needs is that fidelity improves with iteration, compression accompanies fidelity as dead scaffolding erodes, and the human operator's sensing of misfit provides the boundary signal the loop cannot generate internally. As Your Codebase Is Memory traces, the codebase itself is the externalized memory trace of the cuts already made: each compression cycle prunes stale residue so the living mind at the steering edge can read, verify, and redirect the system without drowning in accumulated scaffolding. The K(f) optimum is a mathematical attractor in the sense of the bound that direction points toward, never a destination the loop reaches or reads.
回路不断朝向更短、更忠实的程序演进,却并不收敛于那个最短的程序。更进一步看,本文所援引的形式化框架——柯尔莫哥洛夫复杂度、所罗门诺夫归纳法、莱文搜索——本身也是投射,把收敛铸成了离散枚举。底层表面追溯了当你察觉到这一层时的景象:鲜活的生成过程在比离散枚举模型更细腻的粒度上运作,而感知边缘在结构上始终先于任何形式化模型所能表征的对象。
The loop moves toward shorter, more faithful programs without converging to the shortest. Moreover, the formal frameworks used here—Kolmogorov complexity, Solomonoff induction, Levin search—are themselves projections that cast convergence as discrete enumeration. The Surface Beneath traces what happens when you notice this: the living process operates at finer grain than enumeration models, and the sensing edge remains structurally prior to what any formal model can represent.