当前位置:网站首页>Chapter7-10_ Deep Learning for Question Answering (1/2)
Chapter7-10_ Deep Learning for Question Answering (1/2)
2022-06-13 02:13:00 【zjuPeco】
This article is for teacher lihongyi 【Deep Learning for Question Answering (1/2)】 My course notes , Course video youtube Address , spot here ( Need to climb over the wall ).
The pictures used in the following paragraphs are all from Mr. lihongyi PPT, If there is infringement , Must delete .
Article index :
Part 1 - 7-9 Deep Learning for Dependency Parsing
The next part - 7-11 Deep Learning for Question Answering (2/2)
1 What is? Question Answering(QA)
seeing the name of a thing one thinks of its function ,QA All you have to do is answer the question . Our problem types can be roughly divided into three categories .
- Can be from a source To find the answer directly , Such as "Who is the U.S. president?"
- Need from more than one sources Find the answer to the question , Such as "Is Trump older than Obama?"
- Questions without standard answers , Such as "Who should pay for the date, and why?"
The answers to these questions are from sources Integrated in ,sources It can be text , voice , Video and so on . The basic ideas of the existing models are consistent , Is to put sources Put it in a similar BERT In the model of embedding, At the same time question Put it on the other BERT Do it in embedding, these two items. module It often needs to be done attention, Finally put two modules The output of is put into a generated answer module Go to of , Get the final answer .
The answers can also be divided into several categories .
- A word
- source A passage from
- Multiple choice questions are one or more choices
- It can also be a generated paragraph

2 Sort by answer
2.1 The answer is a word
As early as 2015 In the year , There is a test QA Data set of bAbI, This data set divides the problem into 20 Categories , The answer to each question is a word . At that time, people thought it was very difficult to make the machine automatically answer these questions , But now this 20 Such problems are deep learning Cracked , So now paper Very few people take it bAbI To be the data set .
This is a one word question , It is a simple classification problem , Train a model , Then take the answer with the highest probability .
2.2 The answer is multiple options
When the answer is several options , It is necessary to add one to the model choice Of module.source,question and choice These three module There is attention Of . Every time choice module The input of is one of the options , The model only needs to output yes perhaps no That's all right. . This approach applies when the number of options changes , The number of answers will also change .
2.3 The answer is source A passage from
One kind of answer must be source A passage from , Typical is SQuAD and DRCD, In this way QA Also known as extraction-based. For such answers , We will give source Each of them token Output one start score And a end score. Take... Separately start score The biggest and end score maximal , It is the beginning and end of the answer .
The model looks like the figure below , In the absence of BERT When ,answer module yes LSTM, And there is BERT after , It just needs to be a start vetor and end vector That's all right. .
2.4 The answer is a generated paragraph
Some answers have a high degree of freedom :
- It could be source Different from spans Put together
- It is possible that the answer is in question and source Among them
- It is possible that part of the answer lies in the question and source None of them
- It may be based on source There is no answer at all
The classical models of this kind of problems are MS MARCO and DuReader. Some people also use it directly extraction-based To solve this problem .
In any way , When the answer is not source In the middle of the day , The model will be forced to source Find an answer in , This is bound to make mistakes . To solve this problem , Someone will be there source To add a Null Of token, So when Null Of start score and end score When both exceed a certain threshold , It means there is no answer .
If not extraction-based Methods , That would make an additional classification of the answers , Judge whether there is an answer . The model above in the figure below , Can eat source,question and answer To verify the answer , If not, there is no answer ; The following model in the figure below will only be based on source and question To judge source Is there an answer in .
3 Press source classification
3.1 source It's a web page
Finding the answer from an article is not what we usually need , This kind of work , It's easy for people to do it , The difficulty is , We don't know the answer to the question in which article . The way to do this is to use the search engine to search for this problem , Then take the first few , Judge whether these articles are related to the problem , Then find the answer from the relevant articles .
There are some classic ones V-Net, It is the answer to a number of articles , Then I think that most of the articles have the correct answers , Vote to get the final answer .
3.2 source It's pictures or videos
Sometimes the problem may be the content of the picture or video , The handling method at this time is the same as NLP There is not much difference between , Just use CNN To extract a picture embedding, Others are like NLP Of QA The same .
3.3 source It's voice
As early as 2016 In the year , Teacher Li's team began to try phonics as source Of QA 了 . They crawled the TOEFL listening materials on the Internet as training data for training . It was a great attempt at that time .
After technological progress , Released ODSQA Data sets , A speech recognition based Subword Units and Adversarial learning Of QA.
Of course, I have also tried to use voice as input directly , But the effect is not as good as that of speech recognition .
3.4 source It's video
Finally, the input is a video , go by the name of Movie QA. The input information at this time is not only video , And audio and subtitles . But it turns out , Most of them rely on subtitles , Video and audio don't do much .
边栏推荐
- Functional translation
- 蓝牙模块:使用问题集锦
- Number of special palindromes in basic exercise of test questions
- I didn't expect that the index occupies several times as much space as the data MySQL queries the space occupied by each table in the database, and the space occupied by data and indexes. It is used i
- 拍拍贷母公司信也季报图解:营收24亿 净利5.3亿同比降10%
- Record: how to solve the problem of "the system cannot find the specified path" in the picture message uploaded by transferto() of multipartfile class [valid through personal test]
- 【Unity】打包WebGL項目遇到的問題及解决記錄
- Stm32 mpu6050 servo pan tilt support follow
- ROS learning-8 pit for custom action programming
- Yovo3 and yovo3 tiny structure diagram
猜你喜欢

Stm32 mpu6050 servo pan tilt support follow

C语言压缩字符串保存到二进制文件,从二进制文件读取压缩字符串后解压。

I didn't expect that the index occupies several times as much space as the data MySQL queries the space occupied by each table in the database, and the space occupied by data and indexes. It is used i

How to learn C language and share super detailed experience (learning note 1 -- basic data types of C language)

Deep learning the principle of armv8/armv9 cache

Why is "iFLYTEK Super Brain 2030 plan" more worthy of expectation than "pure" virtual human

The commercial value of Kwai is being seen by more and more brands and businesses

Viewing the ambition of Xiaodu technology from intelligent giant screen TV v86

柏瑞凱電子沖刺科創板:擬募資3.6億 汪斌華夫婦為大股東

ROS learning-7 error in custom message or service reference header file
随机推荐
Simple ranging using Arduino and ultrasonic sensors
1000粉丝啦~
Sensorless / inductive manufacturing of brushless motor drive board based on stm32
ROS learning-7 error in custom message or service reference header file
Leetcode 93 recovery IP address
SQL server deletes all tables and all stored procedures in the database
Functional translation
Stm32+ze-08 formaldehyde sensor tutorial
[keras] generator for 3D u-net source code analysis py
STM32 steering gear controller
[pytorch] kaggle image classification competition arcface + bounding box code learning
Deep learning the principle of armv8/armv9 cache
Use mediapipe+opencv to make a simple virtual keyboard
Rsync transport exclusion directory
拍拍贷母公司信也季报图解:营收24亿 净利5.3亿同比降10%
【Unity】打包WebGL項目遇到的問題及解决記錄
16 embedded C language interview questions (Classic)
Can't use typedef yet? C language typedef detailed usage summary, a solution to your confusion. (learning note 2 -- typedef setting alias)
json,xml,txt
cmake_ example