<p>Understanding the input-output function of principal cortical neurons and their role in network dynamics is a key milestone in decoding how information is represented and processed in the cortex. Pyramidal neurons act as complex computational units, integrating the activity of thousands of synaptic inputs and transforming them into output patterns. These computations are primarily carried out within an elaborate dendritic tree, which receives extensive synaptic input and converts it into a neural code. However, the nature of dendritic computations in vivo during behaviorally relevant tasks remains unclear.</p><p>In this talk, I will present our recent findings on the dendritic mechanisms used by layer 5 pyramidal tract (PT) neurons to encode motor information in vivo during various motor tasks. Using two-photon calcium imaging in head-fixed mice, along with a custom experimental and analytical pipeline, we achieved unprecedented resolution in correlating dendritic structure with function. I will discuss how different types of PT neurons process and represent motor information, how these properties are shaped during learning, and the role of thalamocortical inputs in modulating both learning and representation.</p>