DLM training: endstate and frequency-informed learning #
A DLM is trained by solving SG = C in the least-squares sense: the mapping matrix G minimises
the frequency-weighted loss ∑ᵢ qᵢ ‖(SG − C)ᵢ‖² over the semantic matrix S and form matrix C
of the training experience. The weights are the cognitive commitment, uniform for endstate
learning (EL) and token counts for frequency-informed learning (FIL,
[heitmeier-chuang-axen-baayen-2024]); the optimisation is fixed. The loss separates over form
coordinates, so each column of G is a vector least-squares problem for the √Q-scaled design
√Q S, where Mathlib characterises the minimisers by the adjoint (Core.IsLeastSquares). That
gives the normal equations SᵀQ(SG − C) = 0 of [gahl-baayen-2024]'s appendix and their closed
form (SᵀQS)⁻¹SᵀQC, existence, uniqueness of the fitted values SG (hence of semSup at
experienced meanings), the solution coset, and the identification of FIL under q with EL on the
√Q-premultiplied experience ([heitmeier-2024]).
Main declarations #
TrainingExperience,FrequencyVector,weightedLoss,IsTrained,IsELTrained.isTrained_iff_forall_isLeastSquares,exists_isTrained: training is columnwise least squares, and solutions exist.isTrained_iff,isTrained_closedForm: the normal equationsSᵀQ(SG − C) = 0and their closed form.IsTrained.mul_eq,IsTrained.vecMul_eq_of_mem_span,IsTrained.exists_vecMul_ne,existsUnique_isTrained_iff: fitted values are unique exactly on the span of experience.isELTrained_sqrtScale_iff: FIL underqis EL onTrainingExperience.sqrtScale.Linear.IsTrainedOnand thesemSuptransfer theorems.IsTrained.sum_smul_mul_eq_of_decodable,Linear.IsELTrainedOn.production_centroid_eq_of_decodable: fitted and observed forms agree on every linearly decodable average, so a trained DLM sends the centroid of a linearly decodable set of meanings to the centroid of its forms.
References #
- [Y.-Y. Chuang, M. J. Bell, Y.-H. Tseng and R. H. Baayen, Word-specific tonal realizations in Mandarin (2026)][chuang-bell-tseng-baayen-2026]
- [S. Gahl and R. H. Baayen, Time and thyme again (2024)][gahl-baayen-2024]
- [M. Heitmeier, Mappings in the Discriminative Lexicon Model (2024)][heitmeier-2024]
- [M. Heitmeier, Y.-Y. Chuang, S. D. Axen and R. H. Baayen, Frequency effects in linear discriminative learning (2024)][heitmeier-chuang-axen-baayen-2024]
- [M. Heitmeier, Y.-Y. Chuang and R. H. Baayen, The Discriminative Lexicon (2026)][heitmeier-chuang-baayen-2026]
- [Y. Lu, Y.-Y. Chuang and R. H. Baayen, The realization of tones in spontaneous spoken Taiwan Mandarin (2026)][lu-chuang-baayen-2026]
The training problem #
A frequency vector weights each usage event, the diagonal of the papers' Q. Uniform
weights give EL, token counts FIL ([gahl-baayen-2024]'s appendix, which warns against
log-transforming them).
Equations
- DiscriminativeLexicon.FrequencyVector numEvents = (Fin numEvents → NNReal)
Instances For
The weight matrix Q.
Equations
- q.Q = Matrix.diagonal fun (i : Fin m) => ↑(q i)
Instances For
Its square root, the √Q of the papers' appendix.
Equations
- q.sqrtQ = Matrix.diagonal fun (i : Fin m) => √↑(q i)
Instances For
The √Q-premultiplied experience (√Q S, √Q C) of the papers' appendix.
Instances For
The frequency-weighted training loss ∑ᵢ qᵢ ‖(SG − C)ᵢ‖².
Equations
- DiscriminativeLexicon.weightedLoss data q G = ∑ i : Fin m, ↑(q i) * (data.S * G - data.C) i ⬝ᵥ (data.S * G - data.C) i
Instances For
Under positive weights the loss vanishes exactly on interpolating maps.
G is trained on data under q when it minimises the weighted loss over all mapping
matrices: SG = C solved by least squares.
Equations
- DiscriminativeLexicon.IsTrained data q G = IsMinOn (DiscriminativeLexicon.weightedLoss data q) Set.univ G
Instances For
Endstate learning: training under uniform weights ([gahl-baayen-2024] appendix).
Equations
- DiscriminativeLexicon.IsELTrained data G = DiscriminativeLexicon.IsTrained data 1 G
Instances For
Only relative frequencies matter.
The uniform-weight loss on the √Q-premultiplied experience is the q-weighted loss.
FIL under q is exactly EL on the √Q-premultiplied experience: [heitmeier-2024]'s FIL–EL
equivalence, invertibility-free.
Training as columnwise least squares #
The loss separates over form coordinates: column j of G is a least-squares solution of the
√Q-scaled regression of column j of C on S, a vector problem in Euclidean space.
The weighted loss is the sum over form coordinates of the columns' squared residuals.
Training is columnwise least squares: each column of G minimises the residual of the
corresponding scaled regression.
Trained mapping matrices exist.
The normal equations #
Normal equations: G is trained iff SᵀQ(SG − C) = 0 ([gahl-baayen-2024] (A2), (A4)),
from Mathlib's adjoint characterisation of least squares, column by column.
Closed form: when SᵀQS is invertible, G = (SᵀQS)⁻¹SᵀQC is trained
([gahl-baayen-2024] (A2), (A4)).
The endstate closed form G = (SᵀS)⁻¹SᵀC ([gahl-baayen-2024] (A2)).
The normal equations in vector form: the q-weighted residual rows, weighted further by any
linear functional of the meanings, sum to zero.
Whenever membership in a set P of usage events is a linear functional of the meanings, the
q-weighted sums of the fitted and of the observed forms over P agree.
Fitted values #
All trained matrices under positive weights produce the same predicted forms SG on the
training events: fitted values are unique even when G is not.
Trained matrices agree at every meaning in the span of the experienced ones.
Adding a matrix that annihilates every training meaning preserves training.
Off the span of experienced meanings, training is underdetermined: any trained matrix can be modified into another with a different prediction at an unexperienced meaning.
The trained matrix is uniquely determined exactly when the experienced meanings span the meaning space: the coordinate-free form of the papers' full-column-rank condition on the closed-form solution ([gahl-baayen-2024] appendix; [heitmeier-2024]).
If some linear functional of the meanings reproduces column j₀ of the observed forms
exactly, so does every trained matrix under positive weights, on every training event.
Trained lexicons #
The mapping matrix of the production map, acting on row vectors: ĉ = sG.
Equations
- D.productionMatrix = (LinearMap.toMatrix' D.production).transpose
Instances For
Row i of the fitted forms is the production map at the i-th experienced meaning.
D is trained on data under weights q if its production matrix is. Only the
production side is constrained, as in the papers' production models.
Equations
- DiscriminativeLexicon.Linear.IsTrainedOn data q D = DiscriminativeLexicon.IsTrained data q D.productionMatrix
Instances For
A DLM is EL-trained on data iff its production matrix is trained under uniform weights.
Equations
Instances For
A trained DLM's semantic support at a linearly decodable form coordinate equals the observed form value on every training event.
Two DLMs trained on the same experience and weights have identical semantic support at every
experienced meaning: semSup is a property of the training experience, not of the particular
trained matrix.
semSup is well-defined at novel meanings in the span of experienced ones.
Semantic Support for Form ([gahl-baayen-2024] appendix) at a form vector equals the observed form's own support whenever each coordinate the form vector touches is linearly decodable from the meanings.
Centroids #
Centroids under training ([chuang-bell-tseng-baayen-2026] §3.4, [lu-chuang-baayen-2026]
§4.4): whenever membership in a nonempty set P of usage events is a linear functional of the
meanings, an EL-trained DLM sends the centroid of P's meanings exactly to the centroid of P's
observed forms. Linearity alone sends it to the centroid of the predicted forms
(LinearMap.map_centroid); training makes those coincide with the observed ones.