A Study of Entanglement in a Categorical Framework of Natural Language

Similar documents
Physics, Language, Maths & Music

Types in categorical linguistics (& elswhere)

Comparing Meaning in Language and Cognition: P-Hyponymy, Concept Combination, Asymmetric Similarity

The Elements for Logic In Compositional Distributional Models of Meaning

Linguistic Matrix Theory

Vector-based Models of Semantic Composition. Jeff Mitchell and Mirella Lapata, 2008

Selling Category Theory to the Masses

Ambiguity in Categorical Models of Meaning

Categories in syntax and semantics

A Graph Theoretic Perspective on CPM(Rel)

From Logical to Distributional Models

Bringing machine learning & compositional semantics together: central concepts

2-DIMENSIONAL TOPOLOGICAL QUANTUM FIELD THEORIES AND FROBENIUS ALGEBRAS. Contents 1. The main theorem 1

The Logic of Quantum Mechanics - take II Bob Coecke Oxford Univ. Computing Lab. Quantum Group

arxiv: v2 [cs.cl] 25 Jan 2016

A Compositional Distributional Model of Meaning

arxiv: v1 [cs.cl] 13 Mar 2013

Categorial Grammar. Algebra, Proof Theory, Applications. References Categorial Grammar, G. Morrill, OUP, 2011.

Compositional Distributional Cognition

Topics in Lexical-Functional Grammar. Ronald M. Kaplan and Mary Dalrymple. Xerox PARC. August 1995

Natural Language Processing

Sharpening the empirical claims of generative syntax through formalization

Deep Learning Basics Lecture 10: Neural Language Models. Princeton University COS 495 Instructor: Yingyu Liang

A DOP Model for LFG. Rens Bod and Ronald Kaplan. Kathrin Spreyer Data-Oriented Parsing, 14 June 2005

Encoding Logical Words as Quantum Gates: The Higher Dimensional Case. Marco Fernandez

CS 662 Sample Midterm

Verifying the Steane code with Quantomatic

In the beginning God created tensor... as a picture

Baby's First Diagrammatic Calculus for Quantum Information Processing

Sharpening the empirical claims of generative syntax through formalization

Geometric and Quantum Methods for Information Retrieval

Sharpening the empirical claims of generative syntax through formalization

Stochastic OT as a model of constraint interaction

.. CSC 566 Advanced Data Mining Alexander Dekhtyar..

Overview. Systematicity, connectionism vs symbolic AI, and universal properties. What is systematicity? Are connectionist AI systems systematic?

INTRODUCTION JENNIFER CHUBB, ALI ESKANDARIAN, AND VALENTINA HARIZANOV

When the whole is not greater than the combination of its parts: A decompositional look at compositional distributional semantics

Diagrammatic Methods for the Specification and Verification of Quantum Algorithms

THE LANGUAGE OF FUNCTIONS *

Maschinelle Sprachverarbeitung

Maschinelle Sprachverarbeitung

Categorical quantum channels

Connecting the categorical and the modal logic approaches to Quantum Mech

Multi-theme Sentiment Analysis using Quantified Contextual

A categorical model for a quantum circuit description language

Quantum groupoids and logical dualities

Lecture 7: Word Embeddings

Parsing with CFGs L445 / L545 / B659. Dept. of Linguistics, Indiana University Spring Parsing with CFGs. Direction of processing

Parsing with CFGs. Direction of processing. Top-down. Bottom-up. Left-corner parsing. Chart parsing CYK. Earley 1 / 46.

CME323 Distributed Algorithms and Optimization. GloVe on Spark. Alex Adamson SUNet ID: aadamson. June 6, 2016

Latent Semantic Analysis. Hongning Wang

Where linguistic meaning meets non-linguistic cognition

Model-Theory of Property Grammars with Features

DISTRIBUTIONAL SEMANTICS

Infinite-dimensionality in quantum foundations

Iterated Galois connections in arithmetic and linguistics. J. Lambek, McGill University

Entropy. Leonoor van der Beek, Department of Alfa-informatica Rijksuniversiteit Groningen. May 2005

Universal Properties in Quantum Theory

QPEL Quantum Program and Effect Language

CS626: NLP, Speech and the Web. Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 14: Parsing Algorithms 30 th August, 2012

10/17/04. Today s Main Points

Part-of-Speech Tagging + Neural Networks 3: Word Embeddings CS 287

Statistiek II. John Nerbonne. February 26, Dept of Information Science based also on H.Fitz s reworking

Matrix Calculations: Inner Products & Orthogonality

Representing structured relational data in Euclidean vector spaces. Tony Plate

LECTURER: BURCU CAN Spring

Categorical Models for Quantum Computing

Fall CS646: Information Retrieval. Lecture 6 Boolean Search and Vector Space Model. Jiepu Jiang University of Massachusetts Amherst 2016/09/26

On Paradoxes in Proof-Theoretic Semantics

Discriminative Training

CMPT-825 Natural Language Processing. Why are parsing algorithms important?

Generalized Quantifiers & Categorial Approaches & Intensionality

G E N E R A L I Z E D R E L AT I O N S F O R C O M P O S I T I O N A L M O D E L S O F M E A N I N G. fabrizio romano genovese

Semantics with Dense Vectors. Reference: D. Jurafsky and J. Martin, Speech and Language Processing

A Support Vector Method for Multivariate Performance Measures

Parsing. Based on presentations from Chris Manning s course on Statistical Parsing (Stanford)

Semantics 2 Part 1: Relative Clauses and Variables

Endomorphism Semialgebras in Categorical Quantum Mechanics

Mathematical Foundations for Conceptual Blending

Deep Learning. Ali Ghodsi. University of Waterloo

Natural Language Processing SoSe Words and Language Model

Reconsidering MacLane. Peter M. Hines

Do Neural Network Cross-Modal Mappings Really Bridge Modalities?

Maths Higher Level Algebra

NAME: DATE: MATHS: Higher Level Algebra. Maths. Higher Level Algebra

Advanced Natural Language Processing Syntactic Parsing

The Mathematics of Open Reaction Networks

The representation of word and sentence

CS264: Beyond Worst-Case Analysis Lecture #15: Topic Modeling and Nonnegative Matrix Factorization

Programming Languages in String Diagrams. [ one ] String Diagrams. Paul-André Melliès. Oregon Summer School in Programming Languages June 2011

Ling 240 Lecture #15. Syntax 4

Natural Language Processing : Probabilistic Context Free Grammars. Updated 5/09

Pregroups and their logics

Applied Natural Language Processing

Quantum Quandaries: A Category Theoretic Perspective

Lecture 9: Hidden Markov Model

Fully Lexicalized Pregroup Grammars

Learning Features from Co-occurrences: A Theoretical Analysis

Categorical coherence in the untyped setting. Peter M. Hines

Linear logic and deep learning. Huiyi Hu, Daniel Murfet

Transcription:

A Study of Entanglement in a Categorical Framework of Natural Language Dimitri Kartsaklis 1 Mehrnoosh Sadrzadeh 2 1 Department of Computer Science University of Oxford 2 School of Electronic Engineering and Computer Science Queen Mary University of London QPL 2014, June 4-6 Dimitri Kartsaklis, Mehrnoosh Sadrzadeh Entanglement in a Categorical Framework of Language 1/12

The necessity of compositionality Distributional hypothesis The meaning of a word is determined by its context (Harris, 1954) A word is a vector of co-occurrence statistics with every other word in the vocabulary: cat milk cute 12 8 pet cat dog dog 5 bank money 0 1 account money Not enough data to do the same for phrases or sentences, (e.g. coursework meets deadline, script lack information appear 1 time in a corpus of 100m sentences). Dimitri Kartsaklis, Mehrnoosh Sadrzadeh Entanglement in a Categorical Framework of Language 2/12

A categorical framework for composition A solution Use the grammar rules to compose the vectors of the words in a sentence into a sentence vector. Both a pregroup grammar and the category of finite-dimensional vector spaces and linear maps over a field share a compact closed structure We can then define a strongly monoidal functor F such that: F : Preg F FVect W (1) The meaning of a sentence w 1 w 2... w n with type reduction α is given as: F(α)( w 1 w 2... w n ) (2) Dimitri Kartsaklis, Mehrnoosh Sadrzadeh Entanglement in a Categorical Framework of Language 3/12

An example NP S VP happy kids play games n n l n n r s n l n Adj N V N happy kids play games Type reduction: (ɛ r n 1 s ) (1 n ɛ l n 1 nr s ɛ l n) F [ (ɛ r n 1 s ) (1 n ɛ l n 1 nr s ɛ l n) ] ( happy kids play games ) = ( (ɛ W 1 W ) (1 W ɛ W 1 W W ɛ W ) happy kids play games ) = (happy kids) T play games Dimitri Kartsaklis, Mehrnoosh Sadrzadeh Entanglement in a Categorical Framework of Language 4/12

Entanglement in linguistics Entangled tensor: happy kids play games V W Separable tensor: V W happy kids play games W W W WWW W W W W W W W W Euclidean: happy (r) kids happy (l) play (l) play (r) games play (m) Cosine: play (m) happy kids play games trembling shadows play hide-and-seek W W W W W W W W W W W W W W Dimitri Kartsaklis, Mehrnoosh Sadrzadeh Entanglement in a Categorical Framework of Language 5/12

Concrete models for verb tensors (1/2) A transitive verb should live in W 3, but tensors of order higher than 2 are difficult to create and manipulate A workaround: Start with a matrix, then inflate this to tensors of higher order using Frobenius algebras verb = i ( subject i object i ) (3) Compare with the following separable version: ( ) ( ) verb = subject i object i... and the rank-1 approximation of verb: i i (4) verb R1 = U 1 Σ 1 V T 1 for verb = UΣV T (5) Dimitri Kartsaklis, Mehrnoosh Sadrzadeh Entanglement in a Categorical Framework of Language 6/12

Concrete models for verb tensors (2/2) Model Diagram Formula Relational s = (subj obj) verb Copy-subj s = subj (verb obj) Copy-obj s = obj (verb T subj) We further combine Copy-subj and Copy-obj as follows: Frobenius additive: CopySubj + CopyObj Frobenius multiplicative: CopySubj CopyObj Frobenius tensored: CopySubj CopyObj Dimitri Kartsaklis, Mehrnoosh Sadrzadeh Entanglement in a Categorical Framework of Language 7/12

Detecting sentence similarity (1/2) The task Compare the similarity of transitive sentences by composing vectors and measuring the cosine distance between them. Evaluate the results against human judgements. Dataset 1: Same subjects/objects, semantically related verbs Model ρ with cos ρ with Eucl. Verbs only 0.329 0.138 Additive 0.234 0.142 Multiplicative 0.095 0.024 Relational 0.400 0.149 Rank-1 approx. of relational 0.402 0.149 Separable 0.401 0.090 Copy-subject 0.379 0.115 Copy-object 0.381 0.094 Frobenius additive 0.405 0.125 Frobenius multiplicative 0.338 0.034 Frobenius tensored 0.415 0.010 Human agreement 0.60 Dimitri Kartsaklis, Mehrnoosh Sadrzadeh Entanglement in a Categorical Framework of Language 8/12

Detecting sentence similarity (2/2) Dataset 2: Different subjects, objects and verbs Model ρ with cos ρ with Eucl. Verbs only 0.449 0.392 Additive 0.581 0.542 Multiplicative 0.287 0.109 Relational 0.334 0.173 Rank-1 approx. of relational 0.333 0.175 Separable 0.332 0.105 Copy-subject 0.427 0.096 Copy-object 0.198 0.144 Frobenius additive 0.428 0.117 Frobenius multiplicative 0.302 0.041 Frobenius tensored 0.332 0.042 Human agreement 0.66 Dimitri Kartsaklis, Mehrnoosh Sadrzadeh Entanglement in a Categorical Framework of Language 9/12

Simplifications on the models Conclusions from experimental work 1 Verb matrices created as i (subj i obj i ) are essentially separable 1 (too much linear dependence between vectors?) 2 The only level of entanglement in the inflated verb tensors is provided by the Frobenius operators This introduces a number of simplifications in the models: = s = ( subj verb (l) ) ( verb (r) obj) = = s = ( subj verb (l) ) + ( verb (r) obj) 1 Average cos similarity of verbs with their rank-1 approximations: 0.99 Dimitri Kartsaklis, Mehrnoosh Sadrzadeh Entanglement in a Categorical Framework of Language 10/12

Using linear regression For a given verb, collect all obji, play obj i pairs (e.g. the vector of flute paired with the holistic vector of play flute, and so on) Learn a matrix for the verb by minimizing the quantity: ( ) 2 1 verb object i verb object i (6) 2m i Cosine similarity between the verb matrices and their rank-1 approximations: 0.48 Same concept can be applied to Frobenius additive model: ( ) 1 (verb obj i subj i + verb T subj i obji ) 2 subj verb obj i 2m i (7) Work in progress... Dimitri Kartsaklis, Mehrnoosh Sadrzadeh Entanglement in a Categorical Framework of Language 11/12

Conclusion A preliminary study on entanglement aspects of tensor-based compositional models A number of concrete implementations of the Coecke-Sadrzadeh-Clark categorical framework have been proved problematic from an entanglement perspective However, in all cases the involvement of Frobenius algebras in the creation of verb tensors equips the fragmented compositional structure with flow The separability problem is not present for verb tensors constructed by gradient optimization techniques Corpus-based methods, such as the Frobenius additive model, are still viable and easy alternatives for creating verb tensors Dimitri Kartsaklis, Mehrnoosh Sadrzadeh Entanglement in a Categorical Framework of Language 12/12

Conclusion A preliminary study on entanglement aspects of tensor-based compositional models A number of concrete implementations of the Coecke-Sadrzadeh-Clark categorical framework have been proved problematic from an entanglement perspective However, in all cases the involvement of Frobenius algebras in the creation of verb tensors equips the fragmented compositional structure with flow The separability problem is not present for verb tensors constructed by gradient optimization techniques Corpus-based methods, such as the Frobenius additive model, are still viable and easy alternatives for creating verb tensors Thank you! Dimitri Kartsaklis, Mehrnoosh Sadrzadeh Entanglement in a Categorical Framework of Language 12/12