Definition
Lateral inhibition and adaptation are two coding strategies of the somatosensory system. Lateral inhibition enhances the quality of sensory information by suppressing the pathways that flank the most active one, while adaptation codes for stimulus duration through the way receptor firing declines, or persists, during a sustained stimulus.
1. Lateral inhibition
A localised stimulus, like a pin on the skin, activates several primary sensory neurons at once, and the response of each one is proportional to stimulus strength: the pathway closest to the stimulus fires the most, its immediate neighbours less, and distant ones remain at their tonic level. At the relay, the pathway closest to the stimulus inhibits its neighbours, pushing the flanking pathways below that tonic level. The effect is contrast enhancement: inhibition of the lateral neurons enhances perception of the stimulus, because the difference between the strongly active central pathway and its silenced surroundings is exaggerated. This is how lateral inhibition sharpens the quality of sensory information.

2. Adaptation
Adaptation describes how the receptor potential and firing rate evolve while a stimulus is maintained, and it is the code for stimulus duration. Receptors split into two classes by their temporal response, rapidly adapting and slowly adapting.

3. Rapidly adapting receptors
In rapidly adapting receptors the receptor potential decreases in response to a sustained stimulus, so the afferent produces only an on-off burst of action potentials at the start (and end) of stimulation and then falls silent. Because of this they convey information on changes in ongoing stimulation rather than on the steady stimulus itself. The classic example is the Pacinian corpuscle.
4. Slowly adapting receptors
Slowly adapting receptors behave the opposite way: they keep firing with sustained activity for as long as the stimulus is present. This makes them suited to convey information on the spatial attributes of the stimulus, such as size and shape. The example given is nociceptors.
Summary
Summary
Lateral inhibition enhances the quality of sensory information: the pathway closest to the stimulus inhibits its neighbours, exaggerating contrast and sharpening perception of the stimulus. Adaptation codes for stimulus duration: rapidly adapting receptors, like the Pacinian corpuscle, lose their receptor potential during a sustained stimulus and fire only an on-off burst of action potentials, signalling changes in ongoing stimulation, while slowly adapting receptors, like nociceptors, fire throughout the stimulus and signal its spatial attributes, such as size and shape.