SlideShare a Scribd company logo
Two methods for optimising
cognitive model parameters
David Peebles
—
9th August 2016
The problem
Searching parameter spaces can be laborious and time
consuming – particularly if done iteratively by hand
It’s difficult to know if you have an optimal solution
Worse when model has several interacting parameters, is
non-differentiable, non-continuous, non-linear, stochastic, or
has many local optima.
Guilt and shame < boredom and frustration.
One solution, two methods
Use a population of models to explore the parameter space.
Differential evolution (DE)
Genetic algorithm for multidimensional real-valued functions.
Ideal for optimising models with relatively few parameters or
short run times on a single computer.
High-throughput computing with HTCondor
Open source software for managing job scheduling on
computer clusters or cycle scavenging idle computers.
Ideal for larger, more complex models or when simulating the
behaviour of many participants.
Used by many universities and easy to set up on local
networks (or so I’m told).
Differential evolution
An evolutionary strategy for real numbers used for
multidimensional numerical optimisation [2, 3].
Attractions:
- Simplicity of the algorithm
- Only three control parameters
- Fast, accurate, and robust performance
- Wide applicability
Control parameters:
NP the population size
F a scale factor applied to the mutation process
Cr a constant that regulates the crossover process
The DE algorithm in a nutshell
DE applies repeated cycles of mutation, recombination, and
selection on an initial, randomly generated population of vectors to
create a single vector that produces the best solution to a problem.
RecombinationInitialisation Mutation Selection
Initialisation
RecombinationInitialisation Mutation Selection
Create a population of real-valued vectors – one dimension
for each of the model parameters to be optimised.
Initialise vectors with uniformly distributed random numbers
within maximum and minimum bounds set for each dimension.
(:rt −5.0 −0.01) (:lf 0.1 1.5) (:ans 0.1 0.8)
To create the next population of vectors, each vector i in the
current population is selected in sequence, designated as the
target vector, and subjected to a competitive process. . .
Mutation
RecombinationInitialisation Mutation Selection
Mutation is the weighted difference between two vectors in the
current population.
A mutated donor vector is created by randomly selecting three
unique vectors, j, k and l from the population and adding the
difference between j and k (scaled by the F parameter) to l.
}=
j
k
l
}=
Donor vector
Sum
(weighted by F)
Difference
This ensures that differences in the scale and sensitivity of
different vector parameters are taken into account and that
the search space is explored equally on all dimensions.
Recombination
RecombinationInitialisation Mutation Selection
Cross the donor vector with the target vector to create the trial
vector to allow successful solutions from the previous
generation to be incorporated into the trial vector.
}=
Trial vector
Crossover
Donor
vector
vector
Target
Achieved by series of Bernoulli trials which determine for each
dimension which parent will donate its value.
Moderated by the crossover rate parameter Cr (0 ≤ Cr ≤ 1.).
Selection
RecombinationInitialisation Mutation Selection
Run the model with the parameter values from the trial vector.
If fitnesstrial ≥ fitnesstarget replace target vector with trial vector
in next generation, else retain target vector.
Repeat for each vector in the current population until the next
population is created and the evolutionary process continues
for a user-defined number of cycles.
Retain vector with highest fitness in each population.
Winning vector in the final population is considered the best
solution to the problem.
Paired Associate model example
1. Load (a) ACT-R, (b) DE code file, and (c) the fan effect model.
2. Modify the output function to just return one correlation.
3. Define a function to run the task suppressing the model output
and any warnings resulting from poor parameter choices.
4. Specify the three parameters to adjust with their ranges and
use the default DE configuration.
(defun output-data (data n)
(let ((probability (mapcar (lambda (x) (/ (first x) n)) data))
(latency (mapcar (lambda (x) (/ (or (second x) 0) n)) data)))
;;(correlation latency *paired-latencies*)
(correlation probability *paired-probability*)))
(defun run-paired-with-no-output ()
(let ((*standard-output* (make-string-output-stream)))
(suppress-warnings (paired-experiment 100))))
(optim ’run-paired-with-no-output ’((:rt -5.0 -0.01) (:lf 0.1 1.5) (:ans 0.1 0.8)))
HTCondor
DE useful for models with relatively few parameters or short
run times on a single computer.
DE too slow for large, complex models or when simulating the
behaviour of many participants.
HTCondor Pool
HPC Resources
Cloud Resources
HTCondor
Job
Manager
Users
Run a population of models over a network using HTCondor.
HTCondor – open source, cross-platform software system for
managing and scheduling tasks over computer networks [1].
Running ACT-R models on HTCondor
1. Modify your model to allocate random values to parameters.
2. Create a submit description file specifying job details
(executable, platform, the model files, commands etc.).
requirements =(OpSys == “WINNT61” && Arch == “INTEL”)
(OpSys == “WINDOWS” && Arch == “INTEL”)
(OpSys == “WINDOWS” && Arch == “X86 64”))
executable = actr-s-64.exe
arguments = “-l ’paired.lisp’ -e ’(collect-data 20)’ -e ’(quit)’ ”
transfer executable = ALWAYS
transfer input files = paired.lisp
output = out.stdout.$(Cluster).$(Process)
error = out.err.$(Cluster).$(Process)
log = out.clog.$(Cluster).$(Process)
queue 100
Random number generation
A potential problem arises with how the pseudorandom
number generator (PRNG) seed is set.
Each model instance must be initialised with a unique seed.
Many Lisps (and the ACT-R random module) use the
computer’s clock to generate seed. Problem if different
instances are given the same clock time.
To avoid this, use an ACT-R PRNG that doesn’t using the
system clock, uses a random number generated from CCL
(the Lisp used to create the MS Windows standalone ACT-R).
This method is employed in a new ACT-R
create-random-module which is loaded prior to loading the
model file.
Why not use MindModeling@Home?
NOT a toothbrush thing
MAYBE a lack of knowledge thing
MAYBE a World Community Grid thing (Zika, cancer cures).
Some models are small/trivial
Speed, convenience and flexibility
Try them out
Code and instructions for using both methods using the paired
associate model from tutorial unit 4.
DE: https://github.com/peebz/actr-paired-de
HTCondor: https://github.com/peebz/actr-paired-htc
Thanks as always to Dan Bothell for his patience and advice.
References I
M. J. Litzkow, M. Livny, and M. W. Mutka. ‘Condor—A Hunter
of Idle Workstations’. In: Proceedings of the 8th International
Conference on Distributed Computing Systems. IEEE. June
1988, pp. 104–111.
R. Storn and K. Price. Differential evolution: A simple and
efficient adaptive scheme for global optimization over
continuous spaces. Tech. rep. TR-95-012. Berkeley, CA: ICSI
Berkeley, 1995.
R. Storn and K. Price. ‘Differential evolution: A simple and
efficient heuristic for global optimization over continuous
spaces’. In: Journal of global optimization 11.4 (1997),
pp. 341–359.

More Related Content

PPTX
Data Analysis Assignment Help
PPT
Learning On The Border:Active Learning in Imbalanced classification Data
PPTX
Machine learning and linear regression programming
PPTX
Data Analysis project "TITANIC SURVIVAL"
PPTX
Intro to Machine Learning for non-Data Scientists
PPTX
WEKA: Credibility Evaluating Whats Been Learned
PDF
Lab 2: Classification and Regression Prediction Models, training and testing ...
PDF
My Postdoctoral Research
Data Analysis Assignment Help
Learning On The Border:Active Learning in Imbalanced classification Data
Machine learning and linear regression programming
Data Analysis project "TITANIC SURVIVAL"
Intro to Machine Learning for non-Data Scientists
WEKA: Credibility Evaluating Whats Been Learned
Lab 2: Classification and Regression Prediction Models, training and testing ...
My Postdoctoral Research

What's hot (20)

PPTX
ML_in_QM_JC_02-10-18
PDF
모듈형 패키지를 활용한 나만의 기계학습 모형 만들기 - 회귀나무모형을 중심으로
PDF
Random forest using apache mahout
PDF
Visualizing the model selection process
PPTX
An Introduction to Simulation in the Social Sciences
PPTX
Lightning talk at MLConf NYC 2015
PDF
Object Detection with Deep Learning - Xavier Giro-i-Nieto - UPC School Barcel...
PPTX
Reading group nfm - 20170312
PPTX
Machine Learning - Neural Networks - Perceptron
PDF
The ABC of Implementing Supervised Machine Learning with Python.pptx
PPTX
Automated Machine Learning (Auto ML)
PDF
Yellowbrick: Steering machine learning with visual transformers
PDF
Introduction to Tensor Flow for Optical Character Recognition (OCR)
DOCX
Polymer Brush Data Processor
PDF
IRJET - Movie Genre Prediction from Plot Summaries by Comparing Various C...
PPTX
Computing and Data Analysis for Environmental Applications
PPTX
hands on machine learning Chapter 6&7 decision tree, ensemble and random forest
PPTX
Tensor flow
PPTX
Learning machine learning with Yellowbrick
PDF
Efficient Data Stream Classification via Probabilistic Adaptive Windows
ML_in_QM_JC_02-10-18
모듈형 패키지를 활용한 나만의 기계학습 모형 만들기 - 회귀나무모형을 중심으로
Random forest using apache mahout
Visualizing the model selection process
An Introduction to Simulation in the Social Sciences
Lightning talk at MLConf NYC 2015
Object Detection with Deep Learning - Xavier Giro-i-Nieto - UPC School Barcel...
Reading group nfm - 20170312
Machine Learning - Neural Networks - Perceptron
The ABC of Implementing Supervised Machine Learning with Python.pptx
Automated Machine Learning (Auto ML)
Yellowbrick: Steering machine learning with visual transformers
Introduction to Tensor Flow for Optical Character Recognition (OCR)
Polymer Brush Data Processor
IRJET - Movie Genre Prediction from Plot Summaries by Comparing Various C...
Computing and Data Analysis for Environmental Applications
hands on machine learning Chapter 6&7 decision tree, ensemble and random forest
Tensor flow
Learning machine learning with Yellowbrick
Efficient Data Stream Classification via Probabilistic Adaptive Windows
Ad

Similar to Two methods for optimising cognitive model parameters (20)

PPTX
Accounting for uncertainty in species delineation during the analysis of envi...
PDF
Approaches to online quantile estimation
PDF
Heuristic design of experiments w meta gradient search
PDF
maxbox starter60 machine learning
PDF
Computational Intelligence Assisted Engineering Design Optimization (using MA...
PPTX
A Tale of Data Pattern Discovery in Parallel
DOC
HW2-1_05.doc
PDF
Machine Learning Guide maXbox Starter62
PPT
Genetic Algorithms
PPTX
All projects
PDF
AI optimizing HPC simulations (presentation from 6th EULAG Workshop)
PPTX
A TALE of DATA PATTERN DISCOVERY IN PARALLEL
PDF
Ernest: Efficient Performance Prediction for Advanced Analytics on Apache Spa...
PPTX
Machine Learning Algorithms (Part 1)
PDF
An Adaptive Masker for the Differential Evolution Algorithm
PPT
AHF_IDETC_2011_Jie
PDF
Sparse Support Faces - Battista Biggio - Int'l Conf. Biometrics, ICB 2015, Ph...
PDF
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
PPT
MEME – An Integrated Tool For Advanced Computational Experiments
PDF
Accounting for uncertainty in species delineation during the analysis of envi...
Approaches to online quantile estimation
Heuristic design of experiments w meta gradient search
maxbox starter60 machine learning
Computational Intelligence Assisted Engineering Design Optimization (using MA...
A Tale of Data Pattern Discovery in Parallel
HW2-1_05.doc
Machine Learning Guide maXbox Starter62
Genetic Algorithms
All projects
AI optimizing HPC simulations (presentation from 6th EULAG Workshop)
A TALE of DATA PATTERN DISCOVERY IN PARALLEL
Ernest: Efficient Performance Prediction for Advanced Analytics on Apache Spa...
Machine Learning Algorithms (Part 1)
An Adaptive Masker for the Differential Evolution Algorithm
AHF_IDETC_2011_Jie
Sparse Support Faces - Battista Biggio - Int'l Conf. Biometrics, ICB 2015, Ph...
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
MEME – An Integrated Tool For Advanced Computational Experiments
Ad

More from University of Huddersfield (12)

PDF
Multiple processes in graph-based reasoning
PDF
Modelling alternative strategies for mental rotation
PDF
Robert Gordon talk, 21 March 2018
PDF
EWIC talk - 07 June, 2018
PDF
Multiple representations and visual mental imagery in artificial cognitive sy...
PDF
Multiple representations talk, Middlesex University. February 23, 2018
PDF
Machine Learning, Artificial General Intelligence, and Robots with Human Minds
PDF
Cardiff map-based orientation talk
PDF
Graph comprehension model talk, Birkbeck and Toulouse Le Mirail, February 2012
PDF
Diagrammatic Cognition: Discovery and Design workshop, Humboldt University, B...
PDF
A cognitive architecture-based modelling approach to understanding biases in ...
PDF
DECISIVe workshop introduction
Multiple processes in graph-based reasoning
Modelling alternative strategies for mental rotation
Robert Gordon talk, 21 March 2018
EWIC talk - 07 June, 2018
Multiple representations and visual mental imagery in artificial cognitive sy...
Multiple representations talk, Middlesex University. February 23, 2018
Machine Learning, Artificial General Intelligence, and Robots with Human Minds
Cardiff map-based orientation talk
Graph comprehension model talk, Birkbeck and Toulouse Le Mirail, February 2012
Diagrammatic Cognition: Discovery and Design workshop, Humboldt University, B...
A cognitive architecture-based modelling approach to understanding biases in ...
DECISIVe workshop introduction

Recently uploaded (20)

PDF
IFIT3 RNA-binding activity primores influenza A viruz infection and translati...
PDF
MIRIDeepImagingSurvey(MIDIS)oftheHubbleUltraDeepField
PPTX
G5Q1W8 PPT SCIENCE.pptx 2025-2026 GRADE 5
PDF
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
PPTX
Comparative Structure of Integument in Vertebrates.pptx
PDF
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
PPT
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
PDF
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
PPTX
DRUG THERAPY FOR SHOCK gjjjgfhhhhh.pptx.
PDF
diccionario toefl examen de ingles para principiante
DOCX
Q1_LE_Mathematics 8_Lesson 5_Week 5.docx
PDF
Sciences of Europe No 170 (2025)
PPTX
Derivatives of integument scales, beaks, horns,.pptx
PPTX
2. Earth - The Living Planet earth and life
PDF
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
PPTX
neck nodes and dissection types and lymph nodes levels
PDF
bbec55_b34400a7914c42429908233dbd381773.pdf
PPTX
Classification Systems_TAXONOMY_SCIENCE8.pptx
PPTX
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
PPTX
GEN. BIO 1 - CELL TYPES & CELL MODIFICATIONS
IFIT3 RNA-binding activity primores influenza A viruz infection and translati...
MIRIDeepImagingSurvey(MIDIS)oftheHubbleUltraDeepField
G5Q1W8 PPT SCIENCE.pptx 2025-2026 GRADE 5
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
Comparative Structure of Integument in Vertebrates.pptx
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
DRUG THERAPY FOR SHOCK gjjjgfhhhhh.pptx.
diccionario toefl examen de ingles para principiante
Q1_LE_Mathematics 8_Lesson 5_Week 5.docx
Sciences of Europe No 170 (2025)
Derivatives of integument scales, beaks, horns,.pptx
2. Earth - The Living Planet earth and life
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
neck nodes and dissection types and lymph nodes levels
bbec55_b34400a7914c42429908233dbd381773.pdf
Classification Systems_TAXONOMY_SCIENCE8.pptx
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
GEN. BIO 1 - CELL TYPES & CELL MODIFICATIONS

Two methods for optimising cognitive model parameters

  • 1. Two methods for optimising cognitive model parameters David Peebles — 9th August 2016
  • 2. The problem Searching parameter spaces can be laborious and time consuming – particularly if done iteratively by hand It’s difficult to know if you have an optimal solution Worse when model has several interacting parameters, is non-differentiable, non-continuous, non-linear, stochastic, or has many local optima. Guilt and shame < boredom and frustration.
  • 3. One solution, two methods Use a population of models to explore the parameter space. Differential evolution (DE) Genetic algorithm for multidimensional real-valued functions. Ideal for optimising models with relatively few parameters or short run times on a single computer. High-throughput computing with HTCondor Open source software for managing job scheduling on computer clusters or cycle scavenging idle computers. Ideal for larger, more complex models or when simulating the behaviour of many participants. Used by many universities and easy to set up on local networks (or so I’m told).
  • 4. Differential evolution An evolutionary strategy for real numbers used for multidimensional numerical optimisation [2, 3]. Attractions: - Simplicity of the algorithm - Only three control parameters - Fast, accurate, and robust performance - Wide applicability Control parameters: NP the population size F a scale factor applied to the mutation process Cr a constant that regulates the crossover process
  • 5. The DE algorithm in a nutshell DE applies repeated cycles of mutation, recombination, and selection on an initial, randomly generated population of vectors to create a single vector that produces the best solution to a problem. RecombinationInitialisation Mutation Selection
  • 6. Initialisation RecombinationInitialisation Mutation Selection Create a population of real-valued vectors – one dimension for each of the model parameters to be optimised. Initialise vectors with uniformly distributed random numbers within maximum and minimum bounds set for each dimension. (:rt −5.0 −0.01) (:lf 0.1 1.5) (:ans 0.1 0.8) To create the next population of vectors, each vector i in the current population is selected in sequence, designated as the target vector, and subjected to a competitive process. . .
  • 7. Mutation RecombinationInitialisation Mutation Selection Mutation is the weighted difference between two vectors in the current population. A mutated donor vector is created by randomly selecting three unique vectors, j, k and l from the population and adding the difference between j and k (scaled by the F parameter) to l. }= j k l }= Donor vector Sum (weighted by F) Difference This ensures that differences in the scale and sensitivity of different vector parameters are taken into account and that the search space is explored equally on all dimensions.
  • 8. Recombination RecombinationInitialisation Mutation Selection Cross the donor vector with the target vector to create the trial vector to allow successful solutions from the previous generation to be incorporated into the trial vector. }= Trial vector Crossover Donor vector vector Target Achieved by series of Bernoulli trials which determine for each dimension which parent will donate its value. Moderated by the crossover rate parameter Cr (0 ≤ Cr ≤ 1.).
  • 9. Selection RecombinationInitialisation Mutation Selection Run the model with the parameter values from the trial vector. If fitnesstrial ≥ fitnesstarget replace target vector with trial vector in next generation, else retain target vector. Repeat for each vector in the current population until the next population is created and the evolutionary process continues for a user-defined number of cycles. Retain vector with highest fitness in each population. Winning vector in the final population is considered the best solution to the problem.
  • 10. Paired Associate model example 1. Load (a) ACT-R, (b) DE code file, and (c) the fan effect model. 2. Modify the output function to just return one correlation. 3. Define a function to run the task suppressing the model output and any warnings resulting from poor parameter choices. 4. Specify the three parameters to adjust with their ranges and use the default DE configuration. (defun output-data (data n) (let ((probability (mapcar (lambda (x) (/ (first x) n)) data)) (latency (mapcar (lambda (x) (/ (or (second x) 0) n)) data))) ;;(correlation latency *paired-latencies*) (correlation probability *paired-probability*))) (defun run-paired-with-no-output () (let ((*standard-output* (make-string-output-stream))) (suppress-warnings (paired-experiment 100)))) (optim ’run-paired-with-no-output ’((:rt -5.0 -0.01) (:lf 0.1 1.5) (:ans 0.1 0.8)))
  • 11. HTCondor DE useful for models with relatively few parameters or short run times on a single computer. DE too slow for large, complex models or when simulating the behaviour of many participants. HTCondor Pool HPC Resources Cloud Resources HTCondor Job Manager Users Run a population of models over a network using HTCondor. HTCondor – open source, cross-platform software system for managing and scheduling tasks over computer networks [1].
  • 12. Running ACT-R models on HTCondor 1. Modify your model to allocate random values to parameters. 2. Create a submit description file specifying job details (executable, platform, the model files, commands etc.). requirements =(OpSys == “WINNT61” && Arch == “INTEL”) (OpSys == “WINDOWS” && Arch == “INTEL”) (OpSys == “WINDOWS” && Arch == “X86 64”)) executable = actr-s-64.exe arguments = “-l ’paired.lisp’ -e ’(collect-data 20)’ -e ’(quit)’ ” transfer executable = ALWAYS transfer input files = paired.lisp output = out.stdout.$(Cluster).$(Process) error = out.err.$(Cluster).$(Process) log = out.clog.$(Cluster).$(Process) queue 100
  • 13. Random number generation A potential problem arises with how the pseudorandom number generator (PRNG) seed is set. Each model instance must be initialised with a unique seed. Many Lisps (and the ACT-R random module) use the computer’s clock to generate seed. Problem if different instances are given the same clock time. To avoid this, use an ACT-R PRNG that doesn’t using the system clock, uses a random number generated from CCL (the Lisp used to create the MS Windows standalone ACT-R). This method is employed in a new ACT-R create-random-module which is loaded prior to loading the model file.
  • 14. Why not use MindModeling@Home? NOT a toothbrush thing MAYBE a lack of knowledge thing MAYBE a World Community Grid thing (Zika, cancer cures). Some models are small/trivial Speed, convenience and flexibility
  • 15. Try them out Code and instructions for using both methods using the paired associate model from tutorial unit 4. DE: https://github.com/peebz/actr-paired-de HTCondor: https://github.com/peebz/actr-paired-htc Thanks as always to Dan Bothell for his patience and advice.
  • 16. References I M. J. Litzkow, M. Livny, and M. W. Mutka. ‘Condor—A Hunter of Idle Workstations’. In: Proceedings of the 8th International Conference on Distributed Computing Systems. IEEE. June 1988, pp. 104–111. R. Storn and K. Price. Differential evolution: A simple and efficient adaptive scheme for global optimization over continuous spaces. Tech. rep. TR-95-012. Berkeley, CA: ICSI Berkeley, 1995. R. Storn and K. Price. ‘Differential evolution: A simple and efficient heuristic for global optimization over continuous spaces’. In: Journal of global optimization 11.4 (1997), pp. 341–359.