Presentation is loading. Please wait.

Presentation is loading. Please wait.

InterSpeech 2013 Investigation of Recurrent-Neural-Network Architectures and Learning Methods for Spoken Language Understanding University of Rouen(France)

Similar presentations


Presentation on theme: "InterSpeech 2013 Investigation of Recurrent-Neural-Network Architectures and Learning Methods for Spoken Language Understanding University of Rouen(France)"— Presentation transcript:

1 InterSpeech 2013 Investigation of Recurrent-Neural-Network Architectures and Learning Methods for Spoken Language Understanding University of Rouen(France) - 廬昂大學(法國), University of Montréal, Québec, Canada 蒙特婁大學 (加拿大) 作者 : Grégoire Mesnil, Yoshua Bengio, Xiaodong He, Li Deng 報告者 : 楊明翰 日期 : 2014/11/21

2 Outline: Abstract Introduction - Solving the Slot Filling problem
- The history of neural networks Slot Filling, Using RNN for Slot Filling Experimental Setting Experiment (3種) Conclusion References

3 Abstract : One of the key problems in spoken language understanding (SLU) is the task of slot filling. We implemented and compared several important recurrent- neural-network architectures (包含Elman-type and Jordan-type recurrent networks and their variants.) Tool : Theano neural network toolkit Benchmark : ATIS Baseline : Conditional random fields (CRF)

4 Introduction (1/2) : Solving the Slot Filling Problem
A major task in spoken language understanding (SLU) : 1. automatically extract semantic concept 2. fill in a set of arguments or “slots” embedded in a semantic frame 直到最近 : 1. HMM/CFG : (generative model) 2. Conditional Random Field : (discriminative model) 目前當紅的新技術 : Nueral Network - involves many layers of nonlinear information processing in deep neural networks

5 Introduction (2/2) Neural network language model
History of LM Introduction (2/2) Neural network language model Deep learning的技術成功應用在Language model上 one important advance is the invention of word embeddings [Bengio 2003] : A neural probabilistic language model [Bengio 2005] : Hierarchical probabilistic neural network language model [2008 Ronan] A Unified Architecture for Natural Language Processing: Deep Neural Networks with Multitask Learning [Hinton 2008] : Hierarchical log-bilinear model [Mikolov 2010] : Recurrent neural network based language model [Huang 2012] : Improving Word Representations Via Global Context And Multiple Word Prototypes 很多學者研究如何把neural network用在language上 根據這些卓越的研究成果最重要的就是word embedings方面的改良 語言模型就是看一句話像不像正常人說出來的自然語言。 [2011 Ronan] Natural language processing (almost) from scratch => SENNA

6 Slot Filling (1/2) 電腦分析一句話的語義可以分為三個部分 1. domain detection
2. intent determination 3. slot filling

7 Slot Filling (2/2) baseline Conditional Random Field (linear chain)
L : input word sequence S : slot sequence ( L所對應之label過的sequence) Z : normalize St : 目前狀態, St-1 : 前一個狀態 Lt : 目前這個詞 Energy function 一些特徵函數的例子 如果li是副詞並且第i個單詞以"ly"結尾,則f1( s , i , li, li − 1) = 1,否則為0 如果我們給這個特徵函數賦大且正的權重,那麼就是說我們很願意將以"ly"結尾的單詞看成是副詞。(因為權重大,最後對總score的貢獻大嘛) 如果i = 1並且li是動詞,並且句子以"?"結尾,則f2( s , i , li, li − 1) = 1,否則為0 同樣的,如果我們給這個特徵函數賦大且正的權重,說明我們很願意將以"?"結尾的句子的第一個單詞標為動詞。 如果li − 1是形容詞並且li是名詞,則f1( s , i , li, li − 1) = 1,否則為0 一樣的,大且正的權重,說明我們願意將形容詞後面的詞標為名詞(或者將名詞前面的詞標為形容詞) 如果li − 1是介詞並且li也是介詞,則f1( s , i , li, li − 1) = 1,否則為0 這個就是反著的了,英語裡面好像木有兩個介詞連用的情況,所以這個時候我們的權重得是負的,說明我們不喜歡這種搭配。 現在你該明白了吧,總結一下:為了建一個條件隨機場,你只需要定義一些特徵函數(它們依賴於整個句子,當前的位置,附近的標籤),然後將這些函數加權求和,再正則化就可以得到最終的概率了。

8 Slot Filling (2/2) baseline Conditional Random Field (linear chain)
The window size of words around the current word lt : 2d+1 λm : weight 一些特徵函數的例子 如果li是副詞並且第i個單詞以"ly"結尾,則f1( s , i , li, li − 1) = 1,否則為0 如果我們給這個特徵函數賦大且正的權重,那麼就是說我們很願意將以"ly"結尾的單詞看成是副詞。(因為權重大,最後對總score的貢獻大嘛) 如果i = 1並且li是動詞,並且句子以"?"結尾,則f2( s , i , li, li − 1) = 1,否則為0 同樣的,如果我們給這個特徵函數賦大且正的權重,說明我們很願意將以"?"結尾的句子的第一個單詞標為動詞。 如果li − 1是形容詞並且li是名詞,則f1( s , i , li, li − 1) = 1,否則為0 一樣的,大且正的權重,說明我們願意將形容詞後面的詞標為名詞(或者將名詞前面的詞標為形容詞) 如果li − 1是介詞並且li也是介詞,則f1( s , i , li, li − 1) = 1,否則為0 這個就是反著的了,英語裡面好像木有兩個介詞連用的情況,所以這個時候我們的權重得是負的,說明我們不喜歡這種搭配。 現在你該明白了吧,總結一下:為了建一個條件隨機場,你只需要定義一些特徵函數(它們依賴於整個句子,當前的位置,附近的標籤),然後將這些函數加權求和,再正則化就可以得到最終的概率了。

9 Using RNN for Slot Filling (1/5) Word embeddings
學者們想出了使用Euclidean space取代N-gram model的方法 The architecture of these models can vary from shallow neural nets (NN) or convolutional nets (SENNA) to recurrent neural nets (RNN) The learned word embedding shows good generalization properties across many common natural language processing (NLP) tasks. 淺層學習是機器學習的第一次浪潮。        20世紀80年代末期,用於人工神經網絡的反向傳播算法(也叫Back Propagation算法或者BP算法)的發明,給機器學習帶來了希望,掀起了基於統計模型的機器學習熱潮。這個熱潮一直持續到今天。人們發現,利用BP算法可以讓一個人工神經網絡模型從大量訓練樣本中學習統計規律,從而對未知事件做預測。 這種基於統計的機器學習方法比起過去基於人工規則的系統,在很多方面顯出優越性。這個時候的人工神經網絡,雖也被稱作多層感知機(Multi-layer Perceptron),但實際是種只含有一層隱層節點的淺層模型。         20世紀90年代,各種各樣的淺層機器學習模型相繼被提出,例如支撐向量機(SVM,Support Vector Machines)、 Boosting、最大熵方法(如LR,Logistic Regression)等。這些模型的結構基本上可以看成帶有一層隱層節點(如SVM、Boosting),或沒有隱層節點(如LR)。這些模型無論是在理論分析還是應用中都獲得了巨大的成功。相比之下,由於理論分析的難度大,訓練方法又需要很多經驗和技巧,這個時期淺層人工神經網絡反而相對沉寂。         深度學習是機器學習的第二次浪潮。         2006年,加拿大多倫多大學教授、機器學習領域的泰斗Geoffrey Hinton和他的學生RuslanSalakhutdinov在《科學》上發表了一篇文章,開啟了深度學習在學術界和工業界的浪潮。這篇文章有兩個主要觀點:1)多隱層的人工神經網絡具有優異的特徵學習能力,學習得到的特徵對數據有更本質的刻畫,從而有利於可視化或分類;2)深度神經網絡在訓練上的難度,可以通過“逐層初始化”(layer-wise pre-training)來有效克服 [2011 Ronan] Natural language processing (almost) from scratch => SENNA

10 Using RNN for Slot Filling (2/5) Short-term dependencies captured using a word context window
w(t) : 3-word context window Xfrom : embedding vector of the word “from” d : dimension of the embedding vector Feed-forward NN中, input: X會輸入到hidden layer: h, 經過非 線性的運算後得到output : Y

11 Using RNN for Slot Filling (3/5) Two types of RNN architectures
1. Elman-type RNN : hidden layer的output當成 下一個時間的hidden layer的input U V W

12 Using RNN for Slot Filling (3/5) Two types of RNN architectures
2. Jordan-type RNN : output layer的output當成 下個時間的hidden layer的input copy y W U V

13 Using RNN for Slot Filling (4/5) Long-term dependencies captured using RNN
除了前面提到的context window之外, 我們加上time steps vector , 來表示前一個時間 這篇論文的創意在這裡 ! 圖1 : 從未來 從未來預測現在 從過去預測現在

14 Using RNN for Slot Filling (4/5) Long-term dependencies captured using RNN
這篇paper使用Bi-directional Jordan-type RNNs 現在的hidden layer由 上個時間, 下個時間加上目前input組成 Backward model Forward model [1997 Mike Schuster] Bidirectional Recurrent Neural Networks

15 Using RNN for Slot Filling (5/5) Learning methods
training bi-directional RNNs on the slot/concept predictions of previously trained RNNs gave us poor generalization results due to overfitting. 為了解決上述的問題, 使用[Hinton 2012] 解決overfitting的方法 按比例省略hidden layer的某些node & 部分的input vector 實驗結果顯示, 使用這個方法可以改善overfitting的問題, 增加bi- directional RNNs 訓練的performance [2012 hinton] Improving neural networks by preventing co-adaptation of feature detectors

16 Experimental setting : Experimental Evaluation
Corpus : ATIS corpus Training set : 4978 utterances (from the ATIS-2 and ATIS-3 corpora) Test set : 893 utterances (from the ATIS-3 Nov93 and Dec94 datasets)

17 Experimental : (1) Corpus for learning word embeddings
Two procedures for learning word embeddings : 1. SENNA : the embeddings pre-trained on the Wikipedia corpus 2. RNNs : RNNLM tool Three semantically different corpora for embedding training : 1. Wikipedia : The Westbury lab wikipedia corpus. 2. Gutenberg : Corresponds to digitized books with expired 3. Broadcast news : On the RNNLM website “SENNA” (Semantic/syntactic Extraction using a Neural Network Architecture) 古騰堡計畫(Project Gutenberg,縮寫:PG),由志工參與,致力於將文化作品的數位化和歸檔,並鼓勵創作和發行電子書。該計畫肇始於1971年,是最早的數位圖書館。其中的大部分書籍都是公有領域書籍的原本,古騰堡計畫確保這些原本自由流通、自由檔案格式,有利於長期保存,並可在各種電腦上閱讀。截至2012年7月,古騰堡計畫聲稱超過40,000件館藏。 copyrights

18 Experiment : (1) Result on word embeddings
We first consider a frame-level MLP setting (e.g., a feed- forward MLP with inputs of only word embedding features within a word context window) 推測是因為SENNA的word vector的norm在訓練期間保持normalize到1, 而RNNLM訓練期間使用三種語義不同的corpus, 造成有類似的performance 從ATIS training set取出1000句當作驗證集(validation set), 用來選擇最佳的word context window size 和 hyper-parameters The model is then re-trained with the best set of hyper-parameters on the whole ATIS training set.

19 Experiment : (1) Result on word embeddings
從ATIS training set中取1000個句子用來找 最佳的word context window size 及 hyper-parameters. 再用得到的這兩個參數對整個 ATIS training set重新訓練 推測是因為SENNA的word vector的norm在訓練期間保持normalize到1, 而RNNLM訓練期間使用三種語義不同的corpus, 造成有類似的performance 從ATIS training set取出1000句當作驗證集(validation set), 用來選擇最佳的word context window size 和 hyper-parameters The model is then re-trained with the best set of hyper-parameters on the whole ATIS training set.

20 Experiment : (2) Result on Jordan-RNN
使用F1-score來比較 CRF的實驗使用 CRFpp toolkit

21 Experiment : (2) Result on Jordan-RNN
使用F1-score來比較 CRF的實驗使用 CRFpp toolkit

22 Experiment : (3) Results on slot filling accuracy
123

23 Conclusion 我們將各種不同RNN架構用在slot filling上, 其中包含 Elman-type, Jordan-type以及他們的變體 我們也研究了word embedding在slot filling上的效能, 為了使實驗 容易重現和比較, 我們使用Theano neural network toolkit來做所有 的neural network實驗, 並且用ATIS來評估 Elman-type RNN及Jordan-type RNN表現得比CRF(baseline)還要好, 而bi-directional version of the Jordan-RNN 有最好的成績 Future work will explore more efficient training of RNNs and the choice of more comprehensive features and using a different RNN training toolkit incorporating more advanced features.

24 Thank you for your attention!

25 References (1/2) : BB%8Bintroduction-to-conditional-random-fields/

26 References (2/2) : %AE%80%E4%BB%8Bintroduction-to-conditional-random-fields/

27 如何用vector表達一個詞: (詞向量) One-hot Representation
最直覺的方法 : 把每個word表示為一個很長的向量 - 滑鼠 表示為[ ] - 鍵盤 表示為[ ] - 每個詞都是茫茫0海中的一個1。 這種表示方法也存在一個重要的問題:任意兩個詞之間都 是獨立的。 光從這兩個向量中看不出兩個詞是否有關係。 這種One-hot Representation如果採用稀疏方式存儲,會是非常的簡潔:也就是給每個詞分配一個數字ID。 比如剛才的例子中,滑鼠記為3,鍵盤記為8(假設從0開始記)。如果要寫程式的話,用Hash表給每個詞分配一個編號就可以了。

28 如何用vector表達一個詞: (詞向量) Distributed Representation
Deep Learning : [0.792, −0.177, −0.107, 0.109, −0.542, ...] (50 維~100維) Distributed representation最大的貢獻就是讓相關或者相似的 詞,在距離上更接近。 向量的距離可以用最傳統的歐氏距離來計算,也可以用cos 夾角來計算。 用這種方式表示的向量,”滑鼠”和”鍵盤”的距離會遠遠小於” 滑鼠”和”杯子”。 機率分佈的表達方式 Deep Learning中一般用到的詞向量並不是剛才提到的用One-hot Representation表示的那種很長很長的詞向量,而是用Distributed Representation

29 Word vector : 詞向量的歷史 如果用傳統的稀疏表示法表示,在解決某些任務的時候 (比如構建語言模型)會造成維數災難[Bengio 2003] 從實踐的角度來看,高維的特徵如果要套用Deep Learning, 其複雜度幾乎是難以接受的,因此低維的詞向量在這裡也 飽受吹捧。 1986 -雖然這篇文章沒有說要將詞做Distributed representation [2003 Bengio] A Neural Probabilistic Language Model

30 Back to intro2 Word vector : 詞向量的歷史 Distributed representation最早是Hinton在1986年的論文 《Learning distributed representations of concepts》中提出的。 Distributed representation用來表示word,通常被稱為 ”Word Representation” 或 ”Word Embedding” 。 相似詞的詞向量距離相近,這就讓基於詞向量設計的一些 模型較smooth,讓模型看起來非常的漂亮。 1986 -雖然這篇文章沒有說要將詞做Distributed representation Back to intro2

31 Introduction (2/2) Neural network language model
History of LM Introduction (2/2) Neural network language model Deep learning的技術成功應用在Language model上 one important advance is the invention of word embeddings [Bengio 2003] : A neural probabilistic language model [Bengio 2005] : Hierarchical probabilistic neural network language model [2008 Ronan] A Unified Architecture for Natural Language Processing: Deep Neural Networks with Multitask Learning [Hinton 2008] : Hierarchical log-bilinear model [Mikolov 2010] : Recurrent neural network based language model [Huang 2012] : Improving Word Representations Via Global Context And Multiple Word Prototypes 很多學者研究如何把neural network用在language上 根據這些卓越的研究成果最重要的就是word embedings方面的改良 [2011 R. Collobert] Natural language processing (almost) from scratch => senna

32 Introduction (2/2) [Bengio 2003] : A neural probabilistic language model
用了三層的neural network來建語言模型(n-gram) •每個C是|V|x m的矩陣 現在需要根據這已知的n − 1個詞預測下一個詞 wt。 •|V| : 語料中的總詞數 •m : 詞向量的維度 C(w) : 對應的詞向量 前n-1個詞

33 Introduction (2/2) [Bengio 2003] : A neural probabilistic language model
用了三層的neural network來建語言模型(n-gram) 現在需要根據這已知的n − 1個詞預測下一個詞 wt。 網絡的第一層(輸入層)是將C( wt − n + 1) , … , C( wt − 2) , C( wt − 1) 這 n − 1 個向量首尾相接拼起來,形成一個 ( n − 1 ) m 維的向量

34 Introduction (2/2) [Bengio 2003] : A neural probabilistic language model
用了三層的neural network來建語言模型(n-gram) 現在需要根據這已知的n − 1個詞預測下一個詞 wt。 - 網絡的第二層(隱藏層),使用d+ Hx 計算得到。 - d是一個bias。 - 使用tanh作為activation function

35 Introduction (2/2) [Bengio 2003] : A neural probabilistic language model
用了三層的neural network來建語言模型(n-gram) - 網絡的第三層(輸出層)一共有| V| 個節點 最後使用softmax 來normalize output: y 的機率 現在需要根據這已知的n − 1個詞預測下一個詞 wt。

36 Introduction (2/2) [Bengio 2003] : A neural probabilistic language model
用了三層的neural network來建語言模型(n-gram) 現在需要根據這已知的n − 1個詞預測下一個詞 wt。 •U :(一個 | V| × h 的矩陣)是隱藏層到輸出層的參數 •h : hidden unit的數量 •W: direct connection, 如果沒用到設為0 •b : output bias U

37 Back to intro2 Introduction (2/2) [Bengio 2003] : A neural probabilistic language model 用了三層的neural network來建語言模型(n-gram) - 整個模型大多數的計算集中在 U和隱藏層的矩陣乘法 - 有很多學者研究這一個環節的簡化,提升計算的速度 現在需要根據這已知的n − 1個詞預測下一個詞 wt。 U

38 Introduction (2/2) Neural network language model
History of LM Introduction (2/2) Neural network language model Deep learning的技術成功應用在Language model上 one important advance is the invention of word embeddings [Bengio 2003] : A neural probabilistic language model [Bengio 2005] : Hierarchical probabilistic neural network language model [2008 Ronan] A Unified Architecture for Natural Language Processing: Deep Neural Networks with Multitask Learning [Hinton 2008] : Hierarchical log-bilinear model [Mikolov 2010] : Recurrent neural network based language model [Huang 2012] : Improving Word Representations Via Global Context And Multiple Word Prototypes 很多學者研究如何把neural network用在language上 根據這些卓越的研究成果最重要的就是word embedings方面的改良 [2011 R. Collobert] Natural language processing (almost) from scratch => senna

39 Back to intro2 Introduction (2/2) [Bengio 2005] : Hierarchical probabilistic neural network language model 在最後一層使用binary tree, tree的node用來分類詞向量 以前要比較|V|個詞, 找出最相似的, 現在只要做log2(|V|)次 使用WordNet中的IS-A關係, 人工轉換成binary tree 實驗發現速度提升了, 但是效果變差 Part of Speech (POS) Chunking (CHK) Name Entity Recognition (NER) Semantic Role Labeling (SRL) Syntactic Parsing (PSG)

40 Introduction (2/2) Neural network language model
History of LM Introduction (2/2) Neural network language model Deep learning的技術成功應用在Language model上 one important advance is the invention of word embeddings [Bengio 2003] : A neural probabilistic language model [Bengio 2005] : Hierarchical probabilistic neural network language model [2008 Ronan] A Unified Architecture for Natural Language Processing: Deep Neural Networks with Multitask Learning [Hinton 2008] : Hierarchical log-bilinear model [Mikolov 2010] : Recurrent neural network based language model [Huang 2012] : Improving Word Representations Via Global Context And Multiple Word Prototypes Eric H. Huang 的工作是在C&W 的基礎上改進而成的,並非自成一派從頭做起。 他這篇發表在ACL 2012 上的《Improving Word Representations via Global Context and Multiple Word Prototypes》試圖通過對模型的改進,使得詞向量富含更豐富的語義信息。 他在文中提出了兩個主要創新來完成這一目標:(其實從論文標題就能看出來)第一個創新是使用全文信息輔助已有的局部信息,第二個創新是使用多個詞向量來表示多義詞。 [2011 R. Collobert] Natural language processing (almost) from scratch => senna

41 Back to intro2 Introduction (2/2) [2008 Ronan] : A Unified Architecture for Natural Language Processing: Deep Neural Networks with Multitask Learning SENNA 主要目的並不是在於生成一份好的詞向量,甚至不想訓練 語言模型,而是要用這份詞向量去完成NLP裡面的各種任務, 例如Part of Speech, Name Entity Recognition , Syntactic Parsing , Semantic Role Labeling……等等 他們沒有去求一個詞的機率, 而是將context window內連續n個詞 打分數, 分數越高表示這句越正常, 分數地表示這句話不太 合理 分數只有相對高低之分, 沒有機率的特性 U X 為訓練集中的所有連續的 n 元短語,D是整個字典。 第一個求和枚舉了訓練語料中的所有的n元短語,作為正樣本。第二個對字典的枚舉是構建負樣本。 x( w ) 是將短語 x 的最中間的那個詞,替換成 w。在大多數情況下,在一個正常短語的基礎上隨便找個詞替換掉中間的詞,最後得到的短語肯定不是正確的短語,所以這樣構造的負樣本是非常可用的(多數情況下確實是負樣本,極少數情況下把正常短語當作負樣本也不影響大局)。 同時,由於負樣本僅僅是修改了正樣本中的一個詞,也不會讓分類面距離負樣本太遠而影響分類效果

42 Introduction (2/2) Neural network language model
History of LM Introduction (2/2) Neural network language model Deep learning的技術成功應用在Language model上 one important advance is the invention of word embeddings [Bengio 2003] : A neural probabilistic language model [Bengio 2005] : Hierarchical probabilistic neural network language model [2008 Ronan] A Unified Architecture for Natural Language Processing: Deep Neural Networks with Multitask Learning [Hinton 2008] : Hierarchical log-bilinear model [Mikolov 2010] : Recurrent neural network based language model [Huang 2012] : Improving Word Representations Via Global Context And Multiple Word Prototypes 很多學者研究如何把neural network用在language上 根據這些卓越的研究成果最重要的就是word embedings方面的改良 [2011 R. Collobert] Natural language processing (almost) from scratch => senna

43 Introduction (2/2) [Hinton 2008] : Hierarchical log-bilinear model
Back to intro2 Introduction (2/2) [Hinton 2008] : Hierarchical log-bilinear model 改良自 [Bengio 2005] : Hierarchical probabilistic neural network language model Hinton希望能從語料中自動學習出一棵樹,並能達到比人工構 建更好的效果。 他們使用bootstrapping的方法來構tree。 從隨機的樹開始,根據分類結果不斷調整和迭代。最後得 到的是一棵平衡二叉樹,並且同一個詞的預測可能處於多 個不同的葉節點。 這種用多個葉節點表示一個詞的方法,可以提升下一個詞 是多義詞時候的效果。 Bootstrapping : 從給定訓練集中有放回的均勻抽樣,也就是說,每當選中一個樣本,它等可能地被再次選中並被再次添加到訓練集中。

44 Introduction (2/2) Neural network language model
History of LM Introduction (2/2) Neural network language model Deep learning的技術成功應用在Language model上 one important advance is the invention of word embeddings [Bengio 2003] : A neural probabilistic language model [Bengio 2005] : Hierarchical probabilistic neural network language model [2008 Ronan] A Unified Architecture for Natural Language Processing: Deep Neural Networks with Multitask Learning [Hinton 2008] : Hierarchical log-bilinear model [Mikolov 2010] : Recurrent neural network based language model [Huang 2012] : Improving Word Representations Via Global Context And Multiple Word Prototypes 很多學者研究如何把neural network用在language上 根據這些卓越的研究成果最重要的就是word embedings方面的改良 [2011 R. Collobert] Natural language processing (almost) from scratch => senna

45 Back to intro2 Introduction (2/2) [Mikolov 2010] : Recurrent neural network based language model w ( t ) 是句子中第 t 個詞的One-hot representation 的向量,也就是說 w是一個非常長的向量,裡面只有一個元素是1。而下面的s ( t − 1 )向量就是上一個hidden layer 每來一個新詞,就和上一個隱藏層聯合計算出下一個隱藏 層,隱藏層反複利用,一直保留著最新的狀態。各隱藏層 通過一層傳統的前饋網絡得到輸出值。 對於最後隱藏層到輸出層的巨大計算量,Mikolov 使用了一種 分組的方法:根據詞頻將 | V| 個詞分成 |𝑉| 組,先通過 |𝑉| 次判斷,看下一個詞屬於哪個組,再通過若干次判斷, 找出其屬於組內的哪個元素。 Bengio 2003論文裡提了一句,可以使用一些方法降低參數個數,比如用循環神經網絡

46 Back to intro2 Introduction (2/2) [Mikolov 2010] : Recurrent neural network based language model w ( t ) 是句子中第 t 個詞的One-hot representation 的向量,也就是說 w是一個非常長的向量,裡面只有一個元素是1。而下面的s ( t − 1 )向量就是上一個hidden layer 每來一個新詞,就和上一個隱藏層聯合計算出下一個隱藏 層,隱藏層反複利用,一直保留著最新的狀態。各隱藏層 通過一層傳統的前饋網絡得到輸出值。 循環神經網絡的最大優勢在於,可以真正充分地利用所有上文信息來預測下一個詞,而不像前面的其它工作那樣,只能開一個n個詞的窗口,只用前n個詞來預測下一個詞。從形式上看,這是一個非常“終極”的模型,畢竟語言模型裡能用到的信息,他全用上了。可惜的是,循環神經網絡形式上非常好看,使用起來卻非常難優化,如果優化的不好,長距離的信息就會丟失,甚至還無法達到開窗口看前若干個詞的效果。Mikolov在RNNLM裡面只使用了最樸素的BPTT優化算法,就已經比n-gram中的state of the art方法有更好的效果,這非常令人欣慰。如果用上了更強的優化算法,最後效果肯定還能提升很多。 對於最後隱藏層到輸出層的巨大計算量,Mikolov 使用了一種分組的方法:根據詞頻將 | V| 個詞分成 | V|−−−√ 組,先通過 | V|−−−√次判斷,看下一個詞屬於哪個組,再通過若干次判斷,找出其屬於組內的哪個元素。最後均攤複雜度約為o ( | V|−−−√),略差於M&H 的 o ( log( | V| ) ),但是其淺層結構某種程度上可以減少誤差傳遞,也不失為一種良策。

47 Introduction (2/2) Neural network language model
History of LM Introduction (2/2) Neural network language model Deep learning的技術成功應用在Language model上 one important advance is the invention of word embeddings [Bengio 2003] : A neural probabilistic language model [Bengio 2005] : Hierarchical probabilistic neural network language model [2008 Ronan] A Unified Architecture for Natural Language Processing: Deep Neural Networks with Multitask Learning [Hinton 2008] : Hierarchical log-bilinear model [Mikolov 2010] : Recurrent neural network based language model [Huang 2012] : Improving Word Representations Via Global Context And Multiple Word Prototypes 很多學者研究如何把neural network用在language上 根據這些卓越的研究成果最重要的就是word embedings方面的改良 [2011 R. Collobert] Natural language processing (almost) from scratch => senna

48 Back to intro2 Introduction (2/2) [Huang 2012] : Improving Word Representations Via Global Context And Multiple Word Prototypes 改良[2008 Ronan] 因為Ronan在訓練詞向量的時候,只使用了上下文各5個詞, 算上自己總共有11個詞的資訊,這些局部的資訊還不能充 分挖掘出中間詞的語義。 Huang直接使用Ronan的network結構計算出一個得分,作為local context。(local得分) 然後Huang提出了Global context,這類似傳統的詞袋模型。 詞袋模型是把文章中所有詞的One-hot Representation加起來,形成 一個向量(就像把詞全都扔進一個袋子裡),用來表示文章。 Bengio 2003論文裡提了一句,可以使用一些方法降低參數個數,比如用循環神經網絡

49 Back to intro2 Introduction (2/2) [Huang 2012] : Improving Word Representations Via Global Context And Multiple Word Prototypes Huang的global context是將文章中所有詞的詞向量求個加權平均 (weight是詞的idf),作為文章的語義。 他把文章的語義向量和當前詞的詞向量拼接起來,形成一 個兩倍長度的向量作為輸入,之後還是用Ronan的網絡結構算 出一個分數。(global 得分) 將global得分+local得分來優化Ronan的打分數函數 他的貢獻貢獻是將多義詞用多個詞向量來表示 Bengio 2003論文裡提了一句,可以使用一些方法降低參數個數,比如用循環神經網絡


Download ppt "InterSpeech 2013 Investigation of Recurrent-Neural-Network Architectures and Learning Methods for Spoken Language Understanding University of Rouen(France)"

Similar presentations


Ads by Google