《 Text Understanding with the Attention Sum Reader Network 》——Attention Sum Reader

  • 作爲清華推薦的閱讀理解論文的一篇,同時在張俊林大佬的博客裏也看到了他的身影,覺得有必要看波論文,學習一下。
  • (Attention Sum Reader)AS Reader可以看作是一維匹配結構的典型示例。
  • 這是一篇IBM 的幾位大佬在2016年發表的論文(比較久遠了)

摘要

  • We present a new, simple model that uses attention to directly pick the answer from the context as opposed to computing the answer using a blended representation of words in the document as is usual in similar models。
  • 我們提出了一個新的,簡單的模型,使用attention機制直接從上下文選擇答案,而不是用在相似性models中常見的利用單詞的混合表示來計算答案。
    *論文作者說,他們的模型很適合answer是一個來自文檔中的單詞的question-answering problems,並且在所有的evaluated datasets上達到了 sate of art的效果。

論文行文

  • In the first part of this article we introduce the task at hand and the main aspects of the relevant datasets. Then we present our own model to tackle the problem. Subsequently we compare the model to previously proposed architectures and finally describe the experimental results on the performance of our model。
  • 首先介紹主要任務和數據集,然後敘述自己的模型,接着用自己的模型和已有模型比較,最後敘述自己模型的實驗結果。

1. Introduction

  • While predicting prepositions can easily be done using relatively simple models with very little context knowledge, predicting named entities requires a deeper understanding of the context。
  • 論文首先鋪墊了一堆東西,大致意思是不同的挖空,question等等會影響模型預測的難度。
  • 預測文章裏面的實體比較難,需要對文章有比較深的理解。(解釋了爲什麼qusetion會問答案是entity的問題,前面看過的論文倒是沒有解釋)
  • Also, as opposed to selecting a random sentence from a text as in (Hill et al., 2015)), the question can be formed from a specific part of the document, such as a short summary or a list of tags.
  • Since such sentences often paraphrase in a condensed form what was said in the text, they are particularly suitable for testing text comprehension (Hermann et al., 2015).
  • 總的來說,就是直接選取文中的句子作爲問題,不如以summary的問題去問更能體現出對文章的理解能力。
  • An important property of cloze-style questions is that a large amount of such questions can be automatically generated from real world documents.This opens the task to data-hungry techniques such as deep learning。
  • 論文讚賞了當今可以就完型填空任務生成大量數據,爲數據驅動任務任務打開大門。
  • This is an advantage compared to smaller machine understanding datasets like MCTest (Richardson et al., 2013) that have
    only hundreds of training examples and therefore the best performing systems usually rely on handcrafted features (Sachan et al., 2015; Narasimhan and Barzilay, 2015)
  • 小的數據集依賴人工提取特徵。

2. Task and datasets

2.1 Task

  • The training data consist of tuples (q; d; a; A),where q is a question, d is a document that contains the answer to question q, A is a set of possible answers and a 2 A is the ground truth answer. Both q and d are sequences of words from vocabulary V . We also assume that all possible answers are words from the vocabulary, that is A ⊆ V , and that the ground truth answer a appears in the document, that is a 2 d.

2.2 Datasets

2.21 News Articles — CNN and Daily Mail

  • github

  • 從新聞裏提取出的數據。

Children’s Book Test

  • 從兒童故事書提取出的數據。

Our Model - Attention Sum Reader

  • AS Reader 的答案是一個單詞,一方面模型取得了很好的效果,但是模型只能產生文檔內的單詞。
  • 模型結構圖如下:

在這裏插入圖片描述

  • 參考[1]
    在這裏插入圖片描述
  • 預測過程類似自動摘要裏的pointer-switch,即直接從原文裏找答案。step 5 在進行詞概率合併時之所以不選擇平均,是因爲作者在分析了語料後,發現answer在context裏的詞頻普遍較高,這也算一個trick
  • 另外一些trick:

在這裏插入圖片描述

  • 個人讀到這裏對比了一下attentive reader的結構:

在這裏插入圖片描述

  • 感覺基本框架一樣,就最後的細節不太一樣…這也太…然後就沒有讀下去的慾望了…

實驗效果

  • 分不同數據集合

在這裏插入圖片描述

在這裏插入圖片描述

  • [1]模型在CNN/Daily Mail和CBT的Nouns、Named Entity數據集上進行了測試,在當時的情況下都取得了領先的結果。並且得到了一些有趣的結論,比如:在CNN/Daily Mail數據集上,隨着document的長度增加,測試的準確率會下降,而在CBT數據集上得到了相反的結論。從中可以看得出,兩個數據集有着不同的特徵。

簡評

  • 來自[1]

(1)本文的模型相比於Attentive Reader和Impatient Reader更加簡單,沒有那麼多繁瑣的attention求解過程,只是用了點乘來作爲weights,卻得到了比Attentive Reader更好的結果,從這裏我們看得出,並不是模型越複雜,計算過程越繁瑣就效果一定越好,更多的時候可能是簡單的東西會有更好的效果。

(2)文中直接利用 attention 機制選擇答案,模型就比較偏愛出現次數多的詞,這就隱含了出現次數比較多的詞作爲答案的可能性大的假設,所以從根本上本文是基於task的研究而不是從理論出發的。

在這裏插入圖片描述

END

  • 本文完

參考

[ 1 ]《Text Understanding with the Attention Sum Reader Network 》學習筆記

[ 2 ]【論文筆記02】Text Understanding with the Attention Sum Reader Network

[ 3 ]代碼

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章