Gauge Policy Design Review

Status

Design review accepted for the narrow public magnitude convention helper. GaugePolicy and ProjectiveNormalize now live in zeroproofml.autodiff.projective. The default is canonical_denominator, and the helper does not add a required strict-inference parameter or change current strict-inference behavior.

Problem

Strict inference currently decides semantic bottom from the exported denominator magnitude, for example abs(Q) < tau_infer. That predicate is not invariant under a projective rescaling (P, Q) -> (alpha * P, alpha * Q).

This is not an immediate correctness bug for a single calibrated head when tau_infer was selected from that same head's cached abs(Q) distribution and magnitude convention. It becomes a design problem when thresholds or monitoring rules are compared across bundles, heads, training conventions, or exported normalization choices.

Public Type

from enum import Enum

class GaugePolicy(str, Enum):
    CANONICAL_DENOMINATOR = "canonical_denominator"
    UNIT_L2_PROJECTIVE = "unit_l2_projective"
    ANGULAR_UNIT_CIRCLE = "angular_unit_circle"

The public enum records the magnitude convention. Omitted policy metadata means canonical_denominator.

Policy Candidates

Policy Meaning Main review question
canonical_denominator Use the denominator magnitude exactly as exported by the trained head. Default, preserving existing calibrated heads and cached denominator sweeps.
unit_l2_projective Normalize (P, Q) by its projective L2 norm before applying denominator-threshold logic. Implemented by ProjectiveNormalize; explicit train/export metadata is a separate bundle-contract task.
angular_unit_circle Treat the projective pair as a unit-circle angular representation before thresholding or monitoring. ProjectiveNormalize enforces the magnitude convention only; orientation and wrap rules remain head-specific.

Review Examples

Same scalar value, different projective scale

With tau_infer = 0.2, both pairs decode to the same finite scalar under ordinary division:

(P, Q) = (10.0, 1.0)      -> P / Q = 10.0 and abs(Q) = 1.0
(P, Q) = (1.0, 0.1)       -> P / Q = 10.0 and abs(Q) = 0.1

The second pair crosses the current denominator threshold while the first does not. A gauge policy must make this scale convention explicit before thresholds are reused across exports.

Single calibrated head

Current post-hoc tau_infer sweeps over cached abs(Q) distributions remain gauge-correct for the specific head and magnitude convention that produced those distributions. The design issue is cross-convention reuse, not retroactive invalidation of existing measurements.

Cross-bundle threshold reuse

Two bundles can produce the same decoded values while using different denominator scales. Reusing one threshold across both bundles is only meaningful if their gauge_policy metadata and normalization conventions match.

Unit-L2 normalization edge

ProjectiveNormalize leaves (P, Q) = (0, 0) unchanged. Callers that use the normalized tuple for thresholding can route that coordinate as bottom, fault, or unsupported according to their local contract.

Angular heads

angular_unit_circle should only land with documented wrap and orientation rules. Otherwise downstream consumers cannot compare angular thresholds, signs, or singular-neighborhood reports across heads.

Decisions

  1. The public type is the GaugePolicy enum above.
  2. Omitted-policy compatibility metadata records the canonical_denominator default.
  3. ProjectiveNormalize applies the explicit unit-L2 gauge helper. It is an opt-in helper and not a required strict_inference(...) parameter.
  4. Bundle/audit metadata can record the selected policy and magnitude convention separately from this helper.
  5. Existing same-head tau_infer sweeps remain valid for the convention that produced them.

Non-Goals

  • Do not mix this design choice into the immediate fail-closed SCM patch.
  • Do not change bottom_mask, fault_mask, semantic_bottom_mask, or gap_mask semantics as part of opening this issue.
  • Do not reinterpret existing cached abs(Q) distributions under a new gauge.

Implementation Gate

The implemented helper covers the local tuple-normalization surface: scale-equivalent pairs normalize to the same unit-L2 tuple, the default canonical_denominator policy is a no-op, and (0, 0) remains (0, 0) for explicit caller routing. Bundle metadata round trips are still a separate export-contract task.