In the anesthetized cat the correlation between the ongoing cord dorsum potentials (CDPs) recorded from different lumbar spinal segments has a non-random structure, suggesting relatively stable patterns of functional connectivity between the dorsal horn neuronal ensembles involved in the generation of these potentials. During the nociception induced by the intradermic injection of capsaicin, the patterns of segmental correlation between the spontaneous CDPs acquire other non-random configurations that are temporarily reversed to their pre-capsaicin state by the systemic injection of lidocaine, a procedure known to decrease the manifestation of neuropathic pain in both animals and humans. We have now extended these studies and utilized machine learning for the automatic extraction and selection of particular classes of CDPs according to their shapes and amplitudes. By using a Markovian analysis, we disclosed the transitions between the different kinds of CDPs induced by capsaicin and lidocaine and constructed a global model based on the changes in the behavior of the CDPs generated along the whole set of lumbar segments. This allowed the identification of the different states of functional connectivity within the whole ensemble of dorsal horn neurones attained during nociception and their transitory reversal by systemic administration of lidocaine in preparations with the intact neuroaxis and after spinalization. The present observations provide additional information on the state of self-organized criticality that leads to the adaptive behavior of the dorsal horn neuronal networks during nociception and antinociception both shaped by supraspinal descending influences.