Explainable Natural Language Processing with Matrix Product States

12/16/2021
by   Jirawat Tangpanitanon, et al.
0

Despite empirical successes of recurrent neural networks (RNNs) in natural language processing (NLP), theoretical understanding of RNNs is still limited due to intrinsically complex computations in RNNs. We perform a systematic analysis of RNNs' behaviors in a ubiquitous NLP task, the sentiment analysis of movie reviews, via the mapping between a class of RNNs called recurrent arithmetic circuits (RACs) and a matrix product state (MPS). Using the von-Neumann entanglement entropy (EE) as a proxy for information propagation, we show that single-layer RACs possess a maximum information propagation capacity, reflected by the saturation of the EE. Enlarging the bond dimension of an MPS beyond the EE saturation threshold does not increase the prediction accuracies, so a minimal model that best estimates the data statistics can be constructed. Although the saturated EE is smaller than the maximum EE achievable by the area law of an MPS, our model achieves  99 accuracies in realistic sentiment analysis data sets. Thus, low EE alone is not a warrant against the adoption of single-layer RACs for NLP. Contrary to a common belief that long-range information propagation is the main source of RNNs' expressiveness, we show that single-layer RACs also harness high expressiveness from meaningful word vector embeddings. Our work sheds light on the phenomenology of learning in RACs and more generally on the explainability aspects of RNNs for NLP, using tools from many-body quantum physics.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/07/2016

Sentiment Classification of Food Reviews

Sentiment analysis of reviews is a popular task in natural language proc...
research
05/05/2022

Implicit N-grams Induced by Recurrence

Although self-attention based models such as Transformers have achieved ...
research
05/30/2023

Quantum Natural Language Processing based Sentiment Analysis using lambeq Toolkit

Sentiment classification is one the best use case of classical natural l...
research
06/08/2018

Multilingual Sentiment Analysis: An RNN-Based Framework for Limited Data

Sentiment analysis is a widely studied NLP task where the goal is to det...
research
04/17/2020

How recurrent networks implement contextual processing in sentiment analysis

Neural networks have a remarkable capacity for contextual processing–usi...
research
02/24/2016

Toward Mention Detection Robustness with Recurrent Neural Networks

One of the key challenges in natural language processing (NLP) is to yie...
research
09/06/2019

RNN Architecture Learning with Sparse Regularization

Neural models for NLP typically use large numbers of parameters to reach...

Please sign up or login with your details

Forgot password? Click here to reset