Cockroaches can learn through classical conditioning, form memories that last for days, navigate complex environments, make collective decisions without a leader, and even display individual personalities. By the standards typically applied to insects, they rank among the more cognitively capable, with brain structures that process multiple senses simultaneously in ways researchers have compared to vertebrate neural circuits. None of this makes them “smart” the way a crow or an octopus is smart, but the gap between what cockroaches actually do and what most people assume they can do is wide enough to be genuinely interesting.
They Can Be Trained Like Pavlov’s Dog
The most direct evidence of cockroach intelligence comes from learning experiments. Researchers have shown that cockroaches undergo classical conditioning, the same kind of associative learning made famous by Pavlov’s dogs. In one study, cockroaches were repeatedly exposed to a specific odor paired with a sugar-water reward, while a different odor was presented without any reward. After training, the sugar-associated odor triggered an increase in salivation, while the unpaired odor did not. This was the first demonstration of classical conditioning of salivation in any species besides dogs and humans, and it pointed to unexpectedly sophisticated control over an involuntary bodily function in an insect.1PubMed Central. Pavlov’s Cockroach: Classical Conditioning of Salivation in an Insect
Cockroaches also form lasting olfactory memories. In experiments with the American cockroach, individuals that underwent three rounds of conditioning trials retained their learned odor preferences for at least four days.2ZOOLOGICAL SCIENCE. Classical Olfactory Conditioning in the Cockroach Periplaneta americana That might not sound impressive compared to a dog remembering a trick for years, but for an animal with roughly a million neurons, holding a learned association for days is a sign that real memory consolidation is happening, not just a momentary reflex.
The timing of training matters, too. Cockroaches conditioned during their active period (the early subjective night, since they are nocturnal) showed strong learning and retained the memory for at least two days. Those trained at other times of day performed significantly worse. The deficit was in acquiring the memory, not in recalling it, meaning their circadian clock directly regulates how well they can learn.3PubMed Central. Circadian regulation of insect olfactory learning This is not a trivial detail. It tells us that cockroach brains don’t just passively absorb information; they have internal states that gate learning, much like how sleep-deprived humans struggle to encode new memories.
Spatial Learning and Operant Conditioning
Classical conditioning is one thing, but cockroaches also perform well in operant tasks, where they have to modify their own behavior based on outcomes rather than simply forming a passive association. In a recent T-maze study, cockroaches learned to consistently choose a specific arm of the maze after just five sessions of training, reaching a memory score of about 84 percent.4PubMed Central. Cercus Electric Stimulation Enables Cockroach with Trajectory Control and Spatial Cognition Training That outperformed more traditional punishment-based training methods, suggesting that the way information is delivered to the cockroach brain influences learning efficiency. In plain terms, cockroaches navigate mazes and remember which path leads where.
Their spatial abilities extend beyond the lab. In their natural habitat, cockroaches forage through dark, cluttered spaces and need to track targets while negotiating barriers. Research on the central complex, a brain region involved in orientation and motor planning, indicates that cockroaches build internal representations of their surroundings, processing both the timing and spatial layout of sensory cues to guide navigation.5PubMed Central. Spatial Navigation and the Central Complex: Sensory Acquisition, Orientation, and Motor Control This is not just random wandering. It is goal-directed movement through a mental map.
The Brain That Makes It Possible
Cockroach intelligence rests on surprisingly organized neural hardware. The mushroom bodies, paired structures in the insect brain, serve as the main centers for associative learning and memory. In cockroaches, these structures turn out to be more complex than early researchers expected. Rather than simple input-output relays, they contain multiple classes of neurons that process information from several senses at once: smell, touch, vision, and more. The arrangement of nerve fibers within the mushroom bodies has been compared to the layered architecture of the vertebrate cerebellum, where parallel fibers cross specialized cell dendrites in an orderly grid.6Journal of Comparative Neurology. Morphology and sensory modality of mushroom body extrinsic neurons in the brain of the cockroach, Periplaneta americana
Recordings from freely moving cockroaches reveal even more. Some mushroom body neurons can distinguish between sensory input the cockroach caused itself (like the feel of its own leg moving) and input caused by the outside world. Others monitor the animal’s motor actions in real time, and a third group appears to predict when the cockroach is about to start walking and adjusts activity depending on which direction it will turn.7Journal of Comparative Neurology. Mushroom bodies of the cockroach: Activity and identities of neurons recorded in freely moving animals Telling apart self-generated and externally caused sensation is a cognitive feat that matters for any animal trying to act on the world rather than merely react to it.
The chemical signaling behind learning also has vertebrate parallels. Octopamine neurons in the mushroom body’s vertical lobe are critical for cockroaches to carry out a learned response. Blocking octopamine receptors in that area prevents the cockroach from acting on what it has learned, even though the memory may still exist. Researchers have drawn an explicit analogy to the way midbrain dopamine neurons govern learned actions in mammals.8Neurobiology of Learning and Memory. Roles of octopamine neurons in the vertical lobe of the mushroom body for the execution of a conditioned response in cockroaches A review of convergent evolution across the animal kingdom listed cockroaches (specifically blattoid insects) alongside corvid birds, octopuses, and primates as groups in which complex brains and high intelligence have evolved independently, bound in every case to highly ordered associative networks in multimodal brain centers.9PubMed Central. Convergent evolution of complex brains and high intelligence
Lightning-Fast Escape Responses
Anyone who has tried to swat a cockroach knows about their speed. Behind that quickness is a dedicated neural circuit: six giant interneurons in the nerve cord, arranged in three bilateral pairs, each tuned to a different wind direction. When something disturbs the air near a cockroach’s cerci (the sensory appendages at its rear), these giant interneurons fire and set the turn direction, letting the animal pivot away from the threat and start running.10PubMed Central. Wind direction coding in the cockroach escape response: winner does not take all
What makes this interesting from a cognition standpoint is what happens when those giant interneurons are destroyed. Cockroaches with ablated giant fibers can still turn and run from wind puffs, just more slowly and less reliably.11Brain Research. Escape responses following elimination of the giant interneuron pathway in the cockroach, Periplaneta americana That means a backup system, probably involving head-based sensory structures, handles escape when the fast lane is out of service. The cockroach nervous system has built-in redundancy for one of its most important survival behaviors. It is not a single hardwired reflex but a layered system with fallback options.
Collective Intelligence Without a Leader
Individual smarts are only part of the picture. Cockroaches also display group-level intelligence that emerges from simple individual rules. When presented with multiple shelters, a group of cockroaches reliably converges on a shared resting site through a self-organized process. No individual scouts ahead and reports back. Instead, each cockroach adjusts how long it stays under a shelter based on two local cues: how dark the shelter is and how many other cockroaches are already there. The interaction between these two simple rules produces sophisticated collective behavior, including a quorum effect where the group commits to one shelter once enough individuals have gathered.12Ethology. Complex Dynamics Based on a Quorum: Decision‐Making Process by Cockroaches in a Patchy Environment
An experimental and theoretical study of this phenomenon showed that the decision-making process leads to an optimal outcome for the group on average, even though no individual has full knowledge of the environment or acts as a leader. The mechanism is generic enough that it has been proposed as a model for collective decision-making across species.13PubMed Central. Collegial decision making based on social amplification leads to optimal group formation Cockroaches also recognize kin through chemical profiles on their body surfaces, with differences in cuticular hydrocarbons detected through antennal contact shaping who they prefer to aggregate with.14Behavioral Ecology. Kin recognition via cuticular hydrocarbons shapes cockroach social life Their social lives are not random clustering; there is discrimination and preference involved.
Even their gut bacteria play a role in group coordination. The microbial community in a cockroach’s gut contributes to the chemical signals in its feces, and those signals drive aggregation behavior. Cockroaches raised without gut microbes produce feces that other cockroaches find far less attractive, lacking many of the volatile compounds that normally draw individuals together.15PubMed Central. Gut bacteria mediate aggregation in the German cockroach So the cockroach communication system is partly outsourced to its microbiome.
Distinct Personalities
If you tested a room full of cockroaches on the same task, not all of them would behave the same way. Research on the Pacific beetle cockroach found consistent individual differences in boldness, exploration, and sociality. Some individuals were reliably bolder across repeated trials, and that boldness held up from the juvenile nymph stage into adulthood.16PubMed Central. Personality in the cockroach Diploptera punctata: Evidence for stability across developmental stages despite age effects on boldness Personality, in the behavioral ecology sense, means stable individual differences in behavior across time and contexts. The fact that cockroaches have it suggests their nervous systems are not just running a single uniform program. There is individual variability in how they approach risk, novelty, and social interaction.
A Rich Sensory World
Intelligence is hard to separate from the senses that feed it. Cockroach antennae are not simple feelers. When an object is presented near one antenna, a cockroach will actively and repeatedly touch it, adjusting its orientation based on the frequency of contact. The contact rate correlates with the accuracy of the animal’s turning response and its forward speed, meaning the antennae are functioning as a real-time guidance system for navigation.17PubMed. Active tactile sensing for localization of objects by the cockroach antenna The antenna’s physical structure helps, too. Its stiffness decreases along its length, and this gradient allows the point where the antenna bends to map reliably to the distance between the cockroach and a nearby wall, giving the animal a kind of built-in rangefinder for high-speed tactile navigation.18Journal of Experimental Biology. Mechanical processing via passive dynamic properties of the cockroach antenna can facilitate control during rapid running
Cockroaches also appear to have a pain-like sensory pathway. Noxious stimuli applied to their cuticle activate sensory fibers that are distinct from those carrying touch or wind information, with different fiber diameters and slower conduction speeds. This nociceptive signal travels all the way to the head ganglia, and removing those ganglia dramatically reduces the cockroach’s defensive response to harmful stimuli.19PubMed Central. Nociceptive Pathway in the Cockroach Periplaneta americana Whether cockroaches experience something like pain in a subjective sense remains an open question, but the neural plumbing for detecting and responding to tissue damage is clearly there. Experiments with capsaicin and related compounds showed that these chemicals alter cockroach responses to extreme heat, prolonging the time they spent on a painfully hot surface before escaping.20PLOS ONE. Altered heat nociception in cockroach Periplaneta americana L. exposed to capsaicin
What the Jewel Wasp Reveals About Cockroach Brains
One of the most dramatic illustrations of cockroach cognitive architecture comes not from the cockroach itself but from a parasite that exploits it. The jewel wasp stings cockroaches directly in two specific brain regions: the subesophageal ganglion and the supraesophageal ganglion.21Journal of Experimental Biology. The role of the cerebral ganglia in the venom-induced behavioral manipulation of cockroaches stung by the parasitoid jewel wasp The venom doesn’t paralyze the cockroach or kill it. Instead, it induces a zombie-like state. The cockroach first engages in intense grooming, then falls into long-lasting lethargy, losing the drive to walk spontaneously while remaining physically capable of it.22PubMed Central. Parasitoid wasp venom manipulates host innate behavior via subtype-specific dopamine receptor activation
The mechanism involves a reduction in neural activity in the subesophageal ganglion, which normally sends permissive signals down to the thoracic circuits that generate walking.23PLoS ONE. A Wasp Manipulates Neuronal Activity in the Sub-Esophageal Ganglion to Decrease the Drive for Walking in Its Cockroach Prey The wasp, in effect, hacks the cockroach’s motivational system without touching the motor hardware. The fact that a parasite evolved such precise neurochemical tools to disable cockroach behavior is, ironically, a testament to the complexity of that behavior. You don’t need sophisticated venom to subdue a simple automaton.
Cockroach Cognition in Robotics
Engineers have taken notice of cockroach abilities. Cockroach-based bio-robots, in which live cockroaches carry small electronic backpacks that steer them via electrical signals, have been developed for tasks like pipeline inspection. Compared to artificial crawling robots of similar size, these bio-robots show better flexibility, larger payload capacity, and stronger endurance, partly because the cockroach’s own nervous system handles the hard problem of locomotion through unpredictable terrain.24PubMed Central. The Autonomous Pipeline Navigation of a Cockroach Bio-Robot with Enhanced Walking Stimuli
Even purely artificial robots benefit from studying cockroach behavior. One research group built a stochastic navigation algorithm called RAMBLER, modeled on how cockroaches explore environments and search for targets. By combining the behavioral trends observed in freely exploring cockroaches, the algorithm significantly biased a simulated robot toward a target location, offering a potential blueprint for search-and-rescue or exploration robots equipped with antenna-like contact sensors.25Adaptive Behavior. A model of exploration and goal-searching in the cockroach, Blaberus discoidalis
Termites Are Cockroaches That Went Social
One way to appreciate cockroach cognitive potential is to look at their closest relatives. Termites are not a separate insect order; they are a lineage of cockroaches that evolved eusociality, with complex colonies, division of labor, and cooperative brood care. Multiple genetic analyses have confirmed that termites are nested within the cockroach family tree, with the wood-feeding cockroach genus Cryptocercus as their closest living relative.26Ecological Entomology. Origin of termite eusociality: trophallaxis integrates the social, nutritional, and microbial environments Genomic work indicates that the transition from solitary cockroach ancestors to the cooperative lifestyles of wood-feeding roaches and termites followed a shift to nutrient-poor deadwood diets, which favored mutual dependence on gut microbes and parental feeding.27PubMed. Nutritional specialization and social evolution in woodroaches and termites
Termite colonies build climate-controlled mound structures, wage coordinated warfare, farm fungus, and engage in behaviors that look unmistakably intelligent at the colony level. All of that rests on a neurological foundation inherited from cockroach ancestors. The cognitive toolkit visible in today’s solitary and gregarious cockroaches, learning, memory, kin recognition, collective decision-making, was the raw material from which termite sociality was assembled. It is a reminder that the line between a “simple” pest insect and a builder of underground cities is shorter than it looks.