Attentional Drift Diffusion Model
The multi-attribute attentional drift diffusion model (MAADDM; Yang & Krajbich, 2023) describes how attentional processes drive drive decision making. Much like the ADDM, in the MAADDM preference for the currently attended option accrues faster than preference for non-attended options. However, the MAADDM has been extended to model shifts in attention for alternatives with two attributes. As with other sequential sampling models, the first option to hit a decision threshold determines the resulting choice and reaction time.
Example
In this example, we will develope a MAADDM for binary choice and generate its predictions. Unlike many other sequential sampling models, it is necessary to specify the attentional process, or supply fixation patterns from eye tracking data.
Load Packages
The first step is to load the required packages.
using SequentialSamplingModels
using StatsBase
using Plots
Random.seed!(9854)
Random.TaskLocalRNG()
Define Transition Type
To represent the transition of attention from one option to the other, we will definite a Transition
type and constructor. The fields of the Transition
type are:
state
: an index for the current staten
: the number of statesmat
: an $n\times n$ transition matrix
The constructor accepts a transition matrix, extracts the number of states, and initializes the first state randomly with equal probability.
mutable struct Transition
state::Int
n::Int
mat::Array{Float64,2}
end
function Transition(mat)
n = size(mat,1)
state = rand(1:n)
return Transition(state, n, mat)
end
Main.Transition
Define Transition Matrix
The transition matrix is defined below in the constructor for Transition
. As shown in the table below, the model's attention can be in one of three states: option 1, option 2, or non-option, which is any area except the two options.
Option 1 | Option 1 | ||||
---|---|---|---|---|---|
Attribute 1 | Attribute 2 | Attribute 1 | Attribute 2 | ||
Option 1 | Attribute 1 | 0.980 | 0.015 | 0.0025 | 0.0025 |
Attribute 2 | 0.015 | 0.980 | 0.0025 | 0.0025 | |
Option 1 | Attribute 1 | 0.0025 | 0.0025 | 0.980 | 0.015 |
Attribute 2 | 0.0025 | 0.0025 | 0.015 | 0.980 |
The transition matrix above embodies the following assumptions:
- Once the model attends to an option, it dwells on the option for some time.
- There is not a bias for one option over the other.
- There is a larger chance of transitioning between attributes within the same alternative than transitioning between alternatives
- Transitions are Markovian in that they only depend on the previous state.
tmat = Transition([.98 .015 .0025 .0025;
.015 .98 .0025 .0025;
.0025 .0025 .98 .015;
.0025 .0025 .015 .98])
Main.Transition(4, 4, [0.98 0.015 0.0025 0.0025; 0.015 0.98 0.0025 0.0025; 0.0025 0.0025 0.98 0.015; 0.0025 0.0025 0.015 0.98])
Fixate Function
The function below generates the next attention location based on the previous location.
function fixate(transition)
(;mat,n,state) = transition
w = @view mat[state,:]
next_state = sample(1:n, Weights(w))
transition.state = next_state
return next_state
end
fixate (generic function with 1 method)
Create Model Object
The code snippets assign values to parameters of the MAADDM and create a model object.
Drift Rate Components
In the decision making task, there are two alternatives with two attributes each. This leads to four components of the drift rates: $\nu_{1,1}, \nu_{1,2},\nu_{2,1},\nu_{2,2}$ where the first index corresponds to alternative and the second index corresponds to attribute. To form the drift rate, each component is weighted by non-attention bias and then a difference is computed.
ν = [4.0 5.0; 5.0 4.0]
2×2 Matrix{Float64}:
4.0 5.0
5.0 4.0
Threshold
The threshold hold represents the amount of evidence required to make a decision. This parameter is typically fixed at $\alpha = 1$.
α = 1.0
1.0
Starting Point
The starting point of the evidence accumulation process is denoted $z$ and is typically fixed to $0$.
z = 0.0
0.0
Non-Attend Bias Alternative
The non-attend bias parameter $\theta$ determines how much the non-attended option contributes to the evidence accumulation process. In the standard DDM, $\theta=1$.
θ = 0.30
0.3
Non-Attend Bias Attribute
The non-attend bias parameter $\psi$ determines how much the non-attended option contributes to the evidence accumulation process. In the standard DDM, $\psi=1$.
ϕ = .50
0.5
Attribute Weight
The parameter $\omega$ denotes the weight of the first attribute.
ω = .70
0.7
Diffusion Noise
Diffusion noise, $\sigma$ represents intra-trial noise during the evidence accumulation process.
σ = 0.02
0.02
Drift Rate Scalar
The drift rate scalar controls how quickly evidence accumulates for each option.
Δ = 0.0004
0.0004
Model Object
Finally, we pass the parameters to the maaDDM
constructor to initialize the model.
dist = maaDDM(; ν, α, z, θ, ϕ, ω, σ, Δ)
maaDDM
┌───────────┬────────────────────┐
│ Parameter │ Value │
├───────────┼────────────────────┤
│ ν │ [4.0 5.0; 5.0 4.0] │
│ σ │ 0.02 │
│ Δ │ 0.00 │
│ θ │ 0.30 │
│ ϕ │ 0.50 │
│ ω │ 0.70 │
│ α │ 1.00 │
│ z │ 0.00 │
│ τ │ 0.00 │
└───────────┴────────────────────┘
Simulate Model
Now that the model is defined, we will generate $10,000$ choices and reaction times using rand
. The rand
function accepts the model object, the number of simulated trials, the fixate
function, and the transition matrix object.
choices,rts = rand(dist, 10_000, tmat; fixate)
(choice = [1, 2, 1, 1, 2, 2, 1, 2, 2, 2 … 1, 2, 2, 1, 2, 1, 2, 1, 2, 2], rt = [1.5109999999999444, 0.4880000000000004, 2.2909999999998587, 0.6080000000000004, 0.4860000000000004, 0.4910000000000004, 0.5620000000000004, 0.8550000000000006, 4.407999999999807, 0.6780000000000005 … 1.9219999999998991, 4.344999999999786, 3.3839999999997383, 1.3539999999999617, 1.7569999999999173, 2.1209999999998774, 5.379000000000131, 4.201999999999738, 1.414999999999955, 0.9760000000000008])
Plot Simulation
Finally, we can generate histograms of the reaction times for each decision option.
histogram(dist; model_args=(;tmat), model_kwargs=(;fixate))
plot!(dist; model_args=(;tmat), model_kwargs=(;fixate), t_range=range(.130, 5, length=100), xlims=(0,7))
References
Yang, X., & Krajbich, I. (2023). A dynamic computational model of gaze and choice in multi-attribute decisions. Psychological Review, 130(1), 52.
Fisher, G. (2021). A multiattribute attentional drift diffusion model. Organizational Behavior and Human Decision Processes, 165, 167-182.