当前位置:网站首页>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 .
边栏推荐
- [learning notes] xr872 GUI littlevgl 8.0 migration (display part)
- Leetcode 93 recovery IP address
- 传感器:SHT30温湿度传感器检测环境温湿度实验(底部附代码)
- 华为设备配置CE双归属
- [pytorch]fixmatch code explanation (super detailed)
- Application and routine of C language typedef struct
- ROS learning-8 pit for custom action programming
- [keras] data of 3D u-net source code analysis py
- 华为设备配置虚拟专用网FRR
- C language complex type description
猜你喜欢

(novice to) detailed tutorial on machine / in-depth learning with colab from scratch
![[pytorch]fixmatch code explanation (super detailed)](/img/22/66703bea0f8ee40eceb0687fcb3ad2.jpg)
[pytorch]fixmatch code explanation (super detailed)

【Unity】打包WebGL項目遇到的問題及解决記錄

Huawei equipment configures private IP routing FRR
![How to solve the problem of obtaining the time through new date() and writing out the difference of 8 hours between the database and the current time [valid through personal test]](/img/c5/f17333cdb72a1ce09aa54e38dd0a8c.png)
How to solve the problem of obtaining the time through new date() and writing out the difference of 8 hours between the database and the current time [valid through personal test]
![[51nod.3210] binary Statistics (bit operation)](/img/37/aa4a549deebf994b0049d41d49ff12.jpg)
[51nod.3210] binary Statistics (bit operation)

LabVIEW large project development tools to improve quality

ROS learning-8 pit for custom action programming
![[the second day of actual combat of smart lock project based on stm32f401ret6 in 10 days] (lighting with library function and register respectively)](/img/f7/b2463d8ffe75113d352cae332046db.jpg)
[the second day of actual combat of smart lock project based on stm32f401ret6 in 10 days] (lighting with library function and register respectively)

The commercial value of Kwai is being seen by more and more brands and businesses
随机推荐
Interruption of 51 single chip microcomputer learning notes (external interruption, timer interruption, interrupt nesting)
Vscode configuration header file -- Take opencv and its own header file as an example
[learning notes] xr872 GUI littlevgl 8.0 migration (display part)
Can't use typedef yet? C language typedef detailed usage summary, a solution to your confusion. (learning note 2 -- typedef setting alias)
[programming idea] communication interface of data transmission and decoupling design of communication protocol
[the second day of the actual combat of the smart lock project based on stm32f401ret6 in 10 days] light up with the key ----- input and output of GPIO
[the third day of actual combat of smart lock project based on stm32f401ret6 in 10 days] communication foundation and understanding serial port
Opencv camera calibration (2): fish eye camera calibration
ROS learning-6 detailed explanation of publisher programming syntax
Ten thousand words make it clear that synchronized and reentrantlock implement locks in concurrency
Parameter measurement method of brushless motor
Bluetooth module: use problem collection
Huawei equipment is configured with CE dual attribution
json,xml,txt
Installing Oracle with docker for Mac
Looking at Qianxin's "wild prospect" of network security from the 2021 annual performance report
[keras] train py
Application and routine of C language typedef struct
STM32 sensorless brushless motor drive
Deep learning the principle of armv8/armv9 cache