Nicolas Legrand
nicolaslegrand.bsky.social
Nicolas Legrand
@nicolaslegrand.bsky.social
Senior Researcher in computational cognitive science @ Center for Humanities Computing, Aarhus University.

Active inference - LLM - Reinforcement learning - Bayesian modelling | Creating a neural network library for predictive coding.
Pinned
📄Unlocking Dynamic Neural Networks for Bayesian Modelling with PyHGF

Curious about new interplays between neural networks and Bayesian modelling? Check out our latest preprint on dynamic predictive coding networks 👇

Paper: arxiv.org/abs/2410.09206
Code: github.com/ilabcode/pyhgf
Reposted by Nicolas Legrand
Pleased to share new work with @sflippl.bsky.social @eberleoliver.bsky.social @thomasmcgee.bsky.social & undergrad interns at Institute for Pure and Applied Mathematics, UCLA.

Algorithmic Primitives and Compositional Geometry of Reasoning in Language Models
www.arxiv.org/pdf/2510.15987

🧵1/n
October 27, 2025 at 6:13 PM
Reposted by Nicolas Legrand
We discovered that language models leave a natural "signature" on their API outputs that's extremely hard to fake. Here's how it works 🔍

📄 arxiv.org/abs/2510.14086 1/
Every Language Model Has a Forgery-Resistant Signature
The ubiquity of closed-weight language models with public-facing APIs has generated interest in forensic methods, both for extracting hidden model details (e.g., parameters) and for identifying...
arxiv.org
October 17, 2025 at 5:59 PM
Reposted by Nicolas Legrand
Introducing hMFC: A Bayesian hierarchical model of trial-to-trial fluctuations in decision criterion! Now out in @plos.org Comp Bio.
led by Robin Vloeberghs with @anne-urai.bsky.social Scott Linderman

Paper: desenderlab.com/wp-content/u... Thread ↓↓↓

#PsychSciSky #Neuroscience #Neuroskyence
September 25, 2025 at 9:13 AM
Reposted by Nicolas Legrand
does someone good at coding & analysis want to work remotely w/ us in the coming few months (before end of 2025), as a paid consultant? project will be on neurofeedback (fMRI, ECoG, calcium imaging). we'll work towards developing the experiments & analysis pipelines together. if so pls DM me ur CV🧠📈
September 1, 2025 at 1:06 PM
Reposted by Nicolas Legrand
I’m especially proud of this article I wrote about Gaussian Processes for the Recast blog! 🥳

GPs are super interesting, but it’s not easy to wrap your head around them at first 🤔

This is a medium level (more intuition than math) introduction to GPs for time series.

getrecast.com/gaussian-pro...
August 29, 2025 at 5:11 PM
Reposted by Nicolas Legrand
"The day the paper was published should have been a moment of pride. Instead, it felt like a quiet erasure." #ScienceWorkingLife https://scim.ag/4p3eH5g
August 25, 2025 at 1:24 PM
Reposted by Nicolas Legrand
I made this Computational Psychiatry Starter Pack a while ago and was wondering if I may be missing anyone who has joined bluesky since?

I will add anyone who uses computational models to adress questions in psychiatry research. :)
go.bsky.app/5PTy9Zj
August 8, 2025 at 7:32 AM
Reposted by Nicolas Legrand
My first, first author paper, comparing the properties of memory-augmented large language models and human episodic memory, out in @cp-trendscognsci.bsky.social!

authors.elsevier.com/a/1lV174sIRv...

Here’s a quick 🧵(1/n)
authors.elsevier.com
July 26, 2025 at 3:05 PM
Reposted by Nicolas Legrand
After five years of confused staring at Greek letters, it is my absolute pleasure to finally share our (with @smfleming.bsky.social) computational model of mental imagery and reality monitoring: Perceptual Reality Monitoring as Higher-Order inference on Sensory Precision ✨
osf.io/preprints/ps...
OSF
osf.io
July 23, 2025 at 2:18 PM
Reposted by Nicolas Legrand
Our new paper is out in PNAS: "Evolving general cooperation with a Bayesian theory of mind"!

Humans are the ultimate cooperators. We coordinate on a scale and scope no other species (nor AI) can match. What makes this possible? 🧵

www.pnas.org/doi/10.1073/...
Evolving general cooperation with a Bayesian theory of mind | PNAS
Theories of the evolution of cooperation through reciprocity explain how unrelated self-interested individuals can accomplish more together than th...
www.pnas.org
July 22, 2025 at 6:04 AM
Reposted by Nicolas Legrand
memo is a new probabilistic programming language for modeling social inferences quickly. Looks like a real advance over previous approaches: fast, python-based, easily integrated into data analysis. Super cool!

pypi.org/project/memo...
and
osf.io/preprints/ps...
memo-lang
A language for mental models
pypi.org
July 9, 2025 at 8:56 PM
Reposted by Nicolas Legrand
Thrilled to see our TinyRNN paper in @nature! We show how tiny RNNs predict choices of individual subjects accurately while staying fully interpretable. This approach can transform how we model cognitive processes in both healthy and disordered decisions. doi.org/10.1038/s415...
Discovering cognitive strategies with tiny recurrent neural networks - Nature
Modelling biological decision-making with tiny recurrent neural networks enables more accurate predictions of animal choices than classical cognitive models and offers insights into the underlying cog...
doi.org
July 2, 2025 at 7:03 PM
Reposted by Nicolas Legrand
Interoception vs. Exteroception: Cardiac interoception competes with tactile perception, yet also facilitates self-relevance encoding https://www.biorxiv.org/content/10.1101/2025.06.25.660685v1
June 28, 2025 at 12:15 AM
Impressive and much-needed review on reinforcement learning models of interoception by @lilweb.bsky.social this month out in @cp-trendscognsci.bsky.social Will definitely have a look at this one 😊 www.cell.com/trends/cogni...
The interoceptive origin of reinforcement learning
Rewards play a crucial role in sculpting all motivated behavior. Traditionally, research on reinforcement learning has centered on how rewards guide learning and decision-making. Here, we examine the ...
www.cell.com
June 28, 2025 at 10:16 AM
Reposted by Nicolas Legrand
We need your help!!! 🧠🧪💤

If you are human, you fall asleep at least once a day! What happens in your mind then?

Scientists know actually very little about this private moment.

We propose a 20-min survey to get as much data as possible!

Here is the link:
redcap.link/DriftingMinds
June 19, 2025 at 2:43 PM
Reposted by Nicolas Legrand
If I have time I'll put together a more detailed thread tomorrow, but for now, I think this new paper about limitations of Chain-of-Thought models could be quite important. Worth a look if you're interested in these sorts of things.

ml-site.cdn-apple.com/papers/the-i...
June 8, 2025 at 6:35 AM
Reposted by Nicolas Legrand
Led by postdoc Doyeon Lee and grad student Joseph Pruitt, our lab has a new Perspectives piece in PNAS Nexus:

"Metacognitive sensitivity: The key to calibrating trust and optimal decision-making with AI"

academic.oup.com/pnasnexus/ar...

With co-authors Tianyu Zhou and Eric Du 1/
Metacognitive sensitivity: The key to calibrating trust and optimal decision making with AI
Abstract. Knowing when to trust and incorporate the advice from artificially intelligent (AI) systems is of increasing importance in the modern world. Rese
academic.oup.com
May 27, 2025 at 2:27 PM
Reposted by Nicolas Legrand
🤖🧠 Paper out in Nature Communications! 🧠🤖

Bayesian models can learn rapidly. Neural networks can handle messy, naturalistic data. How can we combine these strengths?

Our answer: Use meta-learning to distill Bayesian priors into a neural network!

www.nature.com/articles/s41...

1/n
May 20, 2025 at 7:04 PM
Reposted by Nicolas Legrand
How does the brain stop thoughts? Find out in my article in @natrevneuro.nature.com with Subbu Subbulakshmi & Maite Crespo-Garcia www.nature.com/articles/s41... that integrates 25 yrs of psychology and neuroscience on this vital function.@mrccbu.bsky.social sky.social #neuroskyence #neuroscience
Brain mechanisms underlying the inhibitory control of thought - Nature Reviews Neuroscience
The capacity to prevent unwanted thoughts is important for cognitive function and mental health. Anderson et al. describe insights into the neural mechanisms of the inhibitory control of thought that ...
www.nature.com
May 20, 2025 at 9:36 AM