# Distilling Text into Circuits

arXiv: https://arxiv.org/abs/2301.10595 · HTML: https://mlsanity.com/paper/2301.10595/

## Key facts

- Cited by 7 papers in the map (data through 14 Oct 2026).
- Builds on 27 of its 87 references that are in the map.
- First posted on arXiv 25 Jan 2023.

## Builds on (most cited first, 27 of 27)

- [Language Models are Few-Shot Learners](https://mlsanity.com/paper/2005.14165/) (2020)
- [QNLP in Practice: Running Compositional Models of Meaning on a Quantum Computer](https://mlsanity.com/paper/2102.12846/) (2021)
- [Foundations for Near-Term Quantum Natural Language Processing](https://mlsanity.com/paper/2012.03755/) (2020)
- [lambeq: An Efficient High-Level Python Library for Quantum NLP](https://mlsanity.com/paper/2110.04236/) (2021)
- [The Frobenius anatomy of word meanings I: subject and object relative pronouns](https://mlsanity.com/paper/1404.5278/) (2014)
- [The Mathematics of Text Structure](https://mlsanity.com/paper/1904.03478/) (2019)
- [Open System Categorical Quantum Semantics in Natural Language Processing](https://mlsanity.com/paper/1502.00831/) (2015)
- [A CCG-Based Version of the DisCoCat Framework](https://mlsanity.com/paper/2105.07720/) (2021)
- [Interacting Conceptual Spaces I : Grammatical Composition of Concepts](https://mlsanity.com/paper/1703.08314/) (2017)
- [The Frobenius anatomy of word meanings II: possessive relative pronouns](https://mlsanity.com/paper/1406.4690/) (2014)
- [Modelling Lexical Ambiguity with Density Matrices](https://mlsanity.com/paper/2010.05670/) (2020)
- [Compositionality as we see it, everywhere around us](https://mlsanity.com/paper/2110.05327/) (2021)
- [A Study of Entanglement in a Categorical Framework of Natural Language](https://mlsanity.com/paper/1405.2874/) (2014)
- [Meaning updating of density matrices](https://mlsanity.com/paper/2001.00862/) (2020)
- [Towards logical negation for compositional distributional semantics](https://mlsanity.com/paper/2005.04929/) (2020)
- [Conversational Negation using Worldly Context in Compositional Distributional Semantics](https://mlsanity.com/paper/2105.05748/) (2021)
- [Grammar Equations](https://mlsanity.com/paper/2106.07485/) (2021)
- [Composing Conversational Negation](https://mlsanity.com/paper/2107.06820/) (2021)
- [Cats climb entails mammals move: preserving hyponymy in compositional distributional semantics](https://mlsanity.com/paper/2005.14134/) (2020)
- [How to make qubits speak](https://mlsanity.com/paper/2107.06776/) (2021)
- [Language-independence of DisCoCirc's Text Circuits: English and Urdu](https://mlsanity.com/paper/2208.10281/) (2022)
- [Compositional Distributional Semantics with Compact Closed Categories and Frobenius Algebras](https://mlsanity.com/paper/1505.00138/) (2015)
- [Talking Space: inference from spatial linguistic meanings](https://mlsanity.com/paper/2109.06554/) (2021)
- [Internal Wiring of Cartesian Verbs and Prepositions](https://mlsanity.com/paper/1811.05770/) (2018)
- [Retracing some paths in Process Algebra](https://mlsanity.com/paper/1401.5113/) (2014)
- [Categories of Semantic Concepts](https://mlsanity.com/paper/2004.10741/) (2020)
- [Rewriting Context-free Families of String Diagrams](https://mlsanity.com/paper/1705.07520/) (2017)

## Built on by (most cited first, 7 of 7)

- [Towards Compositional Interpretability for XAI](https://mlsanity.com/paper/2406.17583/) (2024)
- [A Pattern Language for Machine Learning Tasks](https://mlsanity.com/paper/2407.02424/) (2024)
- [A Pipeline For Discourse Circuits From CCG](https://mlsanity.com/paper/2311.17892/) (2023)
- [On the Anatomy of Attention](https://mlsanity.com/paper/2407.02423/) (2024)
- [Quantum Algorithms for Compositional Text Processing](https://mlsanity.com/paper/2408.06061/) (2024)
- [Variational Quantum Classifiers for Natural-Language Text](https://mlsanity.com/paper/2303.02469/) (2023)
- [Quantum Methods for Managing Ambiguity in Natural Language Processing](https://mlsanity.com/paper/2504.00040/) (2025)

## Abstract (arXiv)

This paper concerns the structure of meanings within natural language. Earlier, a framework named DisCoCirc was sketched that (1) is compositional and distributional (a.k.a. vectorial); (2) applies to general text; (3) captures linguistic `connections' between meanings (cf. grammar) (4) updates word meanings as text progresses; (5) structures sentence types; (6) accommodates ambiguity. Here, we realise DisCoCirc for a substantial fragment of English. When passing to DisCoCirc's text circuits, some `grammatical bureaucracy' is eliminated, that is, DisCoCirc displays a significant degree of (7) inter- and intra-language independence. That is, e.g., independence from word-order conventions that differ across languages, and independence from choices like many short sentences vs. few long sentences. This inter-language independence means our text circuits should carry over to other languages, unlike the language-specific typings of categorial grammars. Hence, text circuits are a lean structure for the `actual substance of text', that is, the inner-workings of meanings within text across several layers of expressiveness (cf. words, sentences, text), and may capture that what is truly universal beneath grammar. The elimination of grammatical bureaucracy also explains why DisCoCirc: (8) applies beyond language, e.g. to spatial, visual and other cognitive modes. While humans could not verbally communicate in terms of text circuits, machines can. We first define a `hybrid grammar' for a fragment of English, i.e. a purpose-built, minimal grammatical formalism needed to obtain text circuits. We then detail a translation process such that all text generated by this grammar yields a text circuit. Conversely, for any text circuit obtained by freely composing the generators, there exists a text (with hybrid grammar) that gives rise to it. Hence: (9) text circuits are generative for text.
