Reinforcement learning processes underlying the onset and maintenance of compulsive ritualistic behavior

Compulsive rituals in OCD present a fundamental puzzle for theories of human learning. How can an action acquire value as a means of preventing harm even though the individual recognizes that the action has little or no causal influence on the feared outcome? We propose that this apparent contradiction can arise from automatic credit assignment, whereby actions that precede favorable outcomes are reinforced even when those actions are known to be causally irrelevant. When harm is anticipated but no adverse outcome occurs, the absence of harm may reinforce the preceding action, allowing an objectively ineffective behavior to acquire harm prevention value. We formalize this account using an actor-critic reinforcement learning model in which actions are performed under fluctuating states of subjective perceived threat. Simulations show that agents possessing such false credit assignment mechanisms develop persistent ritualistic behavior in an objectively uncontrollable environment. We find that ritualistic behavior is especially likely to persist when feared outcomes are rare and highly aversive, making the ritual appear consistently effective in preventing a catastrophe. We further describe the cost-effectiveness of ritualistic behavior, and provide a computational account of how compulsive rituals can emerge as goal-directed attempts to prevent harm, persist despite explicit causal knowledge, and subsequently acquire anxiety-reducing properties. This work may help explain the persistence of compulsive behavior and inform mechanisms through which therapy can reduce it.

Authors

Publication Details

Published
2026-11-02
DOI
https://doi.org/10.31234/osf.io/t5x2s_v1
Primary Topic
Obsessive-Compulsive Spectrum Disorders
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Reinforcement learning processes underlying the onset and maintenance of compulsive ritualistic behavior

Nitzan Shahar, Ido Ben-Artzi, Eran Eldar, Tal Erdinast
1 links
Obsessive-Compulsive Spectrum Disorders
preprint

Reinforcement learning processes underlying the onset and maintenance of compulsive ritualistic behavior

Nitzan Shahar, Ido Ben-Artzi, Eran Eldar, Tal Erdinast
preprint en

Abstract

Compulsive rituals in OCD present a fundamental puzzle for theories of human learning. How can an action acquire value as a means of preventing harm even though the individual recognizes that the action has little or no causal influence on the feared outcome? We propose that this apparent contradiction can arise from automatic credit assignment, whereby actions that precede favorable outcomes are reinforced even when those actions are known to be causally irrelevant. When harm is anticipated but no adverse outcome occurs, the absence of harm may reinforce the preceding action, allowing an objectively ineffective behavior to acquire harm prevention value. We formalize this account using an actor-critic reinforcement learning model in which actions are performed under fluctuating states of subjective perceived threat. Simulations show that agents possessing such false credit assignment mechanisms develop persistent ritualistic behavior in an objectively uncontrollable environment. We find that ritualistic behavior is especially likely to persist when feared outcomes are rare and highly aversive, making the ritual appear consistently effective in preventing a catastrophe. We further describe the cost-effectiveness of ritualistic behavior, and provide a computational account of how compulsive rituals can emerge as goal-directed attempts to prevent harm, persist despite explicit causal knowledge, and subsequently acquire anxiety-reducing properties. This work may help explain the persistence of compulsive behavior and inform mechanisms through which therapy can reduce it.

Good health and well-being
Obsessive-Compulsive Spectrum Disorders
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon