MotorNet: a Python toolbox for controlling differentiable biomechanical effectors with artificial neural networks

Artificial neural networks (ANNs) are a powerful class of computational models for unravelling neural mechanisms of brain function. However, for neural control of movement, they currently must be integrated with software simulating biomechanical effectors, leading to limiting impracticalities: (1) researchers must rely on two different platforms and (2) biomechanical effectors are not generally differentiable, constraining researchers to reinforcement learning algorithms despite the existence and potential biological relevance of faster training methods. To address these limitations, we developed MotorNet, an open-source Python toolbox for creating arbitrarily complex, differentiable, and biomechanically realistic effectors that can be trained on user-defined motor tasks using ANNs. MotorNet is designed to meet several goals: ease of installation, ease of use, a high-level user-friendly API, and a modular architecture to allow for flexibility in model building. MotorNet requires no dependencies outside Python, making it easy to get started with. For instance, it allows training ANNs on typically used motor control models such as a two joint, six muscle, planar arm within minutes on a typical desktop computer. MotorNet is built on TensorFlow and therefore can implement any network architecture that is possible using the TensorFlow framework. Consequently, it will immediately benefit from advances in artificial intelligence through TensorFlow updates. Finally, it is open source, enabling users to create and share their own improvements, such as new effector and network architectures or custom task designs. MotorNet’s focus on higher order model and task design will alleviate overhead cost to initiate computational projects for new researchers by providing a standalone, ready-to-go framework, and speed up efforts of established computational teams by enabling a focus on concepts and ideas over implementation.

[1]  David Sussillo,et al.  Flexible multitask computation in recurrent networks utilizes shared dynamical motifs , 2022, bioRxiv.

[2]  G. Loeb Learning to use Muscles , 2021, Journal of human kinetics.

[3]  Bijan Pesaran,et al.  Multiregional communication and the channel modulation hypothesis , 2020, Current Opinion in Neurobiology.

[4]  Jonathan W Pillow,et al.  Modeling statistical dependencies in multi-region spike train data , 2020, Current Opinion in Neurobiology.

[5]  L. Abbott,et al.  Brain-wide interactions between neural circuits. , 2020, Current opinion in neurobiology.

[6]  Hansjörg Scherberger,et al.  A goal-driven modular neural network predicts parietofrontal neural dynamics during grasping , 2020, Proceedings of the National Academy of Sciences.

[7]  Andrew M. Saxe,et al.  If deep learning is the answer, what is the question? , 2020, Nature Reviews Neuroscience.

[8]  Byron M. Yu,et al.  Statistical methods for dissecting interactions between brain areas , 2020, Current Opinion in Neurobiology.

[9]  J. A. Pruszynski,et al.  Stretch reflexes , 2020, Current Biology.

[10]  S. Gershman,et al.  The neurobiology of deep reinforcement learning , 2020, Current Biology.

[11]  T. Lillicrap,et al.  Backpropagation and the brain , 2020, Nature Reviews Neuroscience.

[12]  Jeffrey Pennington,et al.  Provable Benefit of Orthogonal Initialization in Optimizing Deep Linear Networks , 2020, ICLR.

[13]  Brian C. Horslen,et al.  Diverse and complex muscle spindle afferent firing properties emerge from multiscale muscle mechanics , 2019, bioRxiv.

[14]  Surya Ganguli,et al.  A deep learning framework for neuroscience , 2019, Nature Neuroscience.

[15]  P. Cisek Resynthesizing behavior through phylogenetic refinement , 2019, Attention, Perception, & Psychophysics.

[16]  Jeffrey Weiler,et al.  Spinal stretch reflexes support efficient hand control , 2019, Nature Neuroscience.

[17]  Ayman Habib,et al.  OpenSim: Simulating musculoskeletal dynamics and neuromuscular control to study human and animal movement , 2018, PLoS Comput. Biol..

[18]  Herke van Hoof,et al.  Addressing Function Approximation Error in Actor-Critic Methods , 2018, ICML.

[19]  Rafal Bogacz,et al.  An Approximation of the Error Backpropagation Algorithm in a Predictive Coding Network with Local Hebbian Synaptic Plasticity , 2017, Neural Computation.

[20]  Hansjörg Scherberger,et al.  Neural Population Dynamics during Reaching Are Better Explained by a Dynamical System than Representational Tuning , 2016, PLoS Comput. Biol..

[21]  Yuval Tassa,et al.  Continuous control with deep reinforcement learning , 2015, ICLR.

[22]  Shane Legg,et al.  Human-level control through deep reinforcement learning , 2015, Nature.

[23]  Yoshua Bengio,et al.  Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation , 2014, EMNLP.

[24]  J. Andrew Pruszynski,et al.  Goal-Dependent Modulation of Fast Feedback Responses in Primary Motor Cortex , 2014, The Journal of Neuroscience.

[25]  Michael A Sherman,et al.  WHAT IS A MOMENT ARM? CALCULATING MUSCLE EFFECTIVENESS IN BIOMECHANICAL MODELS USING GENERALIZED COORDINATES. , 2013, Proceedings of the ... ASME Design Engineering Technical Conferences. ASME Design Engineering Technical Conferences.

[26]  D. Wolpert,et al.  The Temporal Evolution of Feedback Gains Rapidly Update to Task Demands , 2013, The Journal of Neuroscience.

[27]  Matthew Millard,et al.  Flexing computational muscle: modeling and simulation of musculotendon dynamics. , 2013, Journal of biomechanical engineering.

[28]  T. Lillicrap,et al.  Preference Distributions of Primary Motor Cortex Neurons Reflect Control Solutions Optimized for Limb Biomechanics , 2013, Neuron.

[29]  Yuval Tassa,et al.  MuJoCo: A physics engine for model-based control , 2012, 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems.

[30]  Jeremy D Wong,et al.  The central nervous system does not minimize energy cost in arm movements. , 2010, Journal of neurophysiology.

[31]  Ajay Seth,et al.  Minimal formulation of joint motion for biomechanisms , 2010, Nonlinear dynamics.

[32]  J. A. Pruszynski,et al.  Stimulus‐locked responses on human arm muscles reveal a rapid neural pathway linking visual input to arm motor output , 2010, The European journal of neuroscience.

[33]  Yoshua Bengio,et al.  Understanding the difficulty of training deep feedforward neural networks , 2010, AISTATS.

[34]  J. Krakauer,et al.  A computational neuroanatomy for motor control , 2008, Experimental Brain Research.

[35]  Ayman Habib,et al.  OpenSim: Open-Source Software to Create and Analyze Dynamic Simulations of Movement , 2007, IEEE Transactions on Biomedical Engineering.

[36]  K. Shenoy,et al.  Temporal complexity and heterogeneity of single-neuron activity in premotor and motor cortex. , 2007, Journal of neurophysiology.

[37]  Maarten F Bobbert,et al.  Is equilibrium point control feasible for fast goal-directed single-joint movements? , 2006, Journal of neurophysiology.

[38]  E. Todorov Optimality principles in sensorimotor control , 2004, Nature Neuroscience.

[39]  D. Thelen Adjustment of muscle mechanics model parameters to simulate dynamic contractions in older adults. , 2003, Journal of biomechanical engineering.

[40]  S. Scott,et al.  Dissociation between hand motion and population vectors from neural activity in motor cortex , 2022 .

[41]  David J. Ostry,et al.  Compensation for loads during arm movements using equilibrium-point control , 2000, Experimental Brain Research.

[42]  E. J. Cheng,et al.  Morphometry of Macaca mulatta forelimb. I. Shoulder and elbow muscles and segment inertial parameters , 2000, Journal of morphology.

[43]  Reza Shadmehr,et al.  Computational nature of human adaptive control during learning of reaching movements in force fields , 1999, Biological Cybernetics.

[44]  F. Mussa-Ivaldi,et al.  The motor system does not learn the dynamics of the arm by rote memorization of past experience. , 1997, Journal of neurophysiology.

[45]  Mitsuo Kawato,et al.  Human arm stiffness and equilibrium-point trajectory during multi-joint movement , 1997, Biological Cybernetics.

[46]  S. Scott,et al.  Reaching movements with similar hand paths but different arm orientations. I. Activity of individual cells in motor cortex. , 1997, Journal of neurophysiology.

[47]  A. G. Feldman,et al.  The origin and use of positional frames of reference in motor control , 1995, Behavioral and Brain Sciences.

[48]  S. Delp,et al.  Variation of muscle moment arms with elbow and forearm position. , 1995, Journal of biomechanics.

[49]  F A Mussa-Ivaldi,et al.  Adaptive representation of dynamics during learning of a motor task , 1994, The Journal of neuroscience : the official journal of the Society for Neuroscience.

[50]  J. Flanagan,et al.  Control of Trajectory Modifications in Target-Directed Reaching. , 1993, Journal of motor behavior.

[51]  Michael I. Jordan,et al.  Forward Models: Supervised Learning with a Distal Teacher , 1992, Cogn. Sci..

[52]  G. Zahalak A distribution-moment approximation for kinetic theories of muscular contraction , 1981 .

[53]  Guigang Zhang,et al.  Deep Learning , 2016, Int. J. Semantic Comput..

[54]  A. W. Wiegner,et al.  Role of agonist and antagonist muscles in fast arm movements in man , 2004, Experimental Brain Research.

[55]  Neville Hogan,et al.  Stability properties of human reaching movements , 2004, Experimental Brain Research.

[56]  Ronald,et al.  Learning representations by backpropagating errors , 2004 .

[57]  Evert-Jan Nijhof,et al.  Simulation of Multijoint Arm Movements , 2000 .