How Adversarial REM Dreams May Facilitate Creativity, and Why We Become Aware of Them

: The importance of sleep for healthy brain function is widely acknowledged. However, it remains unclear how the internal generation of dreams might facilitate cognitive processes. In this perspective, we review a computational approach inspired by artificial intelligence that proposes a framework for how dreams occurring during rapid-eye-movement (REM) sleep can contribute to learning and creativity. In this framework, REM dreams are characterized by an adversarial process that, against the dream reality, tells a discriminator network to classify the internally created sensory activity as real. Such an adversarial dreaming process is shown to facilitate the emergence of real-world semantic representations in higher cortical areas. We further discuss the potential contributions of adversarial dreaming beyond learning, such as balancing fantastic and realistic dream elements and facilitating the occurrence of creative insights. We characterize non-REM (NREM) dreams, where a single hippocampal memory is replayed at a time, as serving the complementary role of improving the robustness of cortical representations to environmental perturbations. We finally explain how subjects can become aware of the adversarial REM dreams, but less of the NREM dreams, and how content-and state-awareness in wake, dream, and lucid dreaming may appear.


Introduction
Even though it disconnects us from the outside world, sleep still hosts internal conscious sensory experiences, or dreams, triggered by the generation of an internal, virtual world [1].Strikingly, these experiences usually evoke the sensation of being awake, since similar features as in our external sensorium (characters, objects, colors, places, and sounds) are incorporated in a realistic manner [2].Moreover, similarly to waking experiences, dreams reflect our current concerns, interests and personality, and are highly rich in emotions [3].As soon as we fall asleep, we stop consciously perceiving sensory stimuli from the external world, and instead be invaded by internal thoughts and hallucinations that are often unrelated to our previous immediate experiences [4].
Despite their realism, dreams, especially from rapid-eye-movement (REM) sleep, often feature bizarre and creative elements, mostly because they do not simply replay previous experiences [5][6][7].In a study examining dream reports and waking activities from participants over 14 days, [5] showed that while 65% of dream reports incorporate aspects of waking experiences, the exact replay of waking events was found in only 1-2.
Instead, dreams are constructed from a combination of various isolated, sometimes non-obviously related episodic fragments [8][9][10].This combination of unrelated memories results in REM dreams often appear bizarre and creative in retrospect.For instance, a person may dream of attending a tea party hosted on the moon, where the guests are historical figures speaking in riddles-a bizarre experience.Creatively, a dream could involve designing a building that transforms itself based on the weather, showcasing innovative solutions to climate change challenges.
The observed novelty in our dreams raises the question of their potential function.How could such a virtual, hallucinatory, and fantastic experience benefit our cognitive functions?It remains debated whether dreams have any functionality at all or whether they are mere epiphenomenal byproducts of sleep [7,11,12].Contemporary theories often relate dreaming to memory consolidation (e.g., see [3,13,14]) or emotional processing (e.g., see [15][16][17]).A further strand of theories assumes that the combination of memories into a new, virtual scenario during dreaming serves to enhance creativity (e.g., see [9,18]).Motivated by anecdotal evidence of scientific discoveries originating in dreams-e.g., the benzene structure by Kekule (1865) or the chemical neurotransmission by Loewi (1936) [1] -the role of dreams in creativity has been taken into wider consideration.It has been proposed that the creative associations between unrelated memories during dreaming could lead to the discovery of unexpected solutions, which lies at the essence of creative problem solving [9].Through this process, the dreamer is enabled to engage in creative experimentations that might serve as a solution for potential future problems [8,19], such as, e.g., rehearsing threat perception and avoidance.However, empirical studies report that dreams rarely contain practical solutions to real-life problems, in addition to the fact that most dreams are forgotten [10,[20][21][22].
In contrast, in a recent computational study, we (the authors of [23]) argued that the creative aspect of dreams serves a more basic function than creativity itself; that is, dreaming facilitates learning semantic representations based on sensory experiences gathered during waking.In this study, we proposed a cortical architecture, where sensory inputs are perceived through feedforward pathways of sensory cortices, while dreams are generated through the feedback pathways.In particular, we show that the generation of dreams during REM sleep can be explained by an adversarial learning mechanism inspired by Generative Adversarial Networks (GANs, [24]) where feedback pathways trick feedforward pathways into believing that the dream comes from outside.Crucially, this mechanism leads to the acquisition of structured, semantic cortical representations, which are essential to perform downstream tasks such as object recognition.
In this article, we provide an accessible overview of this computational approach, thereby explaining how adversarial dreams could facilitate creativity and the learning of an internal representation of objects and concepts from the external world.We show how an adversarial dream implicitly assumes meta-structures in the brain (a 'conductor') that gate and represent information to interpret activity in early sensory cortices either as dreamed/imagined, or being evoked from the external world.This leads us to the notion of dream awareness, and more specifically to the awareness of the dream content and the dream state.We discuss the model in light of previous theories of dream origin, functions, and changes in dreams across the lifespan.

A Computational Model for Creative Dreams
Even though dreaming is a universal phenomenon, characterizing its role is still, up to this day, a challenging task.For instance, it is difficult to assess whether the improvement of skills after a night of sleep is due to the occurrence of a certain dream, or to other physiological features of sleep such as hippocampal replay during NREM sleep [25].In other words, the potential effects of sleeping and dreaming are entangled and thus confounded, since they are naturally co-occurring.Nonetheless, there have been some attempts to investigate the effect of dreaming, notably through the use of pharmacological interventions to suppress REM sleep in participants (see, e.g.[26]).Despite these efforts, disentangling the effects of dreams within sleep remains complex and largely unclear.
Here, computational models can help to quantify physiological features such as dreams and replay through simulations, and thereby decipher their contributions within a defined task.This was the challenge of our study that, through the construction of a "perturbed and adversarial dreaming" (PAD) model, suggests a role for dreams in learning to classify objects that come in a variety of versions in different visual scenes [23].The PAD model is composed of a cortical feedforward (FF) pathway with a discriminator network (D), and a feedback (FB) pathway that generates sensory activity from a hippocampal memory.The system can either be in a Wake state, where external stimuli are directly driving the FF pathway, or in a dream state, where sensory activity is generated by a hippocampal memory replay fed into the FB pathway.
During wakefulness (Figure 1a), the cortex is exposed to diverse natural images that are processed along the cortical hierarchy through the FF pathway, until incorporated into high-level neuronal object representations, for example in the Inferior Temporal (IT) cortex [27].Snapshots of the activity in these representations are temporarily stored in the hippocampus as episodic memory, that, for instance, during sleep, can be replayed into the cortical representation.During the forward processing of the sensory input, the discriminator network D learns to recognize that the sensory activity evoked by an image presentation is real (Figure 1a, red 'D').
During the REM sleep phase (Figure 1b), the representation stored from the previous day is replayed from the hippocampus ("dog" memory) along with past, sometimes unrelated memories ("car" memory), and some additional cortical background activity (which is modeled as noise).The resulting activity in higher cortical areas represents the dream content.It is processed along the cortical FB pathway down to low-level sensory areas where details are added to the dream.Due to the combination of diverse memories, the dream might contain various unrelated elements, such as a car having the texture or the shape of a dog.Yet, the mere superposition of the abstract representations in the higher cortical area does not entail instructions on how the FB pathway can succeed in generating a realistic sensory activity out of the novel combination.This is where the principle of GANs, i.e., adversarial learning, comes into play.The dream is processed through the FF pathway and the discriminator D. During REM sleep, the discriminator learns that the internally generated sensory activity is dreamed.The FB pathway, however, learns to improve the realism of its generated activity, and with that makes the task for the discriminator to correctly classify the activity as dream more difficult.This FB pathway represents adversarial learning, leading to adversarial dreams that try to evoke a misclassification of the discriminator.
The described PAD model of sleep is trained by repeating many wake-sleep cycles, whereby a set of natural images is repeatedly processed by the FF and FB pathways and the discriminator D. Once training is completed, we can examine the quality of the learned highlevel representations (Figure 1c,d) within the learned latent space of the model (the highest cortical representation).Note that these representations are not learned in a supervised manner with an explicit teaching signal that would indicate the ground truth category of the observed object.Instead, the representations are formed through unsupervised learning, leading to a clustered higher-level neuronal representation of visual objects.The structure of the latent space can be illustrated by Principal Component Analysis (PCA, [28]) applied to the activity in the last layer of the FF network.Projecting the activity vectors to the first two principal components, this procedure allows for visualizing how the representations of various learned objects cluster in the latent space.The visualization is not part of the model, although PCA could itself be modeled by a neuronal network [29].
Comparing PCA projections after different training regimes allows for investigating the effect of wakefulness versus REM dreams: If only the wake phase is present, the obtained PCA projection shows that representations from different object categories are entangled, indicating that wakefulness is not sufficient to construct structured semantic representations (Figure 1c).When both Wake and REM sleep phases are simulated (Figure 1d), the PCA projection shows relatively distinct clusters of latent representations according to the semantic category ("class identity") of the corresponding images.The model thus tends to organize latent representations such that high-level, semantic clusters are distinguishable, potentially helping humans and other animals to discern different object categories from their sensorium.This is particularly important for animals that do not receive explicit teaching signals in the way humans and their children do throughout development.
(classifier) trained on high-level cortical representations obtained throughout the model simulation.If the REM phase is included in the training, the accuracy of the classifier tends to be much higher than if only the Wake phase is simulated (Figure 1e,f).The results show that the generation of dreams during REM sleep is essential to organizing high-level representations according to the semantics of the sensorium, suggesting that dreaming is an essential component of learning.During wakefulness (Wake), a discriminator network (D, red) reads out activity from the cortical feedforward pathway (FF, green) and learns to correctly recognize that sensory activity (lower green pyramidal neurons) is externally driven (real, red).The high-level representations are stored in the hippocampus for future replay (dashed arrow, not explicitly modeled as neuronal structure).(b) During REM sleep, the feedback pathway (FB, blue) learns to adversarially generate virtual sensory activity from a combination of multiple hippocampal memories and spontaneous cortical activity (here, a "doggy car") that may be incorrectly classified by D as real.The adversarial learning of realistic sensory activity by the FB pathway is achieved by imposing the target real! on D (red '!', (a) During wakefulness (Wake), a discriminator network (D, red) reads out activity from the cortical feedforward pathway (FF, green) and learns to correctly recognize that sensory activity (lower green pyramidal neurons) is externally driven (real, red).The high-level representations are stored in the hippocampus for future replay (dashed arrow, not explicitly modeled as neuronal structure).(b) During REM sleep, the feedback pathway (FB, blue) learns to adversarially generate virtual sensory activity from a combination of multiple hippocampal memories and spontaneous cortical activity (here, a "doggy car") that may be incorrectly classified by D as real.The adversarial learning of realistic sensory activity by the FB pathway is achieved by imposing the target real! on D (red '!', despite being in the sleep phase), and backpropagating the error to the FB network.(c,d) Principal Component Analysis (PCA) was applied as a tool to visualize the formation of clusters in the highlevel representation of the images.Shown is a projection of the first two principal components, with different colors representing different object categories.(e,f) Performance of a linear classifier telling which object is in an image.The classifier is trained on high-level representations learned either without (e) or with (f) REM dreaming.An epoch consists of 780 Wake-NREM-REM sleep cycles in which 64 images are sampled during Wake and replayed during the NREM and REM phases.One epoch sample roughly 5/6 of the CIFAR10 data set with 60,000 images and 10 classes.Adapted from [23].
These results can be quantified by evaluating the performance of a linear decoder (classifier) trained on high-level cortical representations obtained throughout the model simulation.If the REM phase is included in the training, the accuracy of the classifier tends to be much higher than if only the Wake phase is simulated (Figure 1e,f).The results show that the generation of dreams during REM sleep is essential to organizing high-level representations according to the semantics of the sensorium, suggesting that dreaming is an essential component of learning.

Semantization Requires More Than Memory Replay
Previous cognitive theories of sleep, such as "semantization" theories [30,31], suggest that the commonalities between multiple experienced episodes are extracted during NREM sleep to form a cortical semantic representation.A cognitive model [32] proposed that semantic formation is based on the invariant overlapping and statistical regularities between single-replayed episodic memories.Areas of overlap are strengthened via Hebbian learning, allowing for an abstraction of shared elements among these memories, the so-called semantic "gist".For example, the reactivation of various memories of "cat experiences" facilitates the extraction and consolidation of the concept "cat" from repeating features with episodic memories (four legs, pointed ears, tail, etc.) in cortical representations.
The PAD model offers a further perspective on the semantization process during sleep.It suggests that the semantization of cortical representations is more likely induced by REM dreams, featuring combinations of episodic memories, than by the replay of single episodic memories during NREM sleep.We incorporated NREM sleep into our model by a phase where individual hippocampal memories are replayed without combination with other memories.Instead, the activity in the sensory area after processing through the FB pathway is perturbed by randomized patches (see section on NREM sleep below).We find that NREM sleep in our model has little or no impact on the acquisition of semantic representations-even when adversarial learning based on individual memory replays is enabled in the FF/D and FB pathway (see [23] for details).The simulations indicate that to extract semantic concepts from sensory data, the brain must go beyond merely replaying previous experiences as classically accounted for in NREM sleep [33].It appears that novel but realistic contents must be internally created from simultaneous multiple memories that explore the boundaries between object categories, and help to form a representation of these objects based on contents and content differences.The suggested role of creative REM dreams may help to refine cognitive theories about sleep function and to delineate the role of NREM and REM sleep in memory semantization.
The described creative memory replay can be seen in the light of the overfitted brain hypothesis, which proposes that "nightly dreams evolved to combat the brain's overfitting during its daily learning" [22].More specifically, the overfitted brain hypothesis posits that the creation of corrupted sensory activity from stochastic memory replay during sleep increases the generalizability of the object representations learned during the day.The stochastic memory replay aligns with the NREM phase in our model.In our NREM phase, hippocampal memories are fed back into the cortex and randomly perturbed, in order to train the cortical representations in the FF pathway to become noise resistant.Yet, as we showed, the random perturbations in single memories alone are not as efficient in separating objects in the cortical representation as when memories are paired in a creative replay during REM ( [23], Figure 1d).The PAD model therefore suggests that sleep increases generalizability with both stochastic replay during NREM and-going beyond the overfitted brain hypothesis [22] -also with creative replay during REM sleep.

Adversarial Dreams on the Edge between Fantasy and Reality
Aside from proposing a role for dream function, the adversarial dreaming principle of the PAD model suggests a mechanism for how internal sensory activity can be generated in the brain, and how equilibrium between fantastic and realistic aspects can be maintained, potentially beyond the stage of dreaming.Following the PAD framework, we assume that different memories, for example, a memory of an eagle and a human (the dreamer), are concurrently replayed from the hippocampus and combined in high-level cortical areas (Figure 2).The combined activity is sent through the FB pathway, leading to the generation of a dream representing a flying human, which is, while being novel and creative, not very convincing in terms of realism.This lack of realism allows the discriminator to easily detect that the sensory activity is dreamed and not real.
of the PAD model suggests a mechanism for how internal sensory acti ated in the brain, and how equilibrium between fantastic and realistic as tained, potentially beyond the stage of dreaming.Following the PAD f sume that different memories, for example, a memory of an eagle a dreamer), are concurrently replayed from the hippocampus and comb cortical areas (Figure 2).The combined activity is sent through the FB pa the generation of a dream representing a flying human, which is, whil creative, not very convincing in terms of realism.This lack of realism al nator to easily detect that the sensory activity is dreamed and not real.

Figure 2. Adversarial learning at the edge between fantasy and reality.
A cre ated by the combination of two memory elements (e.g., a bird and a human).Pr bination down through the FB pathway (blue) generates a sensory activity that m a flying human.The sensory activity is then passed through the FF pathway (g discriminator (D, red), which likely detects that this experience is to be dreame '?').But the target of the discriminator is adversarially set to real! (top left).Thi in the discriminator output that is backpropagated through D and the FF path area (dashed red arrows).On its way back, the error transforms into visual ele correct the dreamed sensory activity so that D classifies this activity as real (e.background).This is carried out by modifying the synaptic weights of the (oblique ↗crossing FB) such that this generates the more realistic sensory activi backpropagated errors from the D. Plasticity in the discriminator network in th verted so that D still has a chance to correctly judge the internally generated dreamed (negative sign at c↗rossing D) in a race against the adversarial plasticity The adversarial corrections eventually lead to more realistic dreams (such as c of flying) across the duration of the learning procedure that may extend acros individual.Creative and potentially realistic dreams may help the dreamer in cre ing after sleeping [9,34,35].Images represent a sketch, not simulation results.

Figure 2. Adversarial learning at the edge between fantasy and reality.
A creative dream is initiated by the combination of two memory elements (e.g., a bird and a human).Propagating this combination down through the FB pathway (blue) generates a sensory activity that may be perceived as a flying human.The sensory activity is then passed through the FF pathway (green), featuring the discriminator (D, red), which likely detects that this experience is to be dreamed (indicated by the '?').But the target of the discriminator is adversarially set to real! (top left).This produces an error in the discriminator output that is backpropagated through D and the FF pathway to the sensory area (dashed red arrows).On its way back, the error transforms into visual elements necessary to correct the dreamed sensory activity so that D classifies this activity as real (e.g., a cliff and a lake background).This is carried out by modifying the synaptic weights of the feedback pathway (oblique ↗ crossing FB) such that this generates the more realistic sensory activity suggested by the backpropagated errors from the D. Plasticity in the discriminator network in the REM phase is inverted so that D still has a chance to correctly judge the internally generated sensory activity as dreamed (negative sign at ↗ crossing D) in a race against the adversarial plasticity in the FB pathway.The adversarial corrections eventually lead to more realistic dreams (such as cliff jumping instead of flying) across the duration of the learning procedure that may extend across the life span of an individual.Creative and potentially realistic dreams may help the dreamer in creative problem solving after sleeping [9,34,35].Images represent a sketch, not simulation results.
The adversarial learning of the FB pathway will restore the realism in this scene.The key point of adversarial dreaming is that the FB pathway attempts to fool the discriminator into believing that the dream actually is a sensory experience.There are two ways to implement this fooling: either by reverting the synaptic plasticity in the FB pathway and keeping the correct target for the discriminator (as described and simulated in [23]), or by keeping the plasticity in the FB pathway untouched, while reverting the target for D. It is this second version that we suggest here as a biological implementation.The reason is that the target imposed on the discriminator may provide an awareness signal for the content, as we elaborate in the last section.The REM phase still needs a sign switch in the synaptic plasticity, and this is now on the synapses of the discriminator network during REM sleep (Figure 2).In fact, while D learns during wakefulness to correctly classify the externally generated sensory activity as real, it should learn to correctly classify internally generated sensory activity as dreamed during the REM phase.A sign switch of synaptic plasticity (necessary in the D network when the target remains real during the REM phase) was experimentally observed by the action of acetylcholine [36] and is also involved in the regulation of REM sleep [19].
In detail, the "adversarial game" during REM sleep starts by imposing the wrong target real! on the discriminator output.This typically leads to an error between the target and what the input from D would like to produce.To still improve the discriminator, plasticity in D is inverted, as just explained.But plasticity in the FB pathway remains the same, so the FB network now tries to produce a sensory activity that becomes more real, as requested by the target real!for D. The FB pathway is also told how to improve because the error from D, which carries the instruction to improve the realism in the sensory activity, is propagating down through D and the FF pathway to the FB network (for a biological form error backpropagation, see [37]).In other words, the FB pathway adapts such that the internally generated activity in the sensory area will more likely fool the discriminator into believing that the activity is real and produced from the outside.As a consequence, after thousands of wake-sleep cycles, the dream is thus better blended into the reality of the outside world.The same computational principles may also apply to improve creative imagination during wakefulness (see the Discussion section).
To come back to our example, we consider the experience of dreaming about flying through the clouds, resulting from combining the hippocampal memory of a bird and a human (Figure 2).The dream could be easily unmasked as "fake" by the discriminator D. Yet, sometimes humans engage in sports such as cliff jumping, whereby it appears as if the jumper is flying.Accordingly, the realism of the dream could be increased by adding visual details such as some cliffs and water.On the other hand, the omission of these details signifies errors that must be corrected to enhance the dream's plausibility.In this case, the synaptic connections of the FB pathway are modified to generate a more realistic, plausible dream.Consequently, in a subsequent REM phase, we might find ourselves leaping off a cliff to fly over the sea.The novel dreams created during the REM phase in our model will also change the early cortical activity produced during wakefulness when 'mind-wandering' through the latent representation.This in turn may influence our future actions.For instance, we may go cliff jumping the next day after the REM dream has generated the corresponding scene.
Adversarial learning might thus explain how dreams, originating in a creative combination of memories, can be constrained to become more realistic and make them compatible with our waking experiences and actions.This is in line with Hobson's pioneer activationsynthesis theory that claims that REM dreams result from the brain "making the best of a bad job in producing even partially coherent dream imagery from the relatively noisy signals sent up to it from the brain stem" [38] p. 1347.In the spirit of this citation, the modeled generative process during REM sleep starts with a noise signal added to random combinations of memories and tries to produce a coherent and realistic cortical activity through adversarial learning.We will next see how the resulting balance between fantastic and creative dream elements can be useful to trigger creative insights.

Adversarial Dreaming at the Heart of Creativity?
Adversarial dreaming may also influence creativity during wakefulness.As a consequence of adversarial dreaming, the FB projection can lead to the generation of sensory activity patterns that have not likely been evoked by previously experienced stimuli (novel combination of episodic memories), but that nevertheless may be possible in reality (increased realism through the adversarial game).This kind of constrained simulation may have functional benefits in terms of creative thinking and gaining insights in general.
Novel cognitive insights were argued to result from a period of "incubation", where non-obvious, remote associations from memory (or knowledge) elements are brought into our thinking [39,40].These associations can sometimes be compatible with reality, in which case they can provide a solution to a complex problem through a creative insight ( [41], "Aha moments") that deliberate reasoning alone may not provide.Dreaming appears to be an ideal stage to promote novel associations and eventually enhance creative insights, as previously suggested [9,18,42,43].More recent studies show that subjects with narcolepsy, characterized by falling asleep directly into REM sleep and having a higher percentage of REM sleep [44], show higher creative potential [34].
Creative problem solving is also promoted by the twilight stage before sleep, as allegedly exploited by the great inventor Thomas Edison [35].While napping down, he held two balls that would drop and awaken him as he entered deep sleep, enabling him to capture thoughts about his inventions that would otherwise be lost.Experimental examination confirmed this anecdotal evidence and revealed that creative problems are easier solved on the verge of falling asleep and being awakened from the first stage of NREM sleep (N1), as opposed to being awakened from the second stage of NREM sleep (N2) or staying awake throughout [35].Creative problem-solving is further fostered by a 60 min nap as opposed to a 60 min rest [45].In a similar line, Ritter et al. [46] found that creative performance is already boosted by a simple eye closure as opposed to keeping eyes open.To relate these findings to our model of creative dreaming and imagination, we postulate that during the described creative stages our adversarial processes are triggered.The specific form of memory replay and synaptic plasticity arising in adversarial learning may be induced through differential activation of neuromodulators, as it is also observed during the transition across sleep stages [47], and in shaping memory replay in general [48].
Beyond Edison's nap technique, anecdotal evidence exists from August Kekulé who discovered the Benzene structure through a dream in which he combined two non-related concepts, a snake biting its tail and the carbohydrate molecular chain [1].Here, the adversarial dreaming framework could explain the occurrence of such insights (Figure 3).The memories of a depiction of the ouroboros symbol (a snake eating its tail) and the hexane molecule could be randomly replayed from the hippocampus and combined in high-level areas during REM sleep.Propagating this activity down through the FB pathway, the adversarial learning mechanism could allow the generation of a dreamed molecule that contains aspects of the ouroboros, such as its cyclic shape.By forcing this dream to be realistic against the discriminator's judgment, the dreamed molecule could be harmonized with known properties of chemistry so that it might exist in reality.Naturally, not all creative combinations experienced during dreaming are useful, and their usefulness is ultimately determined by how compatible they are with the actual external world.
This suggests that additional steps may be involved, such as experimentally verifying the insight that occurred, reflected in Kekulé 's words: "Let us learn to dream, gentlemen, and then perhaps we shall learn the truth . . .but let us beware of publishing our dreams before they have been put to the proof by the waking understanding" (account of his famous dream of the benzene structure, as quoted in [49] (p.54).This suggests that additional steps may be involved, such as experimentally ve the insight that occurred, reflected in Kekulé 's words: "Let us learn to dream, gent and then perhaps we shall learn the truth … but let us beware of publishing our d before they have been put to the proof by the waking understanding" (account of mous dream of the benzene structure, as quoted in [49] (p.54).

NREM: Improving Memory Robustness by Perturbed Replay
The suggested adversarial REM dreams represent part of the full PAD mod also includes NREM sleep.For the past few decades, NREM sleep has been ass with memory consolidation [13,33,50] and memory semantization [30,32].The main anism hypothesized to drive these consolidation processes is the reactivation of campal representations observed during slow-wave sleep, the deepest stage of sleep [51].Accordingly, replaying hippocampal memories allows a transfer to corti works for long-term retention via Hebbian learning [13], possibly through an abst of semantic concepts by discarding spatiotemporal details and keeping the commo between replayed memories [30][31][32].
The PAD model also incorporates hippocampal replay during NREM sleep an gests a complementary role of REM sleep in memory consolidation and semanti Here, hippocampal memories of a snake and a hexane molecule are combined to generate a potentially realistic dream through the FB pathway that would represent the benzene molecule.To ensure that this dream is compatible with reality, it is fed through the FF pathway and the discriminator (D) that itself is adversarially encoding the target real (red).The discrepancy between the imposed real target and the forward drive from the D network represents the discrimination error.This discrimination error teaches the FB pathway (red ↗ crossing FB) how to improve the realism of the random memory combination of a snake and a hexane to represent-what Kekulé inspired to become-the benzene (bottom, see Figure 2 for the learning mechanism).

NREM: Improving Memory Robustness by Perturbed Replay
The suggested adversarial REM dreams represent part of the full PAD model that also includes NREM sleep.For the past few decades, NREM sleep has been associated with memory consolidation [13,33,50] and memory semantization [30,32].The main mechanism hypothesized to drive these consolidation processes is the reactivation of hippocampal representations observed during slow-wave sleep, the deepest stage of NREM sleep [51].Accordingly, replaying hippocampal memories allows a transfer to cortical networks for long-term retention via Hebbian learning [13], possibly through an abstraction of semantic concepts by discarding spatiotemporal details and keeping the commonalities between replayed memories [30][31][32].
The PAD model also incorporates hippocampal replay during NREM sleep and suggests a complementary role of REM sleep in memory consolidation and semantization.While memory replay has been extensively associated with memory consolidation, as such, it is not obvious how the reactivation of previous memories alone could improve cortical representations.Here, we argue that non-creative dreams might be beneficial if some perturbations are applied, making the recognition of dreamed objects more challenging.During NREM phases in the PAD model, a single episodic memory is retrieved from the hippocampus (instead of multiple memories in the case of REM) (Figure 4, middle), resulting in dreaming of a sensory input previously experienced.Additionally, this dream is perturbed by some randomized occlusions in the sensory area, and the FF pathway is trained to map the perturbed dream to the initially replayed latent activity in the higher cortical area.Such a learning paradigm is reminiscent of the sleep phase in the Wake-Sleep algorithm [52].In this algorithm, the FF recognition pathway is trained during the Sleep phase so that it inverts the FB generative pathway.The generative FB pathway is itself trained during the Wake phase so that it learns to reproduce the sensory activity from the internal representation generated by the FF pathway.
from the hippocampus (instead of multiple memories in the case of REM) (Figure 4, middle), resulting in dreaming of a sensory input previously experienced.Additionally, this dream is perturbed by some randomized occlusions in the sensory area, and the FF pathway is trained to map the perturbed dream to the initially replayed latent activity in the higher cortical area.Such a learning paradigm is reminiscent of the sleep phase in the Wake-Sleep algorithm [52].In this algorithm, the FF recognition pathway is trained during the Sleep phase so that it inverts the FB generative pathway.The generative FB pathway is itself trained during the Wake phase so that it learns to reproduce the sensory activity from the internal representation generated by the FF pathway.Besides the wake phase (left) consisting of observing sensory inputs from the outside world and the REM phase (right) generating adversarial dreams, the PAD model also features a NREM phase (middle) where a single memory is replayed from the hippocampus in a corrupted manner (dashed blue arrow).Hence, a dream is generated from the latent representation of an input that has been observed during wakefulness.The hippocampal recall is re-activating a higher cortical area (top right, blue), and from there perturbed along the FB pathway to the sensory cortex with some randomized activity patches (bottom, pale squares).This non-creative but perturbed activity is sent through the FF pathway upwards again.The FF pathway learns (red oblique arrow ↗) to map the sensory activity back to the higher cortical area so that it represents the original memory replay (red arrow with the '?'; here, the latent representation of the dog without perturbations).By adapting the FF pathway to match the original unperturbed latent representation, the FF pathway becomes more robust to sensory perturbations and may generalize better to natural variations of the objects.Adapted from [23].
By replaying and perturbing previously experienced inputs, the PAD model shows that learned cortical representations are more robust to perturbations that might occur in the visual field when an object is partially hidden by obstacles (see Figure 5c,d in [23]).While REM dreams tend to semanticize cortical representations through their creative process, NREM dreams make them more robust to environmental noise.Together, NREM and REM dreams act complementarily to construct semantic, robust representations.Hence, a dream is generated from the latent representation of an input that has been observed during wakefulness.The hippocampal recall is re-activating a higher cortical area (top right, blue), and from there perturbed along the FB pathway to the sensory cortex with some randomized activity patches (bottom, pale squares).This non-creative but perturbed activity is sent through the FF pathway upwards again.The FF pathway learns (red oblique arrow ↗) to map the sensory activity back to the higher cortical area so that it represents the original memory replay (red arrow with the '?'; here, the latent representation of the dog without perturbations).By adapting the FF pathway to match the original unperturbed latent representation, the FF pathway becomes more robust to sensory perturbations and may generalize better to natural variations of the objects.Adapted from [23].
By replaying and perturbing previously experienced inputs, the PAD model shows that learned cortical representations are more robust to perturbations that might occur in the visual field when an object is partially hidden by obstacles (see Figure 5c,d in [23]).While REM dreams tend to semanticize cortical representations through their creative process, NREM dreams make them more robust to environmental noise.Together, NREM and REM dreams act complementarily to construct semantic, robust representations.[53]).The output of the discriminator D receives the (non-adversarial) "real" teaching signal from the conductor (C, top left leftward rightward arrow with '!') and may also elicit a calcium spike (red-filled pyramidal neuron), signaling the state of the real awareness.Dashed red boxes represent the location of the state and content awareness, respectively.(b) During NREM sleep, the higher cortical representation in the FB pathway teaches the latent representation generated by the FF pathway (red leftward arrow with '!') that may be matched by the FF drive and, if strong enough, generate a calcium spike in selected neurons (middle green) so that the subject may become aware of the dream content [54].Yet, D does not receive a teaching signal from the conductor (and, hence, the real-dream state awareness may be absent or diffuse).(c) During an adversarial REM dream, the conductor (red C) imposes the same target real to the discriminator output as in Wake (red-filled neuron, activated via the top leftward arrow from C).The teaching of the FF pathway is as in the NREM sleep (lower red arrow).The discriminator activity encoding the state-awareness real tells that the dream content (filled green pyramidal neurons of the FF pathway matching the leftward teaching signal) is (adversarially) perceived as real.(d) In a lucid REM dream, the conductor (C) may non-adversarially impose the state-awareness dream (red) onto the discriminator output (right red-filled neuron) so that the subject realizes that the content represented by the FF pathway (green-filled pyramidal neurons matching the horizontal input from the FB pathway) is effectively dreamed.
In the PAD model, the REM phase is the main driver of semantization.Future modeling work could identify other elements so that the NREM phase, while still replaying a single memory at a time, could contribute more to memory semantization, not only to making memories robust against noise.As recently suggested [55], NREM sleep could, for instance, host a contrastive learning process to push object representation farther apart and hence improve semantization.Contrastive learning [56][57][58] is in fact a training procedure used in recent artificial intelligence models as a way to efficiently learn semantic representations.The main idea is to construct a latent space such that similar sensory inputs (positive examples) are represented close together, while dissimilar sensory inputs (negative examples) are pushed apart within the latent space.During the NREM phase, (a) During wakefulness, the subject may become aware of a sensory content through a teaching signal from the FF pathway to the FB pathway (lower red rightward arrow with '!') that may elicit a dendritic calcium spike in the FB neurons (middle blue pyramidal neuron bottom right, indicating the content of the awareness, [53]).The output of the discriminator D receives the (non-adversarial) "real" teaching signal from the conductor (C, top left leftward rightward arrow with '!') and may also elicit a calcium spike (red-filled pyramidal neuron), signaling the state of the real awareness.Dashed red boxes represent the location of the state and content awareness, respectively.(b) During NREM sleep, the higher cortical representation in the FB pathway teaches the latent representation generated by the FF pathway (red leftward arrow with '!') that may be matched by the FF drive and, if strong enough, generate a calcium spike in selected neurons (middle green) so that the subject may become aware of the dream content [54].Yet, D does not receive a teaching signal from the conductor (and, hence, the real-dream state awareness may be absent or diffuse).(c) During an adversarial REM dream, the conductor (red C) imposes the same target real to the discriminator output as in Wake (red-filled neuron, activated via the top leftward arrow from C).The teaching of the FF pathway is as in the NREM sleep (lower red arrow).The discriminator activity encoding the state-awareness real tells that the dream content (filled green pyramidal neurons of the FF pathway matching the leftward teaching signal) is (adversarially) perceived as real.(d) In a lucid REM dream, the conductor (C) may non-adversarially impose the state-awareness dream (red) onto the discriminator output (right red-filled neuron) so that the subject realizes that the content represented by the FF pathway (green-filled pyramidal neurons matching the horizontal input from the FB pathway) is effectively dreamed.
In the PAD model, the REM phase is the main driver of semantization.Future modeling work could identify other elements so that the NREM phase, while still replaying a single memory at a time, could contribute more to memory semantization, not only to making memories robust against noise.As recently suggested [55], NREM sleep could, for instance, host a contrastive learning process to push object representation farther apart and hence improve semantization.Contrastive learning [56][57][58] is in fact a training procedure used in recent artificial intelligence models as a way to efficiently learn semantic representations.The main idea is to construct a latent space such that similar sensory inputs (positive examples) are represented close together, while dissimilar sensory inputs (negative examples) are pushed apart within the latent space.During the NREM phase, positive examples can be obtained by systematically perturbing the activity generated in the sensory area out of the single memory replay, for instance, by mimicking the view point of the object, and with this creating two different instances from the same hippocampal memory.These two instances of the low-level object representation are then learned to be mapped close to each other in the high-level representation.Negative examples in a NREM memory replay can be obtained by pushing the projection of the FF pathway to the higher cortical area away from previous hippocampal memory replays in this higher area [55].

Adversarial Processes Explaining Dream Awareness?
Our model for unsupervised learning of object representations out of naturalistic sensory inputs-what we call semantization-implicitly assumes various meta-structures that gate the learning process.A first meta-structure pops up when considering the classical Wake-Sleep algorithm [52], described above as a model for NREM sleep (that we extended by random perturbations in the replay).For instance, when replaying a memory from the hippocampus into the FB pathway at the level of the higher cortical area, this activity serves as a target for the activity that is re-created through the FB → FF loop back to the same higher cortical area (red '?' in Figure 4).One way to biologically implement the hippocampal replay as a target or "teaching signal" for the FF neurons is to "nudge" these neurons in the soma, while the synapses projecting from the FF pathway to their dendrites learn to reproduce the somatic nudging [59].When the somatic nudging is strong enough, the match between the dendritic input and somatic activity may elicit a dendritic calcium spike, and with this also the perception [53].It was argued that during sleep, when such dendritic calcium spikes arise, the dreamer is becoming aware of the content of the dream [54], although not necessarily of the fact that this is a dream (Figure 5b).Becoming aware of the dreaming content is what differentiates dreams from the more general state of sleep without dreaming.
During the Wake, the FB neurons in the sensory area are nudged by the FF sensory neurons (that are themselves driven by the sensory input).A possible match between the teacher signal and the top-down signal through the FB pathway may elicit a dendritic calcium spike in these FB neurons, and again signal the awareness of the sensory content ( [53], Figure 5a).Crucially, and different from NREM sleep, the output of the discriminator network D receives an additional nudging input from conductor C, signaling the target real.This conductor is itself a neuronal population representing the meta-information of whether the sensory activity should be perceived as externally or internally generated.We postulate that the teaching signal in the FB neurons from the low-level FF neurons makes us aware of seeing an object (content awareness), while the teaching signal in the D neurons from the conductor makes us aware that the object is real (state awareness, upper red in part in Figure 5a).The same conductor was suggested to be also involved in forming consciousness by [60].
During REM sleep, adversarial learning also requires activity in the discriminator network.As we suggest here, the conductor adversarially sets the target real for the output of the discriminator D (while it reverts the plasticity in D so that this still can learn that the sensory activity is dreamed).With the real-target being backpropagated, the FB pathway is told how to improve the realism of the sensory activity it generates.As in Wake, the conductor signal in the discriminator neurons tells the subject that the sensory activity is (incorrectly) generated from outside and is considered real (state awareness).In addition, subjects may become aware of the dream content because the FF neurons in the higher cortical areas are nudged by the FB neurons, initiated by the memory replay (content awareness, Figure 5c).It is tempting to postulate that the double nudging of the FF neurons and the specific real-discriminator neurons during REM sleep is the reason that subjects perceive the sensory activity as real during sleep, and more often remember REM dreams, as compared to NREM activity where the D neurons do not receive a teaching signal.According to the PAD model, we become aware of a REM dream because it is adversarial (Figure 5c).
Lucid dreaming in this model is explained by nudging the higher cortical FF neurons with the target activity set by the FB pathway (as in NREM and REM), but the discriminator neurons are now nudged to encode dreams, corresponding to the true (non-adversarial) state of the sensory activity (Figure 5d).The teaching signal dreamed for the discriminator neurons may give the subject the awareness that its current state is the dream, and is in fact happening in lucid dreaming [61].To keep the functional benefit of lucid dreaming, the plasticity in the FB pathway has to be turned off, as in NREM sleep (Figure 4), so that the FB pathway is not unlearned by reverting the discriminator target.Correspondingly, plasticity in the discriminator network should not be reverted (and instead can be as in the Wake state).
If during lucid dreaming the described plasticity modulations are not correctly implemented, while the target in D is still switched from real to dream, negative consequences of the dream experience are expected.With a discriminator target being a dream and plasticity in the FB pathway remaining turned on, random combinations of memory replays would be pushed further away from any realism, easily detectable by D as a dream.In fact, failed induction of lucid dreaming, potentially explained by a unilateral switch of the discriminator target alone without stopping FB plasticity, may lead to harrowing dysphoric dreams [62].However, if the switch in the D label is correctly synchronized with the required plasticity changes, the awareness of the dream and the dream content during lucid dreaming may help to consolidate specifically selected memories, as is also exploited in therapy therapeutic applications [62].
Overall, the meta-structure of a discriminator and a conductor coming with adversarial dreaming opens a door to differentiate between (i) sensory activity that we become aware of, or not, during wakefulness, (ii) the memory replay during sleep without dreaming, likely happening in NREM sleep, (iii) the awareness of the dream content while sleeping, but not being aware of the dream state itself, as in REM sleep, and (iv) the awareness of the dream content and the dream state, as in lucid dreaming.These awareness modulations, and in particular the state awareness of the dream, are potentially modulated by the same ratio of acetylcholine over noradrenaline and serotonin that is also shown to tune NREM sleep and other metacognitive processes [19,63].

Discussion
In this perspective article, we have reviewed the PAD (Perturbed and Adversarial Dream) model-a novel proposal for the formation, function, and interplay of NREM and REM dreams.This model is based on the concept of GANs (Generative Adversarial Networks, [64]), which have been proposed to be implemented in the brain [65].GANs come with a discriminator network that tells the internally generated sensory activity apart from the externally induced sensory activity.Such a discriminator network may be realized in the brain by a reality-monitoring region located in the anterior prefrontal cortex [66].
The PAD model suggests that during REM sleep new sensory contents are created out of a combination of stored hippocampal memories, shaped by an adversarial game between FB and FF pathways improving the realism of the dream.While the proposed adversarial mechanism has shown benefits for learning semantic representations in silico, we have also discussed its potential implications for higher-level cognitive functions, such as enhancing creative insight.We suggested a complementary role of non-creative dreams, mostly occurring during NREM sleep, in improving the robustness of cortical representations against variations in the sensory inputs.While our model focuses on the role of sleep and dreams in memory semantization and creativity enhancement, dreams are also assumed to be involved in processing emotions and motivation [67] that are not explicitly addressed here.Nevertheless, the suggested functional structure of REM and NREM sleep aligns with various empirical findings and implicates some promising directions for empirical studies in human subjects.In general, the PAD model with the 'neuronal conductor' that orchestrates the learning in the various sleep stages offers a framework to study metacognition.It may explain how the awareness of dream contents in REM versus NREM sleep may arise ('content-awareness'), and how the phenomenon of lucid dreaming as theawareness of the state of dreaming arises ('state-awareness').

Empirical Justifications and Predictions
The PAD model generates empirical predictions that can be organized along three distinct lines.First, REM dreams should facilitate the emergence of semantic representations.Second, REM dreams should enhance creative insights.And, third, dreams can only enhance creative insights if they are balanced in terms of fantastic and realistic elements-if a dream is overly detached from, or too close to reality, it cannot help creative problem solving.The PAD model predicts that the adversarial game between FF and FB pathways results in an equilibrium of fantastic and realistic elements, which are beneficial for creative insight.Before we further elaborate on empirical findings and suggest possible studies, it is worth pointing out that evaluating the effects of REM dreaming encompasses several significant problems.Measuring the effects of dreaming is complicated by the fact that dreaming naturally occurs only during sleep.This co-occurrence renders it hard to disentangle the unique effects of dreaming versus sleeping.Additionally, it is difficult to directly attest whether a subject is dreaming or not, or determine what the subject is dreaming about (although a real-time dialogue between experimenter and dreamer is possible [68] and images can be reconstructed from fMRI activity [69].Finally, sleep deprivation is not only experimentally challenging but also ethically delicate. Semantization: The first line of experimental investigation arises from the model's prediction that REM dreams facilitate the emergence of semantic representations.We propose to employ a category learning task in which subjects must acquire representations for novel objects.As a dependent measure, it evaluates how well the acquired representations can be generalized to previously unseen images of the objects.Immediately after completing the task, the performance of one group of participants is evaluated, while the performance of another group is evaluated after a night's sleep.In addition to a night's sleep after the learning task, the third group of participants receives a pharmacological agent known for inhibiting REM sleep, such as, e.g., an anti-depressant (e.g., see [26,70]).This design would allow us to investigate the potential effects of REM dreams on the semantization process of cortical representations.However, as pointed out above, such a design does not allow us to disentangle the effects of dreaming vs. sleeping.Nevertheless, evidence that REM sleep improves category learning compared to no sleep and REM-inhibited sleep would be consistent with the PAD model's predictions.Given the difficulties arising from the entanglement of sleeping and dreaming, we further suggest testing the experimental predictions of the PAD model by investigating the effects of mental imagery-another process that internally generates visual experience.The cognitive process of mental imagery is assumed to cause a perception-like experience of visual stimuli in the absence of corresponding external stimulation (e.g., [71,72]).In contrast to dreaming, mental imagery is voluntarily triggered, its content is relatively controllable [73], and there is no entanglement with sleep.These characteristics render mental imagery, compared to dreaming, more suitable for testing the effects of internally generated experiences on category learning.Considering that mental imagery shares the same neuronal substrates as dreaming [2,73], we suggest that mental imagery is a valid proxy process to test the predictions of the PAD model on semantization.More specifically, we propose to use a category learning task (see above), whereby some subjects are tasked to perform additional mental imagery training trials, whereby the objects to be learned (for instance, a 'doggy car') need to be imagined.We propose to study a category learning task as described above.During the task, some subjects are asked to perform additional mental imagery training sessions, whereby the objects to be learned (for instance, a 'doggy car') need to be imagined.In parallel, a control group of subjects would perform the category learning task without engaging in any mental imagery.The PAD model predicts that subjects who internally generate additional visual input by mental imagery (postulated to activate the adversarial process of improving the realism of the imagination), learn representations that become easier to linearly separate (as compared to the control group).
Finally, while model simulations suggest that the creative combination of episodic memories during REM dreams facilitates semantization, this should not be the case for the non-creative replay during NREM sleep.Yet, the PAD model predicts that dreams during NREM increase the robustness of learned representations.After completing the category learning task, participants proceed to sleep.They are then awakened from sleep upon the onset of REM sleep, as indicated by polysomnographic recordings.Upon awakening, participants are tasked with categorizing perturbed versions of the images from the categorization task (e.g., added noise, blurring, or occlusions).According to the PAD model, we hypothesize that classification accuracy will be higher for participants who have experienced a phase of NREM sleep compared to a control group who have not undergone a NREM sleep phase.
Creativity and REM dreams: The second line of experimental investigation arises from the central claim that creativity is nurtured by REM dreams, as has previously been shown [9,18].Further evidence that adversarial learning could be involved arises from the observation that prefrontal networks implicated in reality monitoring [74] are generally deactivated during REM sleep [75], while leaving the question open as to whether specific REM activation sites may also be related to daydreaming and creative visual imagery during wakefulness [76].
We also postulate a difference between NREM dreams (non-creative; only replay of memories) and REM dreams (creative; recombination of memories).In this line, semantic analysis of dream protocols showed that REM dreams are likely composed of more minimal story units than NREM dreams [77], consistent with the model assumption that REM dreams are composed of a mixture of episodic memories.Moreover, the analysis of dream protocols by non-semantic word graphs has shown that REM dreams are more complex and have a larger connectedness (although they are graph-theoretically less random-like) than NREM dreams [78].
Since creative problem solving is also shown to be boosted in the first NREM sleep stage (N1, [35]) by exploiting Edison's technique, or by simply closing the eyes [46] during active imagination, one may wonder whether an adversarial process postulated during REM sleep is likewise in play during the N1 stage or the imagination with closed eyes.To test such a hypothesis, one may look at similarities in the local characterization of REM vs. N1 sleep stages in MEG signals [79,80], for instance.While similarities in metacognitive processes during REM sleep and wakefulness have been linked to similarities in EEG signals [19,63], linking adversarial and creative processes to specific brain signals, however, will remain a challenge.
REM dreams becoming more realistic: The PAD model posits that REM dreams become more realistic during our learning process and during the refinement of cortical representations in general.In the specific simulations, the formation of a good representation requires 10 to 40 thousand Wake-NREM-REM cycles (with 4 cycles/day corresponding to roughly 8-27 years).In the human brain, the formation of cortical representations of objects and concepts spans across childhood into adolescence (e.g., see [81][82][83]).Hence, when applied to a real-world scenario, the learning process covered by the model may extend beyond the period during which humans acquire representations.It has been reported that children's recurrent dreams are more likely to contain monsters and ghoulish creatures, while with aging and maturation, recurrent dreams are more likely to represent personal competencies [84].Likewise, the frequency of nightmares decreases from early adolescence to late adulthood [85], and so does the frequency of dream recalls [86].The hypothesis that REM dreams become more realistic with age has yet to be tested.Several questionnaires could be employed to quantitatively assess the reduction of the bizarreness of dreams across time, like the bizarreness score [87], in combination with the dream frequency scale [88] or the Creative Achievement Questionnaire [89].

Conclusions
Inspired by modern artificial intelligence, the PAD model connects cortical structures and dream phenomenology to a functional model of sleep.The model complements the memory consolidation theory during sleep with a creative process that combines memories to form new contents.Adversarial dreaming during REM sleep allows for exploring, testing, and structuring the newly formed cortical representations while keeping these representations compatible with wake experiences.Adversarial dreams may improve our creative abilities by reenacting the past to generate novel virtual experiences that later may enrich reality.Adversarial processes include a discriminator network that is able to tell externally from internally generated sensory activity apart, together with a 'conductor' that orchestrates the teaching signals for the involved networks (FF, D, and FB) during wakefulness, NREM, and REM sleep.The framework also offers to introduce a notion of content-awareness and state-awareness.These notions help to delineate sleep from dream and lucid dreaming and could explain why we become aware of REM dreams, but not so much of NREM dreams.The suggested experimental approaches may help to validate these concepts, and hopefully help to elucidate the mystery of sleep, including its variation of awareness.

Figure 1 .
Figure 1.Creative dreams during REM sleep improve cortical representations and learning.(a)During wakefulness (Wake), a discriminator network (D, red) reads out activity from the cortical feedforward pathway (FF, green) and learns to correctly recognize that sensory activity (lower green pyramidal neurons) is externally driven (real, red).The high-level representations are stored in the hippocampus for future replay (dashed arrow, not explicitly modeled as neuronal structure).(b) During REM sleep, the feedback pathway (FB, blue) learns to adversarially generate virtual sensory activity from a combination of multiple hippocampal memories and spontaneous cortical activity (here, a "doggy car") that may be incorrectly classified by D as real.The adversarial learning of realistic sensory activity by the FB pathway is achieved by imposing the target real! on D (red '!',

Figure 1 .
Figure 1.Creative dreams during REM sleep improve cortical representations and learning.(a) During wakefulness (Wake), a discriminator network (D, red) reads out activity from the cortical feedforward pathway (FF, green) and learns to correctly recognize that sensory activity (lower green pyramidal neurons) is externally driven (real, red).The high-level representations are stored in the hippocampus for future replay (dashed arrow, not explicitly modeled as neuronal structure).(b) During REM sleep, the feedback pathway (FB, blue) learns to adversarially generate virtual sensory activity from a combination of multiple hippocampal memories and spontaneous cortical activity (here, a "doggy car") that may be incorrectly classified by D as real.The adversarial learning of realistic sensory activity by the FB pathway is achieved by imposing the target real! on D (red '!', despite being in the sleep phase), and backpropagating the error to the FB network.(c,d) Principal Component Analysis (PCA) was applied as a tool to visualize the formation of clusters in the highlevel representation of the images.Shown is a projection of the first two principal components, with different colors representing different object categories.(e,f) Performance of a linear classifier telling which object is in an image.The classifier is trained on high-level representations learned either without (e) or with (f) REM dreaming.An epoch consists of 780 Wake-NREM-REM sleep cycles in which 64 images are sampled during Wake and replayed during the NREM and REM phases.One epoch sample roughly 5/6 of the CIFAR10 data set with 60,000 images and 10 classes.Adapted from [23].

Figure 3 .
Figure 3. Adversarial dreaming and creative insights.(a) Dreams could promote creative i such as the discovery of the structure of benzene through a dream experienced by Kekulé the knowledge of carbohydrate structures and the concept of a snake biting its own tail a bined (Ouroboros-Benzene by Haltopub, 2013).(b) The adversarial dreaming framework plain the occurrence of such insights.Here, hippocampal memories of a snake and a hexan cule are combined to generate a potentially realistic dream through the FB pathway that represent the benzene molecule.To ensure that this dream is compatible with reality, i through the FF pathway and the discriminator (D) that itself is adversarially encoding the tar (red).The discrepancy between the imposed real target and the forward drive from the D n represents the discrimination error.This discrimination error teaches the FB pathway (red ing FB) how to improve the realism of the random memory combination of a snake and a he represent-what Kekulé inspired to become-the benzene (bottom, see Figure2for the l mechanism).

Figure 3 .
Figure 3. Adversarial dreaming and creative insights.(a) Dreams could promote creative insights, such as the discovery of the structure of benzene through a dream experienced by Kekulé, where the knowledge of carbohydrate structures and the concept of a snake biting its own tail are combined (Ouroboros-Benzene by Haltopub, 2013).(b) The adversarial dreaming framework can explain the occurrence of such insights.Here, hippocampal memories of a snake and a hexane molecule are combined to generate a potentially realistic dream through the FB pathway that would represent the benzene molecule.To ensure that this dream is compatible with reality, it is fed through the FF pathway and the discriminator (D) that itself is adversarially encoding the target real (red).The discrepancy between the imposed real target and the forward drive from the D network represents the discrimination error.This discrimination error teaches the FB pathway (red ↗ crossing FB) how to improve the realism of the random memory combination of a snake and a hexane to represent-what Kekulé inspired to become-the benzene (bottom, see Figure2for the learning mechanism).

Figure 4 .
Figure 4.The role of NREM sleep in improving robustness to perturbations.Besides the wake phase (left) consisting of observing sensory inputs from the outside world and the REM phase (right) generating adversarial dreams, the PAD model also features a NREM phase (middle) where a single memory is replayed from the hippocampus in a corrupted manner (dashed blue arrow).Hence, a dream is generated from the latent representation of an input that has been observed during wakefulness.The hippocampal recall is re-activating a higher cortical area (top right, blue), and from there perturbed along the FB pathway to the sensory cortex with some randomized activity patches (bottom, pale squares).This non-creative but perturbed activity is sent through the FF pathway upwards again.The FF pathway learns (red oblique arrow ↗) to map the sensory activity back to the higher cortical area so that it represents the original memory replay (red arrow with the '?'; here, the latent representation of the dog without perturbations).By adapting the FF pathway to match the original unperturbed latent representation, the FF pathway becomes more robust to sensory perturbations and may generalize better to natural variations of the objects.Adapted from[23].

Figure 4 .
Figure 4.The role of NREM sleep in improving robustness to perturbations.Besides the wake phase (left) consisting of observing sensory inputs from the outside world and the REM phase (right) generating adversarial dreams, the PAD model also features a NREM phase (middle) where a single memory is replayed from the hippocampus in a corrupted manner (dashed blue arrow).Hence, a dream is generated from the latent representation of an input that has been observed during wakefulness.The hippocampal recall is re-activating a higher cortical area (top right, blue), and from there perturbed along the FB pathway to the sensory cortex with some randomized activity patches (bottom, pale squares).This non-creative but perturbed activity is sent through the FF pathway upwards again.The FF pathway learns (red oblique arrow ↗) to map the sensory activity back to the higher cortical area so that it represents the original memory replay (red arrow with the '?'; here, the latent representation of the dog without perturbations).By adapting the FF pathway to match the original unperturbed latent representation, the FF pathway becomes more robust to sensory perturbations and may generalize better to natural variations of the objects.Adapted from[23].

Figure 5 .
Figure 5. Explaining stimulus awareness during wake, dream, and lucid dreaming in the adversarial framework.(a)During wakefulness, the subject may become aware of a sensory content through a teaching signal from the FF pathway to the FB pathway (lower red rightward arrow with '!') that may elicit a dendritic calcium spike in the FB neurons (middle blue pyramidal neuron bottom right, indicating the content of the awareness,[53]).The output of the discriminator D receives the (non-adversarial) "real" teaching signal from the conductor (C, top left leftward rightward arrow with '!') and may also elicit a calcium spike (red-filled pyramidal neuron), signaling the state of the real awareness.Dashed red boxes represent the location of the state and content awareness, respectively.(b) During NREM sleep, the higher cortical representation in the FB pathway teaches the latent representation generated by the FF pathway (red leftward arrow with '!') that may be matched by the FF drive and, if strong enough, generate a calcium spike in selected neurons (middle green) so that the subject may become aware of the dream content[54].Yet, D does not receive a teaching signal from the conductor (and, hence, the real-dream state awareness may be absent or diffuse).(c) During an adversarial REM dream, the conductor (red C) imposes the same target real to the discriminator output as in Wake (red-filled neuron, activated via the top leftward arrow from C).The teaching of the FF pathway is as in the NREM sleep (lower red arrow).The discriminator activity encoding the state-awareness real tells that the dream content (filled green pyramidal neurons of the FF pathway matching the leftward teaching signal) is (adversarially) perceived as real.(d) In a lucid REM dream, the conductor (C) may non-adversarially impose the state-awareness dream (red) onto the discriminator output (right red-filled neuron) so that the subject realizes that the content represented by the FF pathway (green-filled pyramidal neurons matching the horizontal input from the FB pathway) is effectively dreamed.

Figure 5 .
Figure 5. Explaining stimulus awareness during wake, dream, and lucid dreaming in the adversarial framework.(a) During wakefulness, the subject may become aware of a sensory content through a teaching signal from the FF pathway to the FB pathway (lower red rightward arrow with '!') that may elicit a dendritic calcium spike in the FB neurons (middle blue pyramidal neuron bottom right, indicating the content of the awareness,[53]).The output of the discriminator D receives the (non-adversarial) "real" teaching signal from the conductor (C, top left leftward rightward arrow with '!') and may also elicit a calcium spike (red-filled pyramidal neuron), signaling the state of the real awareness.Dashed red boxes represent the location of the state and content awareness, respectively.(b) During NREM sleep, the higher cortical representation in the FB pathway teaches the latent representation generated by the FF pathway (red leftward arrow with '!') that may be matched by the FF drive and, if strong enough, generate a calcium spike in selected neurons (middle green) so that the subject may become aware of the dream content[54].Yet, D does not receive a teaching signal from the conductor (and, hence, the real-dream state awareness may be absent or diffuse).(c) During an adversarial REM dream, the conductor (red C) imposes the same target real to the discriminator output as in Wake (red-filled neuron, activated via the top leftward arrow from C).The teaching of the FF pathway is as in the NREM sleep (lower red arrow).The discriminator activity encoding the state-awareness real tells that the dream content (filled green pyramidal neurons of the FF pathway matching the leftward teaching signal) is (adversarially) perceived as real.(d) In a lucid REM dream, the conductor (C) may non-adversarially impose the state-awareness dream (red) onto the discriminator output (right red-filled neuron) so that the subject realizes that the content represented by the FF pathway (green-filled pyramidal neurons matching the horizontal input from the FB pathway) is effectively dreamed.