We introduce fidelity probes: natural-language questions generated from a reference artifact with code-derived ground-truth answers, answered from a candidate specification. The fraction of agreeing probes, which we call the fidelity, decomposes into contradiction and coverage-gap rates that drive targeted spec edits to convergence. On a 15-program, roughly 12k-line COBOL benchmark (AWS CardDemo), we raise frozen-test specification fidelity from 0.63 to 0.94 over eight iterations, with the plateau location predicted by a two-state Markov fixed point $F^\dagger$ from just four iterations of rate data. Probes come from an LLM reading the code or from a static-analysis pipeline over its control-flow, data-flow, and system-dependence graphs, with a tunable mixture. A probe-resampling protocol with a frozen held-out set gives a Hoeffding-bounded overfitting discriminant; our measured train/test gap stays more than an order of magnitude below this envelope. Three graph-grounded mixtures lift fidelity by +16 to +30 points; cross-distribution evaluation shows the LLM and symbolic channels are empirically complementary. A cross-family generator sweep on five independent LLM lineages (Anthropic, DeepSeek, Google, Alibaba, OpenAI) confirms the convergence behaviour is not tied to any single model family: three of five non-Claude generators produce trajectories consistent with the Markov fixed-point prediction, and the frozen-test protocol actively falsifies the two generators whose probe distributions drift across iterations. The method applies to any pair of artifacts that are supposed to describe the same behaviour.
翻译:我们引入了保真度探针:基于参考工件生成的自然语言问题,其真实答案来源于代码,并由候选规格进行解答。我们将探针一致性比例称为保真度,它可分解为矛盾率和覆盖缺口率,从而驱动对规格进行有针对性的迭代编辑直至收敛。在包含15个程序、约12000行代码的COBOL基准测试(AWS CardDemo)上,我们通过八次迭代将冻结测试规格的保真度从0.63提升至0.94,而仅需四次迭代的速率数据即可通过两态马尔可夫不动点 \(F^\dagger\) 预测其平台期位置。探针可由大语言模型(LLM)直接读取代码生成,也可通过静态分析管道基于控制流图、数据流图和系统依赖图生成,二者可调节混合比例。采用冻结保留集的探针重采样协议提供了基于Hoeffding不等式的过拟合判别指标;实测训练/测试差距仍比该上限低一个数量级以上。三种基于图结构的混合方案将保真度提升了16至30个百分点;跨分布评估表明,LLM与符号化通道在实证上具有互补性。针对五个独立LLM系列(Anthropic、DeepSeek、Google、Alibaba、OpenAI)的跨族生成器扫描实验证实,该收敛行为并不依赖单一模型家族:五个非Claude生成器中有三个的轨迹与马尔可夫不动点预测一致,而冻结测试协议主动证伪了两个探针分布随迭代漂移的生成器。该方法适用于任何旨在描述相同行为的成对工件。