If you’ve ever been befuddled by a dream, take heart: You’re following a 4,000-year tradition of confusion. Over that time, humanity — in the form of religion, philosophy, psychology, neuroscience — has actually come to somewhat understand what exactly the mind is doing in its slumbering states.

To that end, here are five of the leading theories for what dreams are and what they do to us:

Dreams are data.

Dreaming started to really fall under empirical scrutiny in the 1950s, with the discovery of what would become known as the rapid-eye-movement (REM) phase of sleep by University of Chicago researchers Eugene Aserinsky and Nathaniel Kleitman. Today, brain scans are beginning to detect the subject matter of dreams by training algorithms to recognize what people’s brain activity looks like while awake. Meanwhile, dream recorders are coming down the line. Bulkeley, the dream researcher, has launched the Sleep and Dream Database, which has crowdsourced some 20,000 dreams from volunteers around the world. Already, he says, psychological themes are emerging, such as that people are rarely alone in dreams, and that they tend to dream of people they’re emotionally close to. “Dreams reflect the emotional concerns we have in our relationships,” he says.”Dreaming is really a resource for exploring the qualities of our relationships, who we care about, where we struggle.” It’s kind of like the function of anxiety — a way of assessing (possibly healthy, intimacy-promoting) vulnerability, and prompting action.

Dreams are your memories in action.

For over a century, researchers have been uncovering how sleep promotes memory, specifically the formation of long-term memories, and now neuroscientists are increasingly finding that the kaleidoscopic imagery in dreams is a by-product of the memory-making process. When your different threads of experience are bound together, the result is as familiar as it is alien. “This often bizarre, composite image has not been present to the senses,” argues University of Manchester researcher Sue Llewellyn in a 2013 paper. “It is not ‘real’ because it hyper-associates several memories. During REM sleep, on the phenomenological level, this composite image is experienced as a dream scene.” Memories are bound with memories, and zany imagery ensues.

So does learning. When study participants were asked to navigate a virtual maze, and then take a nap, the people who dreamt of what they learned the first time around did better in the retest. Similarly, birds aren’t born knowing how to sing; they have to learn how. Biologist Daniel Margoliash and his lab at the University of Chicago have peered into the brains of sleeping male zebra finches, and they’ve found that the same patterns of neurons fire while they’re asleep as when they’re singing, trying to attract a mate. While you can’t exactly ask a finch what it experienced the night before, it looks like the birds practice their songs.

– Drake Baer

Read more: 5 of Humanity’s Best Ideas of What Dreams Actually Are

Photo Source: Pixabay Images