USING DOMAIN KNO WLEDGE IN Analytical Carolina

21

Transcript of USING DOMAIN KNO WLEDGE IN Analytical Carolina

USING DOMAIN KNOWLEDGE INMACHINE LEARNING�

Inductive vs� Analytical Learning

Carolina Ruiz

Motivation

Inductive Learning

induction

Examples ��������������������� hypothesis

�� Prior Knowledge� �generalization�

� Statistical reasoning is used to identify featuresthat empirically distinguish

Mfrom

Kexamples�

�e�g� decision trees� NNs� ILP� GAs�

� Fundamental bounds on accuracy depend on num�ber of training examples�

Analytical Learning

deduction

Examples ��������������������� hypothesis

� Prior Knowledge �generalization�

� Logical reasoning is used to identify features thatdistinguish

Mfrom

Kexamples�

�Works well even when training examples are scarce�

Inductive � Analytical Learning

� Combines the best of both worlds

Learning

Learning is to improve with experience at some task

Learning from Examples� Inductive Learning

� Given� A set of training examples

hx�� f�x��i� � � � hxn� f�xn�i

� Find� A hypothesis h de�ned over the whole spaceof instances that coincides with f over the trainingdata� i�e� h�xi� � f�xi� for all � � i � n�

Learning from Examples and Prior Knowledge

� Given� A set of training examples

hx�� f�x��i� � � � hxn� f�xn�i� and

a set B of rules expressing prior knowledge

� Find� A hypothesis h de�ned over the whole spaceof instances s�t�

B � h � xi � f�xi� for all � � i � n�

Part �� Motivation

Inductive Learning

induction

Examples ��������������������� hypothesis

�� Prior Knowledge� �generalization�

� Statistical reasoning is used to identify featuresthat empirically distinguish

Mfrom

Kexamples�

�e�g� decision trees� NNs� ILP� GAs�

� Fundamental bounds on accuracy depend on num�ber of training examples�

�When the output hypothesis is a set of rules thenthis learning is called Inductive Logic Program�ming �ILP�

� ILP� uses prior knowledge to augment the inputdescription of instances �which increases the com�plexity of the hypothesis space��

Inductive Logic Programming

INDUCTIVE LOGIC PROGRAMMING

� �

INDUCTIVE MACHINE LEARNING COMPUTATIONAL LOGIC

From Inductive Machine Learning� inherits its goal�s��

� to develop tools and techniques to induce hypothe�ses from observations �examples�� or

� to synthesize new knowledge from experience�

From Computational Logic� inherits�

� ability to overcome limitations of classical induc�tive learners�

�� use of limited knowledge representation formal�ism �e�g� propositional logic�

� inability to use substantial domain knowledgeduring learning process�

� theory� orientation� and techniques

� interest in properties of rules� convergence �sound�ness and completeness� of algorithms� computa�tional complexity�

EXAMPLE �taken from Luc De Raedt andNada Lavrac� �����

Given �

� a set of examples DM

� f flies�tweety� gK

� �

� a background theory B

bird�tweety�bird�oliver�

Find �

� a hypothesis h that explains the examples D w�r�t�B�

h � f flies�X�� bird�X� g�

EXAMPLE �taken from Luc De Raedt andNada Lavrac� �����

Given �

� a set of examples D

M�

�������sort���� ���sort�� �� ��� �� � ���

K�

�������sort�� ��� ���sort��� �� �� � �� ���

� a background theory B

B �

�������permutation�sorted��

Find �

� a hypothesis h that satis�es the language bias andexplains the examples D w�r�t� B�

h � fsort�X� Y �� permutation�X�Y ��sorted�Y �g�

Sequential Covering Template

Given a set of examplesM�K

�� learned�rules �� fg

� while there are examples still to be explained do

�a� rule �� Learn�one�rule

�b� remove from examples those explained by rule

�c� learned�rules �� learned�rules � rule

�� Output learned�rules

ILP implementations of Learnonerule

General to Specic Search �top down� e�g� FOIL

�� Start with the most general clause

e�g� sort�X� Y ��

� specialize the rule by adding the best possible lit�eral to the body of the rule

e�g� sort�X�Y �� permutation�X�Y �

until the hypothesis entails noK

examples en�suring that hypothesis entails at least a thresholdnumber of

Mexamples�

Specic to General Search �bottom up� e�g� GOLEM

�� Start with the most speci�c clause that implies agiven example

� generalize

�� until the hypothesis cannot be further generalizedwithout implying negative examples�

Searching for the best literal � Foil �Quinlan���� �

Candidate Literals� All literals that can be constructedusing predicates and terms that appear in B and orin the examples�

Evaluation Function� Foil�s information�based no�tion of gain

Note� This search can be computationally explosive

Important� to prune the search space�

Matthew Berube�s MQP �advised by C� Ruiz and S�Alvarez� prunes the search space by using type in�formation making FOIL applicable to some large do�mains�

Summarizing Inductive Learning

� Uses statistical inference to compute a hypothesis that�t the data

� Uses background knowledge to augment the input de�scription of instances �which may increase the com�plexity of the hypothesis space��

� Requires little background knowledge

� Requires large amounts of training data

��

Part II� Motivation

Analytical Learning

deduction

Examples ��������������������� hypothesis

� Prior Knowledge �generalization�

� Logical reasoning is used to identify features thatdistinguish

Mfrom

Kexamples�

�Works well even when training examples are scarce�

� Analytical Learning Method� Explanation�BasedLearning �EBL�

� EBL� uses prior knowledge to reduce the complex�ity of the hypothesis space and to improve the ac�curacy of the output hypothesis�

� Prior Knowledge is assumed to be correct and com�plete

��

Analytical Learning

The Analytical Learning Task�

� Given� A set D of training examples hxi� f�xi�i

and Background Knowledge B �represented as aset of rules Horn clauses�

� Find� a hypothesis h such that�

�� D �B � h

� for all � � i � n� h � xi � f�xi�

Part ��� above reduces the size of the hypothesis space and

makes the output hypothesis more accurate�

Assumptions� The background knowledge is

Correct� each of its assertions is a truthful statementabout the world

Complete� every instance that satis�es the targetconcept can be proven by the domain knowledgeto satisfy it�

Are these reasonable assumptions� Why bother learn�ing if the background knowledge is already complete�

��

Analytical Learning � Motivation

� Chess example �taken from Mitchell�s book�

� Many features are present� Prior knowledge helps ustell apart relevant features from irrelevant ones�

� For the chess domain� it is easy to write down rulesthat completely describe all legal moves� but it is veryhard to write down rules that completely describe anoptimal move strategy�

��

EBL� An Analytical Learning Method

EBL� Explanation�Based Learning

� Prior knowledge is used to construct an explanation proofof each example �which is expressed as a Horn rule�

� this explanation is used to distinguish between therelevant features of the training example and the ir�relevant ones

� the explanation �rule� is generalized to the extent pos�sible and added to the current hypothesis �set of rules�

��

PrologEBG� An EBL System �KedarCabelli� McCarty� �����

� representative of several EBL algorithms

� guaranteed to output a hypothesis that is correct andcovers the positive training examples

� sequential covering algorithm�

�� hypothesis �� fg

� For each positive training example not explainedby hypothesis do

�a� Explain� using the background knowledge� whythe example satis�es the target concept�uses Prolog�s backtracking�

�b� Analyze the explanation to determine the mostgeneral conditions under which the explanationholds�uses regression�

�c� Rene the hypothesis by adding this explana�tion to it�

�� Output hypothesis

��

PrologEBG� Example �taken from Mitchell�sbook�

��

EBL� Di�erent Perspectives

� Using the background knowlede to generalize the training examples

rational logical generalization

� Using the training examples to reformulatethe background knowledge

reformulating B into a more operational form

rules in the hypothesis classify an instance in a singleinference step � knowledge compilation

� Using B and D to restate what the learneralready knows

di�erence between what one knows in principle andwhat one can e�ciently do in practice

��

Summarizing Analytical Learning

� Uses logical deduction to compute a hypothesis that�t the data and the background knowledge

� Uses background knowledge to augment the informa�tion provided by the training data �which decreasesthe size of the hypothesis space��

� Requires correct and complete background knowledge

� Does well on scarce data

��

PART III� Motivation

Inductive � Analytical Learning

induction � deduction

Examples ��������������������� hypothesis

�� Prior Knowledge� �generalization�

The Learning Task�

� Given� A set D of training examples hxi� f�xi�i

and Background Knowledge B �represented as aset of rules Horn clauses�

� Find� a hypothesis h that best �ts D and B�

Assumptions�

Data� May contain errors� may be scarce

Prior Knowledge� If available� it may be incorrector incomplete

Goal� Do better than inductive or analytical learningalone

Inductive � Analytical Search for h

� Use B to derive an initial hypothesis fromwhich to begin the search

e�g� KBANN �Shavlik � Towell ����

� Use B to rene the hypothesis search space

e�g� EBNN �Mitchell � Thrun ���� Matt Berube�s MQP

� Use B to alter the available search steps

e�g� FOCL �Pazzani et al� ����

��