A Categorical Compositional Distributional Modelling for the Language of Life

arXiv:1902.09303 · q-bio.QM · Submitted 2019-02-13 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: Genomics Radio. Generated commentary on the latest computational biology and genomics papers.

Ines: We're looking at the paper: "A Categorical Compositional Distributional Modelling for the Language of Life".

Paper summary: Ines: We just talked about how the "A Categorical Compositional Distributional Modelling for the Language of Life" paper tries to use a math model for language to understand proteins.

Marcus: The core idea is treating proteins as sentences where domains are words and their arrangement is syntax, because that connects biological parts directly to linguistic concepts.

Yuki: I want to follow up on how they formalize the function, since that seems like the main goal—combining domain functions with grammar rules.

Ines: They show this by computing the protein's function based on its domains and linkers using those rules, which is how they get their final result.

Marcus: The results involve taking the vector representation of each part and merging it with the grammar type of those parts to create that final protein function vector.

Yuki: This suggests they are trying to create a formal language for what determines protein function, which could be really helpful for seeing how different proteins work together in a cell.

Ines: They also point out some difficulties, particularly with optimizing the grammar typing system and making the math for combining those domain vectors stricter when you factor in linkers.

Marcus: The authors mentioned that using a diagrammatic representation might help make this visualization and calculation process simpler without getting lost in all the notation.

Yuki: So while they present this mathematical structure for protein function, there’s still significant work ahead before we can use it as a standard tool in fields like population genetics.

Ines: What's important is that they show we can use these linguistic tools to get a vector representation of protein function, which is actually new in how we think about this area.

Marcus: But you have to keep those limitations in mind, like the need for stricter tensor product computations before you try applying this kind of model to very large sets of data.

Yuki: The way they set up the grammar for these components gives us a fresh perspective on looking at protein structure and function across different species.

Conclusion: Ines: So, we're wrapping up our look at "A Categorical Compositional Distributional Modelling for the Language of Life." The paper uses a complex mathematical model to try and map how meaning is built in living systems.

Marcus: That paper is trying to treat proteins like sentences and their parts like words, and the whole idea centers on using grammar rules to figure out the function of those protein structures.

Yuki: It’s about finding a formal way to represent protein function that connects structure and sequence across different species and time scales.

Ines: The authors show this works for real proteins like DAT and FoxP, giving you a vector representation of their function using these linguistic tools.

Marcus: So the implication is that we can use these methods to see how different parts of a protein fit together syntactically, which adds structural information to population genetics.

Yuki: It provides a new lens for understanding protein structure, but there's still significant work needed before this becomes a standard tool in biology.

Ines: It’s about harnessing natural language processing theory to get a mathematical representation of biological function, but that refinement is definitely the next big challenge.

Centre for Neural Circuits and Behaviour, University of Oxford · Department of Physiology, Anatomy and Genetics, University of Oxford · Department of Computer Science, University of Oxford

q-bio.QM

Submitted: 2019-02-13

Updated: 2026-11-19

Comments: 24 pages, 18 figures, 1 table

License: http://creativecommons.org/licenses/by/4.0/

Importance score: 87/100

The gist: The Categorical Compositional Distributional (DisCoCat) Model is a powerful mathematical model for composing the meaning of sentences in natural languages.<ref:1902.09303#pg2>.

Key concepts

DisCoCat Model
A mathematical model that combines distributional representations (word meanings in vector spaces) with compositional grammar types (how words combine). It uses a compact closed monoidal category to unify these two structures, allowing the meaning of a protein to be computed from its parts.
Protein as Sentence
The paper treats proteins like sentences in language. The constituent domains or linker regions within a protein are analogous to individual words, and their specific arrangement corresponds to the sentence's syntax, allowing for compositional analysis.
Grammar Typing (Lambek's Pregroup)
This system uses grammar types to enforce structural rules on protein components, similar to how natural language grammar works. It applies partial orders to these types, ensuring that only structurally valid combinations of domains and linkers are considered when calculating the final function.
Distributional Representation (ProtVec)
This method assigns numerical vectors to parts of a protein sequence, such as 3-mers. This borrows techniques from word embeddings (like Word2Vec) to capture the semantic meaning or functional properties of individual protein domains based on their sequence context.

Terminology

Summary

The Categorical Compositional Distributional (DisCoCat) Model is a powerful mathematical model for composing the meaning of sentences in natural languages. p. 0

Where the paper says it

A Categorical Compositional Distributional Modelling for the Language of Life Yanying Wu1,2 and Quanlong Wang 3 1Centre for Neural Circuits and Behaviour, University of Oxford, UK 2Department of Physiology, Anatomy and Genetics, University of Oxford, UK 3Department of Computer Science, University of Oxford, UK Aug. 13, 2019 Abstract The Categorical Compositional Distributional (DisCoCat) Model is a powerful mathematical model for composing the meaning of sentences in natural languages.

<ref:1902.09303#pg2>. This work attempts to apply the DisCoCat model on the language of life, focusing on proteins as linguistic features because their constituent domains correspond to words and their arrangement corresponds to syntax. p. 0
Where the paper says it

Concretely, we treat each protein as a sentence and its constituent domains as words. The meaning of a word or the sentence is just its biological function, and the arrangement of domains in a protein corresponds to the syntax.

<ref:1902.09303#pg2>. The authors provide a novel way to formalize the functional representation of proteins by computing a protein's function based on its domain functions with grammar rules.<ref:1902.09303#pg2>.

Linguistic Foundations and Macro-molecular Context

The paper reviews linguistic perspectives on macro-molecules built upon Chomsky’s framework, noting that DNA sequence can be viewed as a book of life where genes are sentences.<ref:1902.09303#pg3>. David Searls and others performed extensive grammatical analyses on macro-molecules like DNA, RNA, and proteins. p. 1

Where the paper says it

Coincidently, when the double helix structure of DNA was discovered in the 1950s, linguist Noam Chomsky also developed the revolutionary theory revealing the syntactic structure of natural languages [Chomsky, 1957]. Based on Chomskys theories, David Searls and others have performed extensive grammatical analyses on the macro-molecules (DNA, RNA and proteins) [Doerfler, 1982, Brendel and Busse, 1984, Searls, 1992, Searls, 1993, Searls, 1997, Searls, 2002, Chiang et al.

<ref:1902.09303#pg3>. The central dogma of molecular biology states that information in DNA is first transcribed into RNA and then translated into protein. p. 2
Where the paper says it

There are other macro-molecules such as RNA and protein, which also have their intrinsic linear sequences, and they also play indispensable roles for any living organisms on the earth. According to the central-dogma of molecular biology (Figure 1), information contained in DNA is first transcribed into RNA and then translated into protein.

<ref:1902.09303#pg5>. Gene grammar can be viewed as a modular structure, where a gene resembles a sentence composed of parts like Promoter, Transcript, 5’UTR, ORF, and 3’UTR. p. 4
Where the paper says it

UTR stands for untranslated region, and they will be eliminated together with those Introns from the Transcript sequence to form a coding sequence (CDS) which actually codes for the protein sequences (Figure 4). Figure 4: A typical eukaryote gene structure Such a gene can be viewed as resembling a sentence in having a modular structure, which could be captured by a set of grammar rules as following [Searls, 2002, Searls, 2013]: Gene →Promoter Transcript Transcript →5’UTR ORF 3’UTR ORF →Exon Intron ORF |Exon Exon →CodingSeq Intron →Donor SkippedSeq Acceptor Donor →gt Acceptor →ag CodingSeq →atgaacaca.

<ref:1902.09303#pg6>. RNA secondary structures can be modeled using context-free grammars. p. 5
Where the paper says it

the context-free grammar that follows [Searls, 2013]: Figure 5: A RNA hairpin Pair →a Pair u |u Pair a |c Pair g |g Pair c |ε More complex RNA secondary structures and their grammar models can be found in [Chiang et al. , 2006, Searls and Others, 1999].

<ref:1902.09303#pg7>. Protein grammars are more complex due to the larger alphabet of amino acids, with models like Ranked Node-Rewriting Grammar (RNRG) being established for local structures. p. 5
Where the paper says it

As protein has a relatively more complex ”alphabet” which contains 20 amino acids, also the structures of proteins are much more diverse and complicated than that of RNA molecules, there exists no simple grammars for protein so far. Nevertheless, the linguistic properties of protein structure have been extensively studied, and at least for the local structures, several elegant models were established.

<ref:1902.09303#pg8>.

Mathematical Framework: DisCoCat Model

The DisCoCat model unifies distributional representations of word meanings in vector spaces with the compositional grammar types of words in a pregroup.<ref:1902.09303#pg9>. The key idea is that both pregroup and vector spaces share the same high-level mathematical structure, referred to as a compact closed monoidal category. p. 8

Where the paper says it

The DisCoCat model ingeniously adopts category theory to unify the distributional representations of word meanings in vector spaces with the compositional grammar types of words in a pregroup, and takes advantage of the pregroup algebra to transform the meanings of constituents into a meaning of the whole [Coecke et al. The key idea behind DisCoCat model is that both pregroup and vector spaces share the same high level mathematical structure, referred to as a compact closed monoidal category [Grefenstette and Sadrzadeh, 2011].

<ref:1902.09303#pg9>. The process involves five steps to compute the meaning of a sentence from words w1w2…wn. p. 9
Where the paper says it

If the grammar type of a string of words can be reduced to a sentence, then the corresponding calculation on the vectors would produce the meaning of that sentence also in a vector space. Concretely, we can perform the following steps in order to compute the meaning of a sentence from a string of words w1w2.

<ref:1902.09303#pg9>. These steps include assigning grammar types, assigning vector space representations, concatenating grammar types, performing type reduction using pregroup algebra rules, and applying a functor F to get a linear map L. p. 9
Where the paper says it

pn and carry out a type reduction upon it using the rules of pregroup algebra, and record the chain of reduction as a morphism 4. apply functor F on the reduction morphism obtained from previous step to get a linear map L, and compute the meaning of the sentence by applying L upon the tensor of vector spaces representing the meaning of corresponding words (v1 ⊗ v2 ⊗ .

<ref:1902.09303#pg9>.

Applying the Model to Proteins

The authors propose constructing an equivalent framework for proteins by treating a protein as a sentence and its constituent domains or linker regions as words.<ref:1902.09303#pg10>. They introduce basic types for protein components such as binding domains (b), catalytic domains (c), and linkers (l). p. 9

Where the paper says it

Under such a framework, we treat a protein as a sentence, and the constituent domains or linker regions as words. Consequently, we could obtain the function (meaning) of a protein through combining the vector representation with the grammar type of domains and linkers.

<ref:1902.09303#pg13>. The grammar typing follows Lambek's pregroup structure, enforcing partial orders on these types.<ref:1902.09303#pg13>. Distributed representation of protein domains is achieved by borrowing from methods like ProtVec, which uses Word2Vec on protein sequences to assign vectors to 3-mers. p. 0
Where the paper says it

Putting all those into the DisCoCat framework, we can ”compute” the function of a protein based on the functions of its domains with the grammar rules that combine them together. Since the functions of both the protein and its domains are represented in vector spaces, we provide a novel way to formalize the functional representation of proteins.

<ref:1902.09303#pg14>.

Compositional Function Calculation

The function of a protein is computed by combining the vector representation with the grammar type of domains and linkers.<ref:1902.09303#pg9>. For a toy example, the grammar type for mockP is derived from its domain types, and a contraction rule r(r rp2c l)c → p2 is applied to reduce the grammar type. p. 9

Where the paper says it

Also we have morphisms: η l : I → A ⊗ A l l : A l ⊗ A → I η r : I → A r ⊗ A r : A ⊗ A r → I which satisfy: (1A ⊗ l ) ◦ (η l ⊗ 1A) = 1A ( r ⊗ 1A) ◦ (1A ⊗ η r ) = 1A ( l ⊗ 1Al ) ◦ (1Al ⊗ η l ) = 1Al (1Ar ⊗ r ) ◦ (η r ⊗ 1Ar ) = 1Ar Once the common underlying structure of vector space and pregroup is identified, one can pair the vectors representing meanings of words with those grammatical types in a pregroup via a strong monoidal functor F that preserve the compact closed structure, and consequently the grammatical reduction of pregroup can be directly transformed into linear maps between the corresponding vectors. If the grammar type of a string of words can be reduced to a sentence, then the corresponding calculation on the vectors would produce the meaning of that sentence also in a vector space.

<ref:1902.09303#pg15>. This reduction translates into linear maps applied to the tensor product of vector spaces corresponding to the domains, resulting in a vector representation of the protein's function.<ref:1902.09303#pg16>. Real proteins like DAT and FoxP are analyzed using these methods, yielding vector representations like vN for DAT and vC · vL · vF for FoxP. p. 4
Where the paper says it

taa SkippedSeq →cccaagc. gca Note that CodingSeq and SkippedSeq are components like words in a sentence, and we use some random DNA sequences to temporarily represent their existence in the grammar structure but these sequences have no real meanings.

<ref:1902.09303#pg17>.

Conclusion and Future Directions

The work demonstrates the possibility of harnessing NLP theory to protein linguistics by providing a novel way to represent a protein’s function in a vector space.<ref:1902.09303#pg19>. Major issues for practical use include optimizing the grammar typing system and making the tensor product computation stricter, especially regarding linkers.<ref:1902.09303#pg19>. Embracing diagrammatic representation is suggested to simplify intuition and calculation. p. 9

Where the paper says it

Also we have morphisms: η l : I → A ⊗ A l l : A l ⊗ A → I η r : I → A r ⊗ A r : A ⊗ A r → I which satisfy: (1A ⊗ l ) ◦ (η l ⊗ 1A) = 1A ( r ⊗ 1A) ◦ (1A ⊗ η r ) = 1A ( l ⊗ 1Al ) ◦ (1Al ⊗ η l ) = 1Al (1Ar ⊗ r ) ◦ (η r ⊗ 1Ar ) = 1Ar Once the common underlying structure of vector space and pregroup is identified, one can pair the vectors representing meanings of words with those grammatical types in a pregroup via a strong monoidal functor F that preserve the compact closed structure, and consequently the grammatical reduction of pregroup can be directly transformed into linear maps between the corresponding vectors. If the grammar type of a string of words can be reduced to a sentence, then the corresponding calculation on the vectors would produce the meaning of that sentence also in a vector space.

<ref:1902.09303#pg19>.

Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.

Improvements for AI systems

  1. Categorical Compositional Distributional (DisCoCat) Model Application for Protein Function Computation: The improved system can compute a protein's function by combining the vector representation with the grammar type of domains and linkers as stated in Section 4, allowing for a novel way to formalize functional representation of proteins.

  2. Grammar Typing System Optimization: The system can be improved by implementing an optimized and improved grammar typing system for protein domains that agrees with the Lambek pregroup structure, addressing the need to optimize and improve the preliminary option provided in Section 6.

  3. Stricter Tensor Product Computation: The tensor product computation of vector spaces should be made stricter than the simplified version by determining how to assign the vector space representations of different Linker domains, which is identified as a centre question to address in Section 6.

  4. Diagrammatic Representation Integration: The system should embrace the diagrammatic representation highlighted in the original DisCoCat model, which will make the process of composing the function of a protein much easier to understand intuitively and the calculation itself greatly simplified.

Abstract

The Categorical Compositional Distributional (DisCoCat) model is a mathematical framework for computing the meaning of a sentence from the meanings of its words and the grammatical structure that combines them. Because biological sequences can be viewed as a "language of life", it is tempting to ask whether the DisCoCat model can also give insight into biological macromolecules. Here we take a first step in this direction for proteins, whose linguistic features are the most prominent among the macromolecules. We treat a protein as a sentence and its domains as words, take the biological function of a domain or protein as its meaning, and regard the arrangement of domains as the syntax. We give pregroup grammar types to protein domains and to the linker regions between them, show how type reductions are lifted to multilinear maps between vector spaces, and use these maps to compute a vector representation of a protein's function from vector representations of its domains. In particular, linkers act as relational "words" whose order-three tensors combine the two flanking domains into a vector in a single protein meaning space, so that the functions of proteins with different domain architectures can be compared by an inner product. We extend the construction to proteins with any number of domains, illustrate it with a numerical toy example and five Drosophila melanogaster proteins, discuss how the linker tensors could be learned and how the model could be tested, and relate it to protein language models and other developments since 2019.

Related papers