G17 A Mathematical Model of Language
This lecture rests on two works:
- for the general theory of Merge: M. Marcolli, N. Chomsky, R.C. Berwick, Mathematical Structure of Syntactic Merge. An Algebraic Model of Generative Linguistics, MIT Press, 2025 (cited below as [MCB]);
- for its dynamical-system structure: M. Marcolli, D. Skigin, Merge on workspaces as Hopf algebra Markov chain, arXiv:2512.18861.
Syntax as structure
Syntax is the focus here: the “large-scale structure” of language, where the main structure-building computational process resides. The input from linguistics consists of:
- what the main structure-building and transformation operations of syntax are;
- cross-linguistic variation, and the common universal computational core underlying it;
- the interface between syntax and semantics (structure formation and parsing);
- language acquisition, and the specialization of the core computational mechanism to one particular language.
Strings versus structures
An important development in the modeling of language is the passage from strings to structures. What language appears to look like is a string of symbols,
What language actually looks like is shown on the slide by a photograph of a hanging mobile sculpture: black shapes dangling from wires that branch and branch again from a single suspension point, free to turn in space.
How is language “a structure” beyond the string of words? Look at this sentence:
I shot an elephant in my pajamas – what it was doing in my pajamas, I’ll never know (Groucho Marx)
Why is it funny? Because it conflates two different structures.
A sentence is not just a string of words. We perceive structural relations in a sentence, more than proximity relations in the ordering of its words; the structure reflects the different possible ways in which sentences are generated.
Merge
Chomsky’s Minimalist Program (from the 1990s onward, reformulated after 2013) aims to identify the core computational process of structure formation in syntax. That core is a simple computational structure: Merge.
This process generates structures that are
- called hierarchical structures (or syntactic objects) in linguistics;
- called non-planar (or abstract) binary rooted trees by mathematicians.
The lexical items, at the leaves, are combined into a hierarchical structure. The tree dangles from its root and does not lie in the plane, so the lexical items at the leaves do not form an ordered string of symbols.
Merge is a computational process of structure formation: for instance, merging
What about the linear order of sentences? We can learn any language, and languages vary widely in their word-order structure. So the core computational mechanism, common to all languages, should not depend on one particular word order: word order is learned during language acquisition.
Externalization
- Externalization follows the generative process of structure formation, in which sentences are hierarchical non-planar tree structures.
- Language is externalized through the sensory-motor system (speech, sign) as a temporally ordered sequence of words.
- Equivalently, the trees acquire a planar structure.
- This uses language-dependent forms of word order, plus other rules.
- Example: English is head-initial, Japanese is head-final.
Here VP = verb phrase, TP = tense phrase, DP = determiner phrase. This leads to syntactic variability, syntactic parameters, and a geometry of syntax (which constraints?).
Summary of the picture so far.
- Language starts as hierarchical structures: free-floating (non-planar) binary rooted trees that encode only the structural relations between words.
- The physical constraints of externalization (sound, motion) force a reduction to an ordered sequence.
- During language acquisition our brain quickly learns, from a small collection of such examples, the (non-visible and complex) structure of syntax.
Remark. Note the enormous computational difficulty of solving this inverse problem… yet our brain does it easily.
Structure formation: the Merge model
A closer look at structure formation (movement and transformation):
- We do more than form sentences: we modify them, transform them and manipulate them according to precise rules (forming questions, changing to the passive voice, and so on).
- The Merge operation of structure formation has two aspects: Internal Merge and External Merge.
- Internal Merge (responsible for “movement”) needs to reach inside already formed structures (syntactic objects) for constituent parts (accessible terms) that are available for further computation.
- Structure formation is also a “bottom-up” operation that proceeds in steps, using an intermediate scratchpad for its operations (workspaces).
The main aspects of the Merge model of syntax, in its most recent formulation (2013 onward), are:
- syntactic objects;
- workspaces;
- accessible terms;
- the Merge action on workspaces;
- externalization.
All of these notions have a precise mathematical formulation. It shows that many aspects of the linguistic model that have empirical grounds in fact follow from constraints of the algebraic structure.
Syntactic objects
Definition G17.1 (Magma of syntactic objects). Start with a set
Proposition G17.2 (Free magma and abstract binary rooted trees). The free nonassociative commutative magma on a set
So syntactic objects
Workspaces
Definition G17.3 (Workspaces). The set of workspaces is the free commutative monoid on the set
Merge operations map the set
Accessible terms
Definition G17.4 (Accessible terms). The accessible terms of a syntactic object
In symbols: for a tree
What mathematical structure governs workspaces and accessible terms? The answer: workspaces form a Hopf algebra.
Hopf algebras
A Hopf algebra is a mathematical way of describing composition–decomposition:
- a product, an “assemble” operation (two inputs, one output) that says how to put different objects together;
- a coproduct, a “decompose” operation (one input, two outputs) that lists all the possible ways of decomposing an object into two parts;
- compatibility between these two operations (a relation for interchanging the order of product and coproduct).
The slide illustrates this with jigsaw-puzzle pieces. At the top, two pieces are assembled in all possible ways: the product lists the five ways their tabs and slots can be joined. At the bottom, an assembly of three pieces is decomposed in all possible ways into a pair of parts: (the whole,
Definition G17.5 (Hopf algebra). A Hopf algebra
- a multiplication
; - a unit
; - a comultiplication
; - a counit
; - an antipode
,
such that
- the multiplication is associative;
- the comultiplication is coassociative;
is a unit for the multiplication and is a counit for the comultiplication;- the comultiplication and the counit are homomorphisms of algebras, and the multiplication and the unit are homomorphisms of coalgebras;
relates and , and and .
All of this is expressed by the commutativity of the diagrams below.
These formal requirements are exactly what makes a good pair of composition and decomposition operations.
Multiplication: associativity and unit.
Comultiplication: coassociativity and counit.
The commutativity of the first of these diagrams is coassociativity:
Compatibility of product and coproduct.
Here
Antipode. A further compatibility is the commutativity of the diagram
Remark (Graded Hopf algebras). If the Hopf algebra is graded,
Workspaces form a Hopf algebra
Let
- Product: workspaces (forests) are assembled by disjoint union of syntactic objects (trees),
- Coproduct: it disassembles workspaces into their constituent parts.
If one uses the coproduct in which the trees are primitive elements,
The coproduct by admissible cuts
In a tree
Definition G17.6 (Coproduct by admissible cuts). The coproduct is
Remark. Warning: some care is needed in defining
The Merge action
Definition G17.7 (Merge). For
- the coproduct
extracts and displays all the accessible terms; locates the matching pairs of accessible terms, and ;- the grafting operator
attaches the extracted terms to a new root; - the product
recomposes the new workspace.
Because of
Definition G17.8 (Types of Merge).
- External Merge (EM):
and are components of the workspace. - Sideward Merge (SM): at least one of
, is an accessible term (not a whole component). - Internal Merge (IM):
, the extraction of an accessible term , which is then merged with its own complement . - The assembled Merge operation (all possible Merge transformations of a workspace):
and where is the projection onto the terms of the coproduct with components in the left-hand side.
Merge as a Hopf algebra Markov chain
Here the Merge operations
Theorem G17.9 (Main results (Marcolli–Skigin)).
- The directed graph of the Merge HAMC breaks down into finite graphs
, indexed by the number of leaves; these are sparse graphs for large . - Each
is strongly connected and aperiodic, so the dynamics converges to a stationary distribution. - The IM arrows give subgraphs
in which each component has the uniform stationary distribution. - The full dynamics reduces to a much smaller graph whose vertices are the partitions
(instead of forests). - The dynamics can be weighted by cost functions on the edges.
- The full dynamics of the Merge HAMC maximizes entropy (and, if weighted by a cost function, optimizes free energy).
The Merge graph
Definition G17.10 (Merge graph). The Merge graph
- Minimal SM is
where both and consist of a single leaf (at least one of them in a tree with more than one leaf). - There are two possible choices, which affect the properties of
: allow cutting both edges below the same vertex, or not. This is only relevant in the SM case. The algebraic properties of are better if one does not; the dynamical-system properties are better if one does (so it is allowed). - The condition
is imposed because every Merge operation creates some edge. So any with is transient: it does not contribute to the long-term dynamical behavior.
Example G17.11 (The Merge graph for
Decomposing the Merge graph
Merge operations preserve the number of leaves of forests (using
Counting vertices: counting forests
Counting the vertices means counting the forests
Definition G17.12 (Partitions).
Partitions
There is a projection from workspaces to partitions,
Definition G17.13 (Counting functions). For a partition
- the multinomial coefficient
- the generalized multinomial coefficient
- the counting function
with the convention for parts .
Proposition G17.14 (What they count).
- Tree topologies: the number of non-planar full binary rooted trees with
labeled leaves is - Forests with a fixed partition: the number of forests
with is The multinomial coefficient counts the ways the labels split between the components, and the normalization by accounts for the symmetry of rows of the same length in the partition. - Vertices of the Merge graphs: since
,
Connectivity of the Merge graphs
For a forest
Proposition G17.15 (Numbers of arrows). At a vertex
- the number of outgoing External Merge arrows is
- the number of incoming External Merge arrows is
- the number of outgoing Internal Merge arrows is
(nontrivial IM occurs only for ), and the number of incoming Internal Merge arrows is the same, - the number of outgoing minimal Sideward Merge arrows is
where for the set of pairs of leaves that form a cherry, for the set of cherries that are connected components, and is the number of cherries contained in larger trees; - the number of incoming minimal Sideward Merge arrows is
Proof. Internal Merge. The sources of IM arrows: there is one for each accessible term
This seems complicated, but the key observation is: all these
Reducing the graph by projection to partitions
This fact is used to reduce the graph by projecting it to a graph
Example G17.16 (The projection
The vertex multiplicities (the numbers of forests in each class, that is,
Sparsity
Unlike what the case
Definition G17.17 (Density). The density of a graph
Proposition G17.18 (Sparsity). For the Merge graphs,
Strong connectedness and aperiodicity
Definition G17.19. A directed graph
Theorem G17.20. The Merge graphs are strongly connected (this needs at least minimal SM) [MCB], and they are also aperiodic.
Proof. Strong connectedness is shown in [MCB]. For aperiodicity: for
The IM transformation that extracts
Strong connectedness and aperiodicity have important dynamical consequences, discussed next.
From the graph to a dynamical system
There are two different approaches:
- a random walk on the graph;
- the maximal entropy random walk (here the same as the Hopf algebra Markov chain).
For the random walk, take the transition probabilities to be a normalization of the adjacency matrix,
The maximal entropy random walk (and HAMCs in general) instead finds the basis in which
Theorem G17.21 (Perron–Frobenius theorem). Let
Proposition G17.22 (The basis given by the Perron–Frobenius eigenvector). Take the new basis
Proof.
Stationary distribution
The first important piece of information about a Markov chain as a dynamical system is the form of its stationary distribution, which rules the long-term behavior of the dynamics.
Definition G17.23. A stationary distribution is a probability distribution
Proposition G17.24. Let
Proof.
Ergodicity
Another important property of dynamical systems is ergodicity: the long-term time average along a single trajectory equals the ensemble average across many trajectories.
Definition G17.25 (Ergodic Markov chain). A Markov chain
- its stationary distribution is unique, and
- any initial distribution (a probability on the set of vertices of the graph) converges to the stationary distribution under iteration of
.
Theorem G17.26. Ergodicity of a Markov chain follows from strong connectedness and aperiodicity of its graph.
Corollary G17.27. The Markov chain
Entropy
Let
Definition G17.28 (Entropy of a Markov chain). The entropy of a Markov chain
The maximum over all Markov chains
Maximal entropy random walk
A Markov chain
Theorem G17.29 (Maximal entropy random walk). Among the Markov chains with the same graph
- its entropy is maximal:
; - the probability distribution on paths induced by
is uniform on all paths with the same length and endpoints; is the Perron–Frobenius rescaled adjacency matrix of :
Weighted adjacency matrices: from entropy to free energy
- The different Merge operations (EM, IM, SM) have associated cost functions.
- These cost functions give a weighted adjacency matrix of the Merge graph
. - To incorporate cost functions, the maximal-entropy result has to be replaced by another optimization: Ruelle’s free energy optimization.
This Markov chain represents the core computational process of syntax formation and transformation, prior to its embodiment in the grammar of any one particular language (the core “universal grammar”).
Main question: what are its possible neurocomputational realizations? (For example, realizations of Markov chains in Hopfield networks, or realizations through cross-frequency phase synchronization on wavelets.)
Interfaces
In addition to the core computational mechanism there are the interfaces: externalization (the sensory-motor channel) and semantics (the conceptual channel). The model is motivated by the dual-stream picture of language in the brain (a “what” stream and a “how” stream).
For theoretical linguistics, the externalization interface also incorporates the specialization of the core computational mechanism to one particular language, through positive examples during language acquisition (conditioning of the Markov chain, plus planarization of the trees via word-order rules).
Externalization
The key idea, in a nutshell:
are the syntactic objects produced by free symmetric Merge. are the planar binary rooted trees (with ordered leaves). is the canonical projection (a morphism of magmas). is a non-canonical (language-dependent) section of (it is not a morphism of magmas).- The constraints (syntactic parameters, theta theory) give a projection to the language-dependent
.
First step,
- the planarization
is a language-dependent, non-unique section of the projection; - the only requirement on
is compatibility with the word-order parameters of the given language ; - in this way one obtains a planar tree
for every syntactic object , with no further restriction.
Second step: other constraints.
- One needs to further eliminate those objects
(the planar trees, which form the noncommutative version of ) that violate linguistic constraints of the particular language unrelated to word order (more syntactic parameters). - There are other language-dependent conditions as well: theta theory, obligatory control, and so on; the trees that fail them are eliminated.
The quotient map
Associahedra
Definition G17.30 (Associahedra (Stasheff)). The associahedron
Example G17.31. The 1-dimensional associahedron
The syntax–semantics interface
The overall picture:
- In a similar way, formulating the generative process of syntax in terms of coproduct, grafting and product operations allows syntactic structures and substructures to be mapped consistently to semantic spaces.
- This is called the syntax–semantics interface.
- There are many different models of semantics; the simplest keeps track of proximity relations, agreement, similarity and co-occurrence (for example vector space models).
The slide shows a picture of such a semantic space: points scattered in the plane, grouped into four clusters, each point joined by a line to the center of its cluster.
The conceptual requirements on the syntax–semantics interface are:
- autonomy of syntax;
- syntax supports semantic interpretation;
- semantic interpretation is, to a large extent, independent of externalization;
- compositionality.
Here:
- autonomy of syntax: the Merge computational generative process of syntax is independent of semantics;
- syntax-first view: the syntax–semantics interface proceeds from syntax to semantics;
- there are two channels from the core Merge mechanism: to the conceptual-intentional system (the syntax–semantics interface) and to the sensory-motor system (externalization);
- compositionality: consistency across syntactic substructures.
Geometry of semantic spaces
- Language is a recent evolutionary step, so it requires a small modification: Merge as a single evolutionary step (Berwick–Chomsky).
- Everything else had already evolved: semantic and conceptual spaces are not specific to language (syntax is specific to language)… for example, conceptual manifolds in vision.
- The basic structures of a semantic space are
- proximity measurement (topology, metric);
- interpolation (convexity);
- agreement and disagreement measurements.
The slide’s picture is a curved surface
Semantic parsing of syntactic structures
- Lexical items map to the semantic space,
(words in context). - Syntactic objects (trees)
also map to , using the proximity and interpolation properties of the semantic space together with additional structure on the syntactic objects (syntactic head, phases, labeling).
Externalization and the syntax–semantics interface together
On the slide, the externalization arrow is decorated with a pentagon (the associahedron
The goal is to give a geometric model for the conceptual-intentional and sensory-motor channels and their interaction.
Consistency over substructures
An algebraic approach: a lesson from theoretical physics
The same algebraic structure appears with Feynman diagrams in place of syntactic objects.
- The coproduct decomposition allows the extraction of meaningful physical values of Feynman integrals, consistently over substructures. The slide’s example: for the two-loop photon self-energy graph
of quantum electrodynamics (an electron loop crossed by an internal photon line), where is the one-loop vertex subgraph (it occurs twice in ) and , obtained by shrinking it to a point, is the one-loop photon self-energy graph. - A similar coproduct/grafting/product operation describes the recursive solution of the quantum equations of motion (the Dyson–Schwinger equations). The slide’s example: the grafting operator
, decorated by the one-loop vertex graph, applied to the one-loop vertex graph gives times the sum of the three two-loop vertex graphs obtained by inserting it at each of the three vertices.
This is the renormalization problem of quantum field theory.
The key idea: Birkhoff factorization
- Start with an assignment of semantic values to lexical items,
. - We want to extend it to an assignment for syntactic objects that is consistent over substructures.
- Key idea: incorporate consistency checking in an inductively defined function.
- A simple mapping
(which will include inconsistent cases) is modified in a recursive way. - This recursive construction of consistency checking is known in physics as “Bogolyubov preparation.”
The recursive construction needs two main ingredients:
- a way of extracting the substructures
of a given structure , so that and can be checked separately; - a way of separating out, in the target space
, agreement and disagreement (or of filtering by levels of agreement and disagreement).
The first is on the side of syntax, the second on the side of semantics. The first is provided by the coproduct (the Hopf algebra structure); the second is some form of projection (known as a Rota–Baxter structure).
Example G17.32 (France is a hexagonal republic). Consider the sentences “France is a republic,” “France is hexagonal” and “France is a hexagonal republic.” The first two have a clear, unproblematic semantic parsing; the third seems awkward. Its syntactic object has the form
A basic model of semantic parsing
Its main constructions are:
- a semantic space
(topological or metric, with interpolation or convexity), for instance a geodesically convex Riemannian manifold, with a mapping of syntactic objects to it (using heads and phases); - evaluations (of distances, or of agreement and disagreement): an algebra or semiring
with some “threshold operation” (a Rota–Baxter structure); - semantic probes, which extract (comparative) evaluations from the image of syntactic objects in the semantic space.
Evaluations and thresholds: Rota–Baxter structures
Definition G17.33 (Rota–Baxter algebra). A Rota–Baxter algebra
Its effect:
Definition G17.34 (Rota–Baxter semiring). For a semiring
What does this Rota–Baxter identity mean? It is the behavior of a “threshold operator.”
Example G17.35 (Max-plus (tropical) semiring and ReLU). The max-plus semiring (tropical semiring) is
Proof. Check the four cases of the signs of
Example G17.36 (Viterbi (probabilistic) semiring and thresholds). The Viterbi semiring is
Example G17.37 (Boolean semiring). The Boolean semiring is
Semantic probes
The semantic space
Characters and Birkhoff factorization
Start with
Remark. The target
Definition G17.38 (Birkhoff factorization). A Birkhoff factorization of
The
Proposition G17.39 (Inductive construction). Birkhoff factorizations are constructed inductively. Writing
The Bogolyubov preparation is the expression
In the semiring case,
Example G17.40 (Tropical semiring and ReLU). Take a vector space model of semantics
References
- M. Marcolli, N. Chomsky, R.C. Berwick, Mathematical Structure of Syntactic Merge. An Algebraic Model of Generative Linguistics, MIT Press, 2025. [MCB]
- M. Marcolli, D. Skigin, Merge on workspaces as Hopf algebra Markov chain, arXiv:2512.18861.
- R.C. Berwick, N. Chomsky, cited for Merge as a single evolutionary step (Why Only Us: Language and Evolution, MIT Press, 2016).
- Also named on the slides: J. Stasheff (associahedra) and D. Ruelle (free energy optimization).