Thursday, December 9, 2010

Bayesian hallucination

Have you ever felt your phone buzz (when it didn't), or saw an email notification in the corner of the screen (when there was none)? Don't worry—you're not loosing your mind. 
 
This happens because the brain performs value-weighted predictive coding of unreliable sensory input. It can be explained in terms of balancing costs and benefits when using unreliable information:
  • let $u$ be the utility ( benefit ) of responding to a notification,
  • let $c$ be the cost of verifying whether a notification is real or imagined
  • let $\Pr(\mathrm{present})$ be the probability that a notification is really there
Optimally, you should check a notification if the expected benefit of responding to the notification outweighs the cost : check notification if and only if $\mathbb E(u)>c$

[0] $\mathbb E(u) = u \cdot \Pr(\mathrm{present})$
[1] Check notification if and only if : $u \cdot \Pr(\mathrm{present}) > c$

How does one know $\Pr(\mathrm{present})$ given some unreliable observation $\theta$ in peripheral vision, that is $\Pr(\mathrm{present}|\theta)$ ? This can be computed using Bayes' theorem : [2]

[2] $\Pr(\mathrm{present}|\theta)=\Pr(\theta|\mathrm{present})\cdot\Pr(\mathrm{present})/\Pr(\theta)$

So, $\Pr(\mathrm{present}|\theta)$ is the probability of observing $\theta$ when the notification is really there, $\Pr(\theta)$ is the probability of observing $\theta$ overall, and $\Pr(\mathrm{present})$ is the background probability of the notification being present. Plugging in expression [2] for $\Pr(\mathrm{present}|\theta)$ into equation [1] :

[3] check if and only if : $u \cdot \Pr(\theta|\mathrm{present}) \cdot \Pr(\mathrm{present}) / \Pr(\theta) > c$ 

Peripheral observations $\theta$ are noisy, and $\Pr(\theta|\mathrm{present})$ has different but overlapping distributions depending on whether or nor a stimulus is present. If the expected benefit from checking a notification is high, this can lower the threshold for checking a notification. The sensory system automatically optimizes unreliable perception into a (possibly inaccurate) high-level report for the parts of the brain that deal with behavior and attention.