learning in rule - based recommendation systems

7
Hudli and Hudli 10/14/2015 Learning in Rulebased Recommendation Systems 1 Learning in Rule- Based Recommendation Systems SHRI NI DHI HUDLI * (WI TH ARVI ND HUDLI **) *UCLA. NO W AT APPLE , I NC. **MS RAMAI AH I NSTI TUTE O F TE CHNOLO GY, I NDI A Outline Problem description Rule-based systems Recommendation System appr oaches Lear ning Over r ides Implementation Discussion I E E E Software Technol ogy Conference, 2 01 5 2 Problem Description Learning in rule-based recommendation system General problem, but specific application to course recommendation systems Each year students choose (elective) courses for their curriculum Forces in play Inte re s t – pe rs o nal Pro po s e d plan o f s tudy Pre -re quis ite s Market opportunities De partme nt re quire ments Advis o r re c o mmendations Building a cour se r ecommendation system that addr esses all f or ces and also lear ns I E E E Software Technol ogy Conference, 2 01 5 3

Upload: others

Post on 22-Dec-2021

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Learning in Rule - Based Recommendation Systems

Hudli  and  Hudli 10/14/2015

Learning  in  Rule-­‐based  Recommendation  Systems 1

Learning in Rule-Based Recommendation SystemsSHRINIDHI HUDLI* (WITH ARVIND HUDLI**)

*UCLA. NOW AT APPLE , INC.**MS RAMAIAH INSTITUTE OF TECHNOLOGY, INDIA

Outline

u Problem descr iptionu Rule-based systemsu Recommendation System approachesu Learningu Overr idesu Implementation u Discussion

IEEE Software Technology Conference, 2015

2

Problem Description

u Learning in rule-based recommendation system u General problem, but specific application to course recommendation

systems

u Each year students choose (elective) courses for their curr iculumu Forces in play

u Interest – personalu Proposed plan of s tudy u Pre-requis itesu Market opportunities

u Department requirementsu Advisor recommendations

u Building a course recommendation system that addresses all forces and also learns

IEEE Software Technology Conference, 2015

3

Page 2: Learning in Rule - Based Recommendation Systems

Hudli  and  Hudli 10/14/2015

Learning  in  Rule-­‐based  Recommendation  Systems 2

Prior Worku Pr ior course recommendation systems were built on structural

relationship between courses and histor ical data*u Lee and Cho propose a system based on perceived importance of

courses , number of electives in department, etc.

u T. Denley's Degree Compass , uses s tudents past performance to match degree goals of s tudents

u Chu, et.al, propose a data mining and graph theoretic approach to course recommendation

u Chen, et.al. describe an approach based on fuzzy item response theory

u In our view, course selection is not entirely individualistic or autonomous like movie viewing or product purchases, as modeled by previous approachesu Course recommendations are subject to forces mentioned earlier

IEEE Software Technology Conference, 2015

4

*References to these in accompany ing paper

Solution Approach

u Use a knowledge-based system that encodes rules addressing forces determining a choiceu Build the initial knowledge system based on

input from experts

u Make course recommendations based on constraints satis faction

u Prioritize and prune recommendations

u To make them meaningful

u Learn based on feedback from recommendationsu Reinforce based on pos itive feedback

u Penalize based on negative feedback

IEEE Software Technology Conference, 2015

5

Knowledge Base

Input from experts

Recommendations

Feedback

Learning

Rule-based Systems

u System infers outcomes – recommendations in our case – based on rules in the knowledge-base

u Knowledge-base is the heart of rule-based systemsu Rule-engine’s inference process consists of match-select cycle of

rulesu Built on popular Rete Algorithm

u Rules are fired based matched based on constraints

u Known facts are matched with rules and chosen in a conflict setu Matching rules are chosen from the conflict set based on priority of rules

u We extend standard inference mechanism by making priority dynamic

IEEE Software Technology Conference, 2015

6

Page 3: Learning in Rule - Based Recommendation Systems

Hudli  and  Hudli 10/14/2015

Learning  in  Rule-­‐based  Recommendation  Systems 3

Rules in Rule-Based systems

u Rules are of the form u Left Hand Side (LHS) ⇒Right Hand Side (RHS)u LHS is a set of constraints , and RHS is inference if LHS is satisfiedu In a course recommendation system, LHS can capture interests , pre-requisites, prior-

course grades, conflicts , etc.u It is poss ible that more than one rule is applicable

u Rule-priorities and conflicts determine which rules will eventually apply u In a course-recommendation system, additional rules may have to be applied

based on departmental requirements

u For example a breadth requirement may force a particular course to be recommended even if some constraints are not satisfied – for example student’s interests

u Our system enhances the inferencing process

u Rule-engine match-select u Post-process ing match-select based on department’s mandatory requirements

IEEE Software Technology Conference, 2015

7

Recommendation Systemsu Recommendations are based on collaborative f ilter ing

u A mechanism where inputs from multiple users are used to make predictions for a given user

u The user in question’s profile and interests are used to filter choices of users with s imilar profile and interests

u We further refine and apply item-based collaborative f ilter ing u Recommendation of a given course may imply interest in another related

course

u We use course groups to either select or eliminate

u For example i f Software Metrics course i s recommended, we wi l l not recommend Quanti tati ve Project Management – i f only one course from a group can be chosen

IEEE Software Technology Conference, 2015

8

Recommendation System Types

u Memory-based u User data and actions are remembered and are used to establish

collaboration or correlation amongst other users

u Similarity measures such as Cosine Similarity, Jaccard coeffic ient are used to correlate users interests

u Model-basedu More flexible in recommending items a user or user group has never

encountered before u Uses probabilistic techniques ala Bayes ian Network or Latent Semantic Analys is

u Association Rulesu Recommendations are based on causal relationship between entities

u For example a course’s pre-requisites and student’s prior course work

u Hybrid approachu We use a hybrid approach and combine memory-based and association rules

in our recommendation subsystem

IEEE Software Technology Conference, 2015

9

Page 4: Learning in Rule - Based Recommendation Systems

Hudli  and  Hudli 10/14/2015

Learning  in  Rule-­‐based  Recommendation  Systems 4

Learning

u In our context of rule-based recommendation system, we use reinforcement learning u Reinforcement learning dynamically changes rule firing priorities

u Useful recommendations improve probability of s imilar future recommendations

u Not so useful recommendations – based on user feedback – reduce probability of s imilar future recommendations

u The system learns to avoid unnecessary biases to smoothen out probability adjustments u Penalties and rewards change s lowly and cons ider a wider user base

IEEE Software Technology Conference, 2015

10

Overrides

u The system must support overr ides from experts and departments

u For example the department may want students to “pick” courses like Java Programming or Big Datau Based on industry trend

u User interests or other factors influencing recommendations need to be overr idden if such courses are not chosen!

u We add a post-processing recommender to overr ide recommendations if necessaryu Override rules may be written to resolve conflicts and eliminate

collaborative filter based recommendation

IEEE Software Technology Conference, 2015

11

Implementation

u Web-based Student Course Recommendation Systemu Separation of user system from

recommendation system

u User Interaction System built with Python/Flask

u Rule-based recommender is built with a REST endpoint, allowing it to be used in different contexts (if needed)

u Built in Ruby and a 3rd party rule engine

IEEE Software Technology Conference, 2015

12

User InteractionSystem

Rule-basedRecommender

REST API

HTTP

Page 5: Learning in Rule - Based Recommendation Systems

Hudli  and  Hudli 10/14/2015

Learning  in  Rule-­‐based  Recommendation  Systems 5

Rule Engine Choices

u CLIPSu Class ic rule engine, firs t implemented by NASA in 1985

u Implemented in C u Not well-suited for web applications

u PyCLIPSu Python wrapper on CLIPS. Did not choose this either as it runs on Python 2.6

and our web component does not run on Python 2.6

u JBOSS Droolsu Very popular rule engine. DROOLS rules need to be compiled to Java each

time there is a change in rule. Less dynamic

u Ruleby ☑ ️u Full functionality of DROOLS and CLIPS and implemented in Ruby. Has a DSL

syntax which allows new rules to be dynamically created

IEEE Software Technology Conference, 2015

13

Rule Structure and Priorities

u Rules have two parts u Antecedent

u Conditions that must be satis fied to be selected. Conditions may be based on both user profile and user input. Certain courses may be offered only for certain majors or s tudents with certain interests

u Consequenceu Actions that will be performed if the antecedent is satis fied

u Pr ior ity that determines when a rule will be f iredu Priorities are generally s tatic, but in our case they are dynamically

determined and adjusted based on user feedback

u Expert or overr ide rules have the lowest pr ior ity, always 0u The rules will apply at last and have effect only if overrides are needed

IEEE Software Technology Conference, 2015

14

User Input

u User input comes in two formsu User interests

u General area interest - high interest in programming languages , low interest in theory

u Interest in related and pre-requisite courses

u User feedback

u User feedback for each course recommendation. This input is used for reinforcement learning

IEEE Software Technology Conference, 2015

15

Page 6: Learning in Rule - Based Recommendation Systems

Hudli  and  Hudli 10/14/2015

Learning  in  Rule-­‐based  Recommendation  Systems 6

Course Recommendatio ns

u Courses may have relations amongst them, such as mutually exclusive groupu At most only one course in the group would be recommended

u Example: Java Programming, C# Programming u Certain courses may be offered only for students at certain level

u Example - graduate courses, freshman courses, etc. u Course recommendations are grouped based on course groups

IEEE Software Technology Conference, 2015

16

Sample Rule

IEEE Software Technology Conference, 2015

17

rule :Java,{:priority => priority("CS516","1","Java")},[Student, :student, m.semester == 5] do |context|

s = context[:student](grade,interest) = s.pre_req("CS315")interests = Array.newinterests << s.interest("programmming")interests << s.interest("application")area_interests = interests.maxif (interest < 7 || area_interests < 50)

skip context[:student]else

if !$recommendedCourses.key?(s.name) $recommendedCourses[s.name] = Array.new

endelective = Hash.newelective["group"] = "1"elective["code"] = "CS514"elective["name"] = "Java"

$recommendedCourses[s.name] << elective if s.interested?("CS516")end

end

Override Rule

IEEE Software Technology Conference, 2015

18

rule :ExpertRecomendation74, {:priority => 0},[Student, :student, m.semester == 7] do |context|

s = context[:student]courses = $recommendedCourses[s.name]courses = Array.new if courses == nilalready_recommended = falsecourses.each {|c|

already_recommended = true if c["code"] == "CS715"}if already_recommended == false

elective = Hash.newelective["group"] = "4"elective["code"] = "CS715"elective["name"] = "Data Mining"s.add_expert_recommendation(elective)

endend

Page 7: Learning in Rule - Based Recommendation Systems

Hudli  and  Hudli 10/14/2015

Learning  in  Rule-­‐based  Recommendation  Systems 7

Learning-based adjustment of priorities

u Rules are f ired based on pr ior ities u Pr ior ities are adjusted based on reinforcement learning

u Positive feedback increases pr ior ity of corresponding rule u Negative feedback decreases pr ior ity of corresponding rule

u Rewards and penalties can be adjusted with different coefficients

IEEE Software Technology Conference, 2015

19

Results

IEEE Software Technology Conference, 2015

20

u The course recommendation system was used for undergraduate courses at Visvesvaraya Technological University

u Used for students in undergraduate computer science curr iculum u 600 s tudents

u Initial results were very encouraging u Further s tudy needed to determine effectiveness of recommendations

Discussion

u Reinforcement learning in a rule-based course recommendation systemu Recommender is a hybrid recommender us ing memory-based and

association rules methods

u Rule engine has dynamic priority of rules , allowing learning to influence rule matches and selection

u Expert rules to override recommendations if necessary, with a s tatic priority of 0, always fired last

u Future work will incorporate dynamic addition of rules either by added by the user or generated by the system while learning

IEEE Software Technology Conference, 2015

21