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.
using SequentialSamplingModels
using StatsBase
using Plots
using Random
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.
The first step is to load the required packages.
using SequentialSamplingModels
using StatsBase
using Plots
Random.seed!(9854)
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 state -
n
: the number of states -
mat
: 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
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])
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
The code snippets assign values to parameters of the MAADDM and create a model object.
In the decision making task, there are two alternatives with two attributes each. This leads to four components of the drift rates:
ν = [4.0 5.0; 5.0 4.0]
The threshold hold represents the amount of evidence required to make a decision. This parameter is typically fixed at
α = 1.0
The starting point of the evidence accumulation process is denoted
z = 0.0
The non-attend bias parameter
θ = 0.30
The non-attend bias parameter
ϕ = .50
The parameter
ω = .70
Diffusion noise,
σ = 0.02
The drift rate scalar controls how quickly evidence accumulates for each option.
Δ = 0.0004
Finally, we pass the parameters to the maaDDM
constructor to initialize the model.
dist = maaDDM(; ν, α, z, θ, ϕ, ω, σ, Δ)
Now that the model is defined, we will generate 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)
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))
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.