論文來源:EMNLP 2108

原文:《An Auto-Encoder Matching Model for Learning Utterance-Level Semantic Dependency in Dialogue Generation》

鏈接:

[1808.08795] An Auto-Encoder Matching Model for Learning Utterance-Level Semantic Dependency in Dialogue Generation?

arxiv.org

開源代碼:

lancopku/AMM?

github.com
圖標

本文為了解決在對話生成過程中的語義連貫性問題,提出了一種自動編碼器匹配模型,其中包含兩個自動編碼器和一個映射模塊。其中encoder和decoder層使用自動編碼器學習問題和回答的語義表示,mapping模塊用來學習問答話語級的語義關聯。

整體模型架構如圖:

模型結構圖

encoder模塊的本質上是一個基於LSTM的Seq2Seq模型,將該模塊的編碼器和解碼器命名為「source-encoder」和「source-decoder」。source-encoder接收源文本x = {x1,x2,...,xn},並將其編碼為內部表示h,然後將h解碼為新序列 	ilde{x}={{	ilde{x}1,	ilde{x}2,...	ilde{x}n}} 。提取隱藏狀態h作為語義表示。訓練編碼器減少損失函數,其損失函數定義如下:

decoder模塊僅在測試時不提供答案輸入,其他與encoder模塊基本一致。構建回復的語義表示s,其損失函數定義如下:

mapping模塊為了學習回復與問題在語義上的聯繫。本文僅使用簡單的前饋網路來實現。 mapping模塊將encoder模塊中語義表示h變換為新的表示t。並通過最小化t和回復的語義表示s的L2範數訓練它:

在測試階段,給定輸入話語,encoder模塊、decoder模塊和mapping模塊一起工作產生對話響應。 encoder模塊首先接收輸入x並將其編碼為源話語的語義表示h。 然後,mapping模塊將h變換為回復響應表示t。 最後,將t發送到decoder以生成回復。

在訓練階段定義了一個端到端的損失函數J4:

最後定義整體的損失函數J:

實驗結果:

BLEU scores for the AEM model and the Seq2Seq model

Diversity scores for the AEM model and the Seq2Seq model. Dist-1, Dist-2, and Dist-3 are respectively the number of distinct unigrams, bigrams, and trigrams in the generated text
Human evaluation results of the AEM model and the Seq2Seq model
Examples generated by the AEM model and the Seq2Seq model
中文語料問答結果

本文提出的模型在中文閑聊對話領域表現還是很不錯的,相較於傳統的seq2seq模型,生成的回答多樣性及語義連貫性均有很大提升。相比於GAN模型,訓練過程較為簡單,且單句生成速度有所提升。


推薦閱讀:
相关文章