目录 / 文档-技术白皮书 / 26-EFT.WP.STG.Lensing v1.0
一句话目标:提供学习/物理/谱域/运行时的一致性与安全边界,形成可执行的 C71-* 契约与策略卡,以支撑透镜的发布、监控与回退。
I. 范围与对象
- 对象:graph, K(核/透镜层)、K_eff(组合透镜)、vis(可见性)、M(能量度量)、manifest。
- 输入:离线评测结果、运行时遥测、两口径比对、物理校准、面板指标。
- 输出:contracts.* 断言记录、strategy.card.* 执行建议、guardband.*。
- 约束:契约必须可落盘且可重放验证;阈值采用区间与容差 tol_*;所有度量具备 unit(·) 与 dim(·)。
II. 命名、级别与通用字段
- 命名:C71-xy,其中 x 为域(1=视域;2=谱核;3=两口径;4=物理;5=学习/反演;6=运行时;7=安全/解释;8=清单)。
- 严重级别:sev ∈ {blocker, high, medium, low};动作:action ∈ {fail, warn, degrade, bypass}。
- 通用字段:{rule_id, sev, metric, threshold, window, samples, RefCond, evidence_uri, pass, msg, ts}。
*III. 视域/遮挡契约(C71-1)**(见第4章)
- C71-11 VisibilityRange:metric = mean(vis);threshold: [v_min,1];断言 mean(vis) ≥ v_min。
- C71-12 LOSConsistency:metric = ||vis_{t+1}-vis_t||_1 / |V|;threshold ≤ tol_vis。
- C71-13 OcclusionPenaltyBound:metric = occlusion_penalty(x, vis);threshold ≤ pen_max。
- C71-14 ShadowContinuity:metric = TV(shadow_map);threshold ≤ tv_max。
- 违约策略:degrade → 启用 gate_by_visibility;bypass → 跳过 K 对 nlos 子图。
*IV. 核/谱稳定契约(C71-2)**(见第5章)
- C71-21 SpectralGainBound:metric = sup_λ |g(λ)|;threshold ≤ 1+eps_gain。
- C71-22 StopbandLeakage:metric = mean_{λ∈S_stop} |g(λ)|;threshold ≤ leak_max。
- C71-23 PassbandRipple:metric = max(|g(λ)-1|) on S_pass;threshold ≤ ripple_max。
- C71-24 AnisotropyPSD:metric = κ(A)(各向异性张量条件数);threshold ≤ kappa_max。
- C71-25 EnergyMonotone:metric = E(Kx;M) - E(x;M);threshold ≥ -tol_energy(非放大约束可设 ≤ amp_max)。
- 策略卡:card.spectral_stabilize → 调整 theta/stabilizer;降阶 order' ≤ order 保证 rho_bound。
*V. 两口径一致性契约(C71-3)**(见第7章与第11章)
- C71-31 TwoFormDelta:metric = || y_spec - y_var ||_2 / ||y_spec||_2;threshold ≤ tol_form。
- C71-32 FormLatencyGap:metric = |latency_spec - latency_var|;threshold ≤ tol_latency。
- C71-33 ApproxErrorBound:metric = eps_bound(由近似阶推导);threshold ≤ tol_approx。
- 策略:若 delta_form 超阈 → fail 离线;运行时 → degrade 使用 spec 或 var 中稳定者。
*VI. 物理一致与守恒契约(C71-4)**(见第10章)
- C71-41 TransmissionBalance:metric = T_trans = E(y;M)/E(x;M);threshold ∈ [t_min, t_max]。
- C71-42 BoundaryRespect:metric = ||B y||;threshold ≤ tol_bnd(B 为边界算子)。
- C71-43 NonNegativity(如概率/能量场):metric = min(y);threshold ≥ -tol_nn。
- C71-44 ConservationResidual:metric = || div(Flux(y)) - s ||_2;threshold ≤ tol_cons。
- 策略:启用 regularize_physical;若仍违约 → bypass 该层或改用保守核。
*VII. 学习/去透镜与反演契约(C71-5)**(见第7章与第9章)
- C71-51 TrainValGeneralizationGap:metric = |L_val - L_train|;threshold ≤ tol_gen。
- C71-52 CausalInvariance:metric = Δ_inv(跨环境不变损失差)≤ tol_inv。
- C71-53 InversionResidual:metric = ||K x_hat - y||_2 / ||y||_2 ≤ tol_invres。
- C71-54 SparsityBudget:metric = nnz(K_eff)/DoF ≤ budget_max。
- C71-55 CalibrationCurve:metric = ECE(y_hat, y);threshold ≤ tol_ece。
- 策略:deconvolve_primal_dual 切换正则;distill_to_kernel 限制模型容量。
*VIII. 运行时与面板 SLO 契约(C71-6)**(见第11章)
- C71-61 LatencyP99:metric = P99(latency);threshold ≤ L_p99_max。
- C71-62 CPU/MemBudget:metric = max(cpu_pct, mem_pct);threshold ≤ rsrc_max。
- C71-63 CacheHit:metric = cache_hit_ratio;threshold ≥ hit_min。
- C71-64 ErrorRate:metric = err_rate;threshold ≤ err_max。
- C71-65 DriftScore:metric = drift(x; refs);threshold ≤ drift_max。
- 策略:fallback_plan → 旁路/降阶/阻尼;throttle_policy 控流;snapshot_panel 取证。
*IX. 安全/可解释/合规契约(C71-7)**(见第12章)
- C71-71 ExplanationCompleteness:metric = cov(TopK attribution, y);threshold ≥ cov_min。
- C71-72 AdversarialRobustness:metric = min_ε s.t. fail;threshold ≥ eps_min。
- C71-73 BiasGap(若适用):metric = |metric_group_a - metric_group_b| ≤ tol_bias。
- C71-74 InputSanity:metric = rate(|x|>x_max or NaN);threshold ≤ tol_sanity。
- 策略:触发 robustness_sweep 与 redact_manifest;必要时 fail 发布。
*X. 清单/可追溯契约(C71-8)**(见第15章)
- C71-81 ManifestCompleteness:强制键存在:graph, kernel, compose, contracts, uncertainty, signature。
- C71-82 SignatureValid:metric = verify(signature);必须通过。
- C71-83 ReproducibilityHash:metric = hash(manifest.bytes) 与回放产生一致。
- C71-84 VersionCompat:metric = semver_check(manifest, runtime);必须通过。
XI. 策略卡模板(可执行处置建议)
- 模板字段:{card_id, triggers:[rule_id], decide:{if … then …}, act:{api, params}, verify:{metric, window}, rollback:{plan}, notes}。
- 示例:
- card.spectral_stabilize
- triggers: [C71-21, C71-23];decide: sup_λ|g(λ)|>1+eps_gain or ripple>ripple_max;
- act: I71-11/12 with reduced order & stabilizer;verify: C71-21/23 within 1 window;rollback: restore K_prev。
- card.visibility_gate
triggers: [C71-11, C71-12];act: I71-34 gate_by_visibility(vis, rule);bypass 对 nlos。 - card.form_degrade
triggers: [C71-31];act: switch to spec/var with lower error;verify: delta_form ≤ tol_form。 - card.runtime_fallback
triggers: [C71-61…65];act: I71-67 fallback_plan → 降阶核与限流;verify: SLO 恢复。 - card.physical_regularize
triggers: [C71-41…44];act: I71-47 regularize_physical;不通过则 bypass。
- card.spectral_stabilize
XII. 阈值建议与标定
- 视域:v_min ∈ [0.3,0.7];tol_vis ∈ [0.02,0.1]。
- 谱核:eps_gain ∈ [0.0,0.1];leak_max ∈ [0.01,0.05];ripple_max ∈ [0.02,0.08]。
- 两口径:tol_form ∈ [1e-3,5e-2];tol_latency ∈ [0.5,5] ms。
- 物理:t_min,t_max 按场景设定(如 [0.8,1.2]);tol_cons ∈ [1e-3,1e-1]。
- 运行时:L_p99_max 依据 SLO;hit_min ≥ 0.7;err_max ≤ 1e-3。
- 学习:tol_gen ≤ 0.05;tol_invres ≤ 0.05;budget_max ≤ 0.3。
- 以上为默认建议,需通过离线校准与 A/B 验证固化到 manifest.contracts.thresholds。
XIII. 落盘与审计(清单字段)
- contracts.rules[]:每条 C71-* 的状态与证据 evidence_uri。
- contracts.thresholds:环境化阈值与版本戳。
- contracts.strategy.cards[]:已武装策略卡与触发条件。
- contracts.slo:{latency_p99, err_rate, cache_hit, drift}。
- contracts.audit:{who, when, tool, signature}。
XIV. 交叉引用
视域与遮挡:见第4章。谱核与实现:见第5章。学习与反演:见第7/9章。物理一致:见第10章。运行时:见第11章。清单与发布:见第15章。接口调用:见附录A(I71-*)。小结
- C71-* 契约覆盖视域、谱核、两口径、物理、学习、运行时、安全与清单八大域;
- 策略卡将“发现→决策→执行→验证→回退”标准化;
- 所有断言与处置均可落盘复现,并由面板与遥测持续审计。
版权与许可(CC BY 4.0)
版权声明:除另有说明外,《能量丝理论》(含文本、图表、插图、符号与公式)的著作权由作者(“屠广林”先生)享有。
许可方式:本作品采用 Creative Commons 署名 4.0 国际许可协议(CC BY 4.0)进行许可;在注明作者与来源的前提下,允许为商业或非商业目的进行复制、转载、节选、改编与再分发。
署名格式(建议):作者:“屠广林”;作品:《能量丝理论》;来源:energyfilament.org;许可证:CC BY 4.0。
首次发布: 2025-11-11|当前版本:v5.1
协议链接:https://creativecommons.org/licenses/by/4.0/