pub enum MetricProvenance {
Euclidean,
OutputFisher {
rank: usize,
},
OutputFisherDownstream {
rank: usize,
},
WhitenedStructured {
factor_rank: usize,
},
}Expand description
Where the per-row metric came from — the provenance that makes “likelihood-metric ≠ gauge-metric” diagnosable instead of silent.
Object 4 (the gauge object) reads this to certify which inner product the
fit actually used; #974 fills MetricProvenance::WhitenedStructured with a
factor-analytic residual-covariance whitening.
Variants§
Euclidean
M_n = I_p for every row. The likelihood is isotropic and the gauge
pullback reduces to the bare J_nᵀ J_n. This is the default and is
bit-for-bit the historical isotropic-φ̂ path.
OutputFisher
M_n = U_n U_nᵀ (+ solver-only δI) from supplied per-row output-Fisher
factors U_n ∈ ℝ^{p × rank}. The canonical “one unit of latent motion ↦
one unit of behavioral change” metric: residuals are whitened in the
output-Fisher inner product and the gauge pulls back through the same
factors. The rank is carried in the provenance so a consumer (Object 4)
can certify the factor rank that produced the inner product.
OutputFisherDownstream
M_n = U_n U_nᵀ from per-row output-Fisher factors that aggregate the
downstream influence of position n over future positions through
the KV path, rather than the same-position logits of
MetricProvenance::OutputFisher (#980, mechanism 2).
The same-position pullback ∂logits_t/∂x_t can be ≈ 0 for a feature
whose entire causal effect lands many tokens later (information carried
forward through attention); a gauge built on it is blind to exactly that
content. This provenance is the forward-looking alternative: each row’s
factor U_n is the top-rank factorization of the aggregated output
Fisher Σ_{t ≥ n} (∂logits_t/∂x_n)ᵀ F_t (∂logits_t/∂x_n) over future
positions the residual stream at n reaches. It is provenance-generic:
it whitens nothing ([Self::whitens_likelihood] is false, like
MetricProvenance::OutputFisher) and drives the gauge / lens /
enrichment unchanged ([Self::is_output_fisher_like]). The lens/gauge
machinery consumes it identically; only the scientific reading
changes — dormant-feature detection becomes forward-looking (a feature
driving far-future tokens now registers behavioral coupling that the
same-position metric reported as ≈ 0).
WhitenedStructured
Structured-residual whitening: M_n = Σ_n^{-1} from the estimated
factor-analytic residual covariance Σ_n = Λ c(z_n) Λᵀ + D (#974), with
factor_rank the selected factor count. Produced by
Structured-residual producers materialize this provenance when they fit
a residual-covariance whitening model;
the only provenance for which
whitens_likelihood is true. It
carries the same low-rank factor layout as
MetricProvenance::OutputFisher.
Trait Implementations§
Source§impl Clone for MetricProvenance
impl Clone for MetricProvenance
Source§fn clone(&self) -> MetricProvenance
fn clone(&self) -> MetricProvenance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MetricProvenance
Source§impl Debug for MetricProvenance
impl Debug for MetricProvenance
impl Eq for MetricProvenance
Source§impl PartialEq for MetricProvenance
impl PartialEq for MetricProvenance
Source§fn eq(&self, other: &MetricProvenance) -> bool
fn eq(&self, other: &MetricProvenance) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MetricProvenance
Auto Trait Implementations§
impl Freeze for MetricProvenance
impl RefUnwindSafe for MetricProvenance
impl Send for MetricProvenance
impl Sync for MetricProvenance
impl Unpin for MetricProvenance
impl UnsafeUnpin for MetricProvenance
impl UnwindSafe for MetricProvenance
Blanket Implementations§
impl<T> Boilerplate for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.