Presentation is loading. Please wait.

Presentation is loading. Please wait.

CPSC 422, Lecture 19Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 19 Feb, 27, 2015 Slide Sources Raymond J. Mooney University of.

Similar presentations


Presentation on theme: "CPSC 422, Lecture 19Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 19 Feb, 27, 2015 Slide Sources Raymond J. Mooney University of."— Presentation transcript:

1 CPSC 422, Lecture 19Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 19 Feb, 27, 2015 Slide Sources Raymond J. Mooney University of Texas at Austin D. Koller, Stanford CS - Probabilistic Graphical Models D. Page, Whitehead Institute, MIT Several Figures from “Probabilistic Graphical Models: Principles and Techniques” D. Koller, N. Friedman 2009

2 CPSC 422, Lecture 19Slide 2 Clinical Intelligence Tech Talk by Vikas Chowdhry Tuesday, March 3 rd @ 5:30pm, Hugh Dempster Pavilion, Room # 110 Clinical Intelligence is a rapidly growing and evolving field that uses data to improve healthcare outcomes. In this presentation, Vikas shares specific examples in which analytical and quantitative methods were used to accomplish objectives as diverse as predictive modeling for patient mortality, measuring differences in the quality of healthcare across regions, and assessing the effectiveness of process improvements in clinical workflows. They will also discuss the future of healthcare analytics and how both providers and Epic are leveraging the fields of big data, predictive modeling, and expert systems to improve healthcare. Epic makes software for mid-size and large medical groups, hospitals, and integrated healthcare organizations. More than 180 million patients worldwide, including 54% of the U.S. population, are covered by Epic’s software. Visit epic.com for more information, and careers.epic.com for career opportunities.epic.comcareers.epic.com

3 CPSC 422, Lecture 193 Lecture Overview Recap: Naïve Markov – Logistic regression (simple CRF) CRFs: high-level definition CRFs Applied to sequence labeling NLP Examples: Name Entity Recognition, joint POS tagging and NP segmentation

4 Let’s derive the probabilities we need CPSC 422, Lecture 18Slide 4 Y1Y1 X1X1 X2X2 … XnXn

5 Naïve Markov Parameters and Inference CPSC 422, Lecture 19Slide 5 Y1Y1 X1X1 X2X2 … XnXn

6 Let’s generalize …. Assume that you always observe a set of variables X = {X 1 …X n } and you want to predict one or more variables Y = {Y 1 …Y k } A CRF is an undirected graphical model whose nodes corresponds to X ∪ Y. ϕ 1 (D 1 )… ϕ m (D m ) represent the factors which annotate the network (but we disallow factors involving only vars in X – why?) CPSC 422, Lecture 19 6

7 7 Lecture Overview Recap: Naïve Markov – Logistic regression (simple CRF) CRFs: high-level definition CRFs Applied to sequence labeling NLP Examples: Name Entity Recognition, joint POS tagging and NP segmentation

8 Sequence Labeling Linear-chain CRF Y2Y2 X1X1 X2X2 … XTXT Y1Y1 YTYT.. CPSC 422, Lecture 19 Slide 8

9 Increase representational Complexity: Adding Features to a CRF 9 … X 1,1 X 1,m … X 2,1 X 2,m … X T,1 X T,m … … Instead of a single observed variable X i we can model multiple features X ij of that observation. Y1Y1 Y2Y2 YTYT CPSC 422, Lecture 19

10 CRFs in Natural Language Processing One target variable Y for each word X, encoding the possible labels for X Each target variable is connected to a set of feature variables that capture properties relevant to the target distinction CPSC 422, Lecture 19Slide 10 … X 1,1 X 1,m … X 2,1 X 2,m … X T,1 X T,m … … Y1Y1 Y2Y2 YTYT Does the word end in “ing”? Is the word capitalized? X 1,2 X 2,1

11 Name Entity Recognition Task Entity often span multiple words “British Columbia” Type of an entity may not be apparent for individual words “University of British Columbia” Let’s assume three categories: Person, Location, Organization BIO notation (for sequence labeling) CPSC 422, Lecture 19Slide 11

12 Linear chain CRF parameters With two factors “types” for each word CPSC 422, Lecture 19Slide 12 Dependency between neighboring target vars Dependency between target variable and its context in the word sequence, which can include also features of the words (capitalized, appear in an atlas of location names, etc.) Factors are similar to the ones for the Naïve Markov (logistic regression)

13 Features can also be The word Following word Previous word CPSC 422, Lecture 19 Slide 13

14 More on features CPSC 422, Lecture 19Slide 14 Total number of features can be 10 5 -10 6 However features are sparse i.e. most features are 0 for most words Including features that are conjunctions of simple features increases accuracy

15 Linear-Chain Performance Per-token/word accuracy in the high 90% range for many natural datasets Per-field precision and recall are more often around 80- 95%, depending on the dataset. Entire Named Entity Phrase must be correct Slide 15 CPSC 422, Lecture 19

16 Skip-Chain CRFs Include additional factors that connect non-adjacent target variables E.g., When a word occur multiple times in the same documents CPSC 422, Lecture 19Slide 16 Graphical structure over Y can depend on the values of the Xs !

17 Coupled linear-chain CRFs Performs part-of-speech labeling and noun- phrase segmentation CPSC 422, Lecture 19Slide 17 Linear-chain CRFs can be combined to perform multiple tasks simultaneously

18 Coupled linear-chain CRFs Performs part-of-speech labeling and noun- phrase segmentation CPSC 422, Lecture 19Slide 18 Linear-chain CRFs can be combined to perform multiple tasks simultaneously

19 Forward / Backward / Smoothing and Viterbi can be rewritten (not trivial!) using these factors CPSC 422, Lecture 1919 Then you plug in the factors of the CRFs and all the algorithms work fine with CRFs! Inference in CRFs

20 CRFs Summary Ability to relax strong independence assumptions Ability to incorporate arbitrary overlapping local and global features Graphical structure over Y can depend on the values of the Xs Can perform multiple tasks simultaneously Standard Inference algorithm for HMM can be applied Practical Leaning algorithms exist State-of–the-art on many labeling tasks See MALLET package CPSC 422, Lecture 1920

21 Probabilistic Graphical Models CPSC 422, Lecture 19Slide 21 From “Probabilistic Graphical Models: Principles and Techniques” D. Koller, N. Friedman 2009

22 422 big picture: Where are we? Query Planning DeterministicStochastic Value Iteration Approx. Inference Full Resolution SAT Logics Belief Nets Markov Decision Processes and Partially Observable MDP Markov Chains and HMMs First Order Logics Ontologies Temporal rep. Applications of AI Approx. : Gibbs Undirected Graphical Models Markov Networks Conditional Random Fields Reinforcement Learning Representation Reasoning Technique Prob CFG Prob Relational Models Markov Logics Hybrid: Det +Sto Forward, Viterbi…. Approx. : Particle Filtering CPSC 322, Lecture 34Slide 22

23 CPSC 422, Lecture 19Slide 23 Learning Goals for today’s class You can: Provide general definition for CRF Apply CRFs to sequence labeling Describe and justify features for CRFs applied to Natural Language processing tasks Explain benefits of CRFs

24 Announcements Midterm Avg 73.5 Max 105 Min 30 If score below 70 need to very seriously revise all the material covered so far You can pick up a printout of the solutions along with your midterm. CPSC 422, Lecture 1924

25 Next class Mon Start Logics Revise Logics from 322! CPSC 422, Lecture 1925

26 26 Generative vs. Discriminative Models Generative models (like Naïve Bayes): not directly designed to maximize performance on classification. They model the joint distribution P(X,Y ). Classification is then done using Bayesian inference But a generative model can also be used to perform any other inference task, e.g. P(X 1 | X 2, …X n, ) “Jack of all trades, master of none.” Discriminative models (like CRFs): specifically designed and trained to maximize performance of classification. They only model the conditional distribution P(Y | X ). By focusing on modeling the conditional distribution, they generally perform better on classification than generative models when given a reasonable amount of training data. CPSC 422, Lecture 19

27 Naïve Bayes vs. Logistic Regression Y1Y1 X1X1 X2X2 … XnXn Y1Y1 X1X1 X2X2 … XnXn Naïve Bayes Logistic Regression (Naïve Markov) Conditional Generative Discriminative CPSC 422, Lecture 19Slide 27

28 Sequence Labeling Y2Y2 X1X1 X2X2 … XTXT HMM Linear-chain CRF Conditional Generative Discriminative Y1Y1 YTYT.. Y2Y2 X1X1 X2X2 … XTXT Y1Y1 YTYT CPSC 422, Lecture 19 Slide 28


Download ppt "CPSC 422, Lecture 19Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 19 Feb, 27, 2015 Slide Sources Raymond J. Mooney University of."

Similar presentations


Ads by Google