REANNZ develops and supports a range of products and services to support the specialist needs of our members in the R&E and innovation community.
We operate NZ's national research and education network and seamlessly connect with 120+ networks globally to enable researchers to collaborate.
REANNZ is proud to support the specialist needs of our members from NZ's research, education and innovation community.
Find out more about who REANNZ is, what we do and the people that operate New Zealand’s national research and education network.
Analysing 2.3 million survey responses lends insight into how religious beliefs can influence views on justice, sexual freedom, and moral reasoning.
Religious beliefs can shape human behaviour and social attitudes in profound ways. In the Department of Psychology at Waipapa Taumata Rau University of Auckland, Research Fellow Guy Lavender Forsyth studies how the effects of religious beliefs differ across religious traditions, influencing political orientation and views on justice to sexual freedom and moral reasoning.
To explore these questions, Guy is analysing 2.3 million survey responses drawn from the World Values Survey Association. To uncover insights faster, he is leveraging large-scale Bayesian computational methods and running Markov Chain Monte Carlo (MCMC) simulations.
This ambitious analysis is run on the REANNZ High-Performance Computing (HPC) cluster, Mahuika, allowing Guy to probe patterns and relationships within the data at a scale and depth that would be impossible with conventional statistical approaches.
Guy came to REANNZ seeking help with his model. It was taking more than 10 days to run and he wasn't sure if that was because of the size of the problem or due to inefficient code.
Research Software Engineers from REANNZ profiled the code and found it running at over 90% efficiency, indicating the bottleneck was computational rather than memory-bound.
An attempt to port the code to Mahuika's Graphical Processing Unit (GPU) resources yielded no appreciable improvement, as the categorical nature of the survey data, essentially binary checkbox responses, is poorly suited to GPU acceleration.
Instead, the team recompiled Stan, the probabilistic programming language used to generate the Markov chains, to leverage MPI (Message Passing Interface), a parallelisation framework commonly used on high-performance computing clusters. With MPI, each Markov chain was allocated 30 cores, reducing runtimes for the most complex simulations to a matter of days.
Profiling indicated the code was running optimally, so the engineers turned their attention to the algorithm itself. Guy had implemented his Markov chain simulations using the No-U-Turn Sampler (NUTS; Hoffman & Gelman 2011, arXiv:1111.4246) in Stan, which automatically tunes the sampler's trajectory to efficiently explore complex posterior distributions.
The key tuning parameter, adapt_delta, controls the target acceptance rate for proposed steps — values closer to 1 force the sampler to take smaller, more cautious steps through the parameter space, reducing the risk of divergent transitions at the cost of longer computation time.
Reducing adapt_delta from 0.99 to 0.80 allowed the sampler to take larger steps through the posterior, yielding a 40% improvement in convergence rate and a threefold reduction in model runtime.
Together, these optimisations proved transformative: leveraging MPI provided the compute capacity needed for complex simulations, while relaxing the posterior step size via adapt_delta significantly accelerated both convergence and overall runtime.
Critically, the analysis also disentangled the contributions of model efficiency and model complexity to runtime — an important distinction for guiding future work.
“I'd definitely recommend a REANNZ consultancy to others. It is a wonderful initiative.”
- Guy Lavender Forsyth, Department of Psychology, University of Auckland
Find anything about our products, services, and more. Enter a query in the search input above.