AskMeAnything:
DynamicMemoryNetworks
forNaturalLanguageProcessing
(2015) A.Kumar et al.
발표: 곽근봉
© NBT All Rights Reserved.
이논문을선정한이유
하나의 모델로
언어를 학습할 수는 없을까?
© NBT All Rights Reserved.
QuestionAnswering(QA)
대부분의자연어처리문제는QA문제로치환가능!
© NBT All Rights Reserved.
이논문을선정한이유
하나의모델로세가지영역에서StateOfTheArt
© NBT All Rights Reserved.
참고 자료
읽다보니 지난번 GloVe 쓰셨던 그 분!
http://www.socher.org/
논문 저자의 강의 (Stanford CS224n)
https://youtu.be/OQQ-W_63UgQ?list=PL3FW7Lu3i5Jsnh1rnUwq_TcylNr7EkRe6
http://web.stanford.edu/class/cs224n/lectures/cs224n-2017-lecture16-DMN-QA.pdf
© NBT All Rights Reserved.
개요
DynamicMemoryNetwork
• QA 문제를 풀 수 있는 DMN 이라는 모델을 제안
• RNN 기반 모델
• Question, Input, Episodic Memory, Answer 모듈로 구성
• End to End 학습
© NBT All Rights Reserved.
모델설명
© NBT All Rights Reserved.
모델설명
모델설명
InputModule
: 총 Fact representations c의 개수
: t 번째 fact representation
Input이 한 문장일 경우 : = word의 개수
Input이 여러 문장일 경우 : = 문장의 개수
모델설명
QuestionModule
( 마지막 hidden state만 사용! )
모델설명
EpisodicMemoryModule
모델설명
EpisodicMemoryModule
Fact c를 돌면서 에피소드 e를 계산한다.
각 step마다 gate를 통과하면서 weight를 받게 된다.
Gate 함수 G는 input c, memory m, question q를 입력으로 받는다.
2 layer feed forward neural net 으로 구성된다
© NBT All Rights Reserved.
모델설명
EpisodicMemoryModule
Gate 연산을 위한 z vector
추후 계산양을 줄이기 위해서 W연산은 제외시킴.
(W 연산을 빼더라도 성능에 큰 영향이 없었다고 한다.)
모델설명
AnswerModule
© NBT All Rights Reserved.
모델설명
ObjectiveFunction
= 0, = 1 로 두고 학습 시작
= 1, = 1 로 두고 학습
초기에는
Gate가 충분히 학습되면
© NBT All Rights Reserved.
결과분석
FacebookbAbITask(QA)
© NBT All Rights Reserved.
FacebookbAbI데이터
1Johntravelledtothe hallway.
2 Maryjourneyedtothe bathroom.
3 Where isJohn? hallway 1
1 This morning Mary moved to the kitchen.
2 This afternoon Mary moved to the cinema.
3 Yesterday Bill went to the bedroom.
4 Yesterday Mary journeyed to the school.
5 Where was Mary before the cinema? kitchen 2 1
Ex) Single-supporting-fact
Ex) Time-reasoning
© NBT All Rights Reserved.
결과분석
SentimentAnalysis(감정분석)
© NBT All Rights Reserved.
결과분석
POSTagging(품사태깅)
© NBT All Rights Reserved.
결과분석
반복횟수에따른성능
© NBT All Rights Reserved.
결과분석
반복횟수에따른성능
© NBT All Rights Reserved.
결과분석
반복횟수에따른성능
© NBT All Rights Reserved.
VisualQuestionAnswering
© NBT All Rights Reserved.
VisualQuestionAnswering
© NBT All Rights Reserved.
VisualQuestionAnswering
© NBT All Rights Reserved.
VisualQuestionAnswering
© NBT All Rights Reserved.
요약
• 대부분의 자연어처리 Task는 QA로 치환할 수 있음
• DMN은 다양한 QA 문제들에 높은 성능을 냄
• Visual QA 에도 응용 가능함
© NBT All Rights Reserved.
감사합니다.

Ask me anything: Dynamic memory networks for natural language processing

  • 1.
  • 2.
    © NBT AllRights Reserved. 이논문을선정한이유 하나의 모델로 언어를 학습할 수는 없을까?
  • 3.
    © NBT AllRights Reserved. QuestionAnswering(QA) 대부분의자연어처리문제는QA문제로치환가능!
  • 4.
    © NBT AllRights Reserved. 이논문을선정한이유 하나의모델로세가지영역에서StateOfTheArt
  • 5.
    © NBT AllRights Reserved. 참고 자료 읽다보니 지난번 GloVe 쓰셨던 그 분! http://www.socher.org/ 논문 저자의 강의 (Stanford CS224n) https://youtu.be/OQQ-W_63UgQ?list=PL3FW7Lu3i5Jsnh1rnUwq_TcylNr7EkRe6 http://web.stanford.edu/class/cs224n/lectures/cs224n-2017-lecture16-DMN-QA.pdf
  • 6.
    © NBT AllRights Reserved. 개요 DynamicMemoryNetwork • QA 문제를 풀 수 있는 DMN 이라는 모델을 제안 • RNN 기반 모델 • Question, Input, Episodic Memory, Answer 모듈로 구성 • End to End 학습
  • 7.
    © NBT AllRights Reserved. 모델설명
  • 8.
    © NBT AllRights Reserved. 모델설명
  • 9.
    모델설명 InputModule : 총 Factrepresentations c의 개수 : t 번째 fact representation Input이 한 문장일 경우 : = word의 개수 Input이 여러 문장일 경우 : = 문장의 개수
  • 10.
  • 11.
  • 12.
    모델설명 EpisodicMemoryModule Fact c를 돌면서에피소드 e를 계산한다. 각 step마다 gate를 통과하면서 weight를 받게 된다. Gate 함수 G는 input c, memory m, question q를 입력으로 받는다. 2 layer feed forward neural net 으로 구성된다
  • 13.
    © NBT AllRights Reserved. 모델설명 EpisodicMemoryModule Gate 연산을 위한 z vector 추후 계산양을 줄이기 위해서 W연산은 제외시킴. (W 연산을 빼더라도 성능에 큰 영향이 없었다고 한다.)
  • 14.
  • 15.
    © NBT AllRights Reserved. 모델설명 ObjectiveFunction = 0, = 1 로 두고 학습 시작 = 1, = 1 로 두고 학습 초기에는 Gate가 충분히 학습되면
  • 16.
    © NBT AllRights Reserved. 결과분석 FacebookbAbITask(QA)
  • 17.
    © NBT AllRights Reserved. FacebookbAbI데이터 1Johntravelledtothe hallway. 2 Maryjourneyedtothe bathroom. 3 Where isJohn? hallway 1 1 This morning Mary moved to the kitchen. 2 This afternoon Mary moved to the cinema. 3 Yesterday Bill went to the bedroom. 4 Yesterday Mary journeyed to the school. 5 Where was Mary before the cinema? kitchen 2 1 Ex) Single-supporting-fact Ex) Time-reasoning
  • 18.
    © NBT AllRights Reserved. 결과분석 SentimentAnalysis(감정분석)
  • 19.
    © NBT AllRights Reserved. 결과분석 POSTagging(품사태깅)
  • 20.
    © NBT AllRights Reserved. 결과분석 반복횟수에따른성능
  • 21.
    © NBT AllRights Reserved. 결과분석 반복횟수에따른성능
  • 22.
    © NBT AllRights Reserved. 결과분석 반복횟수에따른성능
  • 23.
    © NBT AllRights Reserved. VisualQuestionAnswering
  • 24.
    © NBT AllRights Reserved. VisualQuestionAnswering
  • 25.
    © NBT AllRights Reserved. VisualQuestionAnswering
  • 26.
    © NBT AllRights Reserved. VisualQuestionAnswering
  • 27.
    © NBT AllRights Reserved. 요약 • 대부분의 자연어처리 Task는 QA로 치환할 수 있음 • DMN은 다양한 QA 문제들에 높은 성능을 냄 • Visual QA 에도 응용 가능함
  • 28.
    © NBT AllRights Reserved. 감사합니다.