  The evolution of spiking neurons and nervous systems in the late Ediacaran
period simultaneously with the evolution of carnivores around 550 million years
ago can be explained by the need for accurately timed decisions under an
imminent threat of being eaten. A simple model shows that threshold triggering
devices, spiking neurons, are utility-maximizing decision-makers for the timing
of escape reflexes given the sensory cues available to Ediacaran animals at the
onset of carnivory. Decisions are suboptimal for very weak stimuli, providing
selection pressure for secondary processing of primary spike train data. A
simple network can make approximately Bayes optimal decisions given stochastic
spike trains. Decisions that are arbitrarily close to Bayes optimal can be
obtained by enlarging this network. A subnetwork that computes the Bayesian
posterior density of the critical state variable - distance between predator
and prey - emerges as a core component of the decision-making mechanism. This
is a neural analog of a Bayesian particle filter with cerebellar-like
architecture. The model explains fundamental properties of neurons and nervous
systems in modern animals and makes testable predictions.
