知识问答

目录

 知识问答概述和相关数据集

问答系统历史

答题机器人

测评数据集

 多语种问答

QALD的评测指标

 WebQuestions

 Free917

 KBQA基本概念及挑战

知识问答简单流程和分类

​ 基于符号表示(传统)的知识库问答

​ 基于分布式表示(DL)的知识库问答

​ 基本概念与术语

问答质量的评估原则

问答任务的复杂性

问答系统的基本组件

基于知识图谱的问答:基本需求

自然语言问题与知识图谱之间的鸿沟

映射自然语言表达式到知识图谱元素词汇

不同的知识表示增加了映射难度

关系或属性隐含表述

知识库如何支持多语言问答

数据质量和异构性

分布式和互联数据

回答性能和可扩展性

KBQA挑战总结

 知识问答主流方法介绍

 基于模板的方法

动机

基于模板的问答

TBSL架构

 TBSL的模板定义

​ TBSL主要缺点

模板是否可以自动生成呢?

词典L构建

​ 上面是utterance中的phrase, Ph={ph1, ph2, phi...}来自utterance的子串

 基于语义解析的方法

传统语义分析方法

​ 应对大规模KB的语义解析

 基于深度学习的方法

KBQA与深度学习结合的两个方向


 知识问答概述和相关数据集

问答系统历史

答题机器人


 

 “多达一”机器人:日本富士通联合日本国立信息学研究所的高考机器人项目 (2011)

 微软创始人Paul Allen与华盛顿大学计划制造能够通过高中生物考试的系统

 863: 基于大数据的类人智能关键技术与系统

测评数据集

– QALD

 知识库问答评测,Question Answering over Linked Data(QALD);是多语言的链接数据问答 (multilingual question answering over linked data) 系统的评测竞赛活动。

 数据来源包括Dbpedia、YAGO和MusicBrainz;

 ESWC workshop上开展,旨在建立一个统一的测评基准。每年100个问题左右,从2011年开始,到目前共举办了7届;

 主要任务有三类

 多语种问答,基于Dbpedia

 问答 基于链接数据(interlinked data)

 Hybrid QA, 基于RDF and free text data

 多语种问答

问答基于链接数据 (interlinked data)

数据集:SIDER, Diseasome, Drugbank

问题:25 training + 25 test

从不同数据集融合信息

 Example: What is the side effects of drugs used for Tuberculosis?

SELECT DISTINCT ?x WHERE {

disease:1154 diseasome:possibleDrug ?v2 .

?v2 a drugbank:drugs .

?v3 owl:sameAs ?v2 .

?v3 sider:sideEffect ?x .

}

Hybrid QA

数据集: DBpedia 3.9 (with English abstracts)

问题: 25 training + 10 test

require both structured data and free text from the abstract to be answered

 Example: Give me the currencies of all G8 countries.

SELECT DISTINCT ?uri WHERE {

?x text:"member of" text:"G8" .

?x dbo:currency ?uri .

}

QALD的评测指标

 采用准确率P,召回率R和F值作为测评指标

 WebQuestions

使 用 Freebase , 通 过 Google Suggest API 爬 取 得 到 候 选 问 题 , 最 终 得 到5,810 个 问 题 (3,778 个 训 练 数 据 ,2,032个测试数据)

利用Amazon Mechanical Turk服务得到答案 (在Freebase中可以找到), 一个问题可能存在多个答案,利用Average F1评价

WebQuestionsSP是WebQuestions包含SPARQL标注的升级版本,其中4737个问题包含semantic parses和对应的SPARQL查询语句,是“answerable”的 , 剩 余 问 题 被 标 注 为 : “ not answerable”

 Free917

同样使用Freebase,共917个问题,包含641个训练样例,276个测试样例

 KBQA基本概念及挑战

知识问答简单流程和分类

基于符号表示(传统)的知识库问答

基于分布式表示(DL)的知识库问答

基本概念与术语

概念一:问句短语

 问句短语定义问的是什么:

 Wh-words:

 who, what, which, when, where, why, and how

 Wh-words + nouns, adjectives or adverbs:

 “which party ...”, “which actress ...”, “how long ...”, “how tall...”.

概念二:问题类型

 问题类型决定了后续采用什么样的回答处理策略

 FACTOID – 事实型问题:

 PREDICATIVE QUESTIONS – 谓词型问题 :

“Who was the first man in space?”

“What is the highest mountain in Korea?”

“How far is Earth from Mars?”

“When did the Jurassic Period end?”

“Where is Taj Mahal?”

 LIST – 列表型问题:

 “Give me all cities in Germany.”

 SUPERLATIVE – 最高级型问题:

 “What is the highest mountain?”

 YES-NO – 对错型问题:

 “Was Margaret Thatcher a chemist?”

 OPINION - 观点型问题:

 “What do most Americans think of gun control?”

 CAUSE & EFFECT–因果型问题:

 “What is the most frequent cause for lung cancer?”

 PROCESS – 方法型问题:

 “How do I make a cheese cake?”

 EXPLANATION & JUSTIFICATION – 解释型问题:

 “Why did the revenue of IBM drop?”

 ASSOCIATION QUESTION – 关联型问题:

 “What is the connection between Barack Obama and Indonesia?”

 EVALUATIVE OR COMPARATIVE QUESTIONS – 比较型问题:

 “What is the difference between impressionism and expressionism?”

概念三:答案类型

The class of object sought by the question:

Abbreviation

Entity: event, color, animal, plant,. . .

Description, Explanation & Justification : definition, manner,reason,. . . (“How, why ...”)

Human: group, individual,. . . (“Who ...”)

Location: city, country, mountain,. . . ( “Where ...”)

Numeric: count, distance, size,. . . (“How many how far, howlong ...”)

Temporal: date, time, ...(from “When ...”)

概念四:问题主题

Question focus is the property or entity that is

being sought by the question

 “In which city was Barack Obama born?”

 “What is the population of Galway?”

问题主题: 问题是关于哪方面的:

 “What is the height of Mount Everest?”

 (geography, mountains)

 “Which organ is affected by the Meniere’s disease?”

 (medicine)

概念五:问答来源类型

 Structure level:

 结构化数据 (databases).

 半结构化数据(e.g. XML).

 非结构化数据.

 数据源:

 Single dataset (centralized).

 Enumerated list of multiple, distributed datasets.

 Web-scale.

概念六:领域类型

 Domain Scope:

 开放域

 特定域

 Data Type:

文本

图片

音频

视频

 多模态问答

 Visual QA

概念七:答案格式

 Long answers

 Definition/justification based.

 Short answers

 Phrases.

 Exact answers

 Named entities, numbers, aggregate, yes/no

问答质量的评估原则

 Relevance- 相 关 度 : The level in which the answer addresses users

information needs.

 Correctness-正确度: The level in which the answer is factually correct.

 Conciseness-精炼度: 答案不包含不相关信息

 Completeness-完备度: 答案应该完整

 Simplicity-简单度: 答案易于解释

 Justification-合理度: Sufficient context should be provided to support thedata consumer in the determination of the query correctness.

 Right: The answer is correct and complete.

 Inexact: The answer is incomplete or incorrect.

 Unsupported: The answer does not have an appropriate evidence/justification.

 Wrong: The answer is not appropriate for the question.

答案的处理

 简单抽取: Direct extraction of snippets from the original document(s) /data records.

 Combination: Combines excerpts from multiple sentences, documents /multiple data records, databases.

 Summarization: Synthesis from large texts / data collections.

 Operational/functional: Depends on the application of functional operators.

 推理: Depends on the application of an inference process over the original data.

问答任务的复杂性

 Semantic Tractability (Popescu et al., 2003) : Vocabulary overlap/distance between the query and the answer.

 Answer Locality (Webber et al., 2003) : Whether answer fragments are distributed across different document fragments /documents or datasets/dataset records.

 Derivability (Webber et al, 2003) : Dependent if the answer is explicit or implicit. Level of reasoning dependency.

 Semantic Complexity: Level of ambiguity and discourse/data heterogeneity.

问答系统的基本组件

 数 据 预 处 理 -Data pre-processing: Preprocesses the database data (includes indexing, data cleaning, feature extraction).

 问 题 分 析 -Question Analysis: Performs syntactic analysis and detects/extracts the core features of the question (NER, answer type, etc).

 数据匹配-Data Matching: Matches terms in the question to entities in the data.

 查询创建-Query Constuction: Generates structured query candidates considering the question-data mappings and the syntactic constraints in the query and in the database.

 排序-Scoring: Data matching and the query construction components output several candidates that need to be scored and ranked according to certain criteria.

 结果返回与生成-Answer Retrieval & Extraction: Executes the query and extracts the natural language answer from the result set.

基于知识图谱的问答:基本需求

 High usability:

Supporting natural language queries.

 High query expressivity:

Path, conjunctions, disjunctions, aggregations, conditions.

 Accurate & comprehensive semantic matching:

High precision and recall.

 Low maintainability:

Easily transportable across datasets from different domains (minimumadaptation effort/low adaptation time).

 Low query execution time:

Suitable for interactive querying.

 High scalability:

Scalable to a large number of datasets (Organization-scale, Web-scale).

自然语言问题与知识图谱之间的鸿沟

Example: What is the currency of the Czech Republic?

SELECT DISTINCT ?uri WHERE {

res:Czech_Republic dbo:currency ?uri .

}

Main challenges:

 Mapping natural language expressions to vocabulary elements

(accounting for lexical and structural differences).

 Handling meaning variations (e.g. ambiguous or vague expressions,

anaphoric expressions).

映射自然语言表达式到知识图谱元素词汇

 URIs are language independent identifiers.

 Their only actual connection to natural language is by the labels that are attached to them.

dbo:spouse rdfs:label “spouse”@en , “echtgenoot”@nl .

 Labels, however, do not capture lexical variation:

wife of

husband of

married to

 Often the conceptual granularity of language does not

coincide with that of the data schema.

When did Germany join the EU?

SELECT DISTINCT ?date

WHERE {

res:Germany dbp:accessioneudate ?date .

}

Who are the grandchildren of Bruce Lee?

SELECT DISTINCT ?uri

WHERE {

res:Bruce_Lee dbo:child ?c .

?c dbo:child ?uri .

}

 In addition, there are expressions with a fixed, dataset- independent meaning.

Who produced the most films?

SELECT DISTINCT ?uri

WHERE {

?x rdf:type dbo:Film .

?x dbo:producer ?uri .

}

ORDER BY DESC(COUNT(?x))

OFFSET 0 LIMIT 1

不同的知识表示增加了映射难度

 Different datasets usually follow different schemas, thus provide different ways of answering an information need.

关系或属性隐含表述

 The meaning of expressions like the verbs to be, to have, and

prepositions of, with, etc. strongly depends on the linguistic

context.

Which museum has the most paintings?

?museum dbo:exhibits ?painting .

Which country has the most caves?

?cave dbo:location ?country .

知识库如何支持多语言问答

 The number of non-English actors on the web is growing substantially.

Accessing data.

Creating and publishing data.

Knowledge Graph:

In principle very well suited for multilinguality, as URIs are language- independent.

But adding multilingual labels is not common practice (less than a quarter of the RDF literals have language tags, and most of those tags are in English).

数据质量和异构性

 Requirement: Completeness and accuracy

(Wrong answers are worse than no answers)

In the context of the Knowledge Graph:

 QA systems need to deal with heterogeneous and imperfect data.

Datasets are often incomplete.

Different datasets sometimes contain duplicate information, often using different vocabularies even when talking about the same things.

Datasets can also contain conflicting information and inconsistencies.

分布式和互联数据

 Data is distributed among a large collection of interconnected datasets.

Example: What are side effects of drugs used for the treatment of Tuberculosis?

SELECT DISTINCT ?x

WHERE {

disease:1154 diseasome:possibleDrug ?d1.

?d1 a drugbank:drugs .

?d1 owl:sameAs ?d2.

?d2 sider:sideEffect ?x.

}


 

回答性能和可扩展性

 Requirement: Real-time processing time. answers,

i.e.

low

In the context of the Knowledge Graph:

 Datasets are huge.

 There are a lot of distributed datasets that might berelevant for answering the question.

 Reported performance of current QA systems amountsto ~20-30 seconds per question (on one dataset).

KBQA挑战总结

怎样缩小自然语言和规范化结构化数据之间的鸿沟

怎样处理不完全、充满噪音和异构的数据集.

怎样处理大规模的知识图谱.

怎样处理分布式数据集上的QA

怎样融合结构化和非结构化的数据

怎样降低维护成本

怎样能快速的复制到不同的领域

 知识问答主流方法介绍

 基于模板的方法

 模板定义

 模板生成

 模板匹配

本节以TBSL (Unger et al., 2012)方法为例详细讲解

 核心贡献:

 Constructs a query template that directly mirrors the linguistic structure of the question

 Instantiates the template by matching natural language expressions with ontology concepts

 评估: QALD 2012

动机

 In order to understand a user question, we need to understand:

The words (dataset-specific)

Abraham Lincoln → res:Abraham Lincoln

died in → dbo:deathPlace

The semantic structure (dataset-independent)

who → SELECT ?x WHERE { ... }

the most N → ORDER BY DESC(COUNT(?N)) LIMIT 1

more than i N → HAVING COUNT(?N) > I

基于模板的问答

 目标: An approach that combines both an analysis of the semantic structure and a mapping of words to URIs.

 方法的两个重要步骤:

 1. Template generation (模板生成)

 Parse question to produce a SPARQL template that directly mirrors the structure of the question, including filters and aggregation operations.

 2. Template instantiation (模板实例化)

 Instantiate SPARQL template by matching natural language expressions with ontology concepts using statistical entity identification and predicate detection.

示例:Who produced the most films?

SPARQL template:

SELECT DISTINCT ?x WHERE {

?y rdf:type ?c .

?y ?p ?x .

}

ORDER BY DESC(COUNT(?y))

OFFSET 0 LIMIT 1

?c CLASS [films]

?p PROPERTY [produced]

Instantiations:

?c = <http://dbpedia.org/ontology/Film>

?p = <http://dbpedia.org/ontology/producer>

TBSL架构

模板定义

 结合KG的结构,以及问句的句式,进行模板定义。通常没有统一的标准或格式

 TBSL的模板定义

为SPARQL query模板,将其直接与自然语言相映射

Step1: 模板生成 – Linguistic processing

1. 首先,获取自然语言问题的POS tags信息

2. 其次,基于POS tags, 语法规则表示问句

3. 然后利用domain-dependent词汇和domain-independent词汇辅助分析问题

4. 最后,将语义表示转化为一个SPARQL模板

示例:Who produced the most films?

 领域无关: who, the most

 领域相关: produced/VBD, films/NNS

Step 2: Template instantiation Entity identification and predicate detection

模板匹配与实例化–实体识别与属性检测

 有了SPARQL模板以后,需要进行实例化与具体的自然语言问句相匹配。即将自然语言问句与知识库中的本体概念相映射的过程。

 对于resources和classes,实体识别常用方法:

 用WordNet定义知识库中标签的同义词

 计算字符串相似度 (trigram, Levenshtein 和子串相似度)

 对于property labels,将还需要与存储在BOA模式库中的自然语言表示进行比较

 最高排位的实体将作为填充查询槽位的候选答案

示例:Who produced the most films?

?c CLASS [films]

<http://dbpedia.org/ontology/Film>

<http://dbpedia.org/ontology/FilmFestival>

...

?p PROPERTY [produced]

<http://dbpedia.org/ontology/producer>

<http://dbpedia.org/property/producer>

<http:// dbpedia.org/ontology/wineProduced>

Step3: Query ranking and selection

排序打分

1. 每个entity根据string similarity和prominence获得一个打分

2.一个query模板的分值根据填充slots的多个entities的平均打分

3. 另外,需要检查type类型:

--对于所有的三元组?x rdf:type <class>,对于查询三元组?xp e和 e p ?x需要检查p的domain/range是否与<class>一致

4. 对于全部的查询集合,仅返回打分最高的.

示例:Who produced the most films?

TBSL主要缺点

 创建的模板结构未必和知识图谱中的数据建模相契合

 考虑到数据建模的各种可能性,对应到一个问题的潜在模板数量会非常多,同时手工准备海量模板的代价也非常大

模板是否可以自动生成呢?

 Automated Template Generation for Question Answering over Knowledge Graphs( Abujabal et

al, www2017)

 提出了QUINT,能够根据utterance-answer对,根据依存树自动学习utterance-query模板

 利用自然语言的组成特点,可以使用从简单问题中学到的模板来解决复杂问题

GUINT架构

方法与主要贡献点

LOGO

1. 提出了QUINT能够根据utterance-answer pair,使用依存树自动学习utterance-query模板。模板的学习使用远程监督的方法。模板支持自动识别问题答案的类型

 其中,使用Interger Linear Programming (ILP)学习utterance-query之间的对齐

2. 利用自然语言的组成特点,可以使用从简单问题中学到的模板来解决复杂问题 (多个predicate)复杂问题解决流程:

 将问题分解为子句

 使用模板回答每一个子句

 结合子句答案获取最终答案

模板生成–问句依存分析

 训练阶段的输入是问题utterance u和它对应的答案集合Au

 输入示例:

 utterance:u =“Which actress played character Amy Squirrel on Bad Teacher?”

 Au = {LucyPunch}

 对应依存树:

使用依存树的好处:

•依存树能够捕捉远距离依赖关系,适合复杂问题

•能够跳过无用的tokens,更好的容错性

模板生成–为utterance构建query

 根据utterance和answer中的entity(使用工具S-MART进行NERL,与freebase链接),从KG中得到最小子图

utterance:u =“Which actress played character Amy Squirrel on Bad Teacher?”

Au = {LucyPunch}

utterance:u =“Which actress played character Amy Squirrel on Bad Teacher?”

Au = {LucyPunch}

黑点构成最小子图,进一步将answer和cvt替换为变量?x,?cvt,并添加answer上的type边,即问题的答案类型(图中灰色节点)。得到utterance在KG中的子图为:

通过ILP将问题与query进行对齐

utterance:u =“Which actress played character Amy Squirrel on Bad Teacher?”

Au = {LucyPunch}

ligned utterance query pair: (u,q,m):

m通过共享的ent,pred和type标注表示 (如“played on”与cast.actor对齐)

词典L构建

(详见语义解析–EMNLP 2013)

包括L P (Predicate lexicon)和L C (type lexicon)

•使用distant supervision方法构建

•使用的语料:ClueWeb09-FACC1, 500M Web pages annotated with Freebase entities.

L P 构建:

•语料中:“[[Albert Einstein | AlbertEinstein]] was born in [[Ulm | Ulm]] ...”

•KG中:(AlbertEinstein birthPlace Ulm)

•将“was born in” -> birthPlace添加到L P 中,并添加权重,即在语料中出现的次数

L c 构建:

•语料中:“[[Albert Einstein | AlbertEinstein]] and other scientists...”

•KG中:(scientists type c)

•添加scientists -> c到L c 中,并添加权重,即在语料中出现的次数。

将问题分块,得到多个phrase

将问题中短语与KG对齐

使用词典L对齐,出现歧义(问题歧义,词典噪声)使用ILP解决

上面是utterance中的phrase, Ph={ph1, ph2, phi...}来自utterance的子串

下面是query (即utterance在KG中对应子图)中的semantic items。Sq={s1, s2, sj......}

max  Wi , jXi , j

i , j

添加边:

根据词典添加边phi->sj∈L P ∪L C 边的权重来自字典

将每个semantic items和每个utterance中的phrase进行连接

使用ILP优化函数确定最优边:

函数限制条件:每个semantic items都需要一条边。每个phrase只能对应一个semantic items。Type边只能选择一个.

注: 其中W i,j 来自词典的权重,X i,j 表示是否保留这条边(0,1)

模板定义与生成

定义一个三元组的模板: (u t , q t , m t ):

其中u t 为问题模板

q t 为query模板

m t 为问题和query映射方法模板

• 对于新问题进行依存分析,并使用工具S-MART进行NERL (freebase)

• 去模板库中进行匹配 (u‘中加粗的黑线与u t 匹配,使用子图同构匹配)

• 再使用词典L对m t (m t 为utterance和query对齐关系)进行实例化

候选Query排序

• 从问题产生多个候选query的原因

– 模板可能匹配多个

– NERL

• 使用Random Forest进行学习两个query对之间的顺序

复杂问题处理

• 依存树重写

– 并列连词

– 关系从句

• 子问题回答

– 匹配模板、实例化,query rank

– 返回query list

• 答案拼接

– 对子问题的query list打分1/r,其中r表示位置。

– 对每个子问题的答案取交集

– 选择交集不为空,且组合后得分最高的query组合

模板匹配方法的优缺点

 模板方法的优点:

 模板查询响应速度快

 准确率较高,可以回答相对复杂的复合问题

 模板方法的缺点:

 人工定义的模板结构经常无法与真实的用户问题进行匹配。

 如果为了尽可能匹配上一个问题的多种不同表述,则需要建立庞大的模板库,耗时耗力且查询起来效率降低。

 基于语义解析的方法

资源映射

Logic Form

候选答案生成

排序

传统语义分析方法

基于符号表示(传统)的知识库问答-Semantic Parsing

问句的形式化表示


 

基本步骤

• 获得短语到资源的映射 – 资源映射


 

• 如何解决文本的歧义 – 逻辑表达式

语义分析–资源映射

资源映射: 将自然语言短语或单词节点映射到知识库的 实体 或 实体关系。 可以通过构造一个词汇表(Lexicon)来完成这样的映射

•复杂映射:“was also born in” → PlaceOfBirth

•较难通过字符串匹配的方式建立映射,可采用统计方法

•实体对 (entity1,entity2)常作为主语和宾语出现在was also born in两侧,并且也存在在知识库中PlaceOfBirth的三元组中,那么我们可以认为“was also born in”这个短语可以和PlaceOfBirth建立映射

语义分析–逻辑表达式

 逻辑表达式: 即一种能让知识库“看懂”的表示。可以表示知识库中的实体、实体关系

 逻辑形式通常可分为一元形式 (unary)和二元形式 (binary)

 一元实体:对应知识库中的实体

 二元实体关系,对应知识库中所有与该实体关系相关的三元组中的实体对。

 并且,可以像数据库语言一样,进行连接Join,求交集Intersection和聚合Aggregate (如计数,求最大值等等)操作

利用Logic Form表示问题语义

语义解析经典方法 – Semantic Parsing on Freebase from Question-Answer Pairs. EMNLP 2013

传统语义解析vs 弱监督语义解析

应对大规模KB的语义解析

 无监督系统 (不需要任何训练数据)

 Unger et al., 2012; Yahya et al., 2012

 远距离监督 (适应于有限的小规模语义关系)

 Krishnamurthy and Mitchell, 2012

 通过问题/逻辑表达式对集合训练得到的Parser

 Cai and Yates, 2013

目标:通过大规模知识库上的问题/答案对集合训练Parser

应对文本(问题)映射到KB的若干挑战

 Alignment: 从文本短语到KB predicates映射的辞典 (Lexicon)

 Bridging: 使用上下文 (context) 生成KB predicates

语义解析– 问题定义

 问题答案对 (question/answers pairs)数据集来训练分析器

 数据集: QALD,WebQuestions,Free917等等 ;也可以人工从KB中抽取构建

Logic Form可以视为图模板 (Graph Template)

Alignment:文本短语

Alignment:KB Predicates

Alignment:短语到KB Predicates的匹配

Bridging操作

Often predicates are not expressed explicity:

• What government does Chile have?

• What is Italy's language?

• Where is Beijing?

• What is the cover price of X-men?

• Who did Humphrey Bogart marry in 1928?

Alignment: build coarse mapping from raw text

Bridging: use neighboring predicates / type constraints

Bridging操作:连接2个Unaries

Bridging操作:Event Modifiers

通过Composition产生候选Logic Form (Derivation)

训练模型来估计给定问句生成一个逻辑表达式的概率

WebQuestions:通过Web获得更多问题

KB不完整问题

KB不完整问题-使用Paraphrasing来解决

模型定义

模型学习

候选逻辑表达式

候选问句生成

Paraphrase模型

 映射同义句

 简单的paraphrase模型利用大量文本做统计

 Association model (关联模型)–Paralex

 Vector space model (向量空间模型)–Wikipedia

Association model (关联模型)

 基于深度学习的方法

KBQA与深度学习结合的两个方向

• 问答过程:基于结构化的问句语义表达 (Lambda演算)在知识图谱匹配最优子图

1. 知识库实体,在图中用圆角矩形表示。

2. 中间变量,在图中用白底圆圈表示。

3. 聚合函数,用菱形表示。

4. lambda变量 (答案),在图中用灰底圆圈表示。

链接Topic Entity并识别核心推断链

采用CNN对候选路径进行打分

输入:自然语言和候选路径

对二者分别经过两个不同的卷积神经网络,输出得到一个300维的分布式表示然后利用向量间的相似度(如cosine距离)计算自然语言和谓语序列的相似度得分

Argument Constraints

排序

Graph-Traversal-Based QA (图遍历QA)

 深度学习End2End方法前身:基于图遍历的QA方法

 与End2End方法的区别仅在于改变了ranking和mapping函数

图遍历QA整体架构

问句理解

 实体链接 (Entity linking ):

 To detect mentions in the query and link them to the resources in the

knowledge base,with a global threshold of 0.15

 By using Wikipedia Miner tool to do the entity linking

 拓扑结构抽取 (Topological structure extraction )

 parse the question text and generate the corresponding constituent tree

 To extracts relationships by using topological patterns

Graph Traversal (图遍历)

 Subgraph construction:

Iteratively construct a subgraph from linked entities in the knowledge base with most K steps

 Path finding:

Start from a known entity e and make one step ahead and obtain many one step paths rooted at e

Calculates the semantic similarity between the predicates around the entity e and the phrase text from the edge in the topological structure

 Iteratively make more steps outward and get many multiple-length paths

When to stop: When it gets to the outmost layer of the subgraph

Discard the obtained path which does not match the topological structure


 

Focus Constraint

 Focus Definition:

 A focus is a phrase in the question text describing the answer directly

e.g. “television shows” is the focus of “Which television shows were created by John Cleese?”

 Rules to find focus:

Derive focus information from interrogatives

person and organization from “who”

place from “where”

date from “when”

Extract a focus based on the POS tags of a question

the longest noun phrase after the interrogative part of a question

the interrogative part could be “Give me all”, “What”, “Which” and so on

the first word after the interrogative part with the POS tag “NN” to the last word having continuous “NN” tag as the focus

Path Ranking

基于端到端知识库问答

(Bordes et al. 2014)

LOGO

目前只处理单关系 (Single Relation)的问句 (Simple Question)

基本步骤

Step1:候选生成

• 利用Entity Linking找到main entity

• 在KB中main entity周围的entity均是候选

Step2:候选排序


 

基于端到端知识库问答

(Bordes et al. 2014)

1 利用Entity Linking定位问题中的main entity

2 找到从问题实体到答案实体的路径

3 生成候选答案的子图

4 将问题和答案子图分别映射成embedding,学习出embedding向量;

5 点积操作 (dot product)获得问题和候选答案之间的相似度分值。

Multi-Column CNN

问题

问句表示

已有方法多采用Word Embedding的平均对于问句进行语义表示,问句表示过于简单

关注答案不同的部分,问句的表示应该是不一样的

知识表示

受限于训练语料

未考虑全局信息

深度学习方法优缺点

 优点

无须像模板方法那样人工编写大量模板,也无须像语义分析方法中人工编写大量规则,整个过程都是自动进行

 缺点

 目前也只能处理简单问题和单边关系问题,对于复杂问题不如两种传统方法效果好

 由于DL方法通常不包含聚类操作,因此对于一些时序敏感性问题无法很好的处理,例如:“who is johnny cash’s first wife” ,答案可能给出的是second wife的名字(模型只关注到了wife而忽略了

first的含义,并没有进行额外的推理)。对于这种情况,可能需要定义专门(ad-hoc)的操作

三类方法总结对比

 模板方法: 模板查询响应快、准确率高,可以回答相对复杂的问题。但人工定义模板费时费力,且经常无法与用户真实问题匹配。

 语义方法: 可以回答较为复杂的问题,例如时序性问题。但人工编写规则工程量大。

 深度学习方法: 无需人工编写规则定义模板,整个学习过程都是自动进行,但目前只能处理简单题和单边关系问题,且深度学习方法通常不包含聚类操作,因此时序性问题无法应对。

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值