{'fraction_non_alphanumeric': 0.03439440525712908, 'fraction_numerical': 0.013383975402423585, 'mean_word_length': 5.356581720636137, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Measuring and modeling the motor system with machine learning

The utility of machine learning in understanding the motor system is promising a revolution in how to collect, measure, and analyze data. The field of movement science already elegantly incorporates theory and engineering principles to guide experimental work, and in this review we discuss the growing use of machine learning: from pose estimation, kinematic analyses, dimensionality reduction, and closed-loop feedback, to its use in understanding neural correlates and untangling sensorimotor systems. We also give our perspective on new avenues where markerless motion capture combined with biomechanical modeling and neural networks could be a new platform for hypothesis-driven research.


Introduction
Investigations of the motor system have greatly benefited from theory and technology. From neurons to muscles and whole-body kinematics, the study of one of the most complicated biological systems has a rich history of innovation. In their quest to understand the visual system, David Marr and H. Keith Nishihara described how static shape powerfully conveys meaning (information), and gave two examples of how "skeletonized" data and 3D shapes, such as a series of cylinders can easily represent animals and humans (Figure 1A,B; 1). These series of shapes evolving across time constitute actions, motion, and what we perceive as the primary output of the motor system. Now with deep learning, the ability to measure these postures has been massively facilitated. But the measurement of movement is not the sole realm where machine learning has increased our ability to understand the motor system. Modeling the motor system is also leveraging new machine learning tools. This opens up new avenues where neural, behavioral, and muscle-activity data can be measured, manipulated, and modeled with everincreasing precision and scale.

Measuring motor behavior
Motor behavior remains the ultimate readout of internal intentions. It emerges from a complex hierarchy of motor * alexander.mathis@epfl.ch, mackenzie@post.harvard.edu control circuits in both the brain and spinal cord, with the ultimate output being muscles. Where these motor commands arise and how they are shaped and adapted over time still remains poorly understood. For instance, locomotion is produced by central pattern generators in the spinal cord and is influenced by goal-directed descending command neurons from the brainstem and higher motor areas to adopt specific gaits and speeds-the more complex and goal-directed the movement, the larger number of neural circuits recruited (5,6). Of course, tremendous advances have already been made in untangling the functions of motor circuits since the times of Sherrington (7), but new advances in machine learning for modeling and measuring the motor system will allow for better automation and precision, and new approaches to modeling, as we highlight below.
In the past few years modern deep learning techniques have enabled scientists to closely investigate behavioral changes in an increasingly high-throughput and accurate fashion. Often eliminating hours of subjective and time-consuming human annotation of posture, "pose estimation"-the geometric configuration of keypoints tracked across time-has become an attractive workhorse within the neuroscientific community (8)(9)(10)(11). While there are still computer vision challenges in both human and animal pose estimation, these new tools perform accurately within the domain they are trained on (12,13). Naturally, the question arises: now that pose estimation is accelerating the pace and ease at which behavioral data can be collected, how can these extracted poses help explain the underlying neural computations in the brain?

Meaningful data from pose estimation.
Advances in pose estimation have opened new research possibilities. Software packages that tackle the needs of animal pose estimation with deep neural networks (DNNs) include DeepLabCut (4,14), LEAP (15), DeepBehavior (16), Deep-PoseKit (17), DeepFly3D (18), and DeepGraphPose (19). These packages provide customized tracking for the detailed study of behavior, and come with their own pitfalls and perspectives (20). Pose estimation was reviewed elsewhere (9)(10)(11)20), which is why we focus on how such data can be used to understand the motor system. Several groups have delved into the challenge of deriving additional metrics from deep learning-based pose estimation data. There are (at least) two common paths: (1) derive kinematic variables, (2) derive semantically-meaningful behavioral actions. Both have unique challenges and potential uses. and modern computer vision has greatly impacted our ability to measure movement (C adapted from 2, D adapted from 3, and E adapted from 4).

Kinematic analysis.
Whether marker-based or marker-free, tracked keypoints can be viewed as the raw building blocks of joint coordinates and subsequent measurements. Namely, key points can form the basis of movement analysis. Kinematics-the analysis of motion, and in biomechanics typically the study of position, velocity, and acceleration of joints-is essential to describe the motion of systems.
How has kinematic data been used to understand the motor system? In elegant work, Vargas-Irwin and colleagues demonstrated how highly detailed pose estimation data can be used to uncover neural representations in motor cortex during skilled reaching. Using a marker-based approach, they showed that a small number of primary motor cortex (M1) neurons can be used to accurately decode both proximal and distal joint locations during reaching and grasping (2) (Figure 1C). Others have powerfully used marker-based tracking to quantify recovery in spinal cord injuries in mice, rats and macaques (21)(22)(23).
Markerless pose estimation paired with kinematic analysis is now being used for a broad range of applications. Human pose estimation tools, such as state-of-the-art (on COCO) HRNet (3) ( Figure 1D) or DeepLabCut ( Figure 1E), have been used in applications such as sports biomechanics (24,25), locomotion ( Figure 2) and clinical trials 1 . For example, Williams et al. recently showed that finger tap bradykinesia could be objectively measured in people with Parkinson's disease (26). They used deep learning-based pose estimation methods and smartphone videos of finger tapping kinematics (speed, amplitude and rhythm) and found correlations with clinical ratings made by multiple neurologists. With a broader adoption of markerless approaches in both the biomechanical and neuroscience community, we 1 https://clinicaltrials.gov/ct2/show/NCT04074772 foresee a growing use of machine learning for developing clinically-relevant biomarkers, and automating the process of clinical scoring of disease states (i.e., automating scoring Parkinson's disease).

Reducing dimensionality to derive actions.
Analyzing and interpreting behavior can be challenging as data are complex and high-dimensional. While pose estimation already reduces the dimensionality of the problem significantly, there are other processing steps that can be used to transform video into "behavior actions". Specifically, dimensionality reduction methods can transform the data into a low-dimensional space, enabling a better understanding and/or visualization of the initial data.
Dimensionality reduction tools (e.g., PCA, t-SNE (31), UMAP (32)) are commonly used methods to cluster data in an unsupervised manner. Principal Component Analysis (PCA) aims to find the components that maximize the variance in the data and the principal components rely on orthogonal linear transformations, and has been important for estimating the dimensionality of movements, for example (2, 33). t-distributed Stochastic Neighbor Embedding (t-SNE) is suitable for visualizing non-linear data and seeks to project data into a lower dimensional space such that the clustering in the high dimensional space is preserved. However, it typically does not preserve the global data structure (i.e., only within-cluster distances are meaningful; but cf. 34). In conjunction with an impressive system to track hunting zebrafish, t-SNE was used to visualize the hunting states ( Figure 2). Lastly, Uniform Manifold Approximation and Projection for Dimension Reduction (UMAP) typically preserves the data's global structure (cf. 35). Many tools allow for seamless passing of pose estimation output to perform such clustering, such as MotionMapper (36) and B-SOiD (37).
The utility of unsupervised clustering for measuring behav-ior is well illustrated by Bala et al. 38. They explored motor behavior in freely moving macaques in large unconstrained environments in the laboratory setting. In combination with 62 cameras-a remarkable feat on its own-OpenMonkeyStudio uses 13 body landmarks and trains a generalizable view-invariant 2D pose detector to then compute 3D postures via triangulation. Coherent clusters extracted with UMAP correlated with semantic actions such as sitting, climbing, and climbing upside down in monkeys (38). Importantly, in this case, a 3D pose estimation compared to 2D pose estimation yielded more meaningful clusters. Together with the 3D location of a second macaque, social interactions were derived from co-occurrence of actions.
Dimensionality reduction can also be applied to kinematic features (such as joint angles). For example, DeAngelis et al. used markerless pose estimation to extract gait features from freely moving hexapods (39). Then, UMAP was applied to generate a low-dimensional embedding of the tracked limbs while preserving the local and global topology of the high-dimensional data. UMAP revealed a vase-like manifold parametrized by the coordination patterns of the limbs. In conjunction with modulation by means of optogenetic or visual perturbations, different gaits and kinematic modalities were evoked and directly interpretable in the UMAP embedding. In a similar approach, using the clustering algorithm clusterdv (40), different types of swimming bouts were iden- Limb tracking to analyze gait patterns in mice whose locomotion has been altered by brainstem optical stimulation (adapted from 4, 27). (2) Autoencoders: Top row: The use of a convolutional autoencoder from video to inferred latents and states, adopted from 28. Bottom row: Architecture of VAME (adapted from 29) constituted by an encoder (input is key points), which learns a representation of the hidden states. The original sequence can be reconstructed by a decoder or the evolution of the time series can be predicted. UMAP embedding of the pose estimation. (3) Behavioral data acquisition enabling precise tracking of zebrafish larvae and behavioral clustering of swimming bouts (adapted from 30). tified from zebrafish larvae movements (41). Similar methods enabled precise visualization of hunting strategies that were dependent on visual cues (42).
Autoencoders are powerful tools for nonlinear dimensionality reduction via generative models (43). They have found wide use in sequence modeling for language, text, and music (44, 45). They can also be used for unsupervised discovery of behavioral motifs by using manually selected features (i.e., the keypoints defined for pose estimation) as input, or by inputting video (Figure 2. For instance, BehaveNet uses video directly to model the latent dynamics (28). Variational Animal Motion Embedding (29) (Figure 2) used keypoints as the input to a recurrent variational auto encoder to learn a complex distribution of the data. Variational autoencoder stochastic neighbor embedding (VAE-SNE) combines a VAE with t-SNE to compress high dimensionality data and automatically learn a distribution of clusters within the data (46).
In addition to unsupervised analysis, supervised methods are powerful ways to use the outputs of pose estimation to derive semantically meaningful actions (47)(48)(49)(50). For instance, the Mouse Action Recognition System (MARS), a pipeline for pose estimation and behavior quantification in pairs of freely behaving (differently colored) mice, works in conjunction with BENTO, which allows users to annotate and analyze behavior states, pose estimates, and neural recording data simultaneously through a graphical interface (50). This framework enabled the authors to use supervised machine learning to identify a subset of 28 neurons whose activity was modulated by mounting behavior. These methods build on open source tools, which provided many supervised and unsupervised learning tools in a highly customize way (47).
Another approach is to use video directly, instead of applying pose estimation first (28,36,51). Here, the pixels themselves can be used for action recognition, which can be highly useful when the behaviors of interest do not involve kinematics, such as blushing in humans, or freezing in mice. In computer science the rise of deep learning has gone hand-in-hand with the development of larger datasets. For example, pre-training models on the Kinetic Human Action Video dataset drastically improves action recognition performance (52). Others pushed video recognition further by using a multi-fiber architecture, where sparse connections are introduced inside each residual block, thereby reducing computations (53). Several groups have leveraged this approach for facial expression (54,55), pharmacological behavior-modulation (56) or for measuring posture and behavior representations (57,58).

Closed-loop feedback based on behavior.
Closed-loop feedback based on behavioral measurements can be informative for causal testing of learning algorithms (such as reinforcement learning) and for probing the causal role of neural circuits in behavior (59,60). Recent efforts to translate offline pose estimation and analysis to real time have enabled new systems, such as in EthoLoop (60) and DeepLabCutlive! (61). EthoLoop is a multi-camera, closed-loop track-ing system using a two-step process: a marker-based camera tracking system, followed by DeepLabCut-based pose estimation analysis. This system is capable of providing closeup views and analyses of the ethology of tracked freely moving primates. The closed-loop aspect enabled real-time wireless neuronal recordings and optical stimulation of individuals striking specific poses. We expect that real-time (and predictive) low-latency pose estimation for closed-loop systems will certainly play a crucial role in the years to come (61)(62)(63). These tools are bound to include more customized behaviordependent real-time feedback options. While the delays can be minimal for such computations, time-delayed (hardware) systems are not real-time controllable. Thus, to instantly provide feedback we added a forward prediction mode to DeepLabCut-Live! (61), which we believe will be crucial as these tools grow in complexity. Overall, the above discussed methods are highly effective in disentangling behavioral data, finding patterns, and capturing actions within behavioral data.

Neural correlates of behavior.
At the heart of neuroscience research is the goal to causally understand how neurons (from synapses to networks) relate to behavior. With the rise of new tools to measure behavior, there is a homecoming to the quest of relating movement to neural activity. As described above, both kinematic features or lower dimensional embeddings of behavior can be used to regress against neural activity, or using real-time feedback, to causally probe their relationship to actions.
In recent years, many groups have utilized such tools to uncover new knowledge of the motor system. It remains debated what the role of motor cortex is, yet new tools are enabling careful and precise studies of the system in goaldirected actions. For example, Ebina et al. used markerless tracking and optogenetics to show that in marmosets stimulation with varying spatial or temporal patterns in motor cortex could elicit simple or even direction-specific forelimb movements (64). Sauerbrei et al. also used markerless tracking to show that motor cortex inactivation halted movements, but this was a result of disrupted inputs (from thalamus), thus revealing that multiple interacting brain regions were responsible for dexterous limb control (65). Moreover, others have used these tools to show that brainstem neurons highly correlate and causally drive locomotor behaviors (27,66).
Furthermore, it is becoming increasingly recognized that brain-wide (or minimally, cortex-wide) neural correlates of movement are ubiquitous in animals performing both spontaneous or goal-directed actions (67-69). Stringer et al. (67) showed spontaneous movements constituted much of the neural variance ("noise") in visual cortex, and Musall, Kaufmann et al. (68) report similar findings across many brain regions. It was also previously shown that neuronal activity in the posterior parietal cortex and the pre-motor cortex (M2) of rats accurately correlate with animal's head posture (70), and of course even in sensory areas such as visual cortex encode movement (67,71,72).
Relating neural activity to not only kinematic or behavioral features, but to muscle output is also highly important for correlating neurons to movement. In a recent study, human neonatal motoneuron activity was characterized using noninvasive neural interface and joint tracking. Using markerless pose estimation, they found that fast leg movements in neonates are mediated by high motoneuron synchronization, and not simply due to an increase in discharge rate as previously observed in adults (73,74). Another example of combining EMG (electromyography) and motion capture, Herent et al. used peripheral recordings via a diaphragmatic EMG to reveal an absence of synchronization (e.g., temporal correlation) of breaths to strides in mice at various displacement speeds during locomotion (75). This rich data is crucial for understanding the neural code, and it is shaping efforts to model the system at an even finer resolution.
Being able to not just capture movement, but model it has a rich history in movement neuroscience (76)(77)(78). In the next sections we will discuss how machine learning has also influenced modeling the motor system.

Neural networks as sensorimotor system models
The brain excels at orchestrating adaptive animal behavior, striving for robustness across environments (7,78). Thereby the brain, hidden in the skull, takes advantage of multiple sensory streams in order to act as a closed-loop controller of the body. How can we elucidate the function of this complex system? The solution to this problem is not trivial due to multiple challenges such as high-dimensionality, redundancy, noise, uncertainty, non-linearity and non-stationarity of the system (78). Since DNNs excel at learning complex inputoutput mappings (79,80), they are well positioned for modeling motor, sensory and also sensorimotor circuits. Moreover, unlike in the biological brain, DNNs are fully observable such that one can easily "record" from all the neurons in the system and measure the connectome. Therefore, in the next sections we discuss how modeling the motor, sensory and combine sensorimotor systems may lead to new principles of motor control.

Modeling the motor system.
How do neural circuits produce adaptive behavior, and how can deep learning help model this system? Several groups have modeled the motor system with neural networks to investigate how, for example, task cues can be transformed into rich temporal sequential patterns that are necessary for creating behavior (81,82). In particular, recurrent neural networks (RNNs), whose activity is dependent on their past activity (memory), have been used to study the motor system, as they can produce complex dynamics (79,80).
In a highly influential study, Sussillo and colleagues showed that RNNs can learn to reproduce complex patterns of muscle activities recorded during a primate reaching task. By modifying the network's characteristics, such as forcing the dynamics to be smooth, the natural dynamics that emerged from the network closely resembled the one observed in the primates' primary motor cortex (M1) (83). In a similar way, RNNs can also be used to understand why a brain area shows a specific feature. For instance, M1 has low-tangled population dynamics when primates perform a cycling movement task using a hand-pedal, unlike muscle activity and sensory feedback (84). Building a network model which is trained on the same task, not only can replicate the same dynamics but it also unveils noise robustness as a possible underlying principle of the observed dynamics. Moreover, RNNs can be used to test various hypotheses about how the brain drives adaptive behavior by comparing neural or behavioral activity to the "neural" units. For instance, it has been investigated how prior beliefs are integrated into the neural dynamics of the network (85), how temporal flexibility is connected to a network's nonlinearities (86), and how robust trajectory shifting allows the translation between sequential categorical decisions (87).
Importantly for motor control, RNNs have also been used to study how sequential, independent movements, or tasks, are generated (88). Here, the authors also tackled the problem of cross task interference, which the RNN overcame by utilizing orthogonal subspaces (88). In related work, a novel learning rule that aimed to conserve network dynamics within subspaces (defined by activity of previously learned tasks) allowed for more robust learning of multiple tasks with a RNN (89).
RNNs are also capable of re-producing complex spatiotemporal behavior, such as speech (90,91). This was achieved using a two-stage decoder with bidirectional, long short-term memory networks. First, the articulatory features were decoded by learning a mapping between sequences of neural activity (high-gamma amplitude envelope and low frequency component from EcoG recordings) and 33 articulatory kinematic features. Second, the kinematic representation is mapped to 32 acoustic features. Importantly, because subjects share the kinematic representation, the first stage of the decoder could be transferred to different participants, which requires less calibration data (91).

Modeling sensory systems.
Sensory inputs, which are delayed and live in a different coordinates to the motor system, need to be integrated for adaptive motor control (77,78). Deep learning based models of sensory systems have several advantages: responses for arbitrary stimuli can be computed, their parts can be mapped to brain regions, and they have high predictability (93)(94)(95).
In general, there are two main approaches used for generating models of sensory systems: (i) data-driven models and (ii) task-driven models. Data-driven approaches use encoding models that are trained to predict neural activity from stimuli. As such, using non-deep-learning-based encoding models is a classical approach (96) where neural responses are approximated using tuning curves (97). Since stimulus features can be highly complex, DNNs can be especially useful in learning the stimulus-response mappings (94, 95, 98- tion, and touch from the environment (middle panel). The sensorimotor system can be modeled using hierarchical, artificial neural networks (right panel), such as feed-forward networks (blue and green), and recurrent networks (red) to represent the sensory and motor systems (respectively). The biological agent and environment provide crucial model constraints (derived from fine-grained behavioral measurements, biochemical and anatomical constraints, etc.). For instance, motion capture and modeling of the plant (body) in the environment (i.e., here the arm) can be used to constrain motor outputs. The model CNS can be used to make predictions about the biological system, and used to explain biological data. Anatomical drawings on the left created with BioRender.com; OpenSim arm adapted from (92). 101). Indeed, DNNs can outperform standard methods, such as the generalized linear model (GLM), in predicting the neural activity of the somatosensory and motor cortex (98). Yet, to fit complex deep learning models, one typically needs a lot of data, a limitation that can be overcome by the task-driven approach.
Task-driven modeling builds on the hypothesis that sensory systems have evolved to solve relevant ecological tasks (102,103): if artificial systems are trained to solve the same complex tasks that animals face, they might converge towards representations observed in biological systems (94,95,104). Therefore, one can (potentially) learn large-scale models for limited neural datasets by taking advantage of transfer learning (e.g., train on ImageNet (105) to obtain better models of the visual (ventral) pathway). Second, the choice of tasks allows researchers to test diverse hypotheses such as the highly successful hypothesis that the ventral pathway in primates is optimized to solve object recognition (93,94,106). Specifically, hierarchical DNNs trained to solve an object recognition task can explain a large fraction of variance in neural data of different brain areas along the visual pathway (106) and auditory pathway (107). Crucially, for audition and vision, large scale datasets of relevant stimuli are readily available. How can this work be expanded to senses of importance to the motor system, such as touch and proprioception, where delivering relevant touch-only or proprioception-only information is more challenging (if not impossible)?
One possible way to overcome this issue consists of simulating touch and proprioceptive inputs using biophysical models. For instance, a physically-realistic model of a mouse's whisker array has been used to develop a synthetic dataset of whisker (touch) sweeps across different 3D objects (108). A muscle-spindle firing rate dataset has been generated from 3D movements based on a musculoskeletal model of a human arm (92). In this way, DNNs trained to perform object or character recognition suggested putative ways spatial and temporal information can be integrated across the hierarchy (108) and that network's architecture might play a main role in shaping its kinematic tuning properties (92). Both of these studies propose perception-based tasks, which provide baseline models, yet we envision the task space, complexity of the biophysical models, and the plant modelled will increase in future studies.

Modeling the sensorimotor system.
Although modeling the motor or sensory systems alone is of great importance, a crucial body of work stems from combining models of sensory, motor, and task-relevant signals. Deep reinforcement learning (DRL) is a powerful policy optimization method to train models of sensorimotor control (109).
For instance, DRL was used to solve a navigation task in zebrafish, and representations in units of the network resembled those observed in the brain (110). Not only did the optimized network have units that correlated with temperature and behavioral states, but it also predicted an additional functional class of neurons which was not previously identified with calcium imaging alone (110). DNNs trained to achieve chemotaxis behavior of c. elegans with DRL provided insights into neuropeptide modulation and circuits (111). In an artificial agent trained to perform vector-based navigation, grid cells emerged as well as coding properties (112) that had been observed in rodents (113), and predicted from theory (114). Motor control has been studied using a virtual rodent trained with DRL to solve a few behavioral tasks. A closer look into the learned neural representations delineates a task-invariant and a task-specific class, which belong to the low-and highlevel controller, respectively (115).
Moreover, DRL has been utilized to learn control policies for complex movements, such as locomotion in challenging environments (116)(117)(118) or complex dexterous hand manipulation (119). Eventually, the policy learned in simulation environments can be transferred to a real-world scenario achieving rather remarkable robustness in terrains not encountered during training (120) and evolving human-like grasping and object interaction behaviors without relying on any human demonstrations (121,122). Lastly, real-world sensory feedback and measurements during natural tasks can also be used to constrain models and define goals. For example, reference motion data can be used to train musculoskeletal model using DRL to reproduce human locomotion behaviors (123,124).
An alternative approach to modeling the sensorimotor system in neural networks is via engineering or theoretical principles. Neural network models have an increased capacity to model highly complex integrated systems, as evidenced by advances, like Spaun, a spiking, multi-million-neuronnetwork model that can perform many cognitive tasks (125)(126)(127). Additionally, optimal feedback control (OFC) theory is a powerful normative principle for deriving models, that predicts many behavioral phenomena (76,77). OFC translated into DNNs accurately predicted neural coding properties in the motor cortex with biomechanical arm models and peripheral feedback (128). Recent experimental and modeling work has also begun to link different cortical regions to their functional roles in an OFC theory framework (129,130). We believe that future work will combine neural recordings and perturbations to continue to test hypotheses generated by DNN-based OFC, and other DNN-based system-wide models, which are constrained by rich behavior (Figure 3).
Towards such hybrid models, Michaels et al. have developed an exceptional model which leverages visual feedback to produce grasping movements. This model combines a CNN to extract visual features and three RNNs (modules) to control a musculosketal human arm. Amongst different architectures, the one with sparse inter-module connectivity was the best in explaining the brain-related neural activity thereby revealing possible anatomical principles of cortical circuits. Moreover, behavioral deficits, observed in previous lesion studies of the corresponding cortical areas, could be predicted by silencing specific modules. Interestingly, slight deficits occurred in regularized networks (i.e., penalty on high firing rates) when inputs from the intermediary module to the output module were lesioned, whereas behavior was completely disrupted in non-regularized networks. This observation suggests that the minimization of the firing rate could be a potential organizational principle of cortical circuits and that M1 might au-tonomously generate movements (131). However, this contrasts recent evidence that continuous input from the thalamus (in mice) is necessary to perform movements (65).
DNNs can also be trained in a self-supervised way based on rich data sets (132), which is a highly attractive platform for studying sensorimotor learning. Sullivan et al. showed that DNNs can learn high-level visual representations when trained on the same naturalistic visual inputs that babies receive using head-mounted cameras (133). These learned representations are invariant to natural transformations and support generalization to unseen categories with few labelled examples (132). An important future direction for studying the motor system will be to not only focus on representational similarity, but also comparing the learning rules used by both biological systems and machine models.
Lastly, DNNs for sensorimotor control are also popular in robotics. Not only can robots serve as great testing grounds for control policies (134,135), but they can also reveal limitations when going from "simulation to reality", such as challenges related to robustness (136,137).

Outlook
In the past few years, neuroscience has tremendously benefited from advances in machine learning. Behavioral analysis got more accurate while also being much less time consuming. This has already revealed novel aspects of behavior, but we are just at the dawn of these developments. Furthermore, advances in deep learning shaped the way biological systems can be modeled. We believe that in the future these two aspects will become increasingly intertwined. Namely, the unreasonable effectiveness of data suggests that powerful models-which further approximate the neural codecan be trained with large-scale behavioral measurements that are now possible. Concretely, with new tools to measure behavior one can constrain biologically plausible agents (such as OpenSim (138) or mujoco models (139)) to generate the behavior in an artificial setting. This simulation can then be used to generate data that might not otherwise be available: i.e., muscle activity from the whole arm or body in parallel with a visual input. These data could be used to develop hierarchical DNN models of the system (as we illustrate in Figure 3). These artificial network models, constrained with complex tasks, will provide researchers with sophisticated tools for testing hypotheses and gaining insight about the mechanisms the brain might use to generate behavior.