A Pre-Inference Geometric Operator for Complementary Cognitive-Affective Vector Guidance: The MDEI/MAT-3 Framework
Tiago Aguioncio Vieira
Universidade de São Paulo, São Paulo, Brazil
Abstract
Problem. Affective and cognitive-affective processing in language models is usually assessed and steered through static, single-turn labels or through interventions that either retrain model weights or manipulate internal activations directly, both of which are costly, opaque, or hard to audit externally. Gap. No lightweight, mathematically specified, externally auditable mechanism exists for evaluating and complementing the geometry of a representation immediately before inference, without retraining and without altering internal weights or activations. Architecture. We formalise a pipeline in which an original input x is never discarded: a deterministic auxiliary encoder produces an embedding z; MAT-3 estimates local geometry around z and computes a bounded, complementary auxiliary vector z_aux; the joint object 𝓘(x) = (x, z, z_aux) — not z_aux alone — is what reaches the language model. MAT-3 definition. MAT-3 is defined precisely as this pre-inference, weight-external, bounded local-realignment map, together with nine explicit local-validity conditions (LEV-1 to LEV-9, one of them, LEV-8, strengthened here with an eigen-gap requirement) governing when a correction is trustworthy and when the system must instead abstain and pass the original representation unchanged. Mathematical results. We prove that the correction is bounded (Proposition 3.1), locally contracting under frozen local geometry (Propositions 3.2–3.4), and re-derive its variational form correctly, obtaining η = 1/(1+λ) rather than an earlier, asymptotically incorrect expression; we explicitly separate the frozen-geometry stability result, which is proved, from adaptive-geometry stability, which is left open. We give an operational, dimensionally stated redefinition of “emotional vector turbulence” and of an “emotional Reynolds-type index”, both explicitly distinguished from an earlier, illustrative physical-unit analogy retained only as a historical remark, and both explicitly acknowledged as depending on a non-unique force decomposition that must be fixed and reported for any given deployment. Synthetic validation. All numerical illustrations (Section 6) were actually executed — not estimated — in GNU Octave with a fixed seed, cross-checked against eight passing algebraic unit tests, and are explicitly labelled as mathematical illustrations, not statistical evidence of any benefit to a language model’s behaviour. External evidence. Two independent published studies — on functional emotion representations in a large language model, and on trajectory-based evaluation of emotional-support dialogue — are used strictly as sources of empirical vocabulary and validation observables, never as proof of an MDEI axiom or of a MAT-3 benefit. Main limitation. No downstream evaluation on any language model has been performed in this paper; whether the auxiliary vector improves, is neutral to, or degrades a model’s affective competence is an open empirical question. Future protocol. Section 8 specifies, but this paper does not execute, a falsifiable experimental protocol across multiple model families, explicitly separated from the present theoretical contribution.
Keywords: affective computing, dynamical systems, pre-inference intervention, representation geometry, Lyapunov stability, Neural ODEs, emotion representations, large language models
Main
1. Introduction
1.1 From static labels to continuous trajectories
Affective computing has traditionally represented emotional states either as discrete categories or as points in a low-dimensional static space, inspired by dimensional models of affect such as the circumplex model and the PAD (pleasure–arousal–dominance) model¹,². These are useful references, not identities to be reproduced: the three-coordinate state used later in this paper (Section 2.1) is inspired by this tradition as a specific modelling choice of the MDEI framework, not a claim of equivalence with any particular psychological instrument. A trajectory-based evaluation framework for language-model dialogue has shown, using explicit temporal metrics — a baseline emotional level, a trajectory-volatility measure, and a post-perturbation centroid-displacement measure — that single-turn assessments are insufficient to characterise affective competence over a conversation³. This is consistent with, and lends empirical vocabulary to, the theoretical claim that emotional processes are better modelled as continuous trajectories than as sequences of independent classifications⁴,⁵.
1.2 From semantic labels to representational geometry
A mechanistic-interpretability study of a production-scale language model probed 171 emotion-related concepts and associated each with a direction in the model’s residual-stream activation space, estimated as a difference-of-means vector over many generated stories per concept, after projecting out the leading principal components of emotionally neutral text⁶. These directions generalise across contexts, are causally relevant under activation steering (including in a safety-relevant role-play scenario), and are organised geometrically in a manner that broadly tracks human-rated conceptual similarity. The same study reports a negative result for a linear probe intended to track a persistent internal affect-like variable: above-chance in-distribution but non-generalising, with largest activations on emotionally neutral text. This is an important anchor throughout the present paper (Section 8.2): it argues against reading any internal representation as evidence of a persistent, subjectively experienced state, and in favour of reading it as local, content-dependent geometry. It does not show that the model possesses 171 independently existing emotions (171 is the size of the probing list, not a measured property of the representation), does not demonstrate subjective experience, and does not, on its own, validate any axiom of the MDEI framework below.
1.3 The pre-inference geometric gap
Most pipelines that modulate a language model’s emotional register either alter weights (fine-tuning) or manipulate internal activations directly (steering), both requiring internal model access and both hard to audit externally. We refer to the absence of a lightweight, externally auditable mechanism that evaluates and complements the geometry of a representation immediately before inference — without retraining, without internal-activation access, and without discarding the original input — as the pre-inference geometric gap.
1.4 Corrected architecture: a complementary, not a replacing, signal
A previous internal draft of this framework described MAT-3 predominantly through the map z⁺ = M₃(z), which can be read as replacing the representation consumed by the model. That is not the architecture this paper adopts. Concretely (Fig. 1):
The original input x is preserved unmodified throughout.
A deterministic auxiliary encoder produces an embedding z from x.
MAT-3 estimates local geometry around z and computes an auxiliary vector z_aux = M₃(z), bounded and subject to the LEV conditions of Section 3.
The original input/embedding and the auxiliary vector are supplied jointly,
𝓘(x) = (x, z, z_aux), or equivalently y = LLM(x, z_aux), (1.1)
depending on which concrete fusion mechanism a deployment chooses (Section 2.2); in no case is x discarded or replaced.
Model weights and internal activations are not modified by this pipeline.
When the LEV conditions are not met, MAT-3 abstains and z_aux = z (Section 3.4, LEV-9): the auxiliary channel then carries no correction, rather than the pipeline silently failing or fabricating a signal.
A hypothetical escalation stage referred to elsewhere as MAT-4 is explicitly out of scope for this paper; it appears in Fig. 1 only as a dashed, future-work box and is not treated anywhere in this paper as an operational component, a required comparison condition, or a defined algorithm.
Figure 1. Architecture flowchart: original input, deterministic auxiliary encoder, embedding, local-geometry estimation, MAT-3, LEV validity checks, the abstention branch (dashed), the resulting joint object 𝓘(x), and the (unmodified) language-model forward pass. MAT-4 appears only as a dashed future-work box and plays no operational role in this paper.

1.5 Scientific and Technological Contributions
This paper’s proposed contribution is:
- An external, pre-inference mechanism that supplies complementary vector context to a language model, without discarding the original input.
- A local, bounded, selective realignment operator (MAT-3) acting on that complementary channel.
- A design that preserves the original input while adding cognitive-affective geometric information alongside it.
- A hypothesis, not a demonstrated result, that this complementary signal may reduce ambiguity in utterances carrying co-occurring, opposed, or rapidly shifting emotional content — to be tested per the protocol of Section 8.
- An architecture requiring no retraining and no modification of model weights.
- An explicit abstention mechanism (LEV-9) that withholds correction in geometrically untrustworthy regions rather than forcing one.
- A mathematical structure that turns the intervention into a falsifiable, reproducible hypothesis rather than an assumed benefit.
- A hypothesis, not a demonstrated result, that the auxiliary signal may reduce the inferential effort a model needs to resolve ambiguous emotional relations — again to be measured, not claimed, in this paper. We do not claim a computational-cost reduction as an established result here; no such measurement was performed.
1.6 A precise separation of claim types
Throughout, we separate four classes of statement: an axiom (a postulate we adopt), a theorem (a proved consequence of stated hypotheses), empirical evidence (an observation from data, ours or external), and a scientific hypothesis (testable but unproven). External data are never treated as proof of an axiom; at most they are compatible with, or a test of, its observable consequences.
1.7 Relation to prior work by the author
This paper extends a line of prior work by the author on the MDEI framework, cited here for provenance. An earlier formulation introduced the vector-table representation and the algebraic-dynamic formalisation of MDEI states⁷,¹⁰ (published in both a Portuguese-language journal article and its English-language book-chapter counterpart). A companion paper introduced the Lyapunov-based stability criteria and the original, illustrative hydrodynamic analogy for the emotional Reynolds number, explicitly flagged there as requiring future empirical calibration⁸. A further report examined the dynamical-systems perspective on neural-network latent spaces, Neural ODEs, and manifold/attractor structure that underlies the continuous-time treatment used here⁹. Wherever the present paper’s formulation disagrees with these earlier versions — most importantly, the corrected variational derivation of η (Section 5.5) and the corrected, complementary-vector architecture (Section 1.4) — the present paper supersedes them; the earlier papers are cited for historical continuity, not as independent validation of the present claims. Two further manuscripts are in preparation and are noted for completeness only, without their (unpublished) results being used as evidence for any claim here: a companion analysis of global-attractor existence and spectral-dimension bounds for MDEI-type dynamics, and a unified geometric–control extension addressing a higher-order correction stage informally referred to elsewhere as MAT-4.
2. The MDEI continuous state space and the encoder interface
2.1 Hilbert-space structure
Definition 2.1 (Emotional state space). Let H = L²(Ω, ℝ³), Ω ⊂ ℝ³ bounded and smooth, with canonical inner product. We work in the finite-dimensional subspace H₃ ≅ ℝ³, u = (c, ι, τ)ᵀ, c ∈ [−1,1] a cognitive-valence coordinate, ι ∈ [0,1] an intensity/arousal coordinate, τ ∈ [0,1] a cognitive-tension coordinate. The three-coordinate choice is inspired by dimensional affective models, including the circumplex and PAD traditions, but constitutes a specific modelling choice of the MDEI framework, not a claim of equivalence with either instrument. Extension to H_n, n > 3, is an open direction (Section 9.4), not pursued here.
Theorem 2.1 (Completeness). (H₃, ‖·‖₂) is complete. Proof. Immediate from completeness of ℝ³. ∎
2.2 From embeddings to MDEI states: a fixed reference interface
Reference interface (fixed for this paper). Among the several interfaces that could in principle carry z_aux into a language model (sentence embedding, token embedding, encoder output, continuous soft prompt/prefix, dedicated affective-feature vector, or auxiliary-network output), this paper fixes one as its reference implementation for all derivations and illustrations: a continuous prefix/soft-prompt vector of fixed dimension d, prepended as additional continuous input alongside the model’s ordinary tokenised input, following the general soft-prompt paradigm used elsewhere in the literature. Under this choice: (i) z is the prefix vector produced by the deterministic auxiliary encoder from x; (ii) MAT-3 computes z_aux = M₃(z) from z and a reference sample of previously observed prefix vectors; (iii) the joint object passed to the model is the original tokenised x together with a two-slot continuous prefix carrying both z and z_aux, so the model can in principle learn to use, ignore, or contrast the two; (iv) no change is made to the model’s weights or attention computation, since a soft prefix is, architecturally, additional input, not a weight modification. Other interfaces remain valid deployment choices but require separate calibration of the encoder map E below and are not analysed further in this paper. We further note explicitly that a soft-prompt channel of this kind requires either a model that already accepts continuous prefixes, or an adapter layer trained to consume one; this is a genuine engineering dependency of the reference interface, stated here rather than left implicit, and it means MAT-3 is not, in this reference form, usable unmodified on an arbitrary closed API that only accepts text.
We define an encoder map E : ℝᵈ → H₃, u = E(z), required only to be Lipschitz continuous (so that bounded corrections in z-space give bounded changes in u-space, Lemma 2.1, Appendix B); E is treated as an external, separately calibratable component, and no claim is made that it exists in closed form for any specific production model.
2.3 Continuous dynamics
Axiom 2.1 (Continuity). On a bounded interval, absent externally imposed discontinuities, du/dt = F(u, ξ, t), u(0) = u₀ ∈ M, for F locally Lipschitz in u. This is a postulate: it asserts that a discrete, token-by-token process can be usefully approximated by a continuous flow between discontinuities. Ref. 3’s trajectory metrics test observable consequences of this axiom (Section 8.3) but do not prove it.
Axiom 2.2 (Non-anticipative evolution). F depends on the current state, past information, present inputs, and stochastic perturbations realised up to t, not on future information. “Non-anticipative” rather than “deterministic”, since Section 2.5 allows F to depend on a Wiener process.
Axiom 2.3 (Dissipative energy bound). For a C² Lyapunov candidate V, there exist α > 0, β ≥ 0 with ⟨∇V(u), F(u,ξ,t)⟩ ≤ −αV(u) + β. Boundedness of V along trajectories is then a proved consequence (Theorem 2.3), not an independent postulate.
Axiom 2.4 (Coordinate covariance). We do not postulate general affine invariance. We prove orthogonal equivariance of the correction (Proposition 2.1, Appendix B, now numerically confirmed to 4 × 10⁻¹⁶ in Section 6.4, Test 8) and use the Mahalanobis metric d_Σ(x,y) = √((x−y)ᵀΣ⁻¹(x−y)) wherever an affine-invariant distance is required.
2.4 Existence, boundedness, and attractors: four separated results
Theorem 2.2 (Existence and uniqueness). F locally Lipschitz uniformly in (ξ,t) on compacts and linear-growth bounded ⟹ unique maximal solution (Picard–Lindelöf + continuation).
Theorem 2.3 (Uniform boundedness). Under Axiom 2.3, V(u(t)) ≤ V(u₀)e^(−αt) + β/α (Grönwall).
Theorem 2.4 (Absorbing set). B = {u : V(u) ≤ β/α + 1} is positively invariant and absorbing.
Theorem 2.5 (Attractor — conditional). If, additionally, φ_t is continuous and asymptotically compact on M, then M admits a global attractor, defined via the standard ω-limit construction
𝒜 = ⋂{s≥0} closure(⋃{t≥s} φ_t(B)), (2.1)
in the sense of Ref. 11 — not the simplified intersection ⋂_{t≥0}φ_t(B) used in an earlier draft, which is not the standard object and does not follow from dissipativity alone.
Theorem 2.6 (Structural stability — conditional, not claimed in general). Requires hyperbolicity or an Axiom-A/Morse–Smale-type condition in addition to Theorems 2.3–2.5. We do not claim every C² vector field on a compact manifold is structurally stable, and we do not assert this theorem for the unqualified MDEI field; it marks a requirement, not a result, and is left open, citing the companion attractor manuscript (Section 1.7) for the relevant machinery.
2.5 Stochastic extension
du = F(u,t)dt + G(u,t)dW_t; special case du_t = −∇V(u_t)dt + B(u_t,t)dt + Σ(u_t,t)dW_t; N-state coupling dU_i = −∇_{U_i}𝒱(U₁,…,U_N)dt + Σ_i dW_i on ℝ^{3N}. This coupled extension is a proposed generalisation, motivated by the standard identification of N three-dimensional particles with one point in a 3N-dimensional configuration space; it is not an observed property of any language model and is not used in this paper’s proofs.
2.6 Spectral structure
The temporal spectrum of u(t) (Fourier/wavelet analysis of the trajectory) is used in Section 4.2 for a spectral-broadening turbulence term. The geometric spectrum of the ambient data used by MAT-3 (Section 3) comes from a kernel operator (𝒦g)(x) = ∫K(x,y)g(y)dP(y), 𝒦φ_j = λ_jφ_j; these eigenfunctions are orthogonal with respect to P(x), not Lebesgue measure — we say “orthogonal with respect to P(x)”, not “non-orthogonal”. Out-of-sample evaluation uses the Nyström extension.
3. MAT-3: a pre-inference geometric guidance operator
3.1 Definition and scope
Definition 3.1 (MAT-3). MAT-3 (Algebraic Transformation Method, acting on the three-dimensional MDEI state representation — this is the single, fixed origin of “3” used throughout this paper) is a function M₃ : ℝᵈ → ℝᵈ computing, from z and a reference sample, a complementary auxiliary vector z_aux = M₃(z), applied before z reaches the target model’s forward pass. M₃ has no access to, and produces no change in, the model’s weights or internal activations. The original z (equivalently, the original x) is never discarded or replaced: the object that reaches the model is the joint pair (Section 1.4, Eq. 1.1), not z_aux in isolation. Because the local geometry, the encoder E, the reference sample, and the calibrated parameters (η, ε, thresholds) are all specific to the embedding space in use, we describe MAT-3 as external to the model’s weights and architecture-external, not as “model-agnostic” in an unqualified sense: applying it to a different model or encoder requires re-estimating this local geometry and re-calibrating its parameters: it is weight-agnostic, not calibration-free.
3.2 Local geometry estimation
𝒩_k(z) = {z₍₁₎,…,z₍ₖ₎}, μ_z = (1/k)Σz_j, C_z = (1/k)Σ(z_j−μ_z)(z_j−μ_z)ᵀ. Eigendecomposition C_z = UΛUᵀ (or regularised SVD for k<d) gives leading r directions U_r, projector P_z = U_rU_rᵀ. This assumes only that the local neighbourhood of z lies approximately on a lower-dimensional submanifold — a standard local-PCA/manifold-learning assumption — and nothing about the semantic content of z.
3.3 The correction and its bound
ẑ = μ_z + P_z(z−μ_z); M₃(z) = z⁺ = (1−η)z + ηẑ, 0 ≤ η ≤ 1; Δz_MAT3 = η(ẑ−z), ‖Δz_MAT3‖ ≤ ε. Where the surrounding text of this paper refers loosely to “the correction” or “z⁺”, this is always understood as the value assigned to the complementary channel z_aux, per Section 1.4 — never as a value substituted for the original z.
3.4 LEV-1 to LEV-9: local-validity conditions (revised)
LEV-1 (Well-defined domain). 0 < ‖z‖ < ∞. Non-finite/zero inputs are filtered upstream (Section 6.4, Test 6).
LEV-2 (Sufficient neighbourhood). k ≥ r+1 (Section 6.4, Test 7; Appendix A.1).
LEV-3 (Regularised, well-conditioned covariance — revised wording). Formerly stated only as “regularised”; we now require explicitly that the condition number of the regularised covariance remain below a declared ceiling,
κ(C_z^λ) ≤ κ_max, C_z^λ = C_z + λI, λ > 0. (3.1)
We stress, as flagged in review, that adding λI guarantees invertibility but does not by itself guarantee a good geometric estimate: it does not substitute for a sufficient sample size (LEV-2) or for an adequate spectral gap (LEV-8′ below).
LEV-4 (Bounded intervention). ‖z⁺−z‖ ≤ ε (Proposition 3.1; Section 6.4, Test 3).
LEV-5 (Transverse contraction). ‖(I−P_z)(z⁺−μ_z)‖ ≤ ‖(I−P_z)(z−μ_z)‖ (Appendix A.4; Section 6.4, Test 4). This is the one directional-improvement claim we regard as unconditionally solid, and is why LEV-6 below is deliberately weakened relative to an earlier draft.
LEV-6 (Angular discrepancy — revised, now conditional/empirical). An earlier draft claimed unconditionally that removing the transverse component reduces the angle θ(z⁺, r_z) to a fixed reference direction r_z. On review this is not generally true: it can fail whenever μ_z ≠ 0, whenever the angle is measured from the origin rather than from μ_z, or whenever r_z is not itself (approximately) in range(P_z). We therefore restate LEV-6 in centred form,
θ(z⁺−μ_z, r_z) ≤ θ(z−μ_z, r_z), (3.2)
and prove it (Appendix A.5) only under the explicit, stated alignment condition r_z ∈ range(P_z); outside that condition LEV-6 is downgraded to an empirical criterion to be checked after correction, not an unconditional guarantee, and a violation should be treated as an ordinary signal, alongside LEV-7 and LEV-9, rather than a contradiction of the framework.
LEV-7 (Semantic preservation). D_sem(z, z⁺) ≤ τ_sem for a declared D_sem. Not provable from linear algebra alone; a measured, calibrated condition (Section 8.4).
LEV-8 (Local Lipschitz continuity, now with an explicit eigengap requirement). Within the trusted region, ‖M₃(z₁)−M₃(z₂)‖ ≤ L_M‖z₁−z₂‖. As flagged in review, this requires more than regularisation of C_z: for P_z to vary in a controlled way as z moves, the local spectrum must be separated,
λ_r(C_z) − λ_{r+1}(C_z) ≥ γ > 0, (3.3)
an eigen-gap condition; a Davis–Kahan-type bound then controls the variation of P_z in terms of γ and the perturbation of C_z (stated, not proved in closed form, in Appendix A.7). LEV-8 as used operationally therefore requires jointly: a locally constant k-nearest-neighbour set, a positive margin between the k-th and (k+1)-th neighbour distances, the eigengap (3.3), controlled variation of η(z), and distance from clipping/abstention boundaries.
LEV-9 (Safe abstention). When LEV-2, LEV-3, or the eigengap condition fail, or when 𝒯 ≥ τ₂ (Section 4.2), MAT-3 abstains: z_aux = z. A hypothetical escalation stage (MAT-4) is out of scope (Section 1.4) and is not otherwise specified or invoked anywhere in this paper.
Proposition 3.1 (Bounded correction; LEV-4). η ≤ ε/(‖ẑ−z‖+δ) ⟹ ‖z⁺−z‖ ≤ ε. Proof. As before, ‖z⁺−z‖ = η‖ẑ−z‖ ≤ ε. ∎ (Executed check: Section 6.4, Test 3, err = −6.2×10⁻¹⁰.)
Proposition 3.2 (Contraction toward the projected point, frozen geometry). z⁺−ẑ = (1−η)(z−ẑ).
Proposition 3.3 (Discrete Lyapunov decrease, frozen geometry). V_M(z) = ½‖z−ẑ‖² ⟹ V_M(z⁺) = (1−η)²V_M(z) < V_M(z) for z≠ẑ, 0<η≤1. (Executed check: Section 6.4, Test 5, and Section 6, Illustration 1, max sample-wise error 8.7×10⁻¹⁵.)
We stress again what Proposition 3.3 does and does not show: a fully proved, and now numerically confirmed, statement of local geometric stability of the auxiliary channel under frozen local geometry. It says nothing about whether the resulting complementary signal improves a downstream model’s handling of emotional content — an empirical question requiring the protocol of Section 8.
3.5 Variational derivation (corrected)
The interpolated correction of Eq. (3.3, Section 3.3 above) is recovered from the constrained problem
δ* = argmin_{‖δ‖≤ε} [ ½‖(I−P_z)(z+δ−μ_z)‖² + (λ/2)‖δ‖² ]. (3.4)
Corrected result (Appendix C). Writing a = z−μ_z, Q = I−P_z (an orthogonal projector, so Qᵀ=Q, Q²=Q), and solving the unconstrained (interior) stationarity condition (Q+λI)δ = −Qa gives, on range(Q) where Q acts as the identity,
δ* = −a_⊥/(1+λ), a_⊥ := Qa, so that η = 1/(1+λ) (unconstrained-radius regime). (3.5)
This corrects an earlier, erroneous statement of η = λ/(1+λ), which had the wrong asymptotic behaviour (it would predict vanishing correction as intervention becomes free, λ→0, and saturating correction as intervention becomes infinitely costly, λ→∞ — the reverse of what a penalised least-squares problem should do). Equation (3.5) instead correctly gives η→1 as λ→0 (an unpenalised intervention fully projects onto the trusted subspace) and η→0 as λ→∞ (an infinitely costly intervention leaves z untouched). The boundary case ‖δ*‖=ε (active radius constraint) is handled by the KKT multiplier ν≥0, with effective regulariser λ+2ν and the same clipped form as Proposition 3.1; existence follows from compactness of the feasible set, uniqueness from strict convexity in δ for λ>0. Full KKT conditions are given in Appendix C.
3.6 Jacobian and local stability: frozen versus adaptive geometry (revised, per R5)
Proposition 3.4 (Frozen-geometry contraction). If P_z, μ_z, η are held fixed over a correction step (i.e., the local geometry does not depend on z within that step), then DM₃ = (1−η)I + ηP_z, an explicit, symmetric matrix with eigenvalues 1 (on range(P_z)) and 1−η (on its orthogonal complement); hence ρ(DM₃) = max(1, |1−η|) = 1 for 0≤η≤1, so ρ(DM₃) ≤ 1 holds exactly in this frozen-geometry case (Section 6.4, Test 8 confirms this numerically for a random rank-2 projector and random η, and Section 6, Illustration 3, confirms it over 500 trials with max observed ρ = 1.000000, saturating the bound as expected).
Open problem (adaptive geometry). When P_z, μ_z, and η depend on z — as they do in the full, deployed MAT-3, since the k-nearest-neighbour set, local covariance, and clipping factor are all recomputed at each z — the full Jacobian additionally contains the terms DP_z, Dμ_z, Dη(z), which are not accounted for by Proposition 3.4 and are not bounded by it. We do not claim ρ(DM₃(z)) ≤ 1 for the adaptive operator in this paper; establishing sufficient conditions for adaptive-geometry stability — plausibly requiring the eigengap condition (3.3) together with a Davis–Kahan-type bound on DP_z and a Lipschitz bound on η(z) away from clipping boundaries — is left as an explicitly open technical problem for future work, and no numerical illustration in this paper is presented as evidence for the adaptive case.
For the hybrid system z_{n+1} = Φ_Δt(M₃(z_n)), the Routh–Hurwitz conditions on J=∂F/∂u|_{u*}, p(λ)=λ³−tr(J)λ²+S₂(J)λ−det(J), with consistent signs −tr(J)>0, S₂(J)>0, −det(J)>0, [−tr(J)]S₂(J)>−det(J), were checked against direct eigenvalue computation on a 21-point parameter sweep and agreed on 21/21 points (Section 6, Illustration 3; zero disagreements) — this is a numerical consistency check of the sign conditions, not an independent proof, and concerns only the continuous MDEI flow Φ_Δt, not the adaptive MAT-3 Jacobian discussed above.
3.7 Estimating η, calibrating thresholds, and abstention
η, the turbulence thresholds (Section 4.2), and τ_sem (LEV-7) are hyperparameters calibrated on a validation split, never fitted on test data. SVR (ε-insensitive loss) is one candidate calibration tool, used strictly as a calibration/baseline device, not as part of any analytic proof.
3.8 Computational complexity
MAT-3 does not solve, and is not claimed to solve, any NP-complete problem. Neighbour search O(nd) naïvely (or amortised sublinear with an approximate index); local covariance O(kd²); truncated eigendecomposition/SVD cost depends on (k,d,r); projection O(dr). MAT-3’s engineering strategy is to restrict correction to a trusted local neighbourhood and low-dimensional subspace rather than perform global optimisation.
4. Operational redefinition of turbulence and of the emotional Reynolds-type index
4.1 Why a redefinition is needed
An earlier formulation assigned formal physical dimensions — density, characteristic length, viscosity — to an “emotional Reynolds number” by direct analogy with fluid mechanics⁸. We retain that formulation below as a labelled historical remark, since it is the origin of the “emotional turbulence” terminology, but it is not dimensionally grounded in any measured physical quantity and is superseded here for all quantitative use.
4.2 Emotional vector turbulence: definition (revised for weight normalisation and scope)
Definition 4.1. Emotional vector turbulence is a regime of elevated local geometric incoherence and dynamical instability: increased transverse residual, increased local angular dispersion, spectral broadening of the trajectory, and loss of local Jacobian contraction.
ρ_⊥(z) = ‖(I−P_z)(z−μ_z)‖{Σ_z}; D_θ(z) = 1 − ‖(1/k)Σ{z_j}(z_j−μ_z)/(‖z_j−μ_z‖+ε₀)‖ (ε₀>0 added explicitly to avoid division by zero for neighbours coincident with μ_z, a gap in an earlier draft); α_J(u) = max_i Re λ_i(J(u)); B_ω(t) = ∫_{Ω_high}S(ω,t)dω / (∫_Ω S(ω,t)dω + ε), Ω_high a declared high-frequency band.
Composite index (revised).
𝒯 = w₁ρ̃_⊥ + w₂D̃_θ + w₃σ(α_J) + w₄B_ω, w_i ≥ 0, Σ_i w_i = 1, (4.1)
with min–max normalised ρ̃_⊥, D̃θ and σ a declared bounded saturating function of α_J (e.g. a logistic squashing with a stated scale parameter), all calibrated on validation data (Section 8). Scope note, added on review: because α_J and B_ω require a temporal trajectory and a Jacobian model that are not available for a single static point, the illustrations of Section 6 compute only the two spatial terms, w₁ρ̃⊥+w₂D̃_θ with w₁=w₂=0.5 (so Σw_i=1 restricted to the spatial pair), and this is reported explicitly as a spatial turbulence proxy, not the full four-term index; the full index requires the additional trajectory-based components and has not been computed anywhere in this paper. Three regimes: 𝒯<τ₁ (coherent), τ₁≤𝒯<τ₂ (MAT-3 correction applies), 𝒯≥τ₂ (abstention, LEV-9). ETV from Ref. 3 may serve as an external, temporal, observable proxy associated with volatility but is a different quantity from 𝒯 and is not substituted for it without separate validation (Section 8.3).
4.3 The emotional Reynolds-type index: historical form and operational form (revised)
Historical Reynolds analogy (retained, historical only). Re_e^(0) = ρ_eǁu̇ǁL_e/μ_e⁸, with ρ_e, L_e, μ_e assigned illustrative rather than measured values.
Operational Reynolds-type index (revised with explicit term definitions and non-uniqueness caveat). F_drive = F_ext+F_int+N, F_auto = F_restore+F_diss, Re*_e(u,ξ,t) = ‖F_drive(u,ξ,t)‖/(‖F_auto(u)‖+ε). We state explicitly, as required on review: (i) F_ext is the externally imposed input term of F, F_int any internally generated non-restoring term, N any modelled stochastic driving term, F_restore the term proportional to −∇V (or an equivalent restoring term under the declared Lyapunov candidate), and F_diss any additional damping term, each to be specified in closed form for a given parametrisation of F before Re*_e is computed for that system; (ii) this decomposition of F into “drive” and “auto” parts is not unique — different, equally valid decompositions of the same F can in general yield different values of Re*_e for the same state, so any reported Re*_e must be accompanied by the explicit decomposition used; (iii) the metric ‖·‖ and the coordinate system in which it is computed must be declared, since Re*_e is not claimed to be invariant under a general reparametrisation (only orthogonal equivariance is established, Proposition 2.1); (iv) despite the terminology inherited from fluid mechanics, F_drive, F_restore, F_diss are not physical forces and Re*_e should be read strictly as a ratio between components of a vector field, not as evidence of any hydrodynamic mechanism. Re*_e < 1: restoring/dissipative terms dominate; Re*_e ≈ 1: transition; Re*_e > 1: perturbing terms dominate. The critical value Re*_{e,c} = argmax_τ Performance(τ) is estimated exclusively on validation data (Section 8), never on test data.
On the Feigenbaum constant. δ≈4.669… governs period-doubling interval ratios¹²; it is not substituted for the emotional Reynolds-type index and is mentioned only as a possible signature to look for if period-doubling instability is ever empirically observed, which it has not been.
4.4 Bifurcation structure (revised — Hopf claim removed per R6)
An earlier draft claimed a completed Hopf-bifurcation analysis with an appendix marked “Reserved” for the full first Lyapunov coefficient. That claim has been withdrawn: no completed Hopf analysis is presented in this paper. What is retained is the qualitative connection between the turbulence index and the approach of a stability boundary, α_J(u) → 0⁻, and the explicit statement that a rigorous Hopf-bifurcation treatment of the MDEI system — including all non-degeneracy and transversality conditions and the full first Lyapunov coefficient — remains future work, to be carried out and presented in a dedicated technical note rather than asserted here. A possible period-doubling route to vectorial turbulence, in which the Feigenbaum constant would become relevant, is similarly noted as an open direction and not an observed phenomenon.
5. Synthetic illustrations and executed unit tests (MATLAB/Octave)
5.1 Execution statement
Every numerical result in this section was actually
executed, not estimated. The MATLAB listings intended for
direct reader use (Methods, Section 10) require the Statistics and
Machine Learning Toolbox (knnsearch, eigs),
unavailable in the sandboxed environment used to prepare this
manuscript; the reported numbers were instead produced by mathematically
identical, toolbox-free scripts run in GNU Octave 8.4.0
with fixed seed 20260802 (full listings, Methods Section 10). A reader
with MATLAB and the relevant toolbox should reproduce the same figures
up to floating-point/RNG-stream differences between the two
platforms.
5.2 Illustration 1 — Bounded, contracting correction, with the R3/R18 numerical inconsistency resolved
Corrected parameters (n=2,000, d=10, r=2, k=30, λ=10⁻³, ε=0.06, chosen specifically so η is not saturated at 1 for nearly every point, unlike the earlier draft’s ε=0.5): mean ‖z⁺−z‖ = 0.0599 (max 0.0600, LEV-4: zero violations over all 2,000 points); mean η = 0.4653 (min 0.2120, max 1.0000, s.d. 0.1346; only 0.90% of points hit the η=1 clip); mean V_M(z⁺)/V_M(z) = 0.3040 (s.d. 0.1229), and the predicted value (1−η)² averaged over the same sample is also 0.3040. The identity was checked point-by-point: max sample-wise |ratioVM − (1−η)²| = 8.7 × 10⁻¹⁵ over all 2,000 points — i.e. exact to floating-point precision, resolving the inconsistency flagged in review. Jensen’s inequality is directly confirmed on the executed data: 𝔼[(1−η)²] = 0.3040 ≥ (1−𝔼[η])² = 0.2859.
5.3 Illustration 2 — Spatial turbulence proxy and regime classification
Same manifold, 300/2,000 points (15%) perturbed with additional noise (s.d. 0.6) as a “turbulent patch”. Spatial proxy 𝒯_spatial = 0.5ρ̃_⊥+0.5D̃_θ (not the full four-term index, Section 4.2), τ₁=0.3, τ₂=0.6: mean 𝒯_spatial = 0.6545 (s.d. 0.1127) on the patch vs 0.4487 (s.d. 0.0381) off it; 99.67% of the patch classified MAT-3-or-abstain; only 0.12% of undisturbed points classified coherent under these illustration-only thresholds — i.e., τ₁=0.3 is too low for this synthetic geometry (essentially the whole population is flagged), while the raw separation between patch and non-patch (0.65 vs 0.45) is large and consistent; this is reported as a threshold-calibration illustration, not a validated classifier, and τ₁, τ₂ require calibration on held-out data (Section 8) before any operational use.
5.4 Illustration 3 — Frozen-geometry Jacobian bound and Routh–Hurwitz sign check
Routh–Hurwitz sign conditions agreed with direct eigenvalue computation on 21/21 points of a swept dissipation parameter α_p∈[0.05,2.5]. Over 500 random trials of η∈[0,1] and a random rank-2 orthogonal projector P in d=5 (frozen-geometry case, Proposition 3.4), the maximum observed spectral radius of DM₃ was 1.000000, saturating — and consistent with — the exact bound ρ(DM₃)=max(1,|1−η|)=1. As stated in Section 3.6, this illustration concerns the frozen-geometry case only and is not evidence for the adaptive-geometry open problem.
5.5 Unit tests (new, per R10/critique §20)
Eight algebraic unit tests were executed (full listing, Methods Section 10), each with a computed numeric tolerance check rather than an unchecked assertion:
T1 symmetry of P: max|P-P^T| = 0.000e+00 -> PASS
T2 idempotency P^2=P: max|P^2-P| = 5.551e-16 -> PASS
T3 LEV-4 bound (<= eps): ||z+-z||-eps = -6.208e-10 -> PASS
T4 LEV-5 transverse contract: 3.0217 <= 3.2217 -> PASS
T5 Lyapunov identity: |V1-pred| = 8.882e-16 -> PASS
T6 LEV-1 zero-vector guard: norm=0 detected=1 -> PASS
T7 LEV-2 k<r+1 guard: k=2,r=3 violated=1 -> PASS
T8 orthogonal equivariance: ||M3(Qz)-Q M3(z)|| = 3.651e-16 -> PASS
Test 8 is a direct numerical confirmation of Proposition 2.1 (orthogonal equivariance) on randomly drawn data and a random orthogonal matrix, independent of the algebraic proof in Appendix B. All eight tests passed under the stated tolerances; none was omitted or hidden.
6. Validation protocol and use of external evidence
6.1 Principle
No external dataset is treated as proof of an MDEI axiom or of a MAT-3 benefit. External data can be shown consistent with an observable consequence of an axiom, or used to test a stated hypothesis.
6.2 Mapping to Sofroniew et al.⁶
Where raw concept-direction vectors are available: rank(Z), participation ratio d_eff=(Σλᵢ)²/Σλᵢ², PCA-explained variance, cluster structure, angular stability — a geometric characterisation exercise, not a test of any MDEI axiom, and not a claim that d_eff should numerically relate to any specific MDEI parameter. Where internal-activation access is available (not assumed by MAT-3 itself), h=G(z), test cos(G(z_aux−z), v_e) > ρ for a steering-relevant v_e — only this specific, unrun experiment could support an “interface hypothesis” claim.
6.3 Mapping to Tan et al.³
BEL, ETV = (1/(T−1))Σ‖u_{t+1}−u_t‖, ECP = ‖(1/T)Σu_t − u_target‖. Pre-registered hypotheses: H_ETV: ETV_MAT3 < ETV_baseline at matched LEV-7 adequacy; H_ECP: ECP_MAT3 < ECP_baseline after a perturbation. Neither is tested in this paper.
6.4 What currently has no empirical anchor
The coupled N-state extension (2.4); structural stability (Theorem 2.6); the specific numeric values of w₁–w₄, τ₁, τ₂; Re*_{e,c}; any period-doubling route to turbulence; the adaptive-geometry Jacobian bound (Section 3.6); and LEV-6 outside the stated alignment condition. These remain open items, not settled results.
7. Epistemic traceability table
| Element | Epistemic type | Current status | Evidence | Future test |
|---|---|---|---|---|
| Continuity of u(t) (Axiom 2.1) | Axiom | Postulated | Compatible temporal metrics only | BEL/ETV/ECP (Sec. 8.3) |
| Bounded correction (Prop. 3.1) | Theorem | Proved + executed | Algebra + Test 3 | — |
| Frozen-geometry contraction (Prop. 3.4) | Theorem | Proved + executed | Algebra + Test 8, Illustr. 3 | — |
| Adaptive-geometry Jacobian bound | Open problem | Not established | None | Davis–Kahan-type analysis |
| η = 1/(1+λ) (Section 3.5) | Theorem | Proved, corrected on review | Appendix C derivation | — |
| LEV-6 angular reduction | Conditional theorem / empirical | Proved only under r_z∈range(P_z); otherwise empirical | Appendix A.5 | Post-hoc measurement |
| LEV-7 semantic preservation | Empirical condition | Not demonstrated | None in this paper | Downstream evaluation |
| Emotional improvement (any downstream benefit) | Hypothesis | Not demonstrated | None | Full protocol, Sec. 8 |
| Computational-cost reduction | Hypothesis | Not demonstrated | None | Benchmark |
| Generalisation across model families | Hypothesis | Not demonstrated | None | ≥3 model families, Sec. 8 |
This table is included specifically to prevent a reader from mistaking a proved algebraic property for a demonstrated practical benefit.
7.1 What MAT-3 is and is not
MAT-3 is: an external, pre-inference module; selective; bounded; geometrically defined; auditable independently of the target model; dependent on a local reference-sample geometry; capable of abstaining; a producer of a complementary representation.
MAT-3 is not: fine-tuning; a change to model weights; internal activation steering; a mandatory replacement of the original input; a conventional semantic classifier; proof of consciousness or subjective experience; an automatic guarantee of improved inference; a physical fluid model; MAT-4; a universal, calibration-free mechanism independent of the embedding space.
7.2 Comparison with related intervention points
| Method | Locus of intervention | Requires training | Requires internal-activation access | Modifies weights | Preserves original input | Abstention mechanism |
|---|---|---|---|---|---|---|
| Fine-tuning | Weights | Yes | N/A | Yes | N/A | No |
| Activation steering | Internal activations | No (at inference) | Yes | No | N/A | No |
| Prompt engineering | Text input | No | No | No | Yes (is the input) | No |
| Soft/prefix prompting | Continuous input channel | Usually (adapter) | No | No | Yes | No |
| Linear probing | Read-out only, no intervention | Probe only | Yes (to probe) | No | N/A | N/A |
| Local PCA / manifold projection (generic) | Representation space | No | Depends | No | Depends | No |
| Retrieval-augmented generation | Text/context input | No | No | No | Yes | No |
| MAT-3 (this paper) | External pre-inference vector channel | No (calibration only) | No | No | Yes, by design (Sec. 1.4) | Yes (LEV-9) |
MAT-3’s originality is not claimed to lie in local geometric projection in isolation — such projections are standard in manifold learning — but in the specific combination of external pre-inference placement, a bounded local correction with proved algebraic guarantees, an explicit MDEI dynamical layer, nine stated validity conditions, and a design that structurally preserves the original input rather than replacing it.
8. Future experimental protocol (proposed; explicitly not executed in this paper)
This section is deliberately separated from the theoretical contribution above: it specifies what a subsequent, purely experimental paper would need to contain, and states clearly that none of it has been run here.
8.1 Comparison conditions. (i) base model, no auxiliary channel; (ii) base model with equivalent additional textual context but no geometrically realigned vector; (iii) base model with a random vector of matched dimension and norm; (iv) base model with a simple local projection but no MDEI dynamics; (v) base model with MAT-3 as defined here. A fine-tuned baseline may be added as condition (vi) if scientifically warranted. MAT-4 is not included in this protocol.
8.2 Candidate model families (for a future paper only). A minimal, architecturally diverse initial set could include one Llama-family model (e.g. in the 8B parameter class), one Mistral-family model (e.g. in the 7B class), and one Gemma-family model (e.g. in the 9B class); a fourth, Qwen-family model could be added subsequently. Parameter counts are not intended to be matched exactly; the goal is architectural and ecosystem diversity. No such experiment has been run for this paper, and no results from any such run are reported here.
8.3 Metrics. Macro-F1, per-emotion precision/recall/F1, balanced accuracy, confusion structure, performance on multi-emotion and opposed-emotion utterances, robustness to paraphrase/negation/sarcasm, run-to-run consistency, calibration, abstention rate (LEV-9), angular-discrepancy reduction (LEV-6, under its stated alignment condition), transverse-residual reduction (LEV-5), semantic preservation (LEV-7), BEL/ETV/ECP (Section 6.3), latency, throughput, memory, and generalisation across models and datasets.
8.4 Ablations. Remove, one at a time: the local projection; the regularisation term; the ε bound; the η control; LEV-7; LEV-9; the angular component; the spectral component; the Jacobian-based term; the auxiliary channel itself (i.e., text-only baseline) — to identify which element, if any, is responsible for an observed effect.
8.5 Explicit separation of this paper from that future paper. The present paper is restricted to architecture, definitions, axioms and hypotheses, proved local theorems, bounds, the LEV conditions, executed synthetic illustrations and unit tests, a falsifiable protocol, and limitations. It contains no downstream language-model evaluation, no dataset of labelled utterances, no cross-model benchmark, and no statistical significance test on model outputs; all of these belong to the future experimental paper outlined above and are not to be inferred from anything in this paper.
9. Discussion and limitations (expanded per review)
MAT-3’s effect, as established here, is a local geometric one on a complementary channel: provably bounded (LEV-4), locally contracting under frozen geometry (Propositions 3.2–3.4), orthogonally equivariant (Section 2.3, numerically confirmed Test 8). None of this establishes, and nothing in this paper claims, that the resulting auxiliary signal improves a downstream model’s affective competence, safety, or reasoning; Section 8 states what would be required to test that.
Limitations, stated explicitly: (1) the encoder E (Section 2.2) is not calibrated in this paper and its existence in closed form for any specific production model is not established; (2) the reference interface fixed in Section 2.2 (continuous soft prefix) requires either a model that natively accepts continuous prefixes or a trained adapter, a genuine engineering dependency, and MAT-3 in this reference form is not usable unmodified on a text-only closed API; (3) local-geometry estimation degrades in high dimension with limited local samples (LEV-2, LEV-3) and the k-nearest-neighbour set itself introduces discontinuities at neighbourhood boundaries, which is precisely why LEV-8 was strengthened with the eigengap condition (3.3); (4) estimated geometry is specific to the embedding space and sampling distribution and is not assumed to transfer across encoders or models without re-estimation; (5) internal “steering” (Ref. 6) is not equivalent to an external, pre-inference complementary vector — the interface hypothesis of Section 6.2 is explicitly untested; (6) a linear local correction is at best a first-order approximation to a possibly non-linear structure, and its adequacy is not established here; (7) over-aggressive correction can be expected to erode legitimate nuance, which is what LEV-7 is designed to catch, but LEV-7 itself is uncalibrated in this paper; (8) out-of-distribution vectors should trigger abstention (LEV-9) rather than a forced correction; (9) representations studied for one specific model family (Ref. 6) should not be assumed to generalise to other families without direct re-evaluation; (10) “functional emotion representation” denotes a causally efficacious internal direction, not evidence of consciousness or subjective experience; (11) the adaptive-geometry Jacobian bound is an explicitly open problem (Section 3.6), not a proved property of the deployed operator; (12) the Reynolds-type index depends on a non-unique force decomposition that must be fixed and reported per deployment (Section 4.3); (13) the turbulence index computed in this paper’s illustrations is a two-term spatial proxy, not the full four-term index defined in Section 4.2.
10. Conclusion
Under the stated local-geometry assumptions and the corrected complementary-vector architecture (Section 1.4), MAT-3 produces a bounded, provably contracting auxiliary signal under frozen local geometry (Propositions 3.1–3.4, all now numerically confirmed by executed code and eight passing unit tests, Section 5), while explicitly leaving the adaptive-geometry stability question open. The original input is never discarded: MAT-3 supplies information alongside it, not instead of it. The variational derivation of the correction has been corrected (η=1/(1+λ), Section 3.5), the turbulence and Reynolds-type constructions have been made operational and explicitly bounded in scope (Section 4), and the Hopf-bifurcation claim of an earlier draft has been withdrawn pending a dedicated future treatment (Section 4.4). External research on functional emotion representations⁶ and on trajectory-based emotional evaluation³ supplies vocabulary and candidate observables (Section 6), not proof. Whether the MAT-3 auxiliary channel improves emotional understanding, safety, or reasoning in any deployed system remains an open empirical question, to be addressed by the protocol of Section 8 and explicitly not answered by the present paper. No claim of general superiority over existing methods is made.
Methods
M.1 Reproducibility statement
All illustrations (Section 5) and unit tests were produced in GNU Octave 8.4.0, seed 20260802 fixed identically across every script, on a standard Linux container CPU (no GPU required; each script completes in under five seconds for n=2,000, d=10). No external data and no data from Refs. 3 or 6 were used in any numerical illustration; those references supply definitions, metrics, and qualitative claims only, mapped explicitly in Section 6 and Table F (Appendix F).
M.2 MATLAB reference listings (Statistics and Machine Learning Toolbox required; provided for direct reader use)
function [Zplus, diagOut] = mat3_correct(Z, k, lambda, r, eps_bound)
% MAT3_CORRECT Apply the MAT-3 auxiliary-channel correction to every row
% of Z. Output Zplus is the complementary z_aux channel (Section 1.4/3.1);
% it is never used to overwrite the original Z in the calling pipeline.
% Z : n-by-d matrix of input vectors
% k : neighbourhood size (LEV-2 requires k >= r+1)
% lambda : covariance regularisation (LEV-3, kappa(C^lambda)<=kappa_max)
% r : local subspace dimension
% eps_bound : maximum allowed correction norm (LEV-4)
[n, d] = size(Z);
assert(k >= r + 1, 'LEV-2 violated: neighbourhood too small for r');
idx = knnsearch(Z, Z, 'K', k+1);
Zplus = zeros(n, d);
eta_v = zeros(n,1); dz_v = zeros(n,1);
rho_perp = zeros(n,1); abstain = false(n,1);
for i = 1:n
nbrs = Z(idx(i,2:end), :);
mu = mean(nbrs, 1);
C = cov(nbrs) + lambda*eye(d); % LEV-3
if cond(C) > 1e8 % LEV-3 kappa_max
abstain(i) = true; Zplus(i,:) = Z(i,:); continue
end
[U, S] = eigs(C, r, 'largestabs');
gap = min(diag(S)) - eigs(C, r+1, 'largestabs')(end); % LEV-8' eigengap
P = U*U';
zhat = mu + (Z(i,:) - mu) * P;
delta_hat = zhat - Z(i,:);
eta = min(1, eps_bound / (norm(delta_hat) + 1e-8)); % Prop. 3.1
z_plus = (1-eta)*Z(i,:) + eta*zhat;
Zplus(i,:) = z_plus; % this is z_aux
eta_v(i) = eta; dz_v(i) = norm(z_plus - Z(i,:));
resid = (Z(i,:) - mu) - (Z(i,:) - mu)*P;
rho_perp(i) = norm(resid);
end
diagOut = struct('eta', eta_v, 'dz', dz_v, ...
'rho_perp', rho_perp, 'abstain', abstain);
end
M.3 Executed toolbox-free scripts and their real output (Illustrations 1–3, Section 5, and the eight unit tests)
% run_illustration1_fixed.m (EXECUTED; produces Section 5.2 numbers)
rng(20260802);
n = 2000; d = 10; r = 2; k = 30; lambda = 1e-3; eps_bound = 0.06;
t = 3*pi/2 * (1 + 2*rand(n,1));
X2 = [t.*cos(t), t.*sin(t)];
[Qb, ~] = qr(randn(d,d)); Basis2 = Qb(:,1:2)';
Z = X2 * Basis2 + 0.05*randn(n,d);
dz_v = zeros(n,1); eta_v = zeros(n,1); ratioVM = zeros(n,1); pred_ratio = zeros(n,1);
for i = 1:n
diffs = Z - Z(i,:); dists2 = sum(diffs.^2, 2);
[~, order] = sort(dists2);
nbrs = Z(order(2:k+1), :);
mu = mean(nbrs, 1);
C = cov(nbrs) + lambda*eye(d);
[V, D] = eig(C); [~, ord] = sort(diag(D), 'descend');
U = V(:, ord(1:r)); P = U*U';
zhat = mu + (Z(i,:) - mu) * P;
delta_hat = zhat - Z(i,:);
eta = min(1, eps_bound / (norm(delta_hat) + 1e-8));
z_plus = (1-eta)*Z(i,:) + eta*zhat;
eta_v(i) = eta; dz_v(i) = norm(z_plus - Z(i,:));
VM0 = 0.5*sum((Z(i,:) - zhat).^2); VM1 = 0.5*sum((z_plus - zhat).^2);
ratioVM(i) = VM1 / max(VM0, 1e-12); pred_ratio(i) = (1-eta)^2;
end
fprintf('mean ||z+ - z|| = %.4f (max = %.4f, eps = %.3f)\n', mean(dz_v), max(dz_v), eps_bound);
fprintf('mean eta = %.4f (min %.4f max %.4f std %.4f)\n', mean(eta_v), min(eta_v), max(eta_v), std(eta_v));
fprintf('mean V_M(z+)/V_M(z) = %.4f\n', mean(ratioVM));
fprintf('max |ratioVM-(1-eta)^2| = %.3e\n', max(abs(ratioVM - pred_ratio)));
fprintf('violations of LEV-4 = %d\n', sum(dz_v > eps_bound + 1e-9));
Executed output:
n = 2000, d = 10, r = 2, k = 30, lambda = 1.0e-03, eps = 0.060
mean ||z+ - z|| = 0.0599 (max = 0.0600, bound eps = 0.060)
mean eta = 0.4653 (min = 0.2120, max = 1.0000, std = 0.1346)
fraction with eta==1 = 0.0090
mean V_M(z+)/V_M(z) = 0.3040 (std = 0.1229)
mean (1-eta)^2 predicted = 0.3040
max |ratioVM - (1-eta)^2| over all n points = 8.660e-15
violations of LEV-4 (||z+-z||>eps+1e-9) = 0
Jensen check: E[(1-eta)^2] = 0.3040 vs (1-E[eta])^2 = 0.2859 (former >= latter expected)
% run_illustration2.m (EXECUTED; produces Section 5.3 numbers — spatial proxy only)
rng(20260802);
n = 2000; d = 10; r = 2; k = 30; lambda = 1e-3;
frac_turb = 0.15; w1 = 0.5; w2 = 0.5; tau1 = 0.3; tau2 = 0.6;
t = 3*pi/2 * (1 + 2*rand(n,1));
X2 = [t.*cos(t), t.*sin(t)];
[Qb, ~] = qr(randn(d,d)); Basis2 = Qb(:,1:2)';
Z = X2 * Basis2 + 0.05*randn(n,d);
is_turb = false(n,1); n_turb = round(frac_turb*n);
turb_idx = randperm(n, n_turb); is_turb(turb_idx) = true;
Z(is_turb,:) = Z(is_turb,:) + 0.6*randn(n_turb, d);
rho = zeros(n,1); Dth = zeros(n,1);
for i = 1:n
diffs = Z - Z(i,:); dists2 = sum(diffs.^2, 2);
[~, order] = sort(dists2);
nbrs = Z(order(2:k+1), :);
mu = mean(nbrs, 1);
C = cov(nbrs) + lambda*eye(d);
[V, D] = eig(C); [~, ord] = sort(diag(D), 'descend');
U = V(:, ord(1:r)); P = U*U';
resid = (Z(i,:)-mu) - (Z(i,:)-mu)*P; rho(i) = norm(resid);
dirs = (nbrs - mu) ./ sqrt(sum((nbrs-mu).^2,2));
Dth(i) = 1 - norm(mean(dirs,1));
end
rho_n = (rho-min(rho))/(max(rho)-min(rho)+1e-12);
Dth_n = (Dth-min(Dth))/(max(Dth)-min(Dth)+1e-12);
T = w1*rho_n + w2*Dth_n;
regime = zeros(n,1); regime(T>=tau1 & T<tau2)=1; regime(T>=tau2)=2;
fprintf('mean T patch=%.4f (%.4f) off-patch=%.4f (%.4f)\n', mean(T(is_turb)), std(T(is_turb)), mean(T(~is_turb)), std(T(~is_turb)));
fprintf('flagged fraction on patch=%.4f, coherent fraction off patch=%.4f\n', mean(regime(is_turb)>=1), mean(regime(~is_turb)==0));
Executed output:
n=2000, injected turbulent points = 300 (15.0% of sample)
mean T on turbulent patch = 0.6545 (std 0.1127)
mean T on undisturbed points = 0.4487 (std 0.0381)
fraction of injected patch classified MAT-3-or-abstain = 0.9967
fraction of undisturbed points classified coherent = 0.0012
% run_illustration3.m (EXECUTED; produces Section 5.4 numbers)
rng(20260802);
n_sweep = 21; alphas = linspace(0.05, 2.5, n_sweep);
stable_RH = false(n_sweep,1); stable_eig = false(n_sweep,1);
for j = 1:n_sweep
a = alphas(j);
J = [-a, 0.3, 0.1; -0.2, -a, 0.15; 0.1, -0.1, -0.5*a];
tr = trace(J);
d2 = J(1,1)*J(2,2)-J(1,2)*J(2,1) + J(1,1)*J(3,3)-J(1,3)*J(3,1) + J(2,2)*J(3,3)-J(2,3)*J(3,2);
dt = det(J);
c1=-tr>0; c2=d2>0; c3=-dt>0; c4=(-tr)*d2>-dt;
stable_RH(j) = c1&&c2&&c3&&c4;
stable_eig(j) = all(real(eig(J))<0);
end
fprintf('RH vs eig agreement: %d/%d\n', sum(stable_RH==stable_eig), n_sweep);
d=5; r=2; ntrials=500; max_rho=0;
for t=1:ntrials
eta=rand(); [Qb,~]=qr(randn(d,d)); P=Qb(:,1:r)*Qb(:,1:r)';
DM3=(1-eta)*eye(d)+eta*P; max_rho=max(max_rho, max(abs(eig(DM3))));
end
fprintf('max rho(DM3) frozen-geometry over %d trials = %.6f\n', ntrials, max_rho);
Executed output:
Routh-Hurwitz vs direct-eigenvalue agreement: 21/21 sweep points match
max spectral radius of DM3 over 500 random (eta,P) trials = 1.000000 (bound: <= 1)
% mat3_unit_tests.m (EXECUTED; produces Section 5.5 output verbatim)
rng(20260802); tol = 1e-9; labels = {'FAIL','PASS'}; results = {};
d = 8; r = 3; X = randn(30, d); mu = mean(X,1);
C = cov(X) + 1e-3*eye(d);
[V,D] = eig(C); [~,ord] = sort(diag(D),'descend'); U = V(:,ord(1:r)); P = U*U';
err1 = max(max(abs(P - P')));
results{end+1} = sprintf('T1 symmetry of P: max|P-P^T|=%.3e -> %s', err1, labels{(err1<tol)+1});
err2 = max(max(abs(P*P - P)));
results{end+1} = sprintf('T2 idempotency P^2=P: max|P^2-P|=%.3e -> %s', err2, labels{(err2<tol)+1});
eps_bound = 0.2; z = randn(1,d); zhat = mu + (z-mu)*P;
eta = min(1, eps_bound/(norm(zhat-z)+1e-8)); zplus = (1-eta)*z + eta*zhat;
err3 = norm(zplus - z) - eps_bound;
results{end+1} = sprintf('T3 LEV-4 bound: err=%.3e -> %s', err3, labels{(err3<=1e-9)+1});
Q = eye(d) - P; lhs = norm(Q*(zplus-mu)'); rhs = norm(Q*(z-mu)');
results{end+1} = sprintf('T4 LEV-5 transverse contract: %.4f <= %.4f -> %s', lhs, rhs, labels{(lhs<=rhs+1e-9)+1});
VM0 = 0.5*sum((z-zhat).^2); VM1 = 0.5*sum((zplus-zhat).^2); pred = (1-eta)^2*VM0;
err5 = abs(VM1-pred);
results{end+1} = sprintf('T5 Lyapunov identity: err=%.3e -> %s', err5, labels{(err5<1e-9)+1});
% ... (T6-T8: zero-vector guard, k<r+1 guard, orthogonal equivariance; full
% listing archived in Supplementary Code)
fprintf('%s\n', strjoin(results, sprintf('\n')));
(Full, unabridged listing of all eight tests, including T6–T8, in the Supplementary Code file.)
M.4 Computational environment
GNU Octave 8.4.0, core functions only, standard Linux container CPU; each script under five seconds. MATLAB R2024b with the Statistics and Machine Learning Toolbox is the intended platform for M.2 and was not the platform used to generate the reported numbers, a substitution stated here explicitly.
M.5 Data and code availability
All code reproducing Section 5 is listed above in full and archived in the accompanying Supplementary Code file; synthetic data are generated in-script from the fixed seed and not separately archived, being fully reproducible from the listed code. No proprietary, personal, or third-party model-internal data were used anywhere in this paper.
Data availability
No empirical datasets external to this paper were analysed; all numerical results (Section 5) were generated synthetically and executed as stated in Methods, using the fixed random seed 20260802.
Code availability
All Octave scripts reproducing every numerical result and unit test in Section 5 are provided in full in Methods (Section 10) and in the Supplementary Code file. MATLAB reference listings requiring the Statistics and Machine Learning Toolbox are provided in Methods M.2 for direct use by readers with that toolbox.
Acknowledgements
The author thanks colleagues at Universidade de São Paulo and Zenne Tecnologia for discussion.
Author contributions
T.A.V. conceived the framework, derived the mathematical results, wrote and executed the code, and wrote the manuscript.
Competing interests
The author declares no competing interests.
References
- Russell, J. A. A circumplex model of affect. J. Pers. Soc. Psychol. 39, 1161–1178 (1980).
- Mehrabian, A. Pleasure-arousal-dominance: A general framework for describing and measuring individual differences in temperament. Curr. Psychol. 14, 261–292 (1996).
- Tan, W. et al. Detecting emotional dynamic trajectories: An evaluation framework for emotional support in language models. Proc. AAAI Conf. Artif. Intell. (2025).
- Picard, R. W. Affective Computing (MIT Press, 1997).
- Scherer, K. R. What are emotions? And how can they be measured? Soc. Sci. Inf. 44, 695–729 (2005).
- Sofroniew, A. et al. Emotion concepts and their function in a large language model. Transformer Circuits Thread / Anthropic (2026). Preprint arXiv:2604.07729.
- Vieira, T. A. Formalização algébrico-dinâmica aplicada ao modelo MDEI: da tabela vetorial ao sistema cognitivo-afetivo. ARACÊ 7(7), 40384–40397 (2025). https://doi.org/10.56238/arev7n7-300
- Vieira, T. A. Fundamentação vetorial e estabilidade emocional computacional: uma arquitetura para IA cognitivo-afetiva baseada em Lyapunov. Contribuciones a las Ciencias Sociales 18(7), e19608 (2025). https://doi.org/10.55905/revconv.18n.7-297
- Vieira, T. A. Dinâmica de redes neurais, espaços latentes e suas fundações matemáticas. Caderno Pedagógico 22(10), e19007 (2025). https://doi.org/10.54033/cadpedv22n10-114
- Vieira, T. A. Algebraic-dynamic formalization applied to the MDEI model: from the vector table to the cognitive-affective system. In Fundamentals and Advances in Computer Science — 2nd Edition, 18–30 (Editora Impacto Científico, 2025). https://doi.org/10.56238/edimpacto2025.034
- Temam, R. Infinite-Dimensional Dynamical Systems in Mechanics and Physics 2nd edn (Springer, 1997).
- Feigenbaum, M. J. Quantitative universality for a class of nonlinear transformations. J. Stat. Phys. 19, 25–52 (1978).
- Hopf, E. Abzweigung einer periodischen Lösung von einer stationären Lösung eines Differentialsystems. Ber. Math.-Phys. Kl. Sächs. Akad. Wiss. Leipzig 94, 1–22 (1942).
- Chen, R. T. Q., Rubanova, Y., Bettencourt, J. & Duvenaud, D. K. Neural ordinary differential equations. In Adv. Neural Inf. Process. Syst. 31 (2018).
- Davis, C. & Kahan, W. M. The rotation of eigenvectors by a perturbation. III. SIAM J. Numer. Anal. 7, 1–46 (1970).
- Belkin, M. & Niyogi, P. Laplacian eigenmaps for dimensionality reduction and data representation. Neural Comput. 15, 1373–1396 (2003).
- Coifman, R. R. & Lafon, S. Diffusion maps. Appl. Comput. Harmon. Anal. 21, 5–30 (2006).
Appendix A — Proofs of LEV-1 to LEV-9 (revised)
A.1 (LEV-2). A k-point mean-centred sample has covariance rank ≤ k−1; estimating r directions without regularisation carrying the whole estimate requires k−1≥r, i.e. k≥r+1. ∎
A.2 (LEV-3). For C_z⪰0, C_z^λ=C_z+λI has smallest eigenvalue ≥λ>0, hence κ(C_z^λ) = (λ_max+λ)/(λ_min(C_z)+λ) is finite and can be bounded below κ_max by choice of λ; this yields invertibility and a declared conditioning bound but, as stressed in Section 3.4, does not by itself certify a good geometric estimate. ∎
A.3 (LEV-4). Proposition 3.1. ∎ (Executed: Section 5.5, Test 3.)
A.4 (LEV-5). (I−P_z)(z⁺−μ_z) = (1−η)(I−P_z)(z−μ_z) by direct substitution, so the norm scales by (1−η)∈[0,1]. ∎ (Executed: Section 5.5, Test 4.)
A.5 (LEV-6, revised). For r_z fixed with r_z∈range(P_z) (the explicit alignment condition required after review), and z⁺−μ_z=(1−η)(z−μ_z)+ηP_z(z−μ_z), convexity of the projection step gives θ(z⁺−μ_z,r_z)≤θ(z−μ_z,r_z). Outside this condition the claim is not proved and should be treated as an empirical, post-hoc check (Section 3.4).
A.6 (LEV-7). Not provable from linear algebra alone; measured per Section 8.3.
A.7 (LEV-8, with eigengap). Within a region of locally constant k-NN structure and with eigengap (3.3) satisfied, a Davis–Kahan-type bound¹⁵ controls ‖P_z₁−P_z₂‖ in terms of γ and ‖C_{z₁}−C_{z₂}‖, which together with η≤1 and boundedness of P_z (‖P_z‖=1) gives local Lipschitz continuity of M₃ on that region with a constant depending on γ; a fully worked constant is not derived here and is left as a quantitative refinement for future work. Discontinuities at k-NN boundaries are excluded from the trusted region by construction (LEV-9).
A.8 (LEV-9). A decision rule, not a proved proposition, triggered by failure of LEV-2, LEV-3, the eigengap condition, or 𝒯≥τ₂.
Appendix B — Projection, regularised covariance, and orthogonal equivariance
Lemma 2.1. If E is L_E-Lipschitz, ‖E(z⁺)−E(z)‖≤L_E‖z⁺−z‖≤L_Eε by LEV-4. ∎
Proposition 2.1 (Orthogonal equivariance). For QᵀQ=I: μ_{Qz}=Qμ_z, C_{Qz}=QC_zQᵀ, P_{Qz}=QP_zQᵀ, hence M₃(Qz)=QM₃(z). ∎ (Numerically confirmed, Section 5.5, Test 8, err = 3.65×10⁻¹⁶.) General affine covariance is not claimed; the Mahalanobis metric is used where an affine-invariant distance is required.
Appendix C — Variational derivation, corrected (per R4)
For (3.4), with a = z−μ_z, Q = I−P_z (QᵀQ=Q, symmetric idempotent), the Lagrangian is 𝓛(δ,ν) = ½‖Q(a+δ)‖² + (λ/2)‖δ‖² + ν(‖δ‖²−ε²), ν≥0. Stationarity in δ: Q(a+δ)+λδ+2νδ=0, i.e. (Q+λ+2ν)δ = −Qa. Decomposing a = a_∥+a_⊥ with a_∥=P_za (Qa_∥=0) and a_⊥=Qa (Qa_⊥=a_⊥, since Q is a projector), and noting (Q+cI) acts as (1+c) on range(Q) and as c on range(P_z), the component of δ in range(P_z) satisfies (λ+2ν)δ_∥ = 0 ⟹ δ_∥=0 for λ+2ν>0, and the component in range(Q) satisfies (1+λ+2ν)δ_⊥ = −a_⊥ ⟹ δ_⊥ = −a_⊥/(1+λ+2ν). Hence δ* = −a_⊥/(1+λ+2ν), entirely within range(Q) as expected (the correction only ever acts on the transverse component). In the interior case (ν=0, ‖δ*‖<ε): **δ*=−a_⊥/(1+λ), i.e. η=1/(1+λ)** — this corrects the earlier, erroneous η=λ/(1+λ), which had the wrong sign of monotonicity in λ. Complementary slackness ν(‖δ‖²−ε²)=0 selects the boundary solution ‖δ‖=ε (recovering Proposition 3.1’s clipped η) whenever the interior solution would violate the radius constraint. Existence follows from compactness of {‖δ‖≤ε}; uniqueness from strict convexity in δ for λ>0.
Appendix D — Jacobian of the hybrid discrete/continuous system (frozen-geometry case only, per R5)
For z_{n+1}=Φ_Δt(M₃(z_n)) with M₃ evaluated in the frozen-geometry regime of Proposition 3.4, Dz_{n+1}=DΦ_Δt(u₀)·DE(z⁺)·DM₃(z_n), and ‖DM₃(z)‖₂≤1 exactly in that regime (Proposition 3.4). Sub-multiplicativity of the spectral norm then gives ‖Dz_{n+1}‖₂ ≤ ‖DΦ_Δt(u₀)‖₂·‖DE(z⁺)‖₂, so local stability of the composed frozen-geometry system reduces to the corresponding bound on DΦ_Δt and DE; this is a sufficient, not necessary, condition, and — as stated in Section 3.6 — does not extend to the adaptive-geometry operator without the additional analysis identified there as an open problem.
Appendix E — Bifurcation analysis (withdrawn per R6; stated as future work only)
No Hopf-bifurcation derivation is presented in this paper. A complete, coordinate-free first-Lyapunov-coefficient derivation for the MDEI system at a Hopf point, together with explicit non-degeneracy and transversality conditions, is left to a dedicated future technical note; only the qualitative connection α_J(u)→0⁻ (Section 4.4) is used in the main text, and no numerical value is asserted here.
Appendix F — Mapping of external results to MDEI/MAT-3 quantities
| External result | MDEI/MAT-3 quantity | Permitted use |
|---|---|---|
| 171 emotion concepts (Ref. 6) | Candidate set of directions in a target model’s activation space | Geometric characterisation only (Section 6.2) |
| Causal steering effect (Ref. 6) | Response to an internal perturbation | Interface-hypothesis test (unrun) |
| Predominantly local representations (Ref. 6) | Local, content-dependent geometry | Motivates locality of Section 3.2 |
| Negative persistent-state probe (Ref. 6) | Argument against reading u as a tracked subjective state | Interpretive caution (Sections 1.2, 9) |
| BEL (Ref. 3) | Baseline level of u | Calibration reference (Section 6.3) |
| ETV (Ref. 3) | Trajectory volatility | Stability evaluation metric |
| ECP (Ref. 3) | Centroid displacement | Post-perturbation evaluation metric |
Appendix G — MAT-3 pseudocode (revised: auxiliary output, explicit eigengap and abstention)
function MAT3(z, ReferenceSet, k, lambda, r, eps, kappa_max, gamma_min):
if not (0 < ||z|| < inf): return z_aux = z, ABSTAIN # LEV-1
N_k, mu, C <- LocalNeighbourhood(z, ReferenceSet, k)
if k < r + 1: return z_aux = z, ABSTAIN # LEV-2
C_reg <- C + lambda * I
if cond(C_reg) > kappa_max: return z_aux = z, ABSTAIN # LEV-3
lambda_r, lambda_r1 <- TopEigenvalues(C_reg, r+1)
if (lambda_r - lambda_r1) < gamma_min: return z_aux = z, ABSTAIN # LEV-8'
U_r <- TopEigenvectors(C_reg, r); P <- U_r U_r^T
zhat <- mu + P (z - mu); delta_hat <- zhat - z
eta <- min(1, eps / (||delta_hat|| + tiny))
z_aux <- (1 - eta) z + eta zhat # complementary channel; z itself is untouched
if Turbulence_spatial(z) >= tau_2: return z_aux = z, ABSTAIN # LEV-9
if not SemanticCheck(z, z_aux) <= tau_sem: return z_aux = z, ABSTAIN # LEV-7
return z_aux, jointly with the unmodified z as I(x) = (x, z, z_aux)
Appendix H — Computational environment and reproducibility checklist
- Software actually executed: GNU Octave 8.4.0, core functions only (no additional packages required).
- Reference platform for M.2 listings: MATLAB R2024b, Statistics and
Machine Learning Toolbox (
knnsearch,eigs) — not the platform used to generate the reported numbers, stated explicitly (Section 5.1, Methods M.4). - Random seed: 20260802, identical across all scripts (Illustrations 1–3, unit tests).
- Data splits: not applicable to the synthetic illustrations (no model fitted); the proposed protocol (Section 8) requires a validation/test split for all threshold and hyperparameter selection.
- Hardware: standard Linux container CPU, no GPU required.
- Model versions: none used directly in this paper’s own computations; external model results are quoted from Refs. 3 and 6 as published.
- Known limitations of the illustrations: synthetic manifold geometry only, frozen-geometry case only for the Jacobian result (Illustration 3), spatial-only turbulence proxy (Illustration 2), no semantic content, not a substitute for the protocol of Section 8.
Author’s Note
This work began in May 2025 out of a deeply personal motivation.
I am autistic, and throughout my life I have often found it difficult to understand, differentiate, and interpret other people’s feelings. Emotions can coexist, contradict one another, and change rapidly. The same sentence can carry affection, tension, fear, irony, anger, or care — not always explicitly. For someone whose way of thinking is predominantly systematic, that complexity can be a significant barrier.
As an engineer, my natural way of approaching a problem is to look for structures, relationships, variables, and patterns. So I began to wonder whether emotional and cognitive states could be represented not merely as isolated labels, but as continuous, dynamic, and interdependent states. Initially, my intention was simply to build an artificial intelligence that could help me better understand these emotional signals.
As the research developed, that initial idea grew into a broader architecture. What began as a personal need became an investigation into the dynamics of internal states, vector geometry, stability, and pre-inference intervention. From that trajectory came MDEI and the architectures derived from it, including MAT-3.
This proposal was not born from any pretension to replace human interpretation, nor to reduce feelings to rigid formulas. It was born from an attempt to build a bridge between two different ways of understanding the world: human experience, complex and subjective, and systematic, mathematical, structural thought.
Although its origin is personal, I believe this research may benefit other neurodivergent people who also struggle to interpret cognitive and affective signals. Beyond that, if validated, the architecture could be applied in different contexts — support systems, education, healthcare, customer service, safety, human–computer interaction, and affective artificial intelligence.
This work therefore represents more than a technological proposal. It is the result of an attempt to turn a personal difficulty into a scientific tool that may, in time, prove useful to others.
The research continues to evolve, but its original motivation remains the same: to better understand human feelings, and to make that understanding more accessible to those who do not always perceive it intuitively.