机器学习研究 第五讲:关系学习

89
中中中中中中中中中中中 中中中中中中中中中中中 Machine Learning and Data Mining 2006 Machine Learning and Data Mining 2006 机机机机机机 机机机 机机机机 机机机 机机机机机机机机机 2006 机 6 机 27 机

Upload: meara

Post on 18-Mar-2016

190 views

Category:

Documents


6 download

DESCRIPTION

中国科学院研究生院 2006 年 6 月 27 日. 机器学习研究 第五讲:关系学习. 韩彦军. 提纲. 什么是关系学习? 关系学习中的一阶逻辑方法。 关系学习中的概率方法。 总结。. 概述. 关系学习,译自 Relational Learning. 最近十年发展起来的一类机器学习问题及其方法的统称。 关系学习中同一样本的各个属性之间有着 复杂的关系 ,或者不同样本相互之间不独 立,这表明了样本集上的某种结构. 复杂内在结构 的问题:文本数据挖掘,生物信息学,交通工程等。. 概述. 译作关系学习不妥。 误解:代数里的关系(甚至是二元关系) 。 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 机器学习研究 第五讲:关系学习

中国科学院自动化研究所中国科学院自动化研究所Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

机器学习研究第五讲:关系学习

韩彦军

中国科学院研究生院2006 年 6 月 27 日

Page 2: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

提纲什么是关系学习?关系学习中的一阶逻辑方法。关系学习中的概率方法。总结。

Page 3: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

概述关系学习,译自 Relational Learning. 最近十年发展起来的一类机器学习问题及其方法的统称。关系学习中同一样本的各个属性之间有着 复杂的关系 ,或者不同样本相互之间不独 立,这表明了样本集上的某种结构.复杂内在结构的问题:文本数据挖掘,生物信息学,交通工程等。

Page 4: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

译作关系学习不妥。误解:代数里的关系(甚至是二元关系) 。Relational Learning 中的关系 : 一种关

联,用一阶逻辑的语言就是谓词。 为方便起见仍称为关系学习。

概述

Page 5: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

概述与其他能用属性 - 值方式表示的机器学习问题不同,关系学习中的问题一般无法如此表示: a. 每个样本不仅由属性描述,而且其中还要用关系描述 b. 属性不等长。

Page 6: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

C C

方法。

的人们想到借助机器学习方法又过于昂贵,因此

验论计算的方法得出,实但是分子性质很难由理

如何?降解能力其

的结构已知,四氯乙烷:如上图:

。化学性质由其结构决定

分子的问题

)ity(degradabil

:)ipsRelationshActivity (

22 CHClHCCl

StructureSARs

土壤沉积物

空气

水结构决定性质

Page 7: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

。二值或者实数分子结构,降解性形式:

中每个元素具有如下给定训练样本集合,其

是一个监督学习问题从机器学习观点看,这

)}({

bilitybiodegrada , ,:

bilitybiodegrada , ,:

bilitybiodegrada , ,:

22

22

BondAtomCHClBrClBrHC

BondAtomCHClHCCl

BondAtomClCHCClH

样本集:

属性 属性之间的关系 预测值“ ”数据呈现为 多表 。

关系学习得名于此,且

表达数据的内在结构

,传统机器学习所没有的

单表

Page 8: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

C(1) C(2)H(8)

Cl(7)Cl(3)

Cl(4)

H(5)

Cl(6)

)

,2,1(

)arg,

,,(

BondType

AtomAtomBond

eChAtomtype

ElementAtomIDAtom

)1,8,2(

)1,7,2( )1,6,2(

)1,5,1( )1,4,1(

)1,3,1( )1,2,1(

bond

bondbond

bondbond

bondbond)037.0,3,,8(

)212.0,93,,7(

)212.0,93,,6(

)037.0,3,,5(

)212.0,93,,4(

)212.0,93,,3(

)388.0,10,,2(

)388.0,10,,1(

Hatom

Clatom

Clatom

Hatom

Clatom

Clatom

Catom

Catom

Page 9: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

.

:

Br

CHClBrCHBrBrClHC

其中含有

如属性长度,种类不固定

.吡喃型葡萄糖

,

:

D

例如:结构引起

可能由其他结构不固定

Page 10: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

形式化描述

简单的相关关系。

如果不独立,之间也是个属性,一般相互独立

的最佳逼近是寻找

目的函数为传统机器学习中:目标

,

.

),,,(^

21

n

ff

xxxf n

Page 11: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

形式化描述1 2 12 1 2

13 1 3 123 1 2 3 12m 1 2

( , , ( , ),( , ), ( , , ), ( , , ),

n

m

f x x x g x xg x x g x x x g x x x

n g

本例中的学习问题要远远复杂。目标函数为 ,

, )

呈现组合爆炸式,而且 不固定,其中 代表结构。

有无某种化学键

某个原子

:

:

g

xi

Page 12: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

f g f g

要寻找这样一个函数的逼近,难度大大提高,因为假设空间巨大且结构很复杂。另外 对于 很敏感,即 关于 不连续。或者说目标函数对于是否存在某种结构很敏感,符合我们的预期,但正因为如此,问题很难解决。

形式化描述

Page 13: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

顾客类别预测,

. . .( )

bigspender

bigspenderi i d

问题描述:由顾客的性别,年龄,收入,消费来判断该顾客是否是“ ” 从而发现潜在的顾客群。这是一个二分类问题但是一个人是否是“ ” 还取决于其他人如:配偶。因此违反了机器学习中普遍存在的独立同分布 假设。

Page 14: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

提纲

Page 15: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

形式化描述

可能性。

”的“是会提高顾客是顾客

即目标函数为

值之间。建立在不同样本的预测

地说,不同样本之间,更确切本问题中,结构建立在

性之间。存在于同一个样本的属分子结构预测中,结构

bigspenderxbigspendery

yyyfxxxf nn

""

)),,(,,,( 2121

Page 16: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

反映问题的内在结构。需要加入领域知识

杂假设空间庞大,结构复

到的问题高一个层次。比传统机器学习中涉及

中的问题,无法回避能更好地反映现实世界

:关系学习的意义和特点

---3.

2.

.1

中的一个点。为样本不能简单表示为

限制假设空间。因的假设;应用领域知识

的空间中搜索最佳采用启发式信息在庞大

的特点:当前关系学习中的算法

nR

Page 17: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

传统机器学习

不易融入背景知识

样本来自同一模型样本之间 i.i.d

属性顺序固定属性数目固定

实际问题

易于融入背景知识

样本可以来自不同模型不一定 i.i.d

属性顺序不定属性数目不定

引发困难

效果差,可理解性差

得到错误模型得到错误模型

组合爆炸无法解决

Page 18: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

关系学习中的一阶逻辑方法

Page 19: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

ILP (归纳逻辑程序)是关系学习领域的研究人员最先采用的解决方法。

Page 20: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

),(),(),( xyparentxfemaleyxDaughter

是一致的

是完备的

,空间中找到一个假设:背景知识,要从假设

:负例正例,即:给定训练样本集

HeHBNe

HeHBPe

tsHB

NPNPE

,|:

,|:

..

:,

Page 21: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

:

?

因为二者有着天然联系

问题方法来解决关系学习的为什么用ILP

以下讨论涉及到一阶逻辑中的基本定义 ,请参阅《机器学习》 (Tom M.Mitchell)第 204 页表 10-3

Page 22: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

每个良构的表达式由常量(如 Joe, 23), 变量(如 x ),谓词(如在Female(Mary) 中的 Female )和函数( age(Mary) 中的 age) 组成。

项( term )为任意常量,任意变量或任意应用到项集合上的函数,例如: Mary, x, age (Mary), age (x).

文字( literal )是应用到项集合上的任意谓词或其否定。例如: Female(Mary), ~Female(x),Greater_than(age(Mary),20)

基本文字( ground literal )是不包含任何变量的文字(如, ~Female(Joe) )

负文字( negative literal )是包含任何否定谓词的文字(如:~ Female(Joe) )

正文字( positive literal )是不包含否定符号的文字(如: Female(Joe) )

一阶逻辑中的基本定义

Page 23: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

子句( clause )是多个文字的析取式, M1 M2 … Mn∨ ∨ ∨ ,其中的所有变量是全称量化的。

Horn 子句是一个如下形式的表达式: H(L1 L2 … Ln),∧ ∧ ∧其中 L1,L2,…Ln 为正文字,可以等价地写为析取式:

H ~L1 ~L2 … ~Ln∨ ∨ ∨ ∨ 置换( substitution )是一个将某些变量替换为某些项的函数。

例如:置换 {x/3,y/z} 把变量 x 替换为项 3 并把变量 y 替换为项 z 。给定一个置换和一个文字 L ,使用 L 表示应用置换后的结果。

逻辑程序( Logic Program ):是一阶逻辑的一个子集,逻辑程序由子句构成,即一系列的 if/then 规则

ILP 的任务便是通过归纳学习的方法学习到用逻辑程序表达的概念。

Page 24: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

目,如信息增益。覆盖的正例和负例的数

集,一般都基于当前子句基础上加入语义

逻辑的用背景知识,相当于在搜索方法:启发式,利

结构。构成格

约简子句集反对称,传递

自反,偏序结构替换在假设空间上构成空间结构:

句集。一组规则可化为一个子,,形式:

子句具有如下子句集构成,假设空间:由

)(

) (),

(

,21

lattice

clausesreduced

LLLH

hornhorn

n

Page 25: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006学习规则集合 学习能表示为 if-then 规则的集合。 其中最重要的一种是学习包含变量的规则集合,或者称为一阶 Horn子句集,由于该集合可被解释为逻辑编程语言 PROLOG 中的程序,学习的过程常被称为归纳逻辑程序( ILP )。 PROLOG 是一个与通用图灵机等价的编程语言。 学习规则集合的一种方法是学习决策树,然后转化为等价的规则集合;或者是遗传算法中,用位串编码每个规则集合,然后用遗传搜索算子来探索整个假设空间。 在一阶规则学习中直接学习规则,如: IF Parent(x,y) THEN Ancestor(x,y) IF Parent(x,z) and Ancestor(z,y) THEN Ancestor(x,y) 以上两条规则紧凑地描述了一个递归函数,很难用决策树或者其他的命题方法表示,决策树一般只能学到特殊的规则。

Page 26: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

序列覆盖算法 该算法学习规则集的策略为:学习一个规则,移去它覆盖的数据,再重复这一过程,被称为序列覆盖 (sequential covering) 算法。 假设已有一个子程序 LEARN-ONE-RULE,它的输入为正例和反例,然后输出单个规则,它能够覆盖许多正例而覆盖很少的反例。要求有较高的精确度,但是不必有较高的覆盖度。 在所有可用训练样本上执行 LEARN-ONE-RULE 子程序,再移去由其学习到的规则覆盖的正例,然后在剩余的训练样本上执行,学习第二个规则。 该过程重复多次,直到最后学习到析取规则集。它们共同覆盖正例,覆盖程度达到所希望的比例。 将学习析取规则集的问题化简为一系列更简单的问题,每个子问题只需要学习单个合取规则。贪婪搜索,没有回溯,结果不一定最佳。

Page 27: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

LEARN-ONE-RULE

实现 LEARN-ONE-RULE 的一个有效途径是将假设空加搜索过程设计成与 ID3 算法相似的方式,但是每一步只沿着最有希望的分支进行。

搜索开始于最一般的规则前件,然后加入那些在训练样例上性能改进最大的属性测试。然后重复该过程,贪婪地加入第二个属性测试,依此类推。

每个合取假设对应于待学习规则的候选前件集合,由其覆盖的样例的熵来评估。

Page 28: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

FOIL(Quinlan,1990)

序列覆盖和 LEARN-ONE-RULE 算法在一阶表示上的自然扩展。 FOIL 学习的假设为一阶规则集的子集,类似 Horn 子句,但有两

个不同:文字不允许含有函数符号(减小了假设空间搜索的复杂度);规则体中的文字可为负文字。

可以学习快速排序算法 QUICKSORT 的递归定义,以及学习从合法棋盘状态中区分出非法状态。

FOIL 算法由两层循环构成,外层循环对应于序列覆盖算法,每次学习一个新规则,将此规则覆盖的正例移去,再学习下一规则。内层循环是 LEARN-ONE-RULE 的另一种形式。

Page 29: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

lesLearned_Ru}PosNewRule{-PosPos

NewRuleRules LearnedlesLearned_Ru NewRuleNewRuleNegNewRuleNeg

NewRulealBest_liter

),(_max argalBest_liter PredicatesNewRuleLiteralsCandidate_

NewRule NewRuleNeg

NegNewRuleNeg dicateTarget_preNewRule

{}__arg_arg

),Pr,_arg(

_

返回成员覆盖的被

前件的子集中满足的前件加入到把

生成候选新文字,基于对增加新文字以特化

不空,执行如下操作:当

规则没有前件的谓词学习

不空时,做如下操作:当

的成员为中的成员为中

NewRuleLGainFoil

NewRulePos

rulesLearnedFalsepredicateetTExamplesNegTruepredicateetTExamplesPos

ExamplesedicatespredicateetTFOIL

literalsCandidateL

Page 30: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

候选特化式的生成

上述两种文字的否定

为规则中已有的变量其中是当前规则中已有的。

中至少一个变量必须则中已有的变量。可为新变量,也可为规即并且中出现的任意谓词名,为在其中

合下列形式的新文字特化式的方法是考虑符中生成该规则的候选字,为当前规则前件中的文其中

规则为:更精确地讲,假定当前加到规则前件中。,每个都可以被单独地生成多个不同的新文字

.3

,),x,Equal(x .2

Pr),,...,( .1:

......),...,,(

kj

1

1

1

121

kj

i

ir

n

n

nk

xx

vvedicatesQvvQ

LFOILLL

LLxxxP

Page 31: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

])log[]log([

)log(log),(

,

11

12

00

02

00

02

11

12

npp

npp

t

npp

npp

tRLGain

LR

为新文字为当前某条规则

信息增益:

编码正例所需的最小位数 , 随着规则越来越强 , 所需位数越来越少

10

10

nn

pp

LRR

负例

正例

没有意义不大可能限制过强个

负例正例负例正例

负例负例正例正例

t

LR

R

Page 32: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006空规则 , 对于一切 x,y,都有 daughter(x,y) 成立

Page 33: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

左图是一个有向图;下图是在命题逻辑中表示“two nodes are linkedto Each other” 的概念。

Page 34: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

Page 35: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

Page 36: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

Page 37: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

8,7,6,7,8,6,6,4,5,4,4,3,2,3

,2,1,3,0,1,0:

Page 38: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

,...5,,...8,,...2:

Page 39: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

注:到此已学习到所有正样本,而且不覆盖负样本,算法结束。

Page 40: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

FOIL 的特点 搜索子句的过程完全由数据驱动,不需要逻辑证明。 采用贪婪搜索策略,且每次只考虑当前的一个最优解。 可以使用递归定义,但会出现无限递归,无法彻底避免。 采用 function-free Horn 子句,限制了表达能力。 无法假设新的谓词,但 INDUCE(Michalski,1980) 和 GI

GOL (Muggleton and Buntine,1988) 中有引入新谓词的机制,当该谓词对简化定义有帮助时。

Page 41: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

小结 逻辑仅仅是一种表达语言,真正的人工智能必须

能理解语义,我们在选择背景知识,假设空间和搜索路径时其实已经把语义隐含其中。

ILP 研究领域中的问题和我们目前碰到的问题不同, ILP 中的数据形式复杂,但是规则相对简单,往往可以加入领域知识,而且可以被人理解。

Page 42: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

关系学习中的概率方法

Page 43: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

BLP, Bayesian

Networki.i.d

s概率方法:直接或间接对类概率密度做估计以下重点介绍其中一种:即:Bayesi an Logi c Networks可看作

的一阶逻辑扩展。每个变量由其他几个变量直接影响,即不需要做 假设。

结构估计

参数估计

两个步骤: 领域知识已知时 , 往往可以确定结构 , 这时估计参数就可以了 , 但尽管如此 , 仍是一个 NP 难题 , 只能得到近似最优解

Page 44: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

。估计参数就会错过真相的父亲,在这个基础上

结构中认为是决定于他而不是父亲,如果指定

,更多地决定于他的爷爷例如:男子是否会秃顶

:有时会得到错误的结论而且指定结构有风险,

Page 45: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

血型 M- 染色体P- 染色体

污染

血型

M- 染色体P- 染色体

血型

M- 染色体P- 染色体

结果

母亲父亲

测试

条件概率密度CPD

Page 46: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

Bayesian Logic Programs

BLPs 的构成: 一个由 Bayesian 子句构成的有限集。 每个 Bayesian 子句上都定义一个条件转移概率。

proper random variables: LH(B).

dependency graph.

CPDs.

( ) ( ( ) | ( ))cpd c P head c body c

Page 47: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

Bayesian Logic Programs

把每个基本原子映射成随机变量,且该映射是一一的。

分为参数学习和结构学习两部分。 输入是数据和初始的贝叶斯网络(需要细化)。 以下是例子。

Page 48: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

Bayesian Logic Programs

Page 49: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

Bayesian Logic Programs

Page 50: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

Bayesian Logic Programs

Page 51: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

Bayesian Logic Programs

Page 52: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

Bayesian Logic Programs

Page 53: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

Bayesian Logic Programs

Page 54: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

Bayesian Logic Programs

Page 55: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

总结

Page 56: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

如: 给出 个样本,每个样本都由这六个量(对象,

对象间的关系,类别)描述,此处假设了样本长度相等。

目标是学出 , 此处 是映射,不是狭义上的函数。

每个 由一系列的属性 描述。

1 2 3 1 2 2 3, , , ( , ), ( , )o o o R o o Q o o yn

1 2 3( , , , , )y f o o o R Q f

(1) (2) ( ( )), ,...,i i i ix x x io

关系学习问题的实质

Page 57: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

假设样本间满足 i.i.d., 则不会涉及到 ,所以很难直接应用关系代数。 除了一些很特殊的问题,如: Bongard 问题, 其中每个样本都具有形式: 每个样本的 n 不必相等, .

( , ), ( , ), ( , )......R a b R b c R c d

1 2 1 2 1, ,... , ( , ), ( , ),n n nx x x Inside x x Inside x x y

( , )ix triangle circle

关系学习问题的实质

Page 58: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

关系学习问题的实质 一般的关系学习问题就是给出 n 个样本,每个都由下式描述: 每个 由一些属性描述: 目标是找到映射关系。 注意: 是建立在对象上的,不是建立在对象的属性上的,它们反映了对象的其他属性。(请看下页的例子)

1 2 ( ), ,... , ( , ),..., ( , )m n k l p qo o o R o o Q o o y

io (1) (2) ( ( )), ,...,i i i ix x x

,......,R Q

Page 59: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006举例: Bongard 问题(分类) 给定若干正负样本,目标规则:如果有一个红色

的圆套在一个蓝色的方形内,则该样本是正样本。

Page 60: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006举例: Bongard 问题(分类)

注:没有写出的谓词取值为 False.

1

2

3

4

1 2 2 3 3 4

1: , ;: , ;: , ;: , ;

( , ), ( , ), ( , )

o circle redo square redo square blueo circle yellowinside o o inside o o inside o o

样本:+

Page 61: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006举例: Bongard 问题(分类)

1

2

3

1 2 2 3

2: , ;: , ;: , ;

( , ), ( , )

o circle blueo circle redo square blueinside o o inside o o

样本 :+

Page 62: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006举例: Bongard 问题(分类)

1

2

3

1 2 2 3

3: , ;: , ;: , ;

( , ), ( , )

o square blueo circle redo square blueinside o o inside o o

样本 :+

Page 63: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006举例: Bongard 问题(分类)

1

2

1 2

4: , ;: , ;

( , ).

o circle blueo circle blueinside o o

样本 :-

Page 64: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006举例: Bongard 问题(分类)

1

2

3

1 2 2 3

5: , ;: , ;: , ;

( , ), ( , )

o circle redo square greeno square redinside o o inside o o

样本 :-

Page 65: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006举例: Bongard 问题(分类)

1

2

3

2 3

6: , ;: , ;: , ;

( , )

o circle redo circle blacko square blueinside o o

样本 :-

Page 66: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

Bongard 问题的涵义 是建立在 之间,但却不是建立在 的

属性(形状,颜色)之间。 其实是建立在一个“隐空间”上(坐标),

这也正是为什么谓词不能由函数替代 。 人类可以知道该空间是什么(根据我们的先验知

识),计算机却无法理解,无法直接对 计算,因此才需要引入一阶逻辑(也就是谓词)。

inside ,i jo o ,i jo o

inside

inside

Page 67: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

一阶逻辑带来了什么?便于人理解,从人的角度抓住了问题的本质,数

据提供,结果解释都很方便。适合人的不一定适合计算机,如上例中计算机无

法真正理解 的语义,因为要理解语义,就必须有“隐空间”,这正是我们无法提供的。

人:难度低;计算机:难度高inside

Page 68: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

提供“隐空间”? 一般会变得更难。采用 ,我们其实是暗示给计算机解决问题

的思路,否则它还得从数据中提取出类似于 的一种表达(要耗费大量计算,而且不一

定能成功)。而且结果不易解释。 人:难度高 计算机:难度高

inside

inside

Page 69: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

关键 是否存在一种中间地带,使得计算机和人类对问

题的理解一致,让计算机学会人处理问题的方式? 人:难度低 计算机:难度低

Page 70: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

关系学习的难点认知心理学理论:有效解决问题往往需要加领域特异性知识。

与 空间中的机器学习相比,关系学习中不易加入领域特异性知识。

nR

Page 71: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

几何-- 空间的领域特异性知识 在 空间的机器学习问题中,我们可以充分利用几何直观,一切抽象方法都建立在几何直观的基础上。( SVM ,流形,统计方法,甚至是神经网络)。由此来设计可以在计算机上运行的算法。

几何直观也是一种领域特异性知识,因为我们生活在 空间内,导致数学建立在 空间上,所以我们没有意识到这种特异性。

nR

nR

3R nR

Page 72: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

关系学习的难点(续) 但是在 relational learning 中我们失去了先天的

优势(想象一下人来求解 Bongard Problem,当每个样本中对象数目巨大时),只能无目的地搜索,又如何能去指导计算机?

Page 73: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

人如何解决关系学习的问题? 一个小游戏:红色区域内的数字应该是几?

Page 74: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

我是如何解决该问题的 “ 一些多边形,有凸有凹,莫非是多边形边

数?” “ 不对。。。,想想也不会这么简单” “5 出现的地方是最零乱的地方。” 发呆 5 分钟。。。做了一系列错误尝试。 “ 原来是这样!”

Page 75: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

启示 人在解决问题时首先会对问题做表征,不同的表征会对应不同的解决策略,然后在“策略空间”搜索。

计算机科学:人首先把问题做好表征,选好解决策略,交给计算机处理。

机器学习:最好能由计算机根据数据性质选择解决策略。数据性质反映了数据的产生机理,与其对应的解决策略才能适应问题。

Page 76: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

启示 空间的机器学习:数据的分布特性可由统计方法得知:线性或非线性?分布的性质?然后选择问题求解策略:线性回归?树?流形?相应于数据的 kernel?

可以看到, 空间中的机器学习在逐渐把问题求解策略交给计算机来做,这样才是真正的机器学习。

关系学习:我把这堆数据告诉你,你去搜吧!

nR

nR

Page 77: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

启示因为没有通用的好的学习算法,因此需要让计算

机根据数据选择模型(问题求解策略)。 在 空间模型选择问题已经得到了广泛深入的研究,相比之下,关系学习中几乎没有人去研究。原因:需要多种领域特异性知识。而 空间中只有一种:几何。

nR

nR

Page 78: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

在关系学习中,我们失去了与生俱来的直观,使得问题求解策略选择变为一个难题。

如何对关系学习中的问题求解策略进行分类,并根据数据选择策略(如: 中的线性,非线性)

是这一领域发展的关键。否则关系学习将丧失理论价值,虽然很有实际意义。

nR

启示

Page 79: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

总结 本次讨论首先探讨了关系学习中存在的问题和难点,然后讨论了用于关系学习的逻辑方法和概率方法。 如前所述,要较好地解决关系学习中的问题需要考虑到领域特异性知识,概率方法就是这样一种尝试,但是目前概率方法只是用来做参数学习,而结构学习才是这个问题的本质所在。 不同的结构,不同的领域特异性知识如何整合在一起: Bongard 问题,邻域填数字问题,分子性质预测问题……

Page 80: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

总结 传统机器学习无法解决的问题都丢给关系学习。因此关系学习只是一个很模糊的概念,其中涵盖了很多不同的问题。如果要下手研究,必须要瞅准一个问题。

目前的逻辑和概率方法都试图用统一的一个方法解决所有关系学习问题,实不可取。

Page 81: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

总结另外两个研究方向因为时间所限没有介绍,即:

把问题命题化;把命题方法一阶逻辑化。请参阅参考文献 [1] 。

Page 82: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

现迈进了大大一步。

智能的实完美解决,我们向人工传统机器学习,如果能

本质不同于;另一方面,关系学习是一个亟待解决的问题

此关系学习了各种各样的结构,因现实世界中的问题充满

] et.al. [Giordanna

er test

2000

cov.4

.3

.2

.1

中有相变题,在不同于传统监督学习问

尚无有效算法

数据难于获得

大且复杂计算困难,假设空间巨

困难:

Page 83: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

文本和网络数据挖掘

,做出路线规划。来确定哪里是交通瓶颈

:车速,流量,拥挤度用摄象头测得路况信息

动力和交通工程

解性环境科学:预测生物降

团预测蛋白质结构和功能

质的致变异性,致癌性药物设计,预测化学物

生物信息学:

应用领域:

.4

.3

)deg(.2

.1

radabilitybio

Page 84: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

最新进展 --- 理论研究改进 ILP方法的效率 [Hendrik Blockeel, Luc Dehaspe, et al. ,2002] Propositionalization [Krogel ,et al.,2003;Pfahringer&Holmes,2003] 泛化 [Nicola Fanizzi, Stefano Ferilli ,2002] 复杂性 [Maloberti et.al ,2004] 概率方法 [Luc De Raedt,2004]

Page 85: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

最新进展 ---与其他方法的融合 Relational Markov Networks (RMNs) [Taskar et al. 2002] Relational dependency networks (RDNs) [Neville et.al, 2003, 2004] Autocorrelation & feature selection [Jensen et.al 2002,2003]

Page 86: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

最新进展 ---Statistical Relational learning

Page 87: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

2001. 52,-7 :43 Learning, Machine

learning.ent reinforcem Relational Driessens. K. and Raedt, de L. Dzeroski, S. ]6[

2003. 16,-1 :5 ns,Exploratio SIGKDD

on,IntroductiAn :Mining Data Relational-Multi Dzeroski, Saso ]5[

161-139 5(1996)Research ceIntelligen

Artificial of JournalFunctions, of sDefinitionOrder -First Learning n,J.R.Quinla ]4[

266-239 ,5(1990),

Learning MachineRelations, From sDefinitionOrder -First Learning n,J.R.Quinla ]3[

7Berlin,198ringer,edition.Sp g,2ndProgrammin Logic of sFoundation J.Lloyd. ]2[

1Berlin,200Springer,, Mining Data RelationalLavra, Nada and Dzeroski Saso ]1[

参考文献:

Page 88: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

ce.Intelligen Artificialon ConferenceJoint nalInternatio EighteenthData,

Relational from Models lStatistica Learningon Workshop theof sProceeding

Survey, a And ClaimsFour : Learning Relational lStatisticaNeville,Jennifer [9]

430-415 4(2003)Research Learning Machine of JournalForward,Look

Longer a andBack Look Short A :ILP ,SrinivasanAshwin and Page David [8]

1307.-1300 pages 1999,August Sweden, Stockholm,

(IJCAI), ceIntelligen Artificialon ConferenceJoint nalInternatio16th theof

sProceeding, Models Relational ticProbabilis Learninget.al.,Friedman Nir ]7[

Page 89: 机器学习研究 第五讲:关系学习

中中国国科科学学院院自自动动化化研研究究所所

Machine Learning and Data Mining 2006Machine Learning and Data Mining 2006

谢谢大家,欢迎交流[email protected]