  This paper presents a predictive coding account of obsessive-compulsive
disorder (OCD). We extend the predictive coding model to include the concept of
a 'formal narrative', or temporal sequence of cognitive states inferred from
sense data. We propose that human cognition uses a hierarchy of narratives to
predict changes in the natural and social environment. Each layer in the
hierarchy represents a distinct view of the world, but it also contributes to a
global unitary perspective. We suggest that the global perspective remains
intact in OCD but there is a dysfunction at a sub-linguistic level of
cognition. The consequent failure of recognition is experienced as the external
world being 'not just right', and its automatic correction is felt as
compulsion. A wide variety of symptoms and some neuropsychological findings are
thus explained by a single dysfunction. We conclude that the model provides a
deeper explanation for behavioural observations than current models, and that
it has potential for further development for application to neuropsychological
data.
