approximate likelihood with a neural network
Idea:
- train NN on simulated data upfront
- and do cheap likelihood approximation during inference
This is crucial because the current MC likelihood approximation is the most expensive computational bottleneck. This becomes especially relevant during the adaptive trial placement loop when we'll have to compute the posterior predictive (requiring to evaluate the likelihood of many different models).
I created a an interface as to how that could look like here, which follows the following class hierarchy:
TaskLikelihood (ABC)
/ \
OddityTask NeuralSurrogateOddityTask
(MC-based) (NN-based)
--> Both OddityTask and NeuralSurrogateOddityTask are then different strategies for computing the likelihood of the same underlying psychophysical task (an oddity task).
Alternatively, as we're thinking about supporting more psychophysical tasks (beyond the oddity task), where then multiple task-specific neural network surrogate classes should be implemented to enable an efficient likelihood approximation for a given task, an intermediate NeuralSurrogateTask abstract base class would make sense: This could define the common interface for all neural network-based likelihoods, such as the requirement to have a forward method and nn_params.
The NeuralSurrogateOddityTask would then inherit from this new class.
TaskLikelihood (ABC)
/ \
OddityTask (MC) NeuralSurrogateTask (ABC)
I
NeuralSurrogateOddityTask
approximate likelihood with a neural network
Idea:
This is crucial because the current MC likelihood approximation is the most expensive computational bottleneck. This becomes especially relevant during the adaptive trial placement loop when we'll have to compute the posterior predictive (requiring to evaluate the likelihood of many different models).
I created a an interface as to how that could look like here, which follows the following class hierarchy:
TaskLikelihood (ABC) / \ OddityTask NeuralSurrogateOddityTask (MC-based) (NN-based)--> Both OddityTask and NeuralSurrogateOddityTask are then different strategies for computing the likelihood of the same underlying psychophysical task (an oddity task).
Alternatively, as we're thinking about supporting more psychophysical tasks (beyond the oddity task), where then multiple task-specific neural network surrogate classes should be implemented to enable an efficient likelihood approximation for a given task, an intermediate
NeuralSurrogateTaskabstract base class would make sense: This could define the common interface for all neural network-based likelihoods, such as the requirement to have aforwardmethod andnn_params.The
NeuralSurrogateOddityTaskwould then inherit from this new class.TaskLikelihood (ABC) / \ OddityTask (MC) NeuralSurrogateTask (ABC) I NeuralSurrogateOddityTask