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
With some trepidation, I'm putting this out into the world:
gershmanlab.com/textbook.html
It's a textbook called Computational Foundations of Cognitive Neuroscience, which I wrote for my class.

My hope is that this will be a living document, continuously improved as I get feedback.
January 9, 2026 at 1:27 AM
Reposted by Nicolas Legrand
🚀 Excited to announce that I'm looking for people (PhD/Postdoc) to join my Cognitive Modelling group @uniosnabrueck.bsky.social.

If you want to join a genuinely curious, welcoming and inclusive community of Coxis, apply here:
tinyurl.com/coxijobs

Please RT - deadline is Jan 4‼️
December 18, 2025 at 2:52 PM
Reposted by Nicolas Legrand
** Recruiting a postdoc ** We are looking for a postdoc to work on emotion, mental health, and interoception, based in London at @ucl.ac.uk in my lab (Clinical and Affective Neuroscience). Part of a large Wellcome Grant (co-led with the brilliant @camillanord.bsky.social)
November 24, 2025 at 12:22 PM
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