張晶晶 黃浩 胡英 吾守爾·斯拉木
摘 要: 口語理解(SLU)性能的好壞對口語對話系統(tǒng)有著至關(guān)重要的作用。在對基本循環(huán)神經(jīng)網(wǎng)絡(luò)及其變體長短時記憶(LSTM)網(wǎng)絡(luò)和門限循環(huán)單元(GRU)網(wǎng)絡(luò)結(jié)構(gòu)分析的基礎(chǔ)上,提出一種特征融合的循環(huán)神經(jīng)網(wǎng)絡(luò)結(jié)構(gòu)。該結(jié)構(gòu)首先把輸入送到隱含層訓(xùn)練得到特征表示;然后該特征信息與源輸入及歷史輸出信息一起送入另一隱含層訓(xùn)練;最后送進輸出層得出結(jié)果。對上述不同的循環(huán)神經(jīng)網(wǎng)絡(luò)的結(jié)構(gòu)及提出的模型在ATIS數(shù)據(jù)庫上進行口語理解實驗。結(jié)果表明,提出的特征融合的循環(huán)神經(jīng)網(wǎng)絡(luò)結(jié)構(gòu)的性能要優(yōu)于傳統(tǒng)循環(huán)神經(jīng)網(wǎng)絡(luò)及其變體結(jié)構(gòu)。
關(guān)鍵詞: 口語理解; 循環(huán)神經(jīng)網(wǎng)絡(luò); 長短時記憶; 門限循環(huán)單元; 特征融合; 自然語言
中圖分類號: TN711?34; TP391 文獻標(biāo)識碼: A 文章編號: 1004?373X(2018)20?0157?04
Abstract: The performance of spoken language understanding (SLU) is of fundamental importance to a spoken language dialogue system. A feature fusion based recurrent neural network structure is proposed on the basis of analyzing the structures of basic recurrent neural network (RNN) and its variants of long short?term memory (LSTM) network and gated recurrent unit (GRU) network. In the structure, the input is sent to the hidden layer and trained to obtain feature representation. The feature information, together with the source input and historical output information, is sent to another hidden layer for training, and then sent to the output layer to obtain results. An SLU experiment was carried out on the ATIS database using the above different recurrent neural network structures and proposed models. The results show that the performance of the feature fusion based recurrent neural network structure is better than that of the conventional recurrent neural network and its variants.
Keywords: SLU; RNN; LSTM; GRU; features fusion; natural language
口語對話系統(tǒng)是由自動語音識別、口語理解(Spoken Language Understanding,SLU)、對話管理和語言生成、語音合成等部分組成[1]??谡Z理解性能對于口語對話系統(tǒng)作用十分重要。口語理解的研究出現(xiàn)于20世紀(jì)70年代初,經(jīng)過幾十年的發(fā)展,大致可以分為基于知識的方法、數(shù)據(jù)驅(qū)動的方法以及兩者結(jié)合的方法。
隨著神經(jīng)網(wǎng)絡(luò)在自然語言處理領(lǐng)域的成功應(yīng)用,人們開始探索不同的神經(jīng)網(wǎng)絡(luò)的功能。RNN被驗證了在解決序列化問題上有著顯著的效果。RNN能夠利用上下文信息,但是,RNN在計算時會出現(xiàn)梯度彌散問題,且對長文本處理效果不佳。針對該問題,Hochreiter 和 Schmidhuber在1997年提出長短時記憶網(wǎng)絡(luò)(Long Short?Term Memory,LSTM)[2],克服了傳統(tǒng)RNN梯度消失和梯度爆炸的問題。2014年, 文獻[3]提出了LSTM的一個變體門限循環(huán)單元(Gated Recurrent Unit,GRU),使得LSTM的結(jié)構(gòu)大大簡化。RNN在解決序列問題上的優(yōu)勢在于網(wǎng)絡(luò)當(dāng)前輸出不僅與當(dāng)前時刻的輸入有關(guān),還與歷史輸出有關(guān)。
本文在RNN,LSTM和GRU神經(jīng)網(wǎng)絡(luò)的基礎(chǔ)上提出一種特征融合的循環(huán)神經(jīng)網(wǎng)絡(luò)結(jié)構(gòu),實驗結(jié)果表明,對于上述RNN網(wǎng)絡(luò)結(jié)構(gòu),特征融合方法都提高了口語理解性能。
口語理解的目的在于自動識別出用戶口語表達自然語言的領(lǐng)域、類別和意圖,然后提取出相關(guān)的概念以達到系統(tǒng)對用戶使用的語言進行理解的目的??谡Z理解主要由領(lǐng)域檢測、意圖識別和槽值填充三部分組成。領(lǐng)域檢測和意圖識別是分類問題,槽值填充是標(biāo)注任務(wù)。槽值填充是對句子中的每一個詞進行標(biāo)注。表1給出了對句子進行處理的結(jié)果。
表1中,句子中分別標(biāo)注不同的BIO標(biāo)簽,分別表示Beginning, Inside, Outside。B表示詞語的開始;I是中間詞;O表示的是句子中其他詞語,對句子理解沒有實際的意義。
2.1 基本的循環(huán)神經(jīng)網(wǎng)絡(luò)
2.2 長短時記憶網(wǎng)絡(luò)和門限循環(huán)單元
式中:更新門[zt]是控制當(dāng)前時刻需要遺忘多少歷史信息和接收新的信息;重置門[rt]用來控制從候選狀態(tài)[ht]中有多少信息是從歷史信息[ht-1]中得到。
3.1 特征表示融合方法循環(huán)神經(jīng)網(wǎng)絡(luò)結(jié)構(gòu)分析
特征融合的循環(huán)神經(jīng)網(wǎng)絡(luò)建立在上述RNN(傳統(tǒng)RNN, LSTM以及GRU)網(wǎng)絡(luò)的基礎(chǔ)上,由4層神經(jīng)網(wǎng)絡(luò)組成,其中包含詞嵌入(word embedding)層,兩個隱層和最后的softmax層。其中,第一個隱層可以是不同的RNN結(jié)構(gòu)單元,第二個隱層是[sigmoid]層結(jié)合RNN訓(xùn)練特點對幾種特征信息進行融合。具體結(jié)構(gòu)如圖3所示。
特征融合循環(huán)神經(jīng)網(wǎng)絡(luò)模型結(jié)構(gòu)最大特點是在神經(jīng)網(wǎng)絡(luò)模型中的第二個隱含層將4種不同的特征信息進行融合。這4種特征信息分別是:上一個隱含層的輸出的特征信息;前一時刻隱含層傳入的歷史信息;源輸入的信息送入隱含層;前一時刻的輸出信息送入隱含層。
這4種特征信息經(jīng)過sigmoid激活函數(shù),對其進行特征融合訓(xùn)練得到信息送進輸出層。
3.2 特征表示融合方法的工作原理
在上述神經(jīng)網(wǎng)絡(luò)結(jié)構(gòu)中,輸入為[x=(x1,x2,…,xn)],經(jīng)過RNN不同的單元節(jié)點隱含層更新,具體的單元節(jié)點計算方式如第2節(jié)所示,將訓(xùn)練之后的信息傳入第二個隱層,融合4種特征信息進行訓(xùn)練。在該隱含層數(shù)據(jù)的訓(xùn)練更新如下:
4.1 實驗條件設(shè)置
本文在Linux操作系統(tǒng)服務(wù)器版Ubuntu 16.04上使用Python 2.7.6的theano[8]庫搭建神經(jīng)網(wǎng)絡(luò)實驗平臺,并使用ATIS數(shù)據(jù)庫進行口語理解實驗驗證提出方法的有效性。ATIS (Airline Travel Information System)數(shù)據(jù)庫被廣泛地作為口語理解任務(wù)的基準(zhǔn)測試數(shù)據(jù)庫,包含4 978條訓(xùn)練語句,測試集共893條語句,數(shù)據(jù)集共有127個語義槽標(biāo)簽。
4.2 實驗結(jié)果及分析
條件隨機場(Conditional Random Fields,CRF)[9]是處理序列標(biāo)注最常用的方法,并且在序列處理問題上取得了比較好的效果。本文首先應(yīng)用CRF模型與Elman?RNN,Jordan?RNN,LSTM和GRU在ATIS數(shù)據(jù)集上進行實驗, 結(jié)果如表2所示。
由表2看出,基本RNN模型Jordan,Elman與CRF模型相比,F(xiàn)1值高出0.19%,1.3%。所以RNN在解決口語理解的序列標(biāo)注問題上更具優(yōu)勢。而RNN變體LSTM和GRU比基本Elman?RNN提高了0.3%和0.57%,故GRU取得了更優(yōu)的性能。
表3給出對Elman?RNN,LSTM和GRU神經(jīng)網(wǎng)絡(luò)進行了特征融合的實驗結(jié)果。從表2與表3的比較可以看出,相同的神經(jīng)網(wǎng)絡(luò)單元節(jié)點加入特征融合處理之后,網(wǎng)絡(luò)結(jié)構(gòu)對于實驗處理的效果得到明顯提升。圖4是比較RNN及其變體結(jié)構(gòu)和對應(yīng)的特征融合網(wǎng)絡(luò)結(jié)構(gòu)在ATIS數(shù)據(jù)庫上的訓(xùn)練實驗過程,也可以看出特征融合能夠進一步改善實驗的性能,獲得更優(yōu)的口語理解性能。
針對RNN的口語理解模型提出基于特征融合的口語理解方法。該方法是一個4層的神經(jīng)網(wǎng)絡(luò)模型結(jié)構(gòu),特點是在第二個隱含層將上一隱層的輸出、前一時刻隱層狀態(tài)、源輸入和歷史輸出4種不同的特征信息進行融合訓(xùn)練從而獲得傳遞信息傳向輸出層。在ATIS數(shù)據(jù)庫上的口語理解實驗表明,本文提出的基于特征融合的循環(huán)神經(jīng)網(wǎng)絡(luò)在口語理解實驗上取得了更優(yōu)的性能。
注:本文通訊作者為黃浩。
參考文獻
[1] 俞凱,陳露,陳博,等.任務(wù)型人機對話系統(tǒng)中的認(rèn)知技術(shù):概念、進展及其未來[J].計算機學(xué)報,2015,38(12):2333?2348.
YU Kai, CHEN Lu, CHEN Bo, et al. Cognitive technology in task?oriented dialogue systems: concepts, advances and future [J]. Chinese journal of computers, 2015, 38(12): 2333?2348.
[2] HOCHREITER S, SCHMIDHUBER J. Long short?term memory [J]. Neural computation, 1997, 9(8): 1735?1780.
[3] CHO K, VAN MERRI?NBOER B, GULCEHRE C, et al. Learning phrase representations using RNN encoder?decoder for statistical machine translation [J/OL]. [2014?09?03]. http://xueshu.baidu.com/s?wd=paperuri%3A%282ba31a0b87d74d2531
7da3521cca2915%29&filter;=sc_long_sign&tn;=SE_xueshusourc?
e_2kduw22v≻_vurl=http%3A%2F%2Farxiv.org%2Fabs%2F1406.1078&ie;=utf?8≻_us=9851577233160611135.
[4] MESNIL G, HE X, DENG L, et al. Investigation of recurrent?neural?network architectures and learning methods for spoken language understanding [J/OL]. [2013?08?01]. https://www.microsoft.com/en?us/research/wp?content/uploads/2016/02/IS13_RNNSLU_cameraready.pdf.
[5] MESNIL G, DAUPHIN Y, YAO K, et al. Using recurrent neural networks for slot filling in spoken language understanding [J]. IEEE/ACM transactions on audio, speech, and language processing, 2015, 23(3): 530?539.
[6] YAO K, ZWEIG G, HWANG M Y, et al. Recurrent neural networks for language understanding [C/OL]. [2014?10?14]. https://www.researchgate.net/publication/266798083_Recurrent_Neural_Networks_for_Language_Understanding.
[7] JOZEFOWICZ R, ZAREMBA W, SUTSKEVER I. An empirical exploration of recurrent network architectures [C]// Proceedings of 32nd International Conference on Machine Learning. Lille: Association for Computing Machinery, 2015: 2342?2350.
[8] AL?RFOU R, ALAIN G, ALMAHAIRI A, et al. Theano: a Python framework for fast computation of mathematical expressions [J/OL]. [2016?05?09]. https://www.researchgate.net/publication/302569301/download.
[9] SUTTON C, MCCALLUM A. An introduction to conditional random fields [J]. Foundations and trends in machine learning, 2011, 4(4): 267?373.
[10] MIKOLOV T, JOULIN A, CHOPRA S, et al. Learning longer memory in recurrent neural networks [J/OL]. [2015?04?16]. https://research.fb.com/wp?content/uploads/2016/11/learning_longer_memory_in_recurrent_neural_networks.pdf?.
[11] HENDERSON M, GA?I? M, THOMSON B, et al. Discriminative spoken language understanding using word confusion networks [C]// Proceedings of IEEE Spoken Language Technology Workshop. Miami: IEEE, 2013: 176?181.