The "Ghost in the Machine" is a metaphor in philosophy. The philosopher Gilbert Ryle called mind the "Ghost in the Machine", and the idea that it was separate from the brain was the mistaken "official doctrine".