We thank Antti Honkela, Tomas Östman, and Alexander Ilin for work on Bayes blocks software library and for useful comments, and Hans van Hateren for supplying the video data Hateren98 used in the experiments. This research has been funded by the European Commission project BLISS and the Finnish Center of Excellence Programme (2000-2005) under the project New Information Processing Principles.