The document describes a sensorimotor inference system that uses neural networks. Layer 4 learns sensory-motor transitions from copies of motor commands and sensory input. Layer 3 pools the representations from Layer 4 into more stable representations by learning higher-order transitions. The system is able to predict and adapt to changes in sensory input based on what was predicted from the motor commands.