72
MACHINE LEARNING APPLICATIONS IN MEDICINE Olga Senyukova Graphics & Media Lab Faculty of Computational Mathematics and Cybernetics Lomonosov Moscow State University

Machine Learning Applications in Medicine (Olga Senyukova)

Embed Size (px)

Citation preview

Page 1: Machine Learning Applications in Medicine (Olga Senyukova)

MACHINE LEARNING APPLICATIONS

IN MEDICINEOlga SenyukovaGraphics & Media Lab

Faculty of Computational Mathematics and Cybernetics

Lomonosov Moscow State University

Page 2: Machine Learning Applications in Medicine (Olga Senyukova)

Medical data

Medical images

Physiologic signals

Other: narrative, textual, numerical, etc.

Page 3: Machine Learning Applications in Medicine (Olga Senyukova)

Medical data

Medical images

Physiologic signals

Other: narrative, textual, numerical, etc.

Page 4: Machine Learning Applications in Medicine (Olga Senyukova)

Medical images

X-Ray MRI

CTUltrasound

Page 5: Machine Learning Applications in Medicine (Olga Senyukova)

Computed tomography (CT)

1972, Sir Godfrey Hounsfield X-rays are computer-processed to

produce tomographic images

https://en.wikipedia.org/wiki/CT_scan

Page 9: Machine Learning Applications in Medicine (Olga Senyukova)

Electrocardiography (ECG)

1901, Einthoven Recording of the electrical activity of the

heart by electrodes placed on the body

intensivecarehotline.com

Page 10: Machine Learning Applications in Medicine (Olga Senyukova)

RR time series

RR time series (interbeat intervals lengths) are widely used for ECG analysis

www.elsevier.es

Page 11: Machine Learning Applications in Medicine (Olga Senyukova)

Human gait time series

reylab.bidmc.harvard.edu

Page 12: Machine Learning Applications in Medicine (Olga Senyukova)

Analysis: what for?

Normal or diseased? Where is the diseased

area? What changes over time

occur (especially, after treatment)?

Does the specific condition take place (e.g. overtraining of the sportsman)?

www.fresher.ru

Page 13: Machine Learning Applications in Medicine (Olga Senyukova)

Main tasks: images

Detection

aneurysm

Segmentation

TMatching (Registration)

Page 14: Machine Learning Applications in Medicine (Olga Senyukova)

Main tasks: physiologic signals

Diagnostics Healthy

Disease XXX

Disease YYY

Template MatchingCondition ZZZ

The same or not???

Page 15: Machine Learning Applications in Medicine (Olga Senyukova)

Machine learning in medical imaging:challenges

Slide by D. Rueckert

Images are often 3D or 4D: # of voxels and # of extracted features is

very large Number of images for training is often

limited: large datasets means typically 100 to 1000

images “small sample size problem”

Page 16: Machine Learning Applications in Medicine (Olga Senyukova)

Machine learning in medical imaging:challenges

Training data is expensive annotation of images is resource intensive

(manpower, cost, time) sometimes possible to augment training

using unlabelled images Training data is sometimes imperfect training data may be wrongly labelled e.g. diseases such as Alzheimer’s require

confirmation through pathology (difficult and costly to obtain)

Slide by D. Rueckert

Page 17: Machine Learning Applications in Medicine (Olga Senyukova)

The InnerEye project

Measuring brain tumors

Localizing and identifying vertebrae

Kinect for surgery

Source: A. Criminisi & the InnerEye team @ MSRC

Page 18: Machine Learning Applications in Medicine (Olga Senyukova)

Anatomy localization via regression forests

A. Criminisi, et al. Med Image Analysis 2013

Page 19: Machine Learning Applications in Medicine (Olga Senyukova)

Decision forests

Leo Breiman, 2001 A. Criminisi, J. Shotton (eds.). Decision

Forests in Computer Vision and Medical Image Analysis // Advances in Computer Vision and Pattern Recognition. 2013

Decision forest consists of decision trees…

Page 20: Machine Learning Applications in Medicine (Olga Senyukova)

Decision tree

Each internal node: a split (test) function Each leaf: class label (predictor)

Source: A. Konushin

Page 21: Machine Learning Applications in Medicine (Olga Senyukova)

Regression tree

input value

conti

nuous

label

• Green – high uncertainty• Red – low uncertainty• Thickness – the number of

samples from the training setSource: A. Criminisi, J. Shotton

Page 22: Machine Learning Applications in Medicine (Olga Senyukova)

Regression tree: training

• S0 – whole training set• Sj – part of training set at the jth node

))(,;(~)|( 2 xyyNxyp y

Source: A. Criminisi, J. Shotton

Page 23: Machine Learning Applications in Medicine (Olga Senyukova)

Regression tree: training

Split function parameters at the jth node maximize the information gain

At each part (L,R): fit a line to the points (e.g. least squares) for each x we have ))(,;(~)|( 2 xyyNxyp y

),(maxarg jj SI

j

jijSyx RLi Syx

yy xxI),( },{ ),(

))(log())(log(

y– green line Source: A. Criminisi, J. Shotton

Page 24: Machine Learning Applications in Medicine (Olga Senyukova)

Example

Source: A. Criminisi, J. Shotton

Page 25: Machine Learning Applications in Medicine (Olga Senyukova)

Example

Source: A. Criminisi, J. Shotton

Page 26: Machine Learning Applications in Medicine (Olga Senyukova)

Different models

Predictor models

Constant Polynomial and linearProbabilistic linear

Weak learners (split functions)

Axis-aligned Generic oriented

hyperplane

Conic sectionSource: A. Criminisi, J. Shotton

Page 27: Machine Learning Applications in Medicine (Olga Senyukova)

Regression forest

ddxx ),...,( 1v

Source: A. Criminisi, J. Shotton

Page 28: Machine Learning Applications in Medicine (Olga Senyukova)

Randomness

Bagging: each tree is learned on subset of the whole training set

Page 29: Machine Learning Applications in Medicine (Olga Senyukova)

Randomness

Randomized node optimization: optimize a split function at the jth node w.r.t. a small random subset of parameter values

),(maxarg jj SI ),(maxarg jj SI

j!!!

j

),,( jjjj τ jjjτ

selects features from the whole feature setis a weak learner type (axis-aligned, linear, etc.)

is a set of splitting thresholdsSource: A. Criminisi, J. Shotton

Page 30: Machine Learning Applications in Medicine (Olga Senyukova)

Forest vs tree

Source: A. Criminisi, J. Shotton

Page 31: Machine Learning Applications in Medicine (Olga Senyukova)

The labeled database

Source: A. Criminisi, J. Shotton

Page 32: Machine Learning Applications in Medicine (Olga Senyukova)

Anatomy localization

Key idea: all voxels in the image vote for the position of the organ

Each organ is defined by its 3D axis-aligned bounding box

Cc),,,,,( F

cHc

Pc

Ac

Rc

Lcc bbbbbbb

C = {liver, spleen, kidneyL, kidneyR, …}

Source: A. Criminisi, J. Shotton

Page 33: Machine Learning Applications in Medicine (Olga Senyukova)

Anatomy localization

For each input voxel we obtain distribution of relative displacements to the organ bounding box

),,( zyx vvvv

),,,,,()( Fc

Hc

Pc

Ac

Rc

Lcc ddddddd v

);( vf – feature response

Source: A. Criminisi, J. Shotton

Page 34: Machine Learning Applications in Medicine (Olga Senyukova)

Context-rich features

Features: mean intensity in randomly displaced boxes

Source: A. Criminisi, J. Shotton

Page 35: Machine Learning Applications in Medicine (Olga Senyukova)

Features for CT and MRI

CT: we can rely on absolute intensity values

MRI: only intensity difference makes senseSource: A. Criminisi, J.

Shotton

Page 36: Machine Learning Applications in Medicine (Olga Senyukova)

Learning clinically useful information from medical images

Biomedical Image Analysis Group Department of Computing Daniel Rueckert

Page 37: Machine Learning Applications in Medicine (Olga Senyukova)

Segmentation using registration

Slide by D. Rueckert

Page 38: Machine Learning Applications in Medicine (Olga Senyukova)

Multi-atlas segmentation using classifier fusion

Page 39: Machine Learning Applications in Medicine (Olga Senyukova)

Multi-atlas segmentation using classifier fusion and selection

Page 40: Machine Learning Applications in Medicine (Olga Senyukova)

Selection of atlases

How to select atlases the most similar to our image?

Atlases should be clustered by disease/population

Manifold learning is used to efficiently discover such clusters

Page 41: Machine Learning Applications in Medicine (Olga Senyukova)

Manifold learning

Source: D. Rueckert

Embed the data to the manifold

(project to less-

dimensional space)

Find a manifold

Page 42: Machine Learning Applications in Medicine (Olga Senyukova)

Manifold learning: Laplacian eigenmaps

Given a graph G = (V, E) Each vertex vi corresponds to an image Each edge weight wij defines the similarity

between image i and j Define diagonal matrix T which contains the

degree sums for each vertex

j ijii wt

Slide by D. Rueckert

Page 43: Machine Learning Applications in Medicine (Olga Senyukova)

Manifold learning: Laplacian eigenmaps

2/12/1 )( TWTTL

Normalized graph Laplacian

2

,min jiji ij yyW

The eigen decomposition of L provides manifold

coordinates yi for each vertex i (or image)

Source: D. Rueckert

Page 44: Machine Learning Applications in Medicine (Olga Senyukova)

Manifold learning for multi-atlas segmentation

We have two sets of images: labeled (atlases) unlabeled

We want to label all the unlabeled images

We can do it iteratively: label a part of unlabeled images using the

most similar from already labeled these images can be used as atlases for the

next iteration

Page 45: Machine Learning Applications in Medicine (Olga Senyukova)

Manifold learning for multi-atlas segmentation

Wolz et al., Neuroimage, 2010

Page 46: Machine Learning Applications in Medicine (Olga Senyukova)

Example

Wolz et al., Neuroimage, 2010

Page 47: Machine Learning Applications in Medicine (Olga Senyukova)

Segmentation of brain lesions in MRI

Olga V. Senyukova, “Segmentation of blurred objects by classification of isolabel contours”. Pattern Recognition, 2014

Data was provided by Children's Clinical and Research Institute Emergency Surgery and Trauma

Page 48: Machine Learning Applications in Medicine (Olga Senyukova)

The proposed algorithm

Each MRI slice is processed separately In order to improve speed and

robustness the regions containing lesions can be specified manually

Lesions inside these regions are segmented automatically

Page 49: Machine Learning Applications in Medicine (Olga Senyukova)

Algorithm overview

Input regionIsolabel contours

I(x,y)=const

Closed isolabel contours

Nonlinear SVM classification

Page 50: Machine Learning Applications in Medicine (Olga Senyukova)

Isolabel contours

In geographyeach isolabel contour (one color): constant height f(x,y)=h

In image processingeach isolabel contour (one color): constant intensity f(x,y)=I

Page 51: Machine Learning Applications in Medicine (Olga Senyukova)

How to distinguish lesion contours? Visually we can do it easily! Let’s use the same set of features for

automatic classification of isolabel contours

Page 52: Machine Learning Applications in Medicine (Olga Senyukova)

Features of isolabel contoursIn order to distinguish isolabel contours delineating lesions we propose 4 features

Imean Imean inside the contour / Imean inside BBox

Imax-IminIvariance

Page 53: Machine Learning Applications in Medicine (Olga Senyukova)

Labeled training base

Various regions on many images: a user can click on lesion contours: they will

get “lesion” other isolabel contours will automatically get

“non-lesion”

…, ,

[ɸ1, ɸ2, ɸ3, ɸ4] -> non-lesion[ɸ1, ɸ2, ɸ3, ɸ4] -> lesion[ɸ1, ɸ2, ɸ3, ɸ4] -> lesion[ɸ1, ɸ2, ɸ3, ɸ4] -> lesion

[ɸ1, ɸ2, ɸ3, ɸ4] -> non-lesion[ɸ1, ɸ2, ɸ3, ɸ4] -> non-lesion[ɸ1, ɸ2, ɸ3, ɸ4] -> non-lesion[ɸ1, ɸ2, ɸ3, ɸ4] -> lesion[ɸ1, ɸ2, ɸ3, ɸ4] -> lesion…

[ɸ1, ɸ2, ɸ3, ɸ4] is a feature vector

Page 54: Machine Learning Applications in Medicine (Olga Senyukova)

Binary classification via SVM We have a binary classification task:

each isolabel contour belongs to one of two classes, lesions or non-lesions

One of the best classifiers is SVM – Support Vector Machine original linear SVM: Vladimir Vapnick,

Alexey Chervonenkis, 1963 applying a kernel trick results in nonlinear

SVM: Bernhard Boser, Isabelle Guyon, Vladimir Vapnick, 1992

Page 55: Machine Learning Applications in Medicine (Olga Senyukova)

Linear SVM

support vectors margin

1:1 by ii wx

1:1 by ii wx

positive samples

negative samples

w/2

Maximizing we solve quadratic optimization problem:

w/2

wwT

2

1

1)( bxy ii w

minimizing

subject to

byb iii i xxxw Solution is a hyperplane:

ix

i– support vectors

– learned weights

Page 56: Machine Learning Applications in Medicine (Olga Senyukova)

Nonlinear SVM

For linearly separable data linear SVM is excellent

What about the data that is not linearly separable?..

We can make it linearly separable by mapping it to more-dimensional space

Page 57: Machine Learning Applications in Medicine (Olga Senyukova)

Nonlinear SVM: kernel trick

by iii i xx bKy iii i ),( xxInstead of we have

)()(),( jijiK xxxx where

2exp),( jijiK xxxx

For classification of isolabel contours I use nonlinear SVM with RBF (radial basis

function) kernel

Page 58: Machine Learning Applications in Medicine (Olga Senyukova)

Ensemble-based analysis of RR and gait

Olga Senyukova Valeriy Gavrishchaka, Department of

Physics, West Virginia University Springer, 2013, 2015

Page 59: Machine Learning Applications in Medicine (Olga Senyukova)

RR and gait time series

Normal?

Huntington’s disease?

Parkinson’s disease?

Normal?

Arrhythmia?

Congestive heart failure?

Page 60: Machine Learning Applications in Medicine (Olga Senyukova)

Ensemble learning techniques Ensemble can work better than a single

classifier

accuracy: 0.61 accuracy: 0.73 accuracy: 0.65

base classifier 1

base classifier 2

base classifier N

Ensemble of classifiers

accuracy: 0.9

Page 61: Machine Learning Applications in Medicine (Olga Senyukova)

AdaBoost

Freund and Schapire, 1997 On each iteration focuses on the most

hard-to-classify samples

Page 62: Machine Learning Applications in Medicine (Olga Senyukova)

AdaBoost

– training data, – labels

Initial weights of all N items: M iterations, from m = 1 to M: find if then stop set

update Classifier output:

Nwi /1)0(

))(()(1

M

m mmTsignH xx

Nii ,...,1, x }1;1{ iy

)]([)(minarg)(1

imi

m

imj

Tm TyiwT

j

xx

2/1m

m

mm

1log

2

1

t

imimmm Z

Tyiwiw

)(exp)()(1

x

Page 63: Machine Learning Applications in Medicine (Olga Senyukova)

Good classifier example

Page 64: Machine Learning Applications in Medicine (Olga Senyukova)

Iteration 1 of 3

T1

Page 65: Machine Learning Applications in Medicine (Olga Senyukova)

Iteration 2 of 3

T2

Page 66: Machine Learning Applications in Medicine (Olga Senyukova)

Iteration 3 of 3

STOPT3

Page 67: Machine Learning Applications in Medicine (Olga Senyukova)

Final model

)](72.0)(70.0)(42.0[ 321 xxx TTTsign

Page 68: Machine Learning Applications in Medicine (Olga Senyukova)

Ensemble decomposition learning We apply ensemble-based classifier to

vector x

Each x can be described by its ensemble decomposition vector (EDL vector)

We can classify data points by comparing their EDL vectors

M

m mmTH1

)()( xx

)](,),(),([)( 2211 xxxx MMTTTD

Page 69: Machine Learning Applications in Medicine (Olga Senyukova)

EDL: learning

All available data«normal/abnormal»

MSE

DFA

AdaBoost

Indicators from nonlinear dynamics

Building a general classifier«normal/abnormal»

MSE1

DFA2 …

MSEN

α1 + α2 + αN

Ансамбль классификаторов

Training example x

MSE1

DFA2 …

MSEN

α1 + α2 + αN

Applying the ensemble

MSE

+1 (normal) -1 (abnormal) +1 (normal) -1 (abnormal)

DFA

)]1(*,),1(*,1*[)( 21 MD xEDL vector

Page 70: Machine Learning Applications in Medicine (Olga Senyukova)

EDL: testing

Testing example y

MSE1

DFA2 …

MSEN

α1 + α2 + αN

Applying the ensemble

]1*,,1*),1(*[)( 21 MD y

)()( yx DD

?x = yx ≠ y

EDL vector

no yes

In multi-class classification problem the class of y is the class of the training example with the closest EDL vector

))()((min)()(: yy DxDDxDCik C

iCk

Page 71: Machine Learning Applications in Medicine (Olga Senyukova)

Results

CHF/Arrhythmia classification Real data from

http://www.physionet.org/physiobank