Cognitive Sciences Stack Exchange is a question and answer site for practitioners, researchers, and students in cognitive science, psychology, neuroscience, and psychiatry. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to understand a neuroscience article by Karl Friston. In it he gives three equations that are, as I understand him, equivalent or inter-convertible and refer to both physical and Shannon entropy. They appear as equation (5) in this article (PDF; DOI 10.1007/s00422-010-0364-z). Here they are:

  • Energy minus entropy: $F = −{\ln p(\tilde s,Ψ|m)}q + {\ln q(Ψ|μ)}q$
  • Divergence plus surprise: = $D(q(Ψ|μ)||p(Ψ|\tilde s,m)) − \ln p (\tilde s|m)$
  • Complexity minus accuracy: = $D(q(Ψ|μ)||p(Ψ|m)) − {\ln p(\tilde s|Ψ,m)}q$

The things I am struggling with at this point are:

  1. the meaning of the || in the 2nd and 3rd versions of the equations
  2. the negative logs

Any help in understanding how these equations are actually what Fristen claims them to be would be greatly appreciated. For example, in the 1st equation, in what sense is the first term energy, etc.?

share|improve this question
Cross-posted on Cross Validated. – Nick Stauner Jul 11 '14 at 23:48
+1 for also being confused by much of Fristen's writing. – zergylord Jul 15 '14 at 17:02
Cross-posted on Mathematics – honi Nov 16 '15 at 19:52
Cross-posted on Data Science – honi Nov 17 '15 at 18:59

As mentioned in the definitions section on page 2 of the paper, $D(q||p) = <ln(q/p)>_q$ is the Kullback-Leibler divergence or cross-entropy between two densities.

The reason for the negative logs is that is the convention when discussing entropy in the context of information theory. This allows information to be combined additively. (

share|improve this answer
i picked this article up as a result of this question and plan to give a more complete explanation of the equations soon – honi Nov 18 '15 at 14:36
Great! I eagerly await your take on what Friston is saying here. i find his work very interesting, but due to my lack of math skills, I cannot grasp the details and do not know how to evaluate it. – johnhidley Nov 19 '15 at 16:25
  1. In physics, exponential of negative energy is often probability (e.g. in maximum entropy models).
  2. || is a notation used in divergences (or info theory) where the order matters. That is $D(A||B) \neq D(B||A)$ as in KL divergence
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.