Central pattern generators (CPGs) are biological neural circuits that produce rhythmic outputs in the absence of rhythmic input. They are the source of the tightly-coupled patterns of neural activity that drive rhythmic motions like walking, breathing, or chewing. Importantly, the ability to function without input from higher brain areas does not mean that CPGs don’t receive modulatory inputs, or that their outputs are fixed. Flexibility in response to sensory input is a fundamental quality of CPG driven behavior.  To be classified as a rhythmic generator, a CPG requires:
Various molecular, genetic and imaging studies have been conducted as for the localization of the CPGs. The results have shown that the networks responsible for locomotion are distributed throughout the lower thoracic and lumbar regions of the spinal cord. Rhythmic movements of the tongue, that participate in swallowing, mastication and respiration, are driven by hypoglossal nuclei, which receive inputs from the dorsal medullary reticular column (DMRC) and the nucleus of the tractus solitarius (NTS). The hypoglossal nucleus receives rhythmic excitatory inputs also from brainstem respiratory neurons within the pre-Boetzinger complex, which appears to play an important role in the origin of respiration rhythmogenesis.
Although anatomical details of CPGs are specifically known in only a few cases, they have been shown to originate from the spinal cords of various vertebrates and to depend on relatively small and autonomous neural networks (rather than the entire nervous system) to generate rhythmic patterns. Many studies have been done to determine the neural substrate of locomotor CPGs in mammals. Neural rhythmicity can arise in two ways: "through interactions among neurons (network-based rhythmicity) or through interactions among currents in individual neurons (endogenous oscillator neurons)". A key to understanding rhythm generation is the concept of a half-center oscillator (HCO). A half-center oscillator consists of two neurons that have no rhythmogenic ability individually, but produce rhythmic outputs when reciprocally coupled. Half-center oscillators can function in a variety of ways. First, the two neurons may not necessarily fire in antiphase and can fire in any relative phasing, even synchrony, depending on the synaptic release. Second, half-centers can also function in an "escape" mode or a "release" mode. Escape and release refer to the way the off-neuron turns on: by escape or release from inhibition. Half-center oscillators can also be altered by intrinsic and network properties and can have dramatically different functionality based on variations in synaptic properties.
The classical view of CPGs, as specific networks of neurons dedicated to this function alone, has been challenged by numerous data obtained mostly on the central nervous system of invertebrates. In addition to be classical dedicated networks, most of the CPGs seem in fact to be either reorganizing or distributed circuits, and a single neural circuit can combine features typical of each of these architectures. The observation in invertebrates of pattern generators temporarily formed before the production of motor activity strengthens the assumption. CPG circuits appear thus to have a flexible character.
Organisms must adapt their behavior to meet the needs of their internal and external environments. Central pattern generators, as part of the neural circuitry of an organism, can be modulated to adapt to the organism's needs and surroundings. Three roles of neuromodulation have been found for CPG circuits:
For example, the Tritonia diomedea swimming CPG can produce reflexive withdrawal in response to weak sensory input, escape swimming in response to strong sensory input and crawling after escape swimming has ceased. The dorsal swim interneurons (DSIs) of the swim CPGs not only cause the rhythmic escape swimming, but also connect to cilia-activating efferent neurons. Experimental evidence confirms that both behaviors are mediated by the DSIs. "Given the extreme differences between these behaviors—-rhythmic versus tonic, muscular versus ciliary, and brief versus prolonged—these findings reveal a striking versatility for a small multifunctional network." "Part of this flexibility is caused by the release of serotonin from the DSIs, which causes cerebral cell 2 (C2) to release more transmitter and strengthen its network synapses. Application of serotonergic antagonists prevents the network from producing the swimming pattern, and hence this intranetwork modulation appears essential for network oscillation."
Data from experiments by Harris-Warrick in 1991 and Hooper and Marder in 1987 suggest that the functional target of modulation is the entire CPG network. These phenomena were first observed through experiments with the neuromodulator in the lobster cardiac ganglion (Sullivan and Miller 1984). The effect of proctolin could not be understood by looking only at the neurons it directly affected. "Instead, neurons that are not directly affected both alter the response of the directly affected neurons and help to transmit the changes in the activity of these neurons throughout the network," allowing the entire network to change in consistent and synchronized way. Harris-Warrick and colleagues have conducted many studies over the years of the effects of neuromodulators on CPG neural networks. For example, a 1998 study showed the distributed nature of neuromodulation and that neuromodulators can reconfigure a motor network to allow a family of related movements. Specifically, dopamine was shown to affect both individual neurons, and synapses between neurons. Dopamine strengthens some synapses and weakens others by acting pre- and post-synaptically throughout the crustacean stomatogastric ganglion. These responses, as well as other effects of dopamine, can be opposite in sign in different locations, showing that the sum of the effects is the overall network effect and can cause the CPG to produce related families of different motor outputs.
A single neuronal network, such as a central pattern generator, can be modulated moment-to-moment to produce several different physical actions depending on the needs of the animal. These were first coined "polymorphic networks" by Getting and Dekin in 1985. An example of one such polymorphic central pattern generator is a multifunctional network of the mollusk Tritonia diomedea. As described by Hooper, weak sensory input to the swimming CPG produces reflexive withdrawal, while strong input produces swimming. The dorsal swim interneurons (DSIs) of the circuit release serotonin to convert to "swim mode," while application of serotonergic antagonists prevents the swim pattern. Additionally, the same single interneuronal network has been found to produce not only "rhythmic, muscle-based escape swimming," but also "nonrhythmic, cilia-mediated crawling." Evidence also suggests that although the CPG controls related but separate functions, neuromodulation of one function can occur without affecting the other. For example, the swim mode can be sensitized by serotonin without affecting the crawl mode. Thus, the CPG circuit can control many separate functions with the appropriate neuromodulation.
Although the theory of central pattern generation calls for basic rhythmicity and patterning to be centrally generated, CPGs can respond to sensory feedback to alter the patterning in behaviorally appropriate ways. Alteration of the pattern is difficult because feedback received during only one phase may require changed movement in the other parts of the patterned cycle to preserve certain coordination relationships. For example, walking with a pebble in the right shoe alters the entire gait, even though the stimulus is only present while standing on the right foot. Even during the time when the left foot is down and the sensory feedback is inactive, action is taken to prolong the right leg swing and extend the time on the left foot, leading to limping. This effect could be due to widespread and long-lasting effects of the sensory feedback on the CPG or due to short-term effects on a few neurons that in turn modulate nearby neurons and spread the feedback through the entire CPG in that way. Some degree of modulation is required to allow one CPG to assume multiple states in response to feedback.
Additionally, the effect of the sensory input varies depending on the phase of the pattern in which it occurs. For example, during walking, resistance to the top of the swinging foot (e.g., by a horizontal stick) causes the foot to be lifted higher to move over the stick. However, the same input to the standing foot cannot cause the foot to lift or the person would collapse. Thus, depending on the phase, the same sensory input can cause the foot to be lifted higher or held more firmly to the ground. "This change in motor response as a function of motor pattern phase is called reflex reversal, and has been observed in invertebrates (DiCaprio and Clarac, 1981) and vertebrates (Forssberg et al., 1977). How this process occurs is poorly understood, but again two possibilities exist. One is that sensory input is appropriately routed to different CPG neurons as a function of motor pattern phase. The other is that the input reaches the same neurons at all phases, but that, as a consequence of the way in which the network transforms the input, network response varies appropriately as a function of motor pattern phase."
A recent study by Gottschall and Nichols studied the hindlimb of a decerebrate cat during walking (a CPG controlled function) in response to changes in head pitch. This study describes the differences in gait and body position of cats walking uphill, downhill and on level surfaces. Proprioceptive (Golgi tendon organs and muscle spindles) and exteroreceptive (optic, vestibular and cutaneous) receptors work alone or in combination to adjust the CPG to sensory feedback. The study explored the effects of neck proprioceptors (giving information about the relative location of the head and body) and vestibular receptors (giving information about the orientation of the head relative to gravity). Decerebrate cats were made to walk on a level surface with their heads level, tilted up or tilted down. Comparing the decerebrate cats to normal cats showed similar EMG patterns during level walking and EMG patterns that reflected downhill walking with the head titled up and uphill walking with the head tilted down. This study proved that neck proprioceptors and vestibular receptors contribute sensory feedback that alters the gait of the animal. This information may be useful for treatment of gait disorders.
Central pattern generators can serve many functions in vertebrate animals. CPGs can play roles in movement, breathing, rhythm generation and other oscillatory functions. The sections below focus on specific examples of locomotion and rhythm generation, two key functions of CPGs.
As early as 1911, it was recognized, by the experiments of Thomas Graham Brown, that the basic pattern of stepping can be produced by the spinal cord without the need of descending commands from the cortex.
The first modern evidence of the central pattern generator was produced by isolating the locust nervous system and showing that it could produce a rhythmic output in isolation resembling that of the locust in flight. This was discovered by Wilson in 1961. Since that time, evidence has arisen for the presence of central pattern generators in vertebrate animals, starting with work on the cat in the 1960s by Elzbieta Jankowska in Gothenburg, who provided the first evidence for a spinal cord CPG. This section addresses the role of the central pattern generator in locomotion for the lamprey and humans.
The lamprey has been used as a model for vertebrate CPGs because, while its nervous system has a vertebrate organization, it shares many positive characteristics with invertebrates. When removed from the lamprey, the intact spinal cord can survive for days in vitro. It also has very few neurons and can be easily stimulated to produce a fictive swimming motion indicative of a central pattern generator. As early as 1983, Ayers, Carpenter, Currie and Kinch proposed that there was a CPG responsible for most undulating movements in the lamprey including swimming forward and backward, burrowing in the mud and crawling on a solid surface, that although not surprisingly did not match the activity in the intact animal, nevertheless provided the basic locomotor output. The different movements have been found to be altered by neuromodulators, including serotonin in a study by Harris-Warrick and Cohen in 1985 and tachykinin in a study by Parker et al. in 1998. The lamprey model of CPG for locomotion has been important to the study of CPGs. Although Sten Grillner claims that the locomotor network is characterised, a claim that has seemingly been uncritically accepted by the spinal cord locomotor network field, there are in fact many missing details and Grillner cannot provide the evidence he uses to support his claims (Parker 2006). A general scheme of the lamprey CPG is now being used in the creation of artificial CPGs. For example, Ijspeert and Kodjabachian used Ekeberg's model for the lamprey to create artificial CPGs and simulate swimming movements in a lamprey-like substrate using controllers based on a SGOCE encoding. Essentially, these are the first steps toward the use of CPGs to code for locomotion in robots. The vertebrate model of CPG has been also developed with both Hodgkin-Huxley formalism, its variants  and control system approaches. For example, Yakovenko and colleagues have developed a simple mathematical model that describes basic principles proposed by T.G. Brown with integrate-to-threshold units organized with mutually inhibitory connections. This model is sufficient to describe complex properties of behavior, such as different regimes of the extensor- and flexor-dominant locomotion observed during electrical stimulation of the mesencephalic locomotor region (MLR), MLR-induced fictive locomotion.
Connections between the CPGs controlling each limb influence the coordination between the limbs and hence the gaits in quadrupedal and possibly also bipedal animals. Left right coordination is mediated by commissural and fore-hind by long-projecting propiospinal interneurons. The balance of the left-right alternation (mediated genetically identified V0d and V0v neuron classes) to left-synchronization promoting commissural interneurons (potentially mediated V3 neurons) determines whether walk and trot (alternating gaits) or gallop and bound (synchronous gaits) are expressed. This balance changes with increasing speed, potentially because of connection from the MLR to commissural interneurons, and causes speed dependent gait transitions characteristic for quadrupedal animals. The walk to trot transition potentially occurs because of the stronger decrease of extension than flexion phase durations with increasing locomotor speed, which leads to progressively increasing overlap between the diagonal limbs up until diagonal synchronization (trot).
Central pattern generators also contribute to locomotion in higher animals and humans. In 1994, Calancie, et al. claimed to have witnessed the "first well-defined example of a central rhythm generator for stepping in the adult human." The subject was a 37-year-old male who suffered an injury to the cervical spinal cord 17 years prior. After initial total paralysis below the neck, the subject eventually regained some movement of the arms and fingers and limited movement in the lower limbs. He had not recovered sufficiently to support his own weight. After 17 years, the subject found that when lying supine and extending his hips, his lower extremities underwent step-like movements for as long as he remained lying down. "The movements (i) involved alternating flexion and extension of his hips, knees, and ankles; (ii) were smooth and rhythmic; (iii) were forceful enough that the subject soon became uncomfortable due to excessive muscle 'tightness' and an elevated body temperature; and (iv) could not be stopped by voluntary effort." After extensive study of the subject, the experimenters concluded that "these data represent the clearest evidence to date that such a [CPG] network does exist in man." Four years later, in 1998, Dimitrijevic, et al. showed that the human lumbar pattern generating networks can be activated by drive to large-diameter sensory afferents of the posterior roots. When tonic electrical stimulation is applied to these fibers in motor complete spinal cord injured individuals (i.e., individuals in whom the spinal cord is functionally isolated from the brain) rhythmic, locomotor-like movement of the lower limbs can be elicited. These measurements were performed in supine position, thus minimizing peripheral feedback. Subsequent studies showed that these lumbar locomotor centers can form a large variety of rhythmic movements by combining and distributing stereotypical patterns to the numerous lower limb muscles.
If step cycle durations and muscle activations were fixed, it wouldn't be possible to change body velocity and adapt to varying terrain. It has been suggested that the mammalian locomotor CPG comprises a “timer” (possibly in the form of coupled oscillators) which generates step cycles of varying durations, and a “pattern formation layer,” which selects and grades the activation of motor pools. Increasing the neural drive from the midbrain locomotor region (MLR) to the spinal CPG increases the step cycle frequency (the cadence). Swing and stance phase durations co-vary in a fairly fixed relationship, with stance phases changing more than swing phases.
Sensory input from the limbs may truncate or extend individual phase durations in a process akin to finite state control (in which "if-then” rules determine when state transitions occur). For example, if a limb that is swinging forward reaches the end of swing in less time than the current CPG-generated flexor phase duration, sensory input would cause the CPG timer to terminate swing and start the stance phase. Furthermore, as body velocity increases, the pattern formation layer would increase muscle activation nonlinearly to provide increased load-bearing and thrust forces. It has been posited that in well-predicted movements, CPG-generated phase durations and muscle forces closely match those required by the evolving biomechanical events, minimizing the sensory corrections required. The term ‘‘neuromechanical tuning’’ has been coined to describe this process 
Fig. 1 provides a simplified schematic that summarizes these proposed mechanisms. A command specifying desired body velocity descends from higher centers to the MLR, which drives the spinal locomotor CPG. The CPG timer produces the appropriate cadence and phase durations and the pattern formation layer modulates the motoneuronal outputs. The activated muscles resist stretch through their own intrinsic biomechanical properties, providing a rapid form of length and velocity feedback control. Reflexes mediated by Golgi tendon organ and other afferents provide additional load compensation, but the main role of sensory input may be to adjust or override the CPG at stance-swing-stance transitions.
As described in Neuromodulation, the human locomotive CPG is very adaptable and can respond to sensory input. It receives input from the brainstem as well as from the environment to keep the network regulated. Newer studies have not only confirmed the presence of the CPG for human locomotion, but also confirmed its robustness and adaptability. For example, Choi and Bastian showed that the networks responsible for human walking are adaptable on short and long timescales. They showed adaptation to different gait patterns and different walking contexts. Also, they showed that different motor patterns can adapt independently. Adults could even walk on treadmills going in a different direction for each leg. This study showed that independent networks control forward and backward walking and that networks controlling each leg can adapt independently and be trained to walk independently. Thus, humans also possess a central pattern generator for locomotion that is capable not only of rhythmic pattern generation but also remarkable adaptation and usefulness in a wide variety of situations.
A three-phase model is the classical view of the respiratory CPG. The phases of the respiratory CPG are characterized by the rhythmic activity of: (1) the phrenic nerve during inspiration; (2) recurrent laryngeal nerve branches that innervate the thyroarytenoid muscle during the last stage of expiration; (3) the internal intercostal nerve branches that innervate the triangularis sterni muscle during the second stage of expiration. The rhythmicity of these nerves is classically viewed as originating from a single rhythm generator. In this model, phasing is produced by reciprocal synaptic inhibition between groups of sequentially active interneurons.
Nevertheless, an alternative model has been proposed reinforced by certain experimental data. According to this model, respiratory rhythm is generated by two coupled anatomically distinct rhythm generators, one in the pre-Boetzinger complex and the other in the retrotrapezoid nucleus / parafacial respiratory group. Further survey provided evidence to the hypothesis that one of the networks is responsible for inspiration rhythm and the other for expiration rhythm. Therefore, inspiration and expiration are distinct functions and one does not induce the other, as is the common belief, but one of two dominates the behavior by generating a faster rhythm.
Swallowing involves the coordinated contraction of more than 25 pairs of muscles in the oropharynx, larynx and esophagus, which are active during an oropharyngeal phase, followed by the primary esophageal peristalsis. Swallowing depends on a CPG located in the medulla oblongata, which involves several brain stem motor nuclei and two main groups of interneurons: a dorsal swallowing group (DSG) in the nucleus tractus solitarii and a ventral swallowing group (VSG) located in the ventrolateral medulla above the nucleus ambiguus. Neurons in the DSG are responsible for the generation of the swallowing pattern, while those in the VSG distribute the commands to the various motoneuronal pools. As in other CPGs, the functioning of the central network can be modulated by peripheral and central inputs, so that the swallowing pattern is adapted to the size of the bolus.
Within this network, central inhibitory connections play a major role, producing a rostrocaudal inhibition that parallels the rostrocaudal anatomy of the swallowing tract. Thus, when the neurons controlling the proximal parts of the tract are active, those that command more distal parts are inhibited. Apart from the type of connection between the neurons, intrinsic properties of the neurons, especially those of NTS neurons, probably also contribute to the shaping and timing of the swallowing pattern.
The swallowing CPG is a flexible CPG. This means that at least some of the swallowing neurons may be multifunctional neurons and belong to pools of neurons that are common to several CPGs. One such CPG is the respiratory one, which has been observed interacting with the swallowing CPG.
Central pattern generators can also play a role in rhythm generation for other functions in vertebrate animals. For example, the rat vibrissa system uses an unconventional CPG for whisking movements. "Like other CPGs, the whisking generator can operate without cortical input or sensory feedback. However, unlike other CPGs, vibrissa motoneurons actively participate in rhythmogenesis by converting tonic serotonergic inputs into the patterned motor output responsible for movement of the vibrissae." Breathing is another non-locomotive function of central pattern generators. For example, larval amphibians accomplish gas exchange largely through rhythmic ventilation of the gills. A study by Broch, et al. showed that lung ventilation in the tadpole brainstem may be driven by a pacemaker-like mechanism, whereas the respiratory CPG adapts in the adult bullfrog as it matures. Thus, CPGs hold a broad range of functions in the vertebrate animal and are widely adaptable and variable with age, environment and behavior.
Rhythmicity in CPG's can also result from time-dependent cellular properties such as adaptation, delayed excitation, and post-inhibitory rebound (PIR). PIR is an intrinsic property that elicits rhythmic electrical activity by depolarizing the membrane once hyperpolarizing stimulus is gone. "It can be produced by several mechanisms including hyperpolarization-activated cation current (Ih) or deinactivation of depolarization-activated inward currents"  Once inhibition has ceased, this period of PIR can be explained as the time with increased neuronal excitability. It is the property of many CNS neurons that sometimes results in action potential "bursts" following immediately after inhibitory synaptic input."Because of this, it has been suggested that PIR may contribute to the maintenance of oscillatory activity in neural networks that are characterized by mutual inhibitory connections, like those involved in locomotor behaviors. In addition, PIR is often included as an element in computational models of neural networks that involve mutual inhibition"  For example, the "PIR in crayfish stretch receptor neurons is caused by recovery from adaptation during the course of inhibitory hyperpolarization. One feature of that system is that PIR only occurs if the hyperpolarization is imposed on a background of excitation, caused in this case by stretch. They also found that PIR can be elicited in the stretch receptor by hyperpolarizing current pulses. This was an important finding because it showed that PIR is an intrinsic property of the postsynaptic neuron, related to the membrane potential change associated with inhibition but independent of transmitter receptors or presynaptic properties. The latter conclusion has stood the test of time, marking PIR as a robust property of CNS neurons in a wide variety of contexts."  This cellular property can most easily be seen in the Lamprey neural circuit. The swimming movement is produced by alternating neural activity between the left and right side of the body, causing it to bend back and forth while creating oscillating movements. While the Lamprey is bent to the left, there is reciprocal inhibition on the right side causing it to relax due to hyperpolarization. Immediately after this hyperopolarizing stimulus, the interneurons use post-inhibitory rebound to initiate activity in the right side. Depolarization of the membrane causes it to contract while reciprocal inhibition is now applied to the left side.
As described earlier, CPGs can also function in a variety of ways in invertebrate animals. In the mollusc Tritonia, a CPG modulates reflexive withdrawal, escape swimming and crawling. CPGs are also used in flight in locusts and for respiration systems in other insects. Central pattern generators play a broad role in all animals and show amazing variability and adaptability in almost all cases.
The classical view of movement control prior to works of Brown attributed the function of muscle pattern generation largely to sensory feedback mechanisms. In this light, the pattern generator can be considered as an intrinsic spinal processor that corrects imperfect sensory feedback and adapts central input to this optimized peripheral input.