---
title: "Mathematical Foundations for a Compositional Distributional"
description: "Coecke, Sadrzadeh and Clark show how grammatical reductions turn word vectors into sentence meanings that can be compared in a…"
canonical: "https://research.elamur.ai/free/en/papers/coecke-2010-mathematical-foundations-compositional-distributional-model/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/coecke-2010-mathematical-foundations-compositional-distributional-model/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2010](https://md.research.elamur.ai/free/en/papers/2010/) / Mathematical Foundations for a Compositional Distributional Model of Meaning

# Mathematical Foundations for a Compositional Distributional Model of Meaning

Paper · 2010 · Bob Coecke, Mehrnoosh Sadrzadeh and Stephen Clark

**Authors:** [Bob Coecke](https://md.research.elamur.ai/free/en/authors/bob-coecke/), [Mehrnoosh Sadrzadeh](https://md.research.elamur.ai/free/en/authors/mehrnoosh-sadrzadeh/) and [Stephen Clark](https://md.research.elamur.ai/free/en/authors/stephen-clark/) · **Year:** 2010 · **Venue:** arXiv:1003.4394 · Lambek Festschirft, special issue of Linguistic Analysis, 2010. · **Licence:** [arXiv — non-exclusive licence to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[Cited by **120** papers in our library of more than 163,000 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/coecke-2010-mathematical-foundations-compositional-distributional-model/cited-by/) · arXiv:1003.4394 · Lambek Festschirft, special issue of Linguistic Analysis, 2010. · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [PDF](https://arxiv.org/pdf/1003.4394)
- [arXiv 1003.4394](https://arxiv.org/abs/1003.4394)

## Summary

A word vector can capture a resemblance between *like* and *love*. To use that resemblance in a sentence, a system also needs to know who feels what toward whom, and what changes when *does not* enters the sentence. Coecke, Sadrzadeh and Clark bring two accounts of meaning together. They use Lambek’s pregroup grammar to describe how words fit together and vectors to represent what the words contribute. The grammatical analysis then specifies a linear calculation that produces a vector for the whole sentence. The project makes sentence composition part of [distributional semantics](https://md.research.elamur.ai/free/en/concepts/distributional-semantics/).

The central observation is that pregroup grammar and finite-dimensional vector spaces share a mathematical structure called compact closure. In the grammar, a verb’s argument requirements cancel against compatible noun types on the appropriate sides. In the vector calculation, each cancellation becomes an inner product between the corresponding pieces of the noun and verb representations. A transitive verb has a tensor that can respond jointly to its subject and object. The cancellation removes the argument positions from the output while their contributions remain in the resulting sentence vector. Diagrams make these connections visible.

Different grammatical constructions can therefore arrive in the same sentence space. The paper illustrates this with affirmative and negative transitive sentences. Its interpretation of *does* passes information through, and its interpretation of *not* exchanges the two basis vectors of a truth-value space. A separate example assigns *like* a graded mixture of *love* and *hate*. The authors can then compare affirmative and negative sentences directly, including a sentence with its own negated form. In the graded example the paper reports non-zero overlap between those forms, a consequence of the chosen representation. With Boolean scalars in place of real numbers, the authors also recover a relational form of Montague-style truth evaluation for their affirmative example.

The paper establishes a way to calculate and compare these meanings once the grammatical types, word representations and sentence space have been supplied. Its results are worked mathematical examples. It leaves acquisition from real corpora, empirical evaluation and computational efficiency for future work. The negation construction is specific to the two-dimensional example, and the extension to other logical connectives remains open.

## Deep dive: Mathematical Foundations for a Compositional Distributional Model of Meaning

Coecke, Sadrzadeh and Clark show how grammatical reductions turn word vectors into sentence meanings that can be compared in a common space. · about 37 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Word meanings and sentence structures answer different questions

The paper begins with two ways of accounting for meaning. In the symbolic tradition it describes, the interpretation of a complex expression follows from its parts and the way they combine. The same words can make different contributions in different constructions because their roles enter the interpretation. Montague-style truth evaluation illustrates what this approach can achieve. Once the relevant objects and relations are fixed, a simple statement has a truth value determined by how its constituents are put together. In the paper’s account, this provides a qualitative answer. To say how close one statement is to another requires a further notion of [semantic similarity](https://md.research.elamur.ai/free/en/concepts/semantic-similarity/).

The distributional tradition begins with patterns of use. A word can be represented by a list of weights, one per feature of its observed contexts. Context might mean nearby words or words in a specified grammatical relation. A feature could record how often the target occurs as the object of *eat*, for instance. The fact that two target words can occur in similar grammatical settings supplies a reason to give them similar representations, even if a human lexicographer has never grouped them. The paper mentions *cat* and *dog*, whose uses overlap around actions and descriptions. The vector geometry provides a means of expressing the amount of overlap, an attractive property for [lexical semantics](https://md.research.elamur.ai/free/en/concepts/lexical-semantics/).

The authors illustrate the construction with a hypothetical count vector for *dog*. Its coordinates correspond, in order, to *eat*, *sleep* and *run*. The associated context counts are 6, 5 and 7. A real application can give differently informative contexts different weights, so the count example is a way to understand a coordinate, instead of a prescription for choosing its value. When many coordinates are gathered in the same space, one can compare words by an inner product or another geometric measure. The paper points to prior work with large collections of context features and extensive bodies of text. It also notes prior evidence of agreement between vector similarities and human judgments or association norms.

The background survey distinguishes the automatically gathered evidence in a vector space from the information in a hand-built semantic network. A manually constructed resource gives explicit categories or relations. A distributional representation gives graded resemblance and can be obtained from text. The authors situate it in work on lexicon acquisition, word sense discrimination, text segmentation and document retrieval. Prior work on retrieving and clustering related words is one example of what these representations had already been used to do. [Automatic Retrieval and Clustering of Similar Words](https://md.research.elamur.ai/free/en/papers/lin-1998-automatic-retrieval-clustering-similar-words/)

Moving from a word to a sentence poses a different problem. Context features can give *John*, *likes* and *Mary* useful representations. The features alone do not tell a calculation which noun is doing the liking and which noun is its object. A local context used to collect a word representation and the grammatical structure of the sentence currently being interpreted are different sources of information. Even grammatical relations used during collection describe occurrences that supplied lexical evidence. The composition problem asks how a particular occurrence of a verb combines with its particular arguments.

The intended outcome has two requirements. The calculation must respect the grammar of a sentence, since the relationships among words affect the result. It must also give outputs that can be compared even when sentences have different structures. If a change in syntax always changes the space in which the result lives, then an inner product no longer applies directly. Much of the paper consists of separating those requirements in the right place. The word-level calculation is specific to the construction, while the result for a complete sentence belongs to a space shared with other complete sentences.

#### From tensor binding to grammatical reduction

The authors discuss an earlier proposal by Clark and Pulman that develops an idea from connectionist work associated with Smolensky. That proposal represents a filler and its role by separate vectors and uses their tensor product to bind them. The contribution for *John* in subject position includes a subject vector, and the contribution for *Mary* in object position includes an object vector. A traversal of the grammatical structure can put together these bindings and the representation of the verb. The result retains information about roles that would be lost if the words were simply collected together.

The paper identifies two difficulties with using that construction as a sentence representation. First, the space of the resulting tensor depends on the construction used to build it. To compare sentences directly by inner product, their representations need to share a space, which the earlier proposal obtains when their structures match. Second, the earlier proposal needs vectors for grammatical roles and leaves open how to obtain them. The issue is independent of whether the word vectors themselves are informative. A system can have good lexical inputs and still lack a way to represent the role vectors or to compare outputs across constructions.

Coecke, Sadrzadeh and Clark retain tensors and the pairing of meaning with role. In their construction, a role remains a grammatical type. A tensor formed from the word meanings is the input to a grammatical calculation. A transitive verb is itself represented by a tensor with places for the subject, the object and the eventual sentence result. This gives the verb a means of relating the noun inputs through its own entries. Different sentence constructions can start with tensors of different shapes because the reduction sends them to a common destination.

On the grammatical side, the paper draws on Lambek’s use of types to analyze sentence structure. Pregroups develop that tradition by equipping each type with left and right adjoints. These record the side on which a compatible type is needed. A transitive verb can carry a requirement for a noun on its left and another on its right, with a sentence type between them. The paper describes pregroup analyses for several languages, including English, French, Polish and Persian. The mechanism developed here is illustrated with [English](https://md.research.elamur.ai/free/en/topics/english/) transitive clauses.

Lambek’s earlier calculus uses operations related to division to describe what an expression needs in order to combine. The paper presents a translation into pregroup notation that expresses those requirements with adjoint types. That connection gives readers a way to interpret the algebra: an adjoint type plays the role of an argument that must be supplied in a particular position. For composition, the decisive advantage is that pregroup reductions have a diagrammatic form. The authors can reinterpret the links of a grammatical analysis using operations that already exist in vector spaces. This is the point at which a formal account of [syntax and grammar](https://md.research.elamur.ai/free/en/topics/syntax-grammar/) becomes part of a calculation of meaning.

### The method, step by step

#### From the words to the output

Consider *John likes Mary*. The verb needs a noun to its left and a noun to its right. A grammatical analysis pairs the left requirement with *John* and the right requirement with *Mary*. With both requirements satisfied, the sentence type survives. The semantic calculation follows those same pairings. Each name contributes a vector, and the verb contributes a tensor, a representation with several coordinates of variation. The noun vectors interact with the corresponding parts of the verb tensor, leaving a vector in the space reserved for sentences.

The paper’s diagrams depict this as a series of wires. Each wire carries a type or space, and each connection specifies which factors interact. In the transitive example the word representations supply the initial wires, the noun connections close off the argument wires, and a sentence wire remains. The order of the words matters when the diagram is built. The sentence wire, however, has the same destination whether the grammatical analysis was as short as the affirmative example or included an auxiliary and negation.

From grammatical types and word meanings to a sentence vector The steps in order.

The procedure assumes a grammatical analysis and lexical representations. The paper explains how to compose them once they are available. For simple noun types, the authors allow distributional spaces whose features come from context. For compound types, such as a transitive verb, they use tensor spaces. The worked examples supply their lexical entries directly. This lets the authors trace the calculation to a known answer and isolate the effect of the grammatical links.

#### What the pregroup records

A pregroup starts with a partially ordered monoid. The monoid supplies an associative way to concatenate types, together with a unit that can be inserted or deleted. The order records when a type can be reduced to another. Concatenation preserves these reductions on either side. Accordingly, a reduction within a substring of types remains valid when that substring occurs in a longer expression. The underlying structure can be written as follows.

```
(P, ≤, ·, 1)
```

Here P is the collection of types, ≤ is the partial order, · is type multiplication, and 1 is its unit. The paper normally omits the multiplication dot when writing consecutive types and uses an arrow when displaying a reduction. The order supplies a direction, so the availability of a reduction in one direction does not automatically supply its reverse.

The properties that make the structure a pregroup are the left and right adjoint rules.

```
pˡ · p ≤ 1 ≤ p · pˡ
```

Here p is a type and pˡ is its left adjoint. The multiplication · places the factors in the written order. The unit 1 is the type of the empty product, and ≤ indicates an allowed reduction. The first inequality permits the adjacent pair with the adjoint on the left to contract. The second permits an expansion from the unit into the pair in the opposite order.

```
p · pʳ ≤ 1 ≤ pʳ · p
```

Here pʳ is the right adjoint of p. The unit 1, product · and order ≤ have the same roles as above. The contraction now applies when the adjoint is to the right of p. Expansions and contractions belong to the same algebra, although the paper uses contractions for the sentence reductions it works through.

Adjoints are unique and reverse the order. Taking opposite adjoints successively returns the original type, and taking an adjoint of a product reverses its factor order. These features allow compound types to be built from simpler ones without assigning an independent grammatical operation to every word. To express the connection with Lambek’s earlier calculus, the paper gives the following translations for its two divisions.

```
p ∖ q ↦ pʳ · q
```

The types are p and q. The symbol ∖ denotes a division operation in the Lambek calculus, ↦ means that the expression is translated to the one on its right, and pʳ is the right adjoint of p. In the product on the right, a p supplied to the left can contract against pʳ and leave q.

```
p / q ↦ p · qˡ
```

The types are again p and q. Here / denotes the other division, ↦ indicates translation, and qˡ is the left adjoint of q. A q supplied to the right can contract against qˡ and leave p. In both formulas the multiplication · records order as well as combination.

For the transitive examples the relevant basic types are n for a noun, s for a declarative sentence, j for an infinitival contribution and σ for an auxiliary connection. Each entry in the grammatical dictionary receives a type made from basic types, their adjoints or their products. The paper’s criterion for a sentence is that the ordered product of the assigned types reduce to s. It describes the grammaticality test as decidable and invokes Lambek’s switching lemma to justify using contractions for the reductions in question.

```
n (nʳ s nˡ) n → 1 s nˡ n → 1 s 1 → s
```

The two outer n factors are the nouns in *John likes Mary*. The parenthesized expression is the verb type, grouping its right adjoint nʳ, sentence component s and left adjoint nˡ. The parentheses identify the contribution of the verb. Each arrow → is a reduction. The first replaces the subject pair with 1 and the next replaces the object pair with 1. Erasing the units leaves s. In the diagram, those same pairings are drawn under the string of types.

The negative construction gives *does*, *not* and *like* separate compound types.

```
n (nʳ s jˡ σ) (σʳ j jˡ σ) (σʳ j nˡ) n → s
```

From left to right, the groups belong to *John*, *does*, *not*, *like* and *Mary*. The superscripts ˡ and ʳ are the left and right adjoints, and → denotes the reduction of the entire product. The adjacent n and nʳ link the subject to the auxiliary, and the adjacent nˡ and n link the verb to the object. Pairs of σ and σʳ join the auxiliary to the particle and the particle to the infinitive. When those pairs contract, the jˡ requirements can connect with their j partners. The s contributed by *does* is what remains.

The σ factors are important to the interpretation. The paper attributes the grammatical treatment involving these connecting types to a line of work on discourse representation in pregroups. Removing the connecting types gives the earlier assignments it discusses. In the authors’ construction, keeping them provides a route for the subject’s contribution through the auxiliary and negation towards the verb. The j connections give the infinitival semantic contribution a separate route back toward the sentence output. The negative construction consequently involves more than an affirmative reduction with an additional word appended.

#### Why composition needs a category

A category describes objects and maps between them. In this application an object can be a grammatical type or a vector space. A map has a specified input and output. Maps can be composed in sequence when those interfaces agree. A monoidal category additionally provides a way to put objects or maps beside one another. The tensor is the operation that builds this parallel combination, so the category has a language both for assembling word meanings and for operating on the assembled expression.

```
g ∘ f : A → C
```

Here f takes an input of type A to an intermediate type B, and g takes an input of type B to an output of type C. The composition symbol ∘ indicates that f is applied first. The arrow → gives the input and output of the composite. In a diagram, a wire from the output of f feeds the input of g.

```
f ⊗ g : A ⊗ B → C ⊗ D
```

In this parallel example f takes A to C and g takes B to D. The symbol ⊗ combines either objects or maps, and → separates the combined input from the combined output. The corresponding boxes sit beside each other. The monoidal laws make parallel composition consistent with sequential composition.

```
(g₁ ⊗ g₂) ∘ (f₁ ⊗ f₂) = (g₁ ∘ f₁) ⊗ (g₂ ∘ f₂)
```

The indices ₁ and ₂ distinguish the two parallel routes. On each route the output of the relevant f map matches the input of the relevant g map. The symbols ⊗ and ∘ denote parallel and sequential composition, and = states that these are two descriptions of the same map. One can describe both rows in sequence or describe each complete route and put the routes side by side.

The monoidal unit, written I, has no visible wire in this calculus. A vector can be represented either as an element of a space or as a linear map from the real scalars into that space. The latter representation allows a word meaning to be drawn as a box with outputs and no input wire. The whole sentence can be drawn in the same way after the reduction has been applied. The paper uses strict monoidal notation, so regrouping factors and removing units does not require drawing separate maps. This is a convention supported by the equivalence with a strict category that the authors describe.

Compact closure adds the possibility of bending a wire. For each object, one can introduce a linked pair or contract a compatible pair. The two sides of the grammar are reflected in the two ordered forms of these operations.

```
ηˡ : I → A ⊗ Aˡ
```

Here ηˡ is the left unit map, I is the monoidal unit, A is an object and Aˡ is its left adjoint. The tensor ⊗ puts the two output factors side by side. The arrow gives the direction from the unit to the pair. This map can be drawn as a bend that introduces two linked wires.

```
εˡ : Aˡ ⊗ A → I
```

The map εˡ is the left contraction. Its input has Aˡ before A, and its output is I. The tensor ⊗ and arrow → specify the ordered input and the direction of the map. This bend connects two incoming wires with no output wire.

```
ηʳ : I → Aʳ ⊗ A
```

Here ηʳ is the right unit map, and Aʳ is the right adjoint of A. The symbols I, ⊗ and → have the same meanings as for the left unit. The order of the output places the adjoint first.

```
εʳ : A ⊗ Aʳ → I
```

Here εʳ is the right contraction. The object A comes before its right adjoint Aʳ, with ⊗ giving the parallel input and → pointing to the unit I.

The bends satisfy identities that let a wire with a consecutive introduction and contraction be straightened. The paper gives these identities both for the original object and for the adjoint wires. One representative identity is the following.

```
(1ₐ ⊗ εˡ) ∘ (ηˡ ⊗ 1ₐ) = 1ₐ
```

In this formula the subscript ₐ refers to the object A, and 1ₐ is its identity map. The left unit ηˡ adds its linked pair beside the original input. The left contraction εˡ connects the adjoint in that pair to the original input. Parallel composition is ⊗, sequential composition is ∘, and = says the result acts as an identity. The graphical argument for the negative sentence uses this ability to replace consecutive bends with a direct route.

The geometry of the diagrams also distinguishes a genuine relationship from independent contributions. A transitive verb could be given a subject component, a sentence component and an object component that are completely separate. But that would impose a strong restriction: its sentence component would be shaped by each noun only through independent scalar factors. A general verb tensor can respond to the subject and object jointly. The authors use this to explain why an ordinary Cartesian decomposition into separate components would lose expressive power. The ability to keep a tensor connected expresses correlations between its factors.

#### How grammatical connections become inner products

A pregroup can be viewed as a category in which the objects are types. There is an arrow from one type to another exactly when the order permits that reduction. Since a partial order gives at most one arrow with specified endpoints, the equations for compact closure follow whenever the respective arrows exist. Type multiplication supplies the tensor, the expansion rules supply the unit maps and the contraction rules supply the epsilon maps. On the grammar side, a diagram is a way to display these operations.

On the vector side, the objects are finite-dimensional real vector spaces, the maps are linear, and the tensor is the vector-space tensor product. The paper works with bases that induce inner products and uses them to identify a space with its dual. This allows the left and right adjoint factors for a given vector space to be written as copies of the same space. For vectors in the space V, the basic contraction has a simple form.

```
εᵥ(v ⊗ w) = ⟨v | w⟩
```

Here V is the space indicated by the subscript ᵥ, v and w are vectors in V, and εᵥ is its contraction map into the real scalars. The input v ⊗ w is the tensor of the two vectors. The brackets ⟨v | w⟩ denote their inner product, and = gives the value of the map on that input. Extending this rule by linearity defines the map on sums of tensors as well.

```
εᵥ(∑ᵢⱼ cᵢⱼ eᵢ ⊗ eⱼ) = ∑ᵢ cᵢᵢ
```

The eᵢ and eⱼ are basis vectors of V indexed by i and j, and cᵢⱼ is the coefficient for that basis pair. The summation symbol ∑ collects the indicated terms, while ⊗ combines the basis factors. The right side keeps the diagonal coefficients cᵢᵢ. In the induced inner product, different basis vectors have inner product 0 and matching ones have inner product 1. Thus the contraction is a linear rule that extracts and adds the matching entries.

```
ηᵥ(1) = ∑ᵢ eᵢ ⊗ eᵢ
```

Here ηᵥ is the vector-space unit for V. Its input 1 is the scalar one, and its output is the sum ∑ᵢ of the tensors formed by pairing each basis vector eᵢ with itself. This is the vector associated with the identity map when a linear operation is represented by its action on the basis. One can understand the link it creates by following any particular basis index. The index appears on both sides of the introduced pair and can be matched against a later input.

Vector-space tensor factors can be exchanged by a linear isomorphism. The grammar of an ordered sentence generally prevents an analogous exchange. The paper addresses this difference by working in a product category, FVect × P. An object pairs a vector space with a grammatical type, and an arrow pairs a linear map with an allowed reduction.

```
(f, p ≤ q) : (V, p) → (W, q)
```

The spaces are V and W, the types p and q belong to the pregroup P, and the linear map f goes from V to W. The symbol ≤ certifies the grammatical reduction. The arrow → represents a morphism in the product category. A linear map between the spaces, by itself, cannot supply this morphism when the grammatical reduction is unavailable. The product keeps the vector-space operations and the grammatical order available at the same time.

The structural operations of the product category act on each component. A grammatical contraction is paired with an inner-product map, while a grammatical expansion can be paired with the vector-space unit. This observation is more specific than the claim that syntax and meaning can each be represented with categories. It gives the authors a recipe for building the semantic map: follow the structure of the reduction and substitute the appropriate linear operation for each link.

#### The sentence map and the affirmative calculation

For a string of words, the authors assign each word a vector space and a grammatical type. The product of the types reduces to a target type. A sentence should have s as that target, while the general definition also covers strings that reduce to another grammatical type. The resulting linear map is typed as follows.

```
f : W₁ ⊗ ⋯ ⊗ Wₙ → X
```

Here f is built from the reduction links, W₁ through Wₙ are the input spaces for the words in order, and X is the space for the surviving target type. The subscripts distinguish positions, and n in this expression is the length of the string instead of the grammatical noun type. The tensor ⊗ forms the joint input, ⋯ indicates the intervening factors, and → gives the map’s direction. For a sentence, X is the fixed sentence space S.

```
u = f(v₁ ⊗ ⋯ ⊗ vₙ)
```

The vector vᵢ is the meaning supplied for the word at position i. The symbols ⊗ and ⋯ form the tensor of all those vectors in their original order, and f applies the linear version of the grammatical reduction. The output u is the meaning assigned to the string. The operation f is linear on the joint tensor space. Viewed in terms of individual word slots, it can interact with changes in multiple inputs because their tensor product is formed before f is applied.

In the affirmative case the subject belongs to V, the object to W, and the verb to a space with a V factor, an S factor and a W factor. The paper allows subject and object spaces to differ even though both noun expressions receive the basic type n. Each verb argument factor matches the space of the noun it contracts with. The verb therefore has a place to record how a subject and an object jointly contribute to a sentence.

```
f = εᵥ ⊗ 1ₛ ⊗ ε𝑤
```

Here f is the affirmative meaning map, εᵥ contracts the two V factors, and ε𝑤 contracts the two W factors. The identity map 1ₛ acts on the sentence space S. The symbol ⊗ puts these operations side by side in the grammatical order. Each contraction produces a scalar that weights what passes through the sentence wire.

```
Ψ = ∑ᵢⱼₖ cᵢⱼₖ vᵢ ⊗ sⱼ ⊗ wₖ
```

The verb vector is Ψ. The vectors vᵢ, sⱼ and wₖ range over bases of the subject space V, the sentence space S and the object space W, respectively. The indices i, j and k distinguish positions in those bases. The coefficient cᵢⱼₖ weights its associated triple, and ∑ᵢⱼₖ sums across all triples of indices. Each ⊗ joins successive factors in a basis tensor.

```
f(v ⊗ Ψ ⊗ w) = ∑ⱼ (∑ᵢₖ cᵢⱼₖ ⟨v | vᵢ⟩ ⟨wₖ | w⟩) sⱼ
```

Here v and w are the actual subject and object vectors, and Ψ is the verb tensor. The inner products ⟨v | vᵢ⟩ and ⟨wₖ | w⟩ measure the matches to the corresponding argument factors. The inner sum ∑ᵢₖ collects their contributions for a fixed sentence coordinate j. Multiplication of the coefficient cᵢⱼₖ and the two inner products gives the contribution from that entry. The outer sum ∑ⱼ combines the weighted basis vectors sⱼ into the output. This is why the contraction can eliminate wires without losing the noun information. The nouns determine the weights of what remains.

The paper also describes the verb tensor as a function of its subject and object. For any supplied argument pair, contractions evaluate this function to a sentence vector. Its separate dependence on each argument is linear when the other is held fixed. This view makes the relationship between the syntax and the tensor concrete. The grammar indicates where the arguments go, and the tensor contains what is known about those arguments in conjunction with that verb.

In the first truth-theoretic example, basis vectors in V represent individual men and basis vectors in W represent individual women. Each name is represented by its own basis vector. John is indexed by 3 in V and Mary by 4 in W. The verb tensor stores a sentence contribution for each pair of those indices. Its contribution for a given pair is assigned according to whether the relation of liking holds. This is an idealized interpretation, with one basis vector per individual, rather than an empirical account of how often a name occurs in particular contexts.

```
f(m₃ ⊗ likes ⊗ f₄) = likes₃₄
```

Here f is the affirmative contraction map, m₃ represents John, f₄ represents Mary and likes denotes the entire verb tensor. The ⊗ signs form the input from the three word meanings. The term likes₃₄ is the sentence-space entry of the tensor for the selected pair. Orthogonality of the individual basis vectors means that every term with a different subject or a different object is removed. Although f₄ uses the letter f, it is an object vector, distinct from the map f.

The authors use two representations of truth. In one dimension the designated non-zero vector stands for truth, and the origin stands for falsity. In two dimensions the truth and falsity vectors are different basis vectors, so falsity now has a non-zero vector of its own. Both representations permit the same grammatical contraction. The change concerns the contents of the sentence slot of the verb, and the output has the corresponding interpretation. The separate basis positions in the second representation allow negation to be expressed as a linear exchange.

#### The auxiliary and negation

The negative sentence introduces an infinitival space J. The auxiliary uses factors for the subject connection, the sentence result, the infinitival connection and the continuation of the subject information. Negation uses paired subject and infinitival factors, and the infinitive *like* uses the subject, infinitival and object factors. The authors set S equal to J in their example, making the infinitival truth-space output and the sentence truth space compatible. They supply meanings for *does* and *not* manually.

A useful identity relates linear maps to tensors. The paper uses it to store a function word’s operation as a word vector, even though its effect emerges as a map when the sentence is composed.

```
Ψᵣ = ∑ᵢ eᵢ ⊗ r(eᵢ)
```

Here r is a linear map from a source vector space to a target vector space, eᵢ runs over a basis of the source, and r(eᵢ) is the corresponding output. The tensor ⊗ pairs each basis vector with its image, ∑ᵢ adds the terms, and Ψᵣ is the tensor representing r. Choosing the identity for r pairs each basis vector with itself, as in the unit map. Choosing the negation operation pairs each basis vector with the opposite truth basis vector.

```
does = (1ᵥ ⊗ ηⱼ ⊗ 1ᵥ) ∘ ηᵥ
```

Here does denotes the vector for the auxiliary in its equivalent form as a map from the scalars. The unit ηᵥ introduces a matched pair of V factors, ηⱼ introduces a matched pair of J factors, and 1ᵥ leaves each outer V factor unchanged. The symbols ⊗ and ∘ indicate the parallel placement of operations and their sequential composition. The resulting four factors are ordered as subject, sentence, infinitival connection and subject continuation, using the identification between S and J. The paired indices act as routes for information when connected to the rest of the sentence.

```
N = [ 0  1
      1  0 ]
```

Here N is the linear map used for negation on J. The bracketed array is its matrix in the two truth basis positions. The entries 0 and 1 specify an exchange: an input basis vector has its entire contribution sent to the other position. In the paper’s convention the first basis position is false and the second is true. Unlike the name N used for a norm in the paper’s similarity definition, N here always denotes the negation operator.

```
not = ∑ᵢ eᵢ ⊗ (|01⟩ + |10⟩) ⊗ eᵢ
```

The quantity not is the particle’s vector, and eᵢ ranges over the subject basis. The strings |01⟩ and |10⟩ denote paired basis vectors of J, with the digits giving the two basis positions in order. The plus sign adds the two off-diagonal terms, and the tensor products ⊗ and summation ∑ᵢ place the exchange inside a matching pair of subject factors. The subject can pass through that part of the tensor while the truth position changes. The corresponding middle pair for *does* uses |00⟩ and |11⟩, which retain the truth position.

After substituting the entries of *does* and *not*, the paper simplifies the full diagram. Matched bends become identity routes. The matrix can pass around a bend with a transpose, which leaves this particular exchange matrix unchanged. The simplified result has subject and object contractions in the same positions as the affirmative calculation, with negation on the middle wire.

```
u₋ = (εᵥ ⊗ N ⊗ ε𝑤)(v ⊗ Ψ ⊗ w)
```

Here u₋ is the negative sentence vector, v is the subject, Ψ is the infinitival verb tensor, and w is the object. The contractions εᵥ and ε𝑤 match the verb to those noun inputs, and N acts on the infinitival result in J, which is also the chosen sentence space. The tensor symbols ⊗ give the parallel operations and the ordered input. This compact form is the result of simplifying the original map with all the word meanings included. The paper also verifies it by expanding the basis sums and performing the contractions in sequence.

#### Comparing the outputs and changing the scalars

The shared sentence space makes an inner product possible after either calculation. The authors also state a normalized comparison for strings whose reductions arrive at the same type. The assumption is that the outputs use a common space, with the same basis and inner product. The composed vectors may come from different maps when their reductions have different patterns.

```
m = ⟨u | u′⟩ / (‖u‖ ‖u′‖)
```

In this definition m is the similarity, u and u′ are the composed vectors for the two strings, and ⟨u | u′⟩ is their inner product. The double bars denote vector norms, and the denominator is the product of those norms. The slash denotes division. The two vectors must have non-zero norms for this formula to be defined. The worked graded examples print inner products, a distinction that matters when one of the vectors is a mixture.

The paper’s final construction changes the values that the coefficients can take. With a fixed basis, a linear map has a matrix. Matrix arithmetic needs an addition and multiplication with distributivity, a structure available over a semiring. The authors point to several possible choices, including non-negative numerical settings, and develop the Boolean case. There the entries are 0 and 1, addition is disjunction, and multiplication is conjunction. A Boolean matrix identifies a relation between its input and output sets.

```
s ∘ r = {(x, z) | ∃ y ∈ Y with (x, y) ∈ r and (y, z) ∈ s}
```

Here x, y and z are elements of the input, intermediate and output sets, and Y is the intermediate set. The relations r and s connect the input to Y and Y to the output, respectively. The symbol ∘ is relational composition, ∃ means that at least one such intermediate element exists, and ∈ denotes membership. The vertical bar in the set expression introduces the membership condition. This is the relational counterpart of multiplying Boolean matrices, since a connection exists exactly when some intermediate choice supplies both required links.

An element in this relational setting is represented by the subset picked out by a relation from a singleton. An intersection can therefore do the work corresponding to an inner product. An empty intersection gives 0, and a nonempty one gives 1. The paper combines the category of finite sets and relations, FRel, with P in the same way that it combines finite-dimensional vector spaces with P. The grammar supplies the structure of the contraction in both cases.

For the affirmative truth example, the sentence output space is replaced by a singleton set. Its full subset represents truth and its empty subset represents falsity. The relation for *likes* contains the triples consisting of a subject, the singleton element and an object whenever the subject likes that object. The grammatical links match the input singleton for John to the subject and the input singleton for Mary to the object. The surviving subset of the sentence singleton records whether the corresponding triple was present. The paper thus recovers the truth evaluation of the affirmative example in a Montague-style setting by reinterpreting the same grammatical links.

### Experiments and results

#### What the paper evaluates by calculation

The paper uses constructed examples. It reports no corpus, data split, trained lexical representations or empirical baseline scores. The earlier tensor-binding proposal is compared conceptually, and the relational interpretation is used as a mathematical comparison for truth evaluation. Neither supplies a benchmark against which the authors measure predictive performance. The concrete results concern truth outputs and pairwise overlaps for specified lexical entries.

The affirmative truth example gives the composition procedure a controlled input: an identity for each noun and a verb tensor with a truth value for every subject–object pair. The grammatical contraction returns the entry for John and Mary. The paper makes this a conditional demonstration. It specifies what the answer will be if the input relation includes that pair, and what it will be if it does not. This checks that the two argument links select the intended entry and that the truth convention survives the reduction.

For the negative example, the authors switch to the two-dimensional truth representation and compare the interpretation with the underlying affirmative proposition. When the stored value of *like* for John and Mary is false, *John does not like Mary* gives true. When the stored value is true, the negative form gives false. The chart uses the paper’s basis labels as truth codes. The higher code identifies truth in this example. The comparison measures the sentence’s truth output, with no ranking of the correctness of the two forms.

Truth codes for the affirmative and negative John–Mary example with a false affirmative input The negative construction returns the true basis label when the affirmative entry is false.

**The numbers**

| System or setting | truth code |
| --- | --- |
| Affirmative transitive calculation | 0 |
| Negative transitive calculation (this paper) | 1 |

The paper obtains the negative truth result both by simplifying diagrams and by expanding the basis calculation. In the expansion, matching indices remove entries that refer to other subjects or objects. The remaining truth vector passes through the terms supplied by the auxiliary and particle. Agreement between the calculations illustrates the intended reading of the diagrams. The diagram is performing the same selection and exchange as the symbolic expression.

#### Similarity with chosen graded verb meanings

The graded example changes the entries of the verb tensor while keeping the participants fixed. The authors define the representation of *likes* using weight 3/4 on the tensor for *loves* and weight 1/4 on the tensor for *hates*. The contraction with John and Mary selects the corresponding mixture for that pair. When the authors compute similarities, they treat the selected love and hate outcomes as orthogonal. Their derivations use the two truth basis positions for the outcomes of those predicates. The choice of mixture weights and the orthogonality assumption both enter the scores.

For the affirmative sentences about John and Mary, the paper reports an inner product of 3/4 for *loves* against *likes*, 1/4 for *hates* against *likes*, and 0 for *loves* against *hates*. These scores show how the stipulated weights propagate from the verb tensor to the selected sentence vector. The overlap with *loves* takes the love component of the mixture, while the orthogonal hate contribution drops out. With *hates* as the comparison, the other component survives. There are no annotated sentence pairs behind these values and no averaging across examples.

The paper obtains a corresponding graded negative sentence by exchanging the basis positions. In the example where the love and hate outputs occupy opposite positions, the negative form of *like* has weight 1/4 on the selected love outcome and 3/4 on the selected hate outcome. The paper reports 3/4 for the inner product of *does not love* with *does not like* for the same John–Mary pair. Both sentences have undergone the exchange, so their overlap reflects the same pair of contributions with the truth positions interchanged.

The comparisons across grammatical forms demonstrate the purpose of the common sentence space. The paper reports 1/4 for the inner product of *does not like* with *loves*, and 3/4 for the inner product of *does not like* with *hates*, again with John as subject and Mary as object. The negative clause has the additional auxiliary and particle, while each affirmative clause uses a single transitive verb. The outer products at the input therefore have different factors. Their reductions end in the same space, so the resulting vectors enter the same overlap calculation.

The cross-form comparison between *likes* and *does not like* gives a reported inner product of 3/8. In the graded example the vectors still have components along the same basis directions after the exchange. Their positive overlap reflects those shared directions. In the truth-only example, the two distinct basis states are orthogonal. The difference between the examples comes from what is encoded in the verb contribution and how that contribution responds to the same exchange.

#### How to read the reported scores

The paper defines similarity using the inner product divided by the product of the norms. Some displayed results, including the 3/8 comparison, are the inner products of the written mixtures. The paper refers to implicit normalization, but its displayed expansions keep the mixture weights and do not show the division by the norms of the composed outputs. The values above are the reported overlaps from those expansions. This reading preserves both the paper’s formal definition and what its arithmetic displays.

In the relational calculation, the comparable result is recovery of a truth value, with no graded score. Matching the subject and object against the verb relation returns either the full singleton or the empty subset. The one-dimensional truth example and the relational example agree on what those outputs mean. The purpose of putting them side by side is to show that the grammar-guided construction can serve both interpretations, with a change in the underlying scalars and operations.

### What the ablations show

The paper has no empirical ablations. Its closest equivalents are worked comparisons in which the grammatical structure, lexical entries or semantic setting change while the effect of that change can be followed directly through the calculation.

The truth-only affirmative and negative cases keep the participants and the underlying relation fixed. The auxiliary and particle change the grammatical route, and the particle supplies the exchange operation. The resulting calculation still selects John and Mary’s entry, then delivers its opposite truth basis vector. This shows why the particle can alter the sentence output without changing which subject and object the verb is evaluated on. The symbolic expansion verifies the same behavior in coordinates.

The two ways of representing truth isolate a separate design choice. Identifying falsity with the origin is enough to express the positive truth result and makes the correspondence with the empty subset easy to see. Giving falsity a separate basis vector lets a linear operator send false to true and true to false. The distinction matters because a linear map sends the origin to the origin. The paper’s construction for *not* uses the separate basis position. The example explains the need for that representation in this calculation.

The graded and truth-only variants use the same exchange on different inputs. In the truth-only setting the exchange sends a basis vector to the orthogonal alternative. In the graded setting the original vector already has components in both directions. The exchange moves the weights, so shared components survive when the two sentence vectors are compared. The comparison identifies the lexical mixture as the reason for the reported positive overlap between the affirmative and negative forms. There is no separate performance comparison between choices of mixture weights.

Finally, the real-valued and relational versions show what can be carried from one setting to another. The same subject and object connections determine the output, while the matching operation now works with subsets and the result expresses truth. The construction depends on a set of structural operations that can be implemented in more than one category. The paper demonstrates this correspondence for its particular affirmative example. It does not independently measure the contribution of the connecting type σ, of any choice of distributional features, or of any technique for acquiring the tensors themselves.

### Limitations

#### Limits identified by the authors

The authors leave implementation on real corpus data and empirical evaluation for future work. The paper describes how distributional spaces can be constructed and how such inputs would enter the framework, while its concrete sentences use handcrafted tensors. It also leaves questions of efficiency, complexity and optimization open. A diagram specifies the contractions, but the cost of obtaining and representing the lexical tensors and applying the contractions at corpus scale remains to be established.

The negation analysis is restricted to a basis exchange in two dimensions. The authors seek an operation that can serve as negation uniformly across meaning spaces of different dimensions. They mention projection onto an orthogonal subspace as a possible direction from earlier work. They also leave conjunction, disjunction and conditionals for a more general logical treatment. Ordinary vector operations do not automatically satisfy the intended laws for those connectives. The example of *but* suggests a further complication, since the authors see its contribution as sensitive to context and therefore harder to associate with a single logical operation.

The move to Boolean scalars establishes a connection with truth evaluation in a relational setting. The authors still call for a representation theorem formalizing the relationship with Montague semantics. They identify quantification and its connection to substitution as issues for that extension. They also propose a correspondence among the categorical account, a form of linear logic and a version of lambda calculus. Such a correspondence would help connect type assignments and meaning computations more systematically. The paper mentions that its abstract setting can accommodate mixed states and leaves their linguistic significance to be investigated.

#### Limits visible in the worked setup

The grammatical and lexical inputs are stipulated. Representing each person by a separate basis vector makes the noun contractions act as exact selection. A distributional noun vector can spread its weight over multiple coordinates, which turns selection into a weighted combination. The paper gives a mathematical rule for doing that. The examples, however, establish neither a way to choose the right lexical features nor evidence that a tensor acquired from text yields a preferred interpretation for a real sentence. A shared output space provides the geometry required for comparison, while the quality of that geometry depends on how its contents are obtained.

The same-argument graded example also relies on a particular relationship between the outputs for *love* and *hate*. The calculation treats those outputs as occupying opposite basis positions for the selected pair. The lexical setup initially defines the two relations by separate truth conditions. Those definitions alone do not ensure that the relations give opposite answers for every pair. The reported identification of the exchanged love outcome with the hate outcome follows under the complementarity assumed in the calculation. It supplies no general linguistic equivalence between *does not love* and *hates*.

Two aspects of the similarity measure need separate attention. A common space makes the inner product well-defined, even if one of the vectors is the origin. The normalized measure has the additional requirement that both vectors be non-zero. Thus the one-dimensional truth encoding provides a valid false output that cannot serve as an input to the normalized comparison as written. In the graded example, the paper’s printed overlaps can be read directly, but applying the formal normalized measure would also require accounting for the norms of the mixtures. These distinctions matter when turning the proposal into an evaluation procedure with a precise metric.

Finally, the examples establish what the framework computes for chosen analyses. A sentence may admit different type assignments or interpretations, and the authors note that the categorical presentation can help express grammatical ambiguity. The paper does not evaluate how to choose among readings or how robust the final similarities are when the grammatical analysis is uncertain. Its constructive result concerns a well-typed input with specified lexical meanings. The broader question of how reliably those conditions can be obtained in practice remains open.

### What came after

The closest continuations in the citing literature take up parts of the framework that the paper leaves open. One is how to represent logical structure when the starting point is a graded word vector. The paper obtains its Boolean interpretation by changing the scalar system and then working with relations. A later paper frames the problem as deriving Boolean structure from distributional vectors themselves. The direction of that inquiry is significant: the distributional representations are the starting material from which the logical structure is to be obtained. [Deriving Boolean Structures from Distributional Vectors](https://md.research.elamur.ai/free/en/papers/kruszewski-2015-deriving-boolean-structures-distributional-vectors/)

Another continuation concerns what a comparison between meanings should express. The earlier paper concentrates on similarity, for which reversing the two inputs to the real inner product preserves the score. Hyponymy expresses a directed relation between a more specific expression and a more general one. Work on graded hyponymy puts this different comparison into compositional distributional semantics. It takes up the question of what kind of semantic relation to represent once lexical meanings can be composed, extending the subject beyond shared geometric overlap. [Graded Hyponymy for Compositional Distributional Semantics](https://md.research.elamur.ai/free/en/papers/bankova-2019-graded-hyponymy-compositional-distributional-semantics/)

Categorical composition also provides room to ask what a sentence presents as its topic or emphasizes as its informational contribution. The original paper’s transitive examples concentrate on argument roles and truth or graded lexical meaning. Subsequent work brought information structure into the categorical setting through a Frobenius construction. This makes information structure itself an object of analysis within compositional distributional semantics, alongside the grammatical connections that determine how constituents combine. [Frobenius Information Structure in Categorical Compositional Distributional Semantics](https://md.research.elamur.ai/free/en/papers/kartsaklis-2015-frobenius-model-information-structure-categorical/)

The division between the grammar and the vector calculation also gives later work a place to reconsider the grammatical formalism. For Coecke, Sadrzadeh and Clark, pregroup reductions provide the instructions for tensor contraction. A later study places tensor semantics in a feature-driven Minimalist grammar setting. Its point of contact is the relationship between syntactic structure and tensor operations, approached through a grammar organized around features. Another study puts grammar, morphology and word sense together in work on circuit topology for Arabic. Its scope brings word-internal structure and lexical interpretation into the same discussion as the grammatical shape of the circuit. [A Feature-Driven Tensor Semantics for Minimalist Grammars](https://md.research.elamur.ai/free/en/papers/paulson-2026-feature-driven-tensor-semantics-minimalist/) · [Quantum Compositional NLP for Arabic](https://md.research.elamur.ai/free/en/papers/mohammed-2026-quantum-compositional-nlp-arabic-grammar/)

The quantum connection in the original paper comes from the structural operations used in its diagrams. Its authors point out that the same kinds of pair creation and contraction appear in diagrammatic presentations of quantum protocols. Later work on variational quantum circuits takes meaning representation into the language of parameterized circuits. Its title identifies the meaning representations themselves with those circuits. That is a different emphasis from the original examples, where the diagrams describe equations for spaces, vectors and linear maps. [Meaning Representations as Variational Quantum Circuits](https://md.research.elamur.ai/free/en/papers/stokin-2026-meaning-representations-as-variational-quantum/)

Other citing work follows the problem of sentence composition through different methods. A convolutional approach treats sentence representation as a neural composition problem. Work on deep unordered composition makes the role of syntactic organization a question for comparison in text classification. Research that decomposes compositionality asks how neural networks generalize under different aspects of the concept. These are related investigations into what it takes to assemble representations from parts. Their stated topics establish that connection without implying that they use the earlier paper’s pregroup contractions. [Convolutional Neural Networks for Sentences](https://md.research.elamur.ai/free/en/papers/kalchbrenner-2014-convolutional-neural-network-modelling-sentences/) · [Deep Unordered Composition for Text Classification](https://md.research.elamur.ai/free/en/papers/iyyer-2015-deep-unordered-composition-rivals-syntactic/) · [Compositionality Decomposed](https://md.research.elamur.ai/free/en/papers/hupkes-2019-compositionality-decomposed-neural-networks-generalise/)

The applications in the citing work also give the semantics a different endpoint. Research on dialogue act classification asks what distributional semantic information contributes to identifying the function of an utterance in dialogue. A study of German derivational morphology turns attention to meaning representations for relationships among words formed by derivation. These settings broaden the range of linguistic units and decisions for which distributional evidence is examined. The original paper supplies a way to ask how structure makes that evidence usable in composition. Whether a given representation helps a task remains a question for that task. [Distributional Semantic Information for Dialogue Act Classification](https://md.research.elamur.ai/free/en/papers/milajevs-2014-investigating-contribution-distributional-semantic-information/) · [Distributional Semantics of German Derivational Morphology](https://md.research.elamur.ai/free/en/papers/kisselew-2015-obtaining-better-understanding-distributional-models/)

## Cite

Cite as Bob Coecke, Mehrnoosh Sadrzadeh and Stephen Clark. 2010. Mathematical Foundations for a Compositional Distributional Model of Meaning. arXiv:1003.4394 · Lambek Festschirft, special issue of Linguistic Analysis, 2010.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.1003.4394](https://doi.org/10.48550/arxiv.1003.4394) · [arXiv 1003.4394](https://arxiv.org/abs/1003.4394)

```bibtex
@misc{coecke2010mathematical,
  title = {{Mathematical Foundations for a Compositional Distributional Model of Meaning}},
  author = {Bob Coecke, Mehrnoosh Sadrzadeh and Stephen Clark},
  year = {2010},
  doi = {10.48550/arxiv.1003.4394},
  eprint = {1003.4394},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1003.4394}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
