DLM training: endstate vs frequency-informed learning #
[BCSBB19] [GB24] [Hei24] [HCB26]
The DLM's trained production map, characterised as the minimiser of a
frequency-weighted quadratic loss. The choice of frequency weights q is the
cognitive commitment (uniform = endstate learning, token counts =
frequency-informed learning); the optimisation is fixed across theories.
Main definitions #
TrainingExperience,FrequencyVector,weightedLoss,IsERMSolution, withIsELSolutionthe uniform special case.TrainingExperience.sqrtScale,residualPairing,predictionEnergy.
Main results #
isERMSolution_iff_rescaled: only the empirical distribution ofqmatters.isERMSolution_iff_coordResidual: ERM is columnwise-unbeatable regression.isELSolution_sqrtScale_iff: FIL underqis EL on the√q-premultiplied experience ([Hei24]'s FIL-EL equivalence, also [HCAB24]; invertibility-free).isERMSolution_iff_residualPairing_eq_zero: the normal equationsSᵀQ(SG − C) = 0as an invertibility-free iff.IsERMSolution.apply_eq_of_mem_span/exists_apply_ne: fitted values are unique exactly on the span of experienced meanings.
The identification of DLM training with weighted regression — and existence
of ERM solutions — is in Regression.lean, via the least-squares keystone
Core.IsLeastSquares. The endstate theory is rule-agnostic: composing
isERMSolution_iff_forall_column with the orthogonality principle
Core.sum_whCorrection_eq_zero_iff identifies the ERM set with the
equilibria of any error-driven rule in the Widrow-Hoff family.
TODO #
Matrix closed form G = (SᵀS)⁻¹SᵀC (the uniqueness half is
existsUnique_isERMSolution_iff in Regression.lean); approximate-decodability
gap bounds for semSup.
Substrate types #
A training experience is a finite indexed family of (meaning, form)
observation pairs — the rows of the papers' S and C matrices.
- meanings : Fin numEvents → MeaningVec meaningDim
- forms : Fin numEvents → FormVec formDim
Instances For
A frequency vector assigns one weight to each usage event — the
diagonal of the papers' Q ([GB24] appendix). The choice of
q is the cognitive commitment: uniform weights give EL and token counts
give FIL (log-transforms distort learning per [GB24]).
Nonnegativity is a per-theorem hypothesis.
Equations
- Processing.Lexical.Discriminative.FrequencyVector numEvents = (Fin numEvents → ℝ)
Instances For
The constant-1 frequency vector counts every event once (endstate learning).
Equations
Instances For
q.normalize rescales q to sum to 1, giving the empirical
distribution over events. For the PMF cast use PMF.ofRealWeightFn.
Instances For
The weighted loss #
Squared coordinate-distance Σⱼ (a j − b j)² between two form vectors.
Equations
- Processing.Lexical.Discriminative.squaredDist a b = ∑ j : Fin n, (a j - b j) ^ 2
Instances For
The frequency-weighted training loss
Σᵢ qᵢ · squaredDist (G (meanings i)) (forms i). This is the variational
characterisation of the papers' procedural √Q normal-equations
specification ([GB24] appendix; see weightedLoss_sqrtScale).
Equations
- Processing.Lexical.Discriminative.weightedLoss data q G = ∑ i : Fin m, q i * Processing.Lexical.Discriminative.squaredDist (G (data.meanings i)) (data.forms i)
Instances For
Under positive weights the loss vanishes exactly on interpolating maps.
Solution Props: ERM and EL #
G is an empirical risk minimiser (ERM) for data under q if
no linear map achieves a smaller weighted loss.
Equations
- One or more equations did not get rendered due to their size.
Instances For
An endstate-learning (EL) solution is an ERM solution under uniform weights ([GB24] appendix).
Equations
Instances For
Structural theorems #
The weighted loss is linear in the frequency vector.
ERM solutions are invariant under positive rescaling of the frequency vector — only relative frequencies matter.
Per-coordinate residual optimality #
The loss separates across form coordinates — each column of G regresses one
cue's support on the semantic dimensions, "optimal in the least-squares sense"
([HCB26] ch. 6) — so ERM is exactly columnwise
unbeatability.
Weighted squared residual of a predicted column pred against
form coordinate j₀ of the training data.
Equations
- Processing.Lexical.Discriminative.coordResidual data q pred j₀ = ∑ k : Fin m, q k * (pred k - data.forms k j₀) ^ 2
Instances For
The weighted loss is the sum over form coordinates of the per-coordinate residuals — each column of the production map is an independent regression.
G is an ERM solution iff at every form coordinate its column's residual
is at most that of any linear functional of the meanings — ERM is
columnwise-unbeatable regression. No sign condition on q.
Rescaling invariance #
The "frequency-vector-as-counts" view (DLM-paper-faithful) and the
"frequency-vector-as-empirical-distribution" view (Bayesian-tradition) make
identical predictions about which production maps are ERM-optimal. For the
PMF (Fin m) cast of q.normalize, call PMF.ofRealWeightFn from
Core.Probability.Constructions directly.
A frequency vector and its empirical distribution agree on which production maps are ERM solutions.
√Q transport #
[GB24]'s appendix computes EL from the normal equations of
regression and FIL by solving the EL problem on √Q-premultiplied S and
C matrices; [HCB26] gives the same construction, and
[Hei24] proves the equivalence with frequency-replicated training
data via the closed-form normal-equations solution, under invertibility.
Here the premultiplied experience is TrainingExperience.sqrtScale and the
equivalence (isELSolution_sqrtScale_iff) is stated invertibility-free at
the level of ERM solution sets. (Regression.lean applies the same √q
scaling inside its design map.)
The √q-premultiplied training experience scales event i by √(q i)
in both meaning and form — the √Q-premultiplication of S and C of
[GB24]'s appendix and [HCB26].
Equations
Instances For
Normal equations: ERM ⟺ residual orthogonality #
[GB24]'s appendix and [Hei24] compute the mappings from
the normal equations of regression (SᵀQ(SG − C) = 0 premultiplied into closed
form under invertibility). Stated invertibility-free: G is an ERM solution
iff every residual-prediction pairing vanishes — the first-order condition of
the quadratic loss. Fitted values on experienced meanings are therefore unique
across ERM solutions, which is what makes the model's predictions (and the
semSup measures) well-defined properties of the training experience.
The q-weighted pairing ∑ᵢ qᵢ ⟨G(sᵢ) − cᵢ, H(sᵢ)⟩ of G's residuals
with H's predictions. The normal equations say this vanishes for every
H exactly at the ERM solutions.
Equations
- Processing.Lexical.Discriminative.residualPairing data q G H = ∑ i : Fin m, q i * ∑ j : Fin n, (G (data.meanings i) j - data.forms i j) * H (data.meanings i) j
Instances For
The q-weighted squared magnitude of H's predictions on the
training meanings.
Equations
- Processing.Lexical.Discriminative.predictionEnergy data q H = ∑ i : Fin m, q i * ∑ j : Fin n, H (data.meanings i) j ^ 2
Instances For
Perturbing the weighted loss around G by H adds twice the residual
pairing plus the energy of the perturbation.
ERM characterisations, uniqueness, and transport #
Graded transfer: if some linear functional of the meanings decodes
coordinate j₀ within total weighted squared error ε, then any ERM
solution's prediction at a positively-weighted event deviates from the
observed value by at most √(ε / q i). Exact decodability is the ε = 0
case (IsERMSolution.coord_eq_of_decodable).
If some linear functional w of the meanings exactly reproduces
coordinate j₀ of the observed forms, then any ERM solution under
positive weights also reproduces it exactly on the training events —
the ε = 0 case of IsERMSolution.abs_coord_sub_le.
A map that reproduces every training form exactly is an ERM solution
under any nonnegative weights — IsERMSolution is nonvacuous whenever
the data are linearly interpolable.
G is an ERM solution iff every residual-prediction pairing vanishes.
This is the first-order condition of the quadratic loss, with no
invertibility hypothesis.
In the papers' columnwise form of the normal equations, G is an ERM
solution iff at every form coordinate the q-weighted residual column is
orthogonal to every linear functional of the meanings. Quantifying over
functionals is SᵀQ(SG − C) = 0 with Sᵀ's rows generalized to the full
dual space.
Under positive weights the prediction energy is definite: it vanishes iff the predictions vanish on every training meaning.
All ERM solutions under positive weights produce the same predicted form for every experienced meaning — fitted values are unique even when the ERM map is not.
ERM solutions agree at every meaning in the span of the experienced
ones. Together with
IsERMSolution.exists_apply_ne, novel-item predictions are well-defined
exactly on the span of experience — the model generalizes by linear
combination of experienced meanings and is unconstrained beyond them.
Adding a map that vanishes on every training meaning preserves ERM: the
ERM solutions are closed under the data-annihilating directions (and by
IsERMSolution.apply_meanings_eq they form exactly such a coset).
Off the span of experienced meanings, ERM solutions are genuinely underdetermined — any ERM solution can be modified into another with a different prediction at any unexperienced meaning direction, by adding a correction supported on the annihilator of the span.
The uniform-weight loss on the √q-premultiplied experience is the
q-weighted loss on the original.
FIL under q is exactly EL on the √q-premultiplied experience —
[Hei24]'s FIL-EL equivalence, invertibility-free.
Connection to LinearDiscriminativeLexicon #
D is trained on data under weights q if its production map is
an ERM solution.
Equations
- D.IsTrainedOn data q = Processing.Lexical.Discriminative.IsERMSolution data q D.production
Instances For
A DLM is EL-trained for given data iff its production map is the type-uniform ERM solution.
Equations
- D.IsELTrainedOn data = D.IsTrainedOn data (Processing.Lexical.Discriminative.uniformFrequency m)
Instances For
A DLM is FIL-trained with a given frequency vector iff its production map is the corresponding ERM solution.
Equations
- D.IsFILTrainedOn data q = D.IsTrainedOn data q
Instances For
A trained DLM's semantic support at a linearly decodable form coordinate
equals the observed form value on every positively-weighted training
event; any contrast carried by that coordinate — categorical or graded —
transfers to semSup exactly.
Graded form of semSup_eq_of_decodable: a trained DLM's semantic support
at a coordinate decoded within total weighted squared error ε deviates
from the observed form value by at most √(ε / q i) — the transfer
theorem in the graded form the applications actually use, where decoding
is estimated rather than exact ([GB24];
[HCB26]).
Two DLMs trained on the same experience and weights have identical
semantic support at every experienced meaning
(IsERMSolution.apply_meanings_eq); semSup is thus a well-defined
property of the training experience, not of the particular ERM solution.
semSup is well-defined for novel meanings too, as long as they lie
in the span of experienced ones — the model generalizes by linear
combination of experienced meanings. Off the span, predictions are
underdetermined (IsERMSolution.exists_apply_ne).
Semantic Support for Form ([GB24] appendix;
[HCB26]) — semSupWord over a word's cue
coordinates — equals the sum of the observed form values whenever each
coordinate is linearly decodable from the meanings.