Towards a Deep and Unified Understanding of Deep Neural Models in - - PowerPoint PPT Presentation

β–Ά
towards a deep and unified understanding of deep neural
SMART_READER_LITE
LIVE PREVIEW

Towards a Deep and Unified Understanding of Deep Neural Models in - - PowerPoint PPT Presentation

Towards a Deep and Unified Understanding of Deep Neural Models in NLP Chaoyu Guan* 2 , Xiting Wang* 2 , Quanshi Zhang 1 , Runjin Chen 1 , Di He 2 , Xing Xie 2 * Equal Contribution 1 John Hopcroft Center and the MoE Key Lab of Artificial


slide-1
SLIDE 1

Towards a Deep and Unified Understanding of Deep Neural Models in NLP

Chaoyu Guan*2, Xiting Wang*2, Quanshi Zhang1, Runjin Chen1, Di He2, Xing Xie2

*Equal Contribution 1John Hopcroft Center and the MoE Key Lab of Artificial Intelligence, AI Institute, at the

Shanghai Jiao Tong University, Shanghai, China

2Microsoft Research Asia, Beijing, China

slide-2
SLIDE 2

Introduction

A key task in explainable AI is to associate latent representations with input units by quantifying layerwise information discarding of inputs. Most explanation methods (e.g., DNN visualization) have coherency & generality issues

  • Coherency: requires that a method generates consistent explanations across different

neurons, layers, and models.

  • Generality: existing measures are usually defined under certain restrictions on model

architectures or tasks.

Towards a Deep and Unified Understanding of Deep Neural Models in NLP #62

slide-3
SLIDE 3

Our solution

Considering both coherency and generality

  • A unified information-based measure: quantify the information of each

input word that is encoded in an intermediate layer of a deep NLP model.

  • The information-based measure as a tool
  • Evaluating different explanation methods.
  • Explaining different deep NLP models
  • This measure enriches the capability of explaining DNNs.

Towards a Deep and Unified Understanding of Deep Neural Models in NLP #62

slide-4
SLIDE 4

Problem

  • Quantification of sentence-level information discarding: quantify the

information of an entire sentence 𝐲 that is encoded in 𝐭.

  • Quantification of word-level information discarding: quantify the information
  • f each specific word 𝐲𝑗 that is encoded in 𝐭.
  • Fine-grained analysis of word attributes: analyze the fine-grained reason why 𝐭

uses the information of 𝐲𝑗. 𝐲 = 𝐲1

π‘ˆ, … , π²π‘œ π‘ˆ π‘ˆ ∈ 𝐘: Input sentence

𝐭 = Ξ¦ 𝐲 ∈ 𝐓: hidden state 𝐲𝑗

π‘ˆ: word embedding

Ξ¦ β‹… : function of the intermediate layer

Towards a Deep and Unified Understanding of Deep Neural Models in NLP #62

slide-5
SLIDE 5

Word Information Quantification

𝑁𝐽 𝐘; 𝐓 = 𝐼 𝐘 βˆ’ 𝐼(𝐘|𝐓) 𝐼 𝐘 𝐓 = ΰΆ±

π­βˆˆπ“

π‘ž 𝐭 𝐼 𝐘 𝐭 𝑒𝐭 𝐼(𝐲) = βˆ’ ΰΆ±

π²β€²βˆˆπ˜

π‘ž 𝐲′ 𝐭 log π‘ž 𝐲′ 𝐭 𝑒𝐲′ 𝐼 𝐘 𝐭 =βˆ— ෍

𝑗

𝐼 π˜π‘— 𝐭

Corpus level Sentence level Word level

𝐼 π˜π‘— 𝐭 = βˆ’ ΰΆ±

𝐲𝒋

β€²βˆˆπ˜π’‹

π‘ž 𝐲𝑗

β€² 𝐭 log π‘ž 𝐲𝑗 β€² 𝐭 𝑒𝐲′𝑗

* Suppose the words are independent in one sentence.

Multi-Level Quantification

𝐼(π˜π‘—|𝐭 = Ξ¦(𝐲)) reflects how much information from word 𝐲𝑗 is discarded by 𝐭 during the forward propagation. 𝐼(𝐘) 𝐼(𝐘|𝐓) 𝑁𝐽(𝐘; 𝐓) Towards a Deep and Unified Understanding of Deep Neural Models in NLP #62

slide-6
SLIDE 6

Word Information Quantification

Perturbation-based Approximation We use 𝐼(ΰ·© π˜π‘—|𝐭) to approximate 𝐼(π˜π‘—|𝐭) by minimizing the following loss:

𝑀 𝝉 = 𝔽𝝑 Ξ¦ ΰ·€ 𝐲 βˆ’ 𝐭

2 βˆ’ πœ‡ ෍ 𝑗=1 π‘œ

𝐼(ΰ·© π˜π‘— 𝐭 α‰š

π‘π‘—βˆΌπ’ͺ(𝟏,πœπ‘—

2𝐉)

Towards a Deep and Unified Understanding of Deep Neural Models in NLP #62

slide-7
SLIDE 7

Fine-Grained Analysis of Word Attributes

𝐡𝑗 = log π‘ž(𝐲𝑗|𝐭) βˆ’ 𝔽𝐲𝑗

β€²βˆˆπ˜π‘— log π‘ž(𝐲𝑗

β€²|𝐭)

𝐡𝐝 = 𝔽𝐲𝑗

β€²βˆˆπ˜π log π‘ž(𝐲𝑗

β€²|𝐭) βˆ’ 𝔽𝐲𝑗

β€²βˆˆπ˜π‘— log π‘ž(𝐲𝑗

β€²|𝐭)

Disentangle the information of a common concept 𝐝 away from each word 𝐲𝑗 𝑠

𝑗,𝐝 = 𝐡𝑗 βˆ’ 𝐡𝐝 indicates the remaining information of the word 𝐲𝑗 when we

remove the information of the common attribute 𝐝 from the word.

Importance of the i-th word concerning random words Importance of the common concept c w.r.t. random words

Towards a Deep and Unified Understanding of Deep Neural Models in NLP #62

slide-8
SLIDE 8

Comparative Study

  • Three baselines: LRP, gradient-based, perturbation
  • Conclusion: our method provides the most faithful explanations for
  • Across timestamp analysis
  • Across layer analysis
  • Across model analysis

Our method clearly shows that the model gradually focuses on the most important parts of the sentence.

Towards a Deep and Unified Understanding of Deep Neural Models in NLP #62

slide-9
SLIDE 9

Understanding Neural Models in NLP

We explain four NLP models (BERT, Transformer, LSTM, and CNN):

  • What information is leveraged for prediction?
  • How does the information flow through layers?
  • How do the models evolve during training?

Towards a Deep and Unified Understanding of Deep Neural Models in NLP #62

slide-10
SLIDE 10
  • Bert and Transformer use words for prediction, while LSTM and CNN use subsequences of

sentences for prediction.

  • Different models process the input sentence in different manners.

Understanding Neural Models in NLP

Towards a Deep and Unified Understanding of Deep Neural Models in NLP #62

slide-11
SLIDE 11

Please visit our poster at #62!

Towards A Deep and Unified Understanding of Deep Neural Models in NLP