23 Sep. 2022 @ UT

Machine Learningfor Behavior Model
How to collaborate DCM and ML ?

Tokyo University of Science

Hideki YAGINUMA
yaginuma@rs.tus.ac.jp

多項ロジット（MNL）モデル（2）DCM vs MLU car   X car   car

To developand services, we areU bus  moreX bus better bus infrastructure
conducting analysis basedε～IIDガンベル分布
on behavior models.

U rail   X rail   bus

p Prediction Accuracy: issue of model parameter estimation

exp V car exp V car   exp V bus  exp V rail p ModelPcar  Interpretability: issue of understanding model (behavior）

Discrete choice modelexpVi Pi   expV j jC

Machine LearningCov(U) 2 002
22 BoxBlack0

0
2

6

2
00



Source: Small data
Source: Big data
Function: Liner
Function: Non-Liner シェア型モデルであるため直感的にわかりやすい
Accuracy(Model fitting): Mid（Low?）
Accuracy(Model fitting): High closed-formのため計算コストが安い
Interpretability : HighInterpretability: Low
08/9/20
第7回
行動モデル
夏の学校Good understanding travel behavior ?
NOT understanding travel18behavior ?

Considering the possibility of collaboration between DCM and ML
from the perspective of Aaccuracy and Interpretability

2Overview of ML

3

Generative learningEx. GAN

https://ieeexplore.ieee.org/document/8612259

4

How to collaborate DCM and ML ?
Part 1: Prediction Accuracy- You can (not) estimate behavior model-Overview of DCM

5

By Chikaraishi(Hiroshima Univ)

Flexible DCM

6

Mixed Loigt (Train 2000)
High flexible model structure by two error term.
Utility function

U i =Vi + ηi + ν iv dist.: assume any G function
・IID Gamble (Logit Kernel)
MNL・any G function (GEV Kernel)
NL, PCL, CNL, GNL…

η dist.: basically assume “Normal dist.”
In the case of normal distribution takes a non-realistic value, it canassume a variety of probability distribution (triangular distribution, cutting
normal distribution, lognormal distribution, Rayleigh distribution, etc.).

• Error Component: approximate to any GEV model• Random Coefficient: Consider the heterogeneity

7

MXL : Error Component Model
Approximation of Nested Logit (NL)

MXL）モデル（5）Describe the nest (covariance) using structured η.

 car
 bus
  rail

Ex: model choiceNormal自動車
U car = β X car +Carnest+ ν car

バス
BusU bus = β X bus + σ transitηtransit + ν bus

鉄道
RailU rail = β X rail + σ transitηtransit + ν rail

Transit nest
Choice prob.
(open-form)ミックストロジット（MIID Gamble
Logit
NestedV +σηe rail transit transit
U car  X car cPrail =fηdηtransittransit
Vcar
Vbus +σ transitηtransit
Vrail +σ transitηtransitUX
e+e+ebusbus
transittransit   bηtransit
0U rail  X rail   transittransit  (∫)

  20 
222transit  N 0,1
 transit    0    transit
N
222Vrail +σ transitηtranist
 0



1etransit prob.
transit  Choice
2Prail = ∑N
N0  00
Vcar
Vbus +σ transitηtranist
Vrail+0σ transit0ηtranist(Simulated)N222+e+e 
NLモデルとは違う!!
N e
夏の学校

33

0  transit20  transit

 transit    02  0
 transit00 
 2 

8MXL : Random Coefficient Model

ミックストロジット（MXL）モ
ミックストロジット（MXL）モデル（11）Assume the heterogeneity of parameter
嗜好の異質性：ランダム係数モデ
ックストロジット（MXL）モデル（11）ミックストロジット（MXL）モデル（11）ックストロジット（MXL）モデル（11）Inミックストロジット（MXL）モデル（11）the case of parameter following Normal dist., we estimate
Approximation of unobservable heterogeneity
U T
嗜好の異質性：ランダム係数モデル（2）
嗜好の異質性：ランダム係数モデル（2）2
嗜好の異質性：ランダム係数モデル（2）
U

T




N
,
car,
nncar,ncar,
nnU car,nU  nUTcarcar,ncar,nT,
nn car,carn ,nU car,n car,nnTcar,,nnnTcarn,car, n car
22 N  , 2 n
2,  n  N ,Nn 
2N, n  Nn ,  U car,n   Tcar,n  nTcar,n   car,ncar , nn car , n
car , n
嗜好の異質性：ランダム係数モデル（2）thedist.ʼshyper-parameter(meanandvariance).
嗜好の異質性：ランダム係数モデル（2）  Tbus ,n  
U n ,
TTcarcar carTTcarU,carn car, n, n  
nn,n ,nnbus, n, n nTbus , n   bus , ncar,car
U car,nU UTcar
Tn Tn car, n T car,
nU,
car,nncar,ncar,nU car,n car
,Tn carT T    TTβ, nbus , n  nTbus
car, n ncar, n , n   busU,nbus,nU

T


T

rail,nrail , nβ
 n rail , n   rail , n ＩＩＤガンベル
bus,nbus,nnbus,nbus,nU bus ,nU  Tbus
Tβn Tbusbus ,nU,,nTβ, nnnTn rail
U bus ,n bus
,Tn bus
Trail busβ, nbusn,T, nrailbus, n, n nbus, n , n bus , nrail , n ＩＩＤガンベル分布 Trail0,1   ,  : unknown parametern,n N
ＩＩＤガンベル分布
rail , n ,n  nTrail , n   rail
U rail ,nU UTrailT
ＩＩＤガンベル分布
n railrail ,n ,n nTrail
,nnT,rail
ＩＩＤガンベル分布
,unknownn , n ＩＩＤガンベル分布
rail , nparameterN, n0n,
1railU rail ,n rail,Tn rail
T
 :rail,n,n
 n   0  観測異質性と非観測 ,  : unknown parametern  N0,1:unknown
1incomen としても良い ,parametern Hyper-parameter N0,1N 0,1  n  ,0can
describe
using observable variables:unknown
parameter
1incomen としても良い ,  : unknown
parameternn  N 0,1
異質性の両方を考慮

観測異質性と非観測incomeとしても良い
観測異質性と非観測
n01n
観測異質性と非観測 n  0 1income
2008/9/20
第7回 異質性の両方を考慮
行動モデル 夏の学校
観測異質性と非観測n としても良いincome2008/9/20
39
としても良い
第7回
行動モデル夏の学校
01 n としても良いn n   0n  1income
βdependon observable
incomevariable
異質性の両方を考慮
異質性の両方を考慮
異質性の両方を考慮

2008/9/20

第7回 行動モデル 夏の学校

39

Difficulty of Estimation
Why estimation methods is important ?
ü Advance GEV model (CNL, GNL, n-GEV…） has many parameter.
⇒ Convergence becomes unstable (Hessian passed away…)
ü non-GEV model requires multiple integral calculations .
⇒ ML estimation can not be usedü Stricture of utility function (non-liner, complex distribution)
ü Dynamic choice behavior (Dynamic Programing: DP)
ü Interaction between decision-maker (Endogeneity）
ü high dimensional data ⇒ N of Sample < N of Variable

The analyst needs to select an appropriate estimation
method corresponding to the model !

9Overview of Estimation method

10To solve Integral
Maximum Likelihood estimation
To Consider
Dynamics
Interaction

Bayesian estimation
To general

Structural estimation
ü Heckman’s 2-stepü Pseudo Likelihood
ü Nested Fixed Point (NFXP）
ü Nested Pseudo Likelihood …
ü MPEC

Numerical method
ü Newton-Cotes rules
Lowü Simpson's ruledimensional

Analytical approximation
ü series approximation
ü Clark approximation
ü MACML

Random approximation
ü Maximum Simulated Likelihood（ Monte Carlo integral, GHK…）
ü MCMC（Gibbs, MH, HM…） High-dimensional

Machine Learning (ML)
Neural Network, (reverse) Reinforcement learning, Sparse modeling, Gaussian Process…
⇒ Several methodologies are useful for DCM parameter estimation !

Collaboration of DCM and ML11Estimation methods in the field of machine learning canbe applied to DCM estimation.
Neural network（Back propagation)

Sparse modeling

Gaussian Process
Estimation considering
complex nonlinearstructures

Estimation consideringparameter dimension reduction

Reinforcement learning

Variational Bayesian

Estimation considering complex
probability distribution

Estimation considering
complex and dynamic choice12

How to collaborate DCM and ML ?
Part 2: Model Interpretability- You can (not) understand behavior model-

XAI: eXplainable AI

13

Recent issue in AI
u In recent years, accuracy and explainability of AI (ML) has beenrequired in practice situation.
u XAI: provides reasons and evidence that humans canunderstand for the results by AI.
u Three requirements werepresented in G20 AI principles
Human centered values• Fairness（公平性）• Accountability（説明責任）• Transparency（透明性）

https://www.mofa.go.jp/policy/economy/g20_summit/osaka19/en/documents/final_g20_osaka_leaders_declaration.html

AI principles

14

Fairness
Eliminate biases that cause unfairness so that AI can provide fair
services regardless of differences in user attributes.
• Bias in training data (input): historical bias, sampling bias
• Users with certain attributes cannot receive the service. And theycannot receive the same level of service as other users.

Accountability
Clarify where the cause of the error lies and who (or what) is
responsible for it.
→ In complex models, it may be difficult to identify where thecause of the problem lies.（ex. DNN）

Transparency
AI systems can present information that users can understand.
••

Information that should be presented model (processing criteria),
data was used to train it, validation, etc...
This is important when dealing with issues related to medical, safety
and policy making.Explainability of ML methods

15In machine learning, there is a tradeoff between the complexity(= accuracy) of the problem and its explainability.
complexity

LOW expandability
model

Deep Neural Network（CNN, RNN, GAN）
Boosting / Bagging model(XGBoost, RF）

HIGH expandability
model

Tree model
Liner / LogisticRegression

Rule based model
explainability

Explainability of ML methods
Tree model

16

Explainability of ML methods
CNN model

17

18

XAI methodu Global or Local explanation: Domains that the model can explain••Global: Understand the overall behavior of AI models.
Local: Understand the reasoning behind each prediction.

Model in-dependent XAI

Global Explanation

PFI(Permutation Feature Importance)
PD(Partial Dependence)
CPD(Conditional Partial Dependence)

SHAP(SHapley Additive exPlanations)

ICE(Individual Conditional Expectation)

LIME

Local Explanation

Model dependent XAI
CAM/ Grad-CAM

Integrated Gradients

Tree Surrogate

Attention

Global XAI : PFI
PFI: Permutation Feature Importanceu Calculating the feature importance in models.
u Shuffle (permutation) the features sample data and evaluate
the importance based on the prediction error of the model.
Trained model𝑦 = 𝑓(𝑥)Error Function
Test data1920

GlobaI XAI : PFI
PFI: Algorithmu Calculating the feature importance in models.
1. Calculate Baseline Prediction Error

3. Calculate shuffle dataʼsPrediction Error

Baseline prediction error

𝑒%&$' 𝑓 = 𝔼 𝐿 𝑓 𝑋( , 𝑦𝑒!"#$ 𝑓 = 𝔼 𝐿 𝑓 𝑥 , 𝑦Error evaluation index(ex. RMSE）
Trained model𝑦 = 𝑓(𝑥)Obs. Value

Prediction Value

4. Calculate FI index

𝑒%&$' 𝑓𝐹𝐼( =𝑒!"#$ 𝑓

2. Create featureʼs shuffle data

𝑋!

Random Shuffle

Repeat to 2-4
for all features

21

Application : mode choiceMode choice model based on NN
u Simple NN considering choice sets byskip connection.
u Apply to the Tokyo Metropolitan area.
u Data: Tokyo PT 2018
INPUT
Choice sets
(Availability）

OUTPUT
Skip connection

×1
×0

Variables(PT data)

×0

Choice prob.
• Rail• Bus• Car• Bike• WalkHidden layer: 4
Units: 100, 100, 50, 10
Ishijima, Yaginuma etc.: Interpretability of machine-learning based travel behavior models using XAI [accepted IATBR]Application : XAI
Results of PI (Permutation Importance)u Calculating the feature importance in models.
u Determining important features for improving model accuracy

22

23

Application : XAI
Results of PD(Partial Dependence)u Calculating the relationship between output and each feature.
u Change point can be detected by expected sensitivity
Train

CarBusBike

X-axis: travel time
Y-axis: choice prob.

Walk

24

Application : XAI
Results of CPD(Partial Dependence)u Calculating the relationship between output and each feature.
u Change point can be detected by gruop sensitivity
Train

Bus

Bike

X-axis: travel time
Y-axis: choice prob.
Travel Purpose

CarWalk25

Application : XAI
Results of ICE(Individual Conditional Expectation)u Calculating the relationship between output and each feature.
u Change point can be detected by individual sensitivity
Train

X-axis: travel time
Y-axis: choice prob.
IndevidualBus

Car

BikeWalk

26

Results of DCM vs MLDCM•

Explainability••

Value of parameterand sign (+/-)
Elasticity
Sensitivity

ML•••••

Featureʼs importanceFeatureʼs sensitivity
Degree of contributeGroup Heterogeneity
Individual parameter• Mid/LowAccuracy

Methodological(depend on N ofalternatives)• Low calc. speed• High• High calc. speed• RUM• Data driven

Collaboration of DCM and ML
u XAI methods are powerful tools for more deep
understanding for DCM.

→ Especially, model in-dependent methods (PFI, PD, SHAP）isgood for us such as specification of utility function !

u Use different models depending on the situation.
→ DCM: Policy making, Explanation to citizenʼs etc.
ML: Monitoring, short-term forecasting, service design etc.

Thank you for your attention !

27