NEURAL MECHANISMS AND BEHAVIOR IN UNRESTRAINED MOUSE OLFACTORY SEARCH by TERESA MARIE FINDLEY A DISSERTATION Presented to the Department of Biology and the Graduate School of the University of Oregon in fulfillment of the requirements for the degree of Doctor of Philosophy September 2020 DISSERTATION APPROVAL PAGE Student: Teresa Marie Findley Title: Neural Mechanisms and Behavior in Unrestrained Mouse Olfactory Search This dissertation has been accepted and approved in fulfillment of the requirements for the Doctor of Philosophy degree in the Department of Biology by: Terry Takahashi Chairperson Matt Smear Advisor Cris Niell Core Member Shawn Lockery Core Member Mike Wehr Core Member Caitlin Fausey Institutional Representative and Kate Mondloch Interim Vice Provost and Dean of the Graduate School Original approval signatures are on file with the University of Oregon Graduate School. Degree awarded September 2020 ii © 2020 Teresa Marie Findley iii DISSERTATION ABSTRACT Teresa Marie Findley Doctor of Philosophy Department of Biology September 2020 Title: Neural Mechanisms and Behavior in Unrestrained Mouse Olfactory Search For many organisms, searching the environment for food and mates entails active sensing. Finding odorous targets may be the most ancient search problem that motile organisms have evolved to solve. While chemosensory navigation has been well characterized in micro-organisms and invertebrates, spatial olfaction in vertebrates is poorly understood. Here, we developed an olfactory search assay where freely moving mice must navigate turbulent airborne odor gradients. Mice are concentration gradient- guided and do not rely upon stereo olfaction to successfully search these gradients. Further, mice synchronize head movement with sniffing with 10s of milliseconds precision. Using unsupervised machine learning, we identified 11 behavioral motifs that make up the structure of search behavior in this task. The onset of these motifs align tightly with the sniff cycle. These motifs sort into two broad categories of search based on nose speed and sniff synchronization. We have defined these two categories as investigation and approach. This assay lays the foundational behavioral work to investigate the underlying neural mechanisms of olfactory search. Movement is pervasively encoded across the brain and sampling movements dictate future sensory input. We anticipate that features of sampling movement are therefore encoded in early sensory areas such as the olfactory bulb. We designed an iv experimental assay that accommodates chronic local field potential recordings in olfactory bulb in the unrestrained mouse to investigate how olfactory bulb signals encode movement during olfactory search. Our system executes 3-dimensional tracking with high accuracy and can be generalized to accommodate many experimental techniques (electrophysiology, fiber photometry, optogenetics, etc.). This tracking is precisely aligned at the millisecond time scale with 16 channel electrophysiological recordings in the olfactory bulb and sniffing from an intranasally implanted thermistor. This assay development will accommodate future experiments into the neural mechanisms of olfactory search behaviors. v CURRICULUM VITAE NAME OF AUTHOR: Teresa Marie Findley GRADUATE AND UNDERGRADUATE SCHOOLS ATTENDED: University of Oregon, Eugene, Oregon Emory University, Atlanta, Georgia DEGREES AWARDED: Doctor of Philosophy, Neuroscience, 2020, University of Oregon Bachelor of Science, Neuroscience & Behavioral Biology, 2014, Emory University AREAS OF SPECIAL INTEREST: Animal behavior Sensory processing Olfaction PROFESSIONAL EXPERIENCE: Undergraduate Researcher, Emory University, 06/2013 – 06/2014 Undergraduate Research Assistant, Emory University, 06/2012 – 06/2013 GRANTS, AWARDS, AND HONORS: Ruth L. Kirschstein National Research Service Award (NRSA) Individual Predoctoral Fellowship (Parent F31; PA-19-195), Active Sensation during Odor- Guided Navigation in Mice, National Institute on Deafness and other Communication Disorders (NIDCD), 2017-2020 Association for Chemoreception Sciences Diversity Travel Fellowship, Glomerular Signals During Unrestrained Olfactory Search in Mice, April 2019 PUBLICATIONS: vi Baker KL, Dickinson M, Findley TM, Gire DH, Louis M, Suver MP, Verhagen JV, Nagel, KI, Smear MC. 2018. Algorithms for Olfactory Search across Species. The Journal of Neuroscience, 38(44): 9383-9389. PREPRINTS: Findley TM. & Wyrick D, Cramer J, Brown MA, Holcomb B, Songco J, Attey R, Yeh D, Monasevitch E, Nouboussi N, Cullen I, Songco J, King JF, Ahmadian Y, Smear MC. 2020 Sniff-synchronized, gradient-guided olfactory search by freely moving mice. bioRxiv doi: https://doi.org/10.1101/2020.04.29.069252. Submitted to eLife 2020. vii ACKNOWLEDGMENTS My sincerest thanks to Dr. Matt Smear for his incredible mentorship and guidance during my graduate studies. I could not have asked for a more skilled, supportive, creative, and generally awesome advisor. Special thanks to the members of the Smear lab for scientific contributions, support, and advice. I would additionally like to thank the Institute of Neuroscience and Biology Department at UO for their support throughout this investigation. Finally, I would like to thank my family, friends, roommates, Pickles, Rick, Borges, Julio, and Bobbi for their unconditional love and support throughout. This investigation was supported in part by a Ruth L. Kirschstein National Research Service Award (NRSA) Individual Predoctoral Fellowship (Parent F31; PA-19-195) from the National Institute on Deafness and other Communication Disorders (NIDCD). viii This manuscript is dedicated to Stella & Lionel Jacobs and Susan & Marshall Findley ix TABLE OF CONTENTS Chapter Page I. INTRODUCTION .................................................................................................... 1 Active sensation & unrestrained movement .......................................................... 1 The olfactory system .............................................................................................. 2 Olfactory search ..................................................................................................... 5 The olfactory environment ............................................................................... 5 Small-scale organisms: chemotaxis ................................................................. 6 Small-scale organisms: odor-gated anemotaxis ............................................... 6 Mammalian olfactory search: trail tracking ..................................................... 7 Mammalian olfactory search: air scenting & sampling movements ................ 8 Neural mechanisms of mouse olfactory search ..................................................... 9 II. SNIFF-SYNCHRONIZED, GRADIENT-GUIDED OLFACTORY SEARCH BY FREELY MOVING MICE .......................................................................................... 11 Introduction ............................................................................................................ 11 Results .................................................................................................................... 15 Olfactory search in noisy gradients of airborne odor ....................................... 15 Mice can use gradient cues in turbulent flow .................................................. 20 Sniff rate and occupancy are consistent across trials and gradient conditions .............................................................................................................. 22 Mice synchronize three-dimensional kinematic rhythms with sniffing during olfactory search ................................................................................................ 24 x Chapter Page State space modeling finds recurring motifs that are sequenced diversely across mice .............................................................................................................. 28 Movement motifs reveal two-state organization of olfactory search ............... 31 Investigation motif onsets are precisely locked to sniffing ............................. 34 Discussion .............................................................................................................. 37 Methods and Materials ........................................................................................... 42 Animals: Housing & Care ................................................................................ 42 Behavioral Assay Design ................................................................................. 43 Surgical Procedures ......................................................................................... 46 Behavioral Training ......................................................................................... 47 Behavioral Experiments ................................................................................... 49 Mapping the Olfactory Environment ............................................................... 50 Data Analysis ................................................................................................... 50 Auto-Regressive Hidden Markov Model ......................................................... 53 Decoding Analysis ........................................................................................... 59 III. UNRESTRAINED ELECTROPHYSIOLOGY ASSAY DEVELOPMENT ........ 74 Introduction ............................................................................................................ 74 Results .................................................................................................................... 77 Discussion .............................................................................................................. 81 Materials & Methods ............................................................................................. 83 xi Chapter Page Animals: Housing & Care ................................................................................ 83 Assay Design ................................................................................................... 84 Surgical Procedures ......................................................................................... 86 Data Analysis ................................................................................................... 87 REFERENCES CITED ................................................................................................ 89 xii LIST OF FIGURES Figure Page 1. Figure 1 .................................................................................................................. 16 2. Figure 2. ................................................................................................................. 18 3. Figure 3 .................................................................................................................. 23 4. Figure 4 .................................................................................................................. 25 5. Figure 5 .................................................................................................................. 27 6. Figure 6 .................................................................................................................. 29 7. Figure 7 .................................................................................................................. 32 8. Figure 8 .................................................................................................................. 35 9. Supplementary Figure 1 ......................................................................................... 61 10. Supplementary Figure 2 ......................................................................................... 62 11. Supplementary Figure 3 ......................................................................................... 63 12. Supplementary Figure 4 ......................................................................................... 64 13. Supplementary Figure 5 ......................................................................................... 65 14. Supplementary Figure 6 ......................................................................................... 66 15. Supplementary Figure 7 ......................................................................................... 67 16. Supplementary Figure 8 ......................................................................................... 68 17. Supplementary Figure 9 ......................................................................................... 69 19. Supplementary Figure 10 ....................................................................................... 70 20. Supplementary Figure 11 ....................................................................................... 71 21. Supplementary Figure 12 ....................................................................................... 72 22. Supplementary Figure 13 ....................................................................................... 73 xiii Figure Page 23. Figure 1 .................................................................................................................. 78 24. Figure 2 .................................................................................................................. 80 xiv CHAPTER I INTRODUCTION Teresa Findley and Matt Smear Institute of Neuroscience, University of Oregon, Eugene, OR 97403 Active sensation & unrestrained movement Animals function in highly dynamic environments. We successfully move through complex settings to forage, seek shelter, and reproduce. As such, we intuitively consider movement to be the result of sensory input -- we react to our surroundings. If something tastes sweet, you will eat more of it. If you touch a hot stove, you will pull your hand away from it. However, such a model excludes the impact that movement has on our senses. Our sensory systems are not fixed objects in a landscape, but are part of a body that is constantly in motion. Body movements shape the content, direction, and intensity of sensory stimuli. Proactively moving our sensors to sample the surrounding environment in a task-oriented manner is called active sensation. In this case, movement drives sensation in the form of eye saccades, sniffing, antennal movements, vibrissae protraction, etc. These sampling movements are integral to the proper function of our senses and it is therefore crucial to incorporate them into our study and subsequent understanding of sensory processing. Traditionally, the nervous system has been regionally categorized into discrete sections thought to support sensory, decision, and motor signals. However, recent 1 evidence challenges this model – movement signals occur globally across the brain during both spontaneous and goal-directed behavior, occurring even in areas traditionally considered sensory regions (Musall et al., 2018; Steinmetz et al., 2018; Stringer et al., 2019). This body of work supports a more comprehensive model of behavior: perception is a closed-loop process in which sensation and motion operate simultaneously and dependently (Ahissar & Assa, 2016; Churchland, P.S., Ramachandran, V.S., & Sjenowski, 1994; Gibson, 1962; Yarbus, 1967). Importantly, in this model of behavior, studying sensory processing requires unrestrained movement. Currently, the main body of sensory neuroscience literature is largely comprised of experiments that limit movement through head and/or body restraint. While advantageous for access, precision, breadth, and longevity of neural recordings, restraint causes changes in sampling behavior during vision (Wallace et al., 2013), somatosensation (O’Connor et al., 2010), and olfaction (Wesson et al., 2009). As it is still unclear whether sensory neural signals recorded in restrained animals generalize to freely moving paradigms, there is a vital need for investigation of sensory processing and behavior in the unrestrained animal. This dissertation presents such an investigation into active sensing behaviors during mouse olfactory search as well as an experimental system that can align discrete behavioral events with neural activity. The olfactory system Olfaction is the principal sense through which many species forage, avoid predators, and socialize/reproduce. Using olfactory cues, wolves can identify individuals, communicate with each other, and track prey that is kilometers away (Mech, L.D., & Frenzel, 1971; Peters & Mech, 1975). In contrast, salmon use olfaction to identify their 2 home stream and return there for breeding (Hasler et al., 1978; Nevitt et al., 1994). Importantly, olfaction is driven by observable and quantifiable sampling behaviors, making it a powerful model system for studying active sensation. Movements of the head, body, nose, vibrissae, antennae, etc. can shape and tune sensory input, allowing organisms to navigate both stable and dynamic chemical environments. In mammals, sniffing regulates odor access to the nose via inhalation speed and volume (Adrian, 1942; Sobel & Tank, 1993; Wachowiak, 2011). Modulations in respiration rate and volume are dramatically different during unrestrained movement (Wesson et al., 2008) and known to influence neural responses to odors (Parabucki et al., 2019; Wachowiak, 2011). Given the known importance of sampling in olfactory sensory processing, the breadth of sampling behaviors, and its ethological relevance, the mammalian olfactory system is an ideal model for investigating active sensing search behaviors in the context of closed-loop perception. Despite its versatility in application, the olfactory system is highly conserved across mammalian species. Olfactory sensory neurons (OSNs) embedded in the olfactory epithelium at the back of the nasal passages detect inhaled odorant molecules (Shepherd & Greer, 1998). Each of these OSNs expresses one type of odorant receptor (Malnic et al., 1999; Serizawa et al., 2000, 2003). OSNs that express the same receptor type all project onto the same glomerulus at the surface of the olfactory bulb (OB) (Ressler et al., 1994; Royet et al., 1998). Each glomerulus in the OB contains both OSN axon terminals and dendritic projections from the deeper mitral and tufted (M/T) cell layer in the OB (Shepherd & Greer, 1998). The glomerular layer is also innervated by periglomerular interneurons (providing inter- and intra- glomerular connections). The granule layer, the 3 deepest layer of the OB, is made up of granule interneurons with dendrodendritic synapses onto mitral cells (Shepherd & Greer, 1998). These provide the possible infrastructure for widescale within-system signal modulation. Both mitral and tufted cells then project to the olfactory cortex and associated areas, relaying information to other parts of the brain (Shepherd & Greer, 1998). The cellular architecture of the OB suggests extensive early processing of incoming signals prior to olfactory cortex access, making it a unique and fascinating model system through which to study sensory processing. To interpret the ethologically relevant features of the olfactory scene, the brain must efficiently and accurately encode odor identity and concentration. Specifically, information regarding odor concentration is essential for locating odor sources. M/T cells are projection neurons that receive direct input from OSNs. They are innervated by both periglomerular and granule cell interneurons allowing for extensive signal modulation. Further, odor identity can be decoded from a single M/T cell spiking pattern (Shusterman et al., 2011). This makes this population a viable candidate for the extraction and encoding of environmentally salient features like concentration and identity. M/T cells are also an ideal neuronal population in which to investigate the impact of sampling behavior on neural activity. The temporal pattern of M/T cell activity is locked in phase with the sniff cycle of awake, head-fixed mice (Shusterman et al., 2011). Recent work recording from OSN terminals and M/T cells simultaneously in the glomerular layer of awake, head-fixed mice shows that the activity of these two populations is tightly coupled (Moran et al., 2019). This suggests that much of the dynamics in M/T cell responses may largely be due to dynamics in OSN activity. Despite this, a sub-population of M/T cells have been shown to act as concentration change detectors, responding to either or both 4 increases and decreases in odor concentration in head-fixed, awake mice (Parabucki et al., 2019). This finding indicates that concentration change detecting M/T cells (ΔC cells) may play an important role in olfactory search. By investigating the population level activity of the M/T cell layer in the unrestrained mouse, we can reveal the relationship between active sensing movements and feature-relevant sensation during search behavior. Olfactory search The olfactory environment In the most simple, controlled conditions, odor molecules diffuse evenly along surfaces or through the air emanating away from an odor source. This results in a smooth gradient of odor concentration that peaks at the odor source. Experimentally, these are conditions where the stimuli are predictable. However, outside of these controlled settings, air turbulence disrupts these smooth gradients, creating complex and difficult to predict stimulus conditions. The resulting odor plumes rapidly fluctuate between pockets of high and low odor concentration (Connor et al., 2018; Crimaldi et al., 2002). This makes naturalistic olfactory scenes difficult to reliably reproduce and measure. Despite the dynamic nature of these stimuli, we know that many animals can use their olfactory systems to execute efficient and accurate searches. By capturing behavior, we can extrapolate some of the computational strategies for executing these searches in turbulent conditions and form hypotheses about the underlying neural mechanisms, even without knowing the stimulus. What follows is a summary outlining the current body of knowledge on the most relevant olfactory search strategies and behaviors to this dissertation. 5 Small-scale organisms: chemotaxis Chemotaxis, one of the simplest forms of chemical navigation, does not require networks of neurons. During bacterial chemotaxis, when a bacterium experiences an increase in attractive odor concentration, their turning probability goes down and they travel in a straight line. If it experiences no odor or a decrease in concentration, turning probability increases. This is controlled by chemoreceptor-activated phosphorylation of a messenger protein, which controls turn probability via the flagellar motor. This system is further tuned to accommodate dynamic stimuli by a pair of enzymes that modulate the methylation of chemoreceptors (Falke et al., 1997). Chemotaxis has also been well- characterized in the Drosophila melanogaster larvae and Caenorhabditis elegans (Gomez-Marin et al., 2011; Larsch et al., 2015; Lockery, 2011). Similarly, for these organisms the re-orientation algorithm is composed of two behavioral programs. Positive odor gradients result in runs whereas negative odor gradients result in stops. Drosophila larvae head cast back and forth to sense the gradient during runs and execute large head sweeps during stops to sample the gradient. Sensory input to just one of the two bilateral olfactory sensors on the head is sufficient to guide larval chemotaxis, suggesting that temporal concentration comparison across sampling movements plays an important role in this behavior (Gomez-Marin et al., 2011). In each of these examples of chemotaxis, olfactory search is executed using a two-state model of behavior (turns and runs). Small-scale organisms: odor-gated anemotaxis Turbulence increases with distance from a surface, meaning flying organisms must address odor gradient disruptions more so than those low to the ground. One popular 6 search strategy among flying insects is odor-gated anemotaxis (movement directed by air currents). Here, odor is not the positional cue, but instead acts as the trigger or gate for transition between behavioral states. Moths, for example, cast their bodies back and forth perpendicular to wind direction in search of attractive odorants. If they detect an attractive odor, they will surge upwind (Kennedy & Marsh, 1974; Vickers & Baker, 1994). In this case, the positional cue is wind direction. Cast and surge are the two behavioral states that are gated by odor cues. Adult Drosophila have also been shown to navigate using odor-gated anemotaxis (Budick & Dickinson, 2006). In this species, there is a delay between the end of a surge and initiation of casting (van Breugel & Dickinson, 2014). This is thought to mitigate the impact that temporary drops in concentration due to turbulence have on behavioral output. Anemotaxis is not the only type of directed movement that can be odor-gated. Recent research has shown that adult Drosophila can travel distances more than 10km over novel terrain to successfully locate banana traps. This suggests that they can use visual celestial cues as positional information during long range odor-gated search (Leitch et al., 2020). Notably, despite the added challenge that air turbulence presents to these insects, they still implement a two-state behavioral strategy reminiscent of the turns and runs of chemotaxis. Mammalian olfactory search: trail tracking Mammalian olfactory navigation can be divided into two general broad categories: trail tracking and air scenting. When trail tracking, animals can track the exact path of another organism or object by following the odor molecules deposited on the ground during movement. Under these conditions, the concentration gradient is steep and stable. Previous work shows that rodents can reliably follow odor trails with rapid 7 sniffing accompanied by side to side head movements (akin to head casts during Drosophila larvae chemotaxis) (P. W. Jones & Urban, 2018; Khan et al., 2012). In rats, sniffing rate slows with distance from the odor track and naris stitching reduces the accuracy of tracking (Khan et al., 2012). This suggests that stereo olfaction (the comparison of concentration between the nares) plays a role in this form of search. Work in mice further supports the role of stereo olfaction, adding that serial comparisons (sniff by sniff) are also important to the execution of trail tracking (P. W. Jones & Urban, 2018). Under these conditions, both serial and stereo comparisons drive movements of the nose. Mammalian olfactory search: air scenting & sampling movements In contrast with ground tracking, air scenting relies on the diffusion of odor molecules through the air, which is heavily influenced and disrupted by air turbulence. Under controlled conditions, where chemical gradients evenly diffuse through the air, moles use both serial and stereo comparisons to execute air scenting olfactory search. Specifically, they implement a serial comparison strategy at a distance and depend increasingly on stereo comparisons as they approach the odor source (Catania, 2013). This is further supported by recent behavioral modeling in mice (Liu et al., 2020). However, olfactory computations executed under turbulent conditions have been more elusive. In these experiments thus far, when presented with odorant plumes, rodents adapt a memory-guided strategy of search (Bhattacharyya & Singh Bhalla, 2015; Gire, David H et al. 2017). As they learn the search task, they begin serially sampling odor ports regardless of the odor source location, reducing the task to one of odor detection rather than gradient-guided search. 8 Despite these findings, natural environments are dynamic and often unpredictable. Therefore, we know mammals cannot always rely on memory guidance to perform air scenting in turbulent conditions. Possible computations for executing such search behavior without memory cues are unknown. Further, the contributions of serial versus stereo comparison are also unknown. As mentioned previously, sampling movements dictate the future sensory input necessary to complete each of these olfactory computations. In mammals, sniffing and movements of the body, head, nose, and whiskers can all be used to actively sense the olfactory environment. Importantly, orofacial muscle groups often move in coordinated synchrony (Kurnikova et al., 2017; Moore et al., 2013) and sniffing gates olfactory access in mammals. Therefore, synchrony between orofacial movements and sniffing suggests that these movements play a role in shaping olfactory input. However, the breadth and utility of active sensing movements during unrestrained olfactory search are largely not understood. Neural mechanisms of mouse olfactory search Despite the progress made in the study of unrestrained olfactory search, the computations used to execute olfactory search have remained elusive. We proposed that unrestrained olfactory search of a plume in mice would rely upon serial comparisons of the concentration gradient. We further hypothesized that head movements would synchronize with the sniff cycle during search, similar to orofacial movements. Finally, given the propensity of two-state models in search behavior, we proposed that our search could be categorized into discrete movement events and that these would fall into a two- state model reminiscent of chemotaxis or odor-gated anemotaxis. 9 Here, we have developed a robust behavioral assay that captures sampling behaviors during turbulent air scenting in the mouse (Findley et al., 2020). We demonstrated that this search behavior is concentration gradient-guided and is not dependent upon stereo comparisons. We extracted movement motifs that underlie olfactory search and demonstrate that these motifs align with sniffing behavior. In fact, head movements are tightly synchronized with the sniff cycle and this phenomenon is specific to odor search conditions. We demonstrated that movement motifs divide into two general categories that we call ‘investigation’ and ‘approach’. These two states differ in overall movement speed, sniffing rate, and the degree of synchrony between head movement and sniffing. This categorization is reminiscent of the two-state models of search already established in smaller organisms. Finally, we present a new system with which we can align discrete behavioral states or individual sampling movements with neural activity at the mitral and tufted cell layer of the olfactory bulb to investigate local field potential encoding of behavioral state and sampling movements during olfactory search. 10 CHAPTER II SNIFF-SYNCHRONIZED, GRADIENT-GUIDED OLFACTORY SEARCH BY FREELY MOVING MICE JOURNAL STYLE INFORMATION Teresa M Findley*, David G Wyrick*, Jennifer L Cramer, Morgan A Brown, Blake Holcomb, Robin Attey, Dorian Yeh, Eric Monasevitch, Nelly Nouboussi, Isabelle Cullen, Jeremea Songco, Jared F King, Yashar Ahmadian, Matthew C Smear. Reproduced in part from a manuscript submitted to eLife 2020. Available on bioRxiv, Copyright 2020. *Authors contributed equally AUTHOR CONTRIBUTIONS TF and MS conceived the study. MB, TF, and MS designed, built, and maintained the behavioral rig. TF, JC, BH, RA, DY, EM, NN, IC, JS, and JK trained mice. JC and TF performed naris occlusion experiments. RA, DW, and TF established and implemented Deeplabcut tracking, DW and YA designed and performed the AR-HMM analysis. TF, DW, BH, YA, and MS analyzed data and wrote the manuscript. INTRODUCTION Sensory observations are often made in concert with movements (Ahissar & Assa, 2016; Gibson, 1966). During active search behavior, animals make sampling movements in order to extract relevant sensory information from the environment (Gibson, 1962; 11 Schroeder et al., 2010). Sampling behavior is flexible, and can be customized for the problem the animal is trying to solve (Kleinfeld et al., 2006; Yarbus, 1967). In the brain, sensory and motor systems interact extensively (Andersen & Mountcastle, 1983; Duhamel et al., 1992; McGinley et al., 2015; Musall et al., 2019; Niell & Stryker, 2010; Poulet & Hedwig, 2006; Sommer & Wurtz, 2002; Stringer et al., 2019), which reflects the importance of interpreting self-induced stimulus dynamics (Sommer & Wurtz, 2008; Sperry, 1950; von Holst & Mittelstaedt, 1950; Webb, 2004). Here, we show how mice sample the environment while navigating a noisy odor gradient. Navigating by chemical cues may be one of the most ancient problems motile organisms evolved to solve, and it remains crucial in the lives of almost all modern species. Unicellular organisms and some invertebrates navigate chemical gradients by chemotaxis (Bargmann, 2006; Berg, 2000; Lockery, 2011). In essence, their movement programs can be described as having two states: they move straight when the concentration is increasing and reorient their movements when the concentration is decreasing. Whereas chemical gradients are stable and informative at the spatial scale of these organisms, for many larger or flying organisms, odor gradient cues do not provide useful positional information (Crimaldi et al., 2002; Murlis et al., 1992; Smear et al., 2018). At this larger spatial scale, turbulent airflow moves odor molecules in dynamic spatiotemporal patterns, disrupting concentration gradients and nullifying classical chemotaxis strategies. Instead, olfactory cues often gate movements that depend on other sensory modalities. Here too, these organisms' behavioral structure can be described as transitions between two states: detection of odor promotes upwind movement while the absence of odor promotes crosswind casting movement (Kennedy & Marsh, 1974; van 12 Breugel & Dickinson, 2014; Vickers & Baker, 1994). In this behavioral program, known as odor-gated anemotaxis, odor cues gate behavioral responses to positional information provided by another modality. In both chemotaxis and odor-gated anemotaxis, search tasks can be described with a two-state search model. In comparison to invertebrates, our understanding of olfactory search behavior in vertebrates is more rudimentary, even in commonly-studied rodent models. In these animals, access to the olfactory environment is gated by respiration, which is in turn responsive to incoming olfactory stimulation (Kepecs et al., 2006; Wachowiak, 2011). Novel odors evoke rapid sniffing, during which respiration synchronizes with whisker, nose, and head movements on a cycle-by-cycle basis (Kurnikova et al., 2017; Moore et al., 2013; Ranade et al., 2013). Thus, during active mammalian olfaction, sensory and motor systems interact in a closed loop via the environment, as is true for other sensory modalities such as vision or somatosensation (Ahissar & Assa, 2016; Gibson, 1966). The cyclical sampling movements coordinated by respiration further synchronize with activity in widespread brain regions (Karalis & Sirota, 2018; Kay, 2005; Macrides et al., 1982; Vanderwolf, 1992; Yanovsky et al., 2014; Zelano et al., 2016) similarly to correlates of locomotor, pupillary, and facial movements observed throughout the brain (McGinley et al., 2015; Musall et al., 2019; Niell & Stryker, 2010; Stringer et al., 2019). Respiratory central pattern generators may coordinate sampling movements to synchronize sensory dynamics across modalities with internal brain rhythms (Kleinfeld et al., 2014). Previous work has shown that rodents follow odor trails, where the concentration gradient is steep and stable, with rapid sniffing accompanied by side-to-side head movements (P. W. Jones & Urban, 2018; Khan et al., 2012). In these conditions, serial 13 sniffing and stereo olfactory cues guide movements of the nose. Likewise, moles used concentration comparisons across space and time to locate a food source in a sealed experimental chamber in which a lack of airflow allowed for even diffusion of a chemical gradient (Catania, 2013). In this study, when input to the nares was reversed, moles navigated towards odor sources at a distance, but demonstrated significant deficits at identifying odor location when near the source. Behavioral modeling in mice further supports that inter-naris concentration comparison plays a more important role in search near the source (Liu et al., 2020). Thus, both serial sniffing and stereo cues can guide olfactory search behavior. The sensory computations and movement strategies employed during navigation of an airborne odor plume are less clear. In previous experiments where rodents searched in airborne odor plumes, mice developed a memory-based strategy of serially sampling each possible reward location for the presence of odor, turning search tasks into detection tasks (Bhattacharyya & Singh Bhalla, 2015; Gire, David H et al., 2017). Thus, it remains unclear whether mammals can follow noisy concentration gradients under turbulent conditions. To better understand the sensory computations and sampling strategies for olfactory search, we designed a two-choice behavioral assay where mice use olfactory cues to locate an odor source while we monitor sniffing and movements of the head, nose, and body. We found that mice use a concentration gradient-guided search strategy to navigate olfactory environments that contain turbulent flow. We found that these navigational behaviors are robust to perturbations including introduction of a novel odorant, varying the concentration gradient, and naris occlusion. Given the fundamental importance of sniffing to olfactory function, we hypothesized that mice would selectively 14 sample the environment such that nose movement would be tightly coupled to respiration. Consistent with this hypothesis, we found that mice synchronize rhythmic three-dimensional head movements with the sniff cycle during search. These sniff- synchronized movement rhythms are prominent during trials, and largely absent during the inter-trial interval, suggesting that sniff synchronous movement is a pro-active strategy rather than a reactive reflex. To find structure in this search strategy, we used unsupervised computational methods to parse movement trajectories into discrete motifs. These movement motifs are organized into two distinguishable behavioral states corresponding to investigation and approach, reminiscent of the two-state olfactory search programs described in smaller organisms. Further, these motifs lock to the sniff cycle with precision at a tens of milliseconds scale. Our findings reveal the microstructure of olfactory search behavior in mice, identifying sensory computations and movement strategies that are shared across a broad range of species. RESULTS Olfactory search in noisy gradients of airborne odor We developed a two-alternative choice task in which freely-moving mice report odor source location for water rewards (Methods and Fig. 1A). Figure 1 (next page). Behavioral assay for freely-moving olfactory search. A) Diagram of experimental chamber where mice are tracked by an overhead camera while performing olfactory search. B) Top. Nose & head position are tracked using red paint at the top of the head. Sniffing is monitored via an intranasally implanted thermistor. Bottom. Example of sniffing overlaid on a trace of nose position across a single trial. C) Diagram of trial structure. Initiation. Mice initiate a trial via an initiation poke (grey oval). Search. Odor is then released from both odor ports (grey rectangles) at different concentrations. Outcome. Mice that cross the decision line (red) on the side delivering the higher concentration as tracked by the overhead camera receive a reward at the 15 corresponding water port (blue ovals). D) Color maps of average odor concentration across ~15 two-second trials captured by a 7x5 grid of sequential photoionization detector recordings. Rows represent side of stimulus presentation (left or right). Odor concentration beyond the decision line were not measured. E) Comparison of sniff recordings taken with an intranasally implanted thermistor and intranasally implanted pressure cannula. These are implanted on the same mouse in different nostrils. Top. Example trace of simultaneous pressure cannula (blue) and thermistor (red) recordings with inhalation points (as detected in all future analyses) overlaid on the traces in their respective colors. Bottom Left. Histogram of peak latencies (pressure inhalation onset – thermistor inhalation onset). 14/301 inhalations (4.7%) were excluded as incorrect sniff detections. These were determined as incorrect, because they fell more than 2 standard deviations outside the mean in peak latency (mean = 1.61585ms, SD = ±14.93223ms). Bottom Right. Peak latencies, defined as the difference between pressure inhalation onset and thermistor inhalation onset, plotted against instantaneous sniff frequency. 16 To capture the search behavior, we measured respiration using nasal thermistors (McAfee et al., 2016) and video-tracked the animal’s body, head, and nose position in real time at 80 frames/s (Fig. 1B,E; Fig. S1). The mouse initiates a trial by inserting its nose in a port (Fig 1C; “Initiation”), which activates odor release from two ports at the opposite end of the arena. The mouse reports the location of higher odor concentration by walking toward it (Fig. 1C; “Search”). In previous studies, rodents performing olfactory search tasks developed memory-guided foraging strategies. In essence, animals run directly to potential odor sources and sample each in turn, thus converting the search tasks to detection tasks (Bhattacharyya & Singh Bhalla, 2015; Gire, David H et al., 2017). To prevent mice from adopting sample-and-detect strategies, our task forces mice to commit to a decision at a distance from the actual source. Using real-time video-tracking (Lopes et al., 2015), we enforced a virtual “decision line”, such that the trial outcome is determined by the mouse’s location when it crosses this decision line (Fig. 1C; “Outcome”). For stimuli, we deliver odor from two separate flow-dilution olfactometers, giving independent control over odor concentration on the two sides. To test olfactory search over a range of difficulties, we presented four odor patterns, defined by the ratio of odor concentration released from the two sides (100:0, 80:20, 60:40, 0:0). Figure 2 (next page). Mice use concentration gradient cues in turbulent flow to perform search. A) Initial training steps. Water Sampling. In this task, mice alternate in sequence between the initiation, left, and right nose pokes to receive water rewards. Odor Association. Next, mice run the alternation sequence as above with without water rewards released from the initiation poke, making its only utility to initiate a trial. Further, odor is released on the same side of water availability to create an association between odor and reward. 17 Odor Search. Here, mice initiate trials by poking the initiation poke. Odor is then randomly released from the left or right odor port. Correct localization (see Fig. 1C, decision line) results in a water reward and incorrect is deterred by an increased inter-trial interval (ITI). B) Performance curve across sessions for the Odor Search (100:0) training step (n = 26). C-F) Session statistics for four different experiments. Each colored line is the average of an individual mouse across all sessions, black points are means across mice, and whiskers are ±1 standard deviation across mice. Top. Percent of correct trials. Middle. Average trial duration. Bottom. Average path tortuosity (total path length of nose trajectory/shortest possible path length). C) Odor omission. The 80:20 concentration ratio (Fig. 1) and odor omission (0:0) conditions randomly interleaved across a session. Data shown includes all sessions for each mouse (n = 19). D) Variable ΔC, Constant |C|. Three concentration ratio conditions (100:0, 80:20, 60:40) randomly interleaved across a session. Data shown includes all sessions for each mouse (n = 15). E) Constant ΔC, Variable |C|. Concentration ratio conditions 90:30 and 30:10 randomly interleaved across a session (n = 5). Data shown for first session only. F) Naris occlusion. 80:20 sessions for mice with no naris stitch, a sham stitch that did not occlude the nostril, and a naris stitch that occluded one nostril (n = 13). Data shown includes all naris occlusion sessions, even if the mouse did not perform under every experimental condition. 18 We measured the spatiotemporal distribution of odor using a photoionoization detector (PID) in a 5x7 grid of sampling locations (Fig. 1D; Fig. S2). Pinene was used for the majority of experiments, because it is a neutral-valence odorant that is sensitively detected by the PID. As designed, varying the concentration ratios produced across-trial averaged gradients of different magnitudes. Airflow in the arena is turbulent, imposing temporal fluctuations on the odor gradient. Thus, our assay tests an animal’s ability to navigate noisy odor gradients. Mice learn the olfactory search task rapidly and robustly. We trained mice in the following sequence (Fig. 2A): First, naïve, water-restricted mice obtained water rewards from all ports in an alternating sequence (Fig. S3A; “water sampling”). In the next phase of training, we added odor stimulation such that odor delivery alternated in the same sequence as reward, so that the mice would learn to associate odor with reward ports (Fig. S3B; “odor association”). Following these initial training steps, mice were introduced to the olfactory search paradigm. Odor was pseudo-randomly released from either the left or right odor source (“100:0“), signaling water availability at the corresponding reward port. Almost all mice performed above chance in the first session (binomial test, p<0.05 for 24 out of 25 mice, 75 ± 9.2% correct, mean ± s.d.; Fig. 2B). Within 4 sessions, most animals exceeded 80% performance (19 out of 26). Following 100:0, mice were introduced to the 80:20 condition with mean performance across mice in the first session reaching ~60% (Fig. S3D). Most subjects improved to exceed 70% performance over the next 7 sessions (17 out of 24). The mice that did not were excluded from subsequent experiments. 19 Next, we tested whether mice trained to search pinene plumes would generalize their search behavior to a novel odorant. We chose vanillin as the novel odorant, because, unlike pinene, vanillin does not activate the trigeminal fibers of the nose (Cometto-Muniz & Abraham, 2010; Doty et al., 1978; Hummel et al., 2009). Thus we could test whether trigeminal chemosensation is necessary for performance in our task. We found no differences in performance between vanillin and pinene sessions for these mice (Wilcoxon rank-sum test, p = 0.827, Fig. 4A; n = 3). These data suggest that this search behavior generalizes across odors and does not rely on the trigeminal system. Mice can use gradient cues in turbulent flow We reasoned that mice would solve this task using odor gradient cues. To vary odor gradients between trials, we trained mice in sessions with interleaved concentration ratios (100:0, 80:20, 60:40) across the trials of a session. In addition to these concentration ratios, odor omission probe trials (0:0) were randomly interleaved into all experimental sessions. During these trials, airflow was identical to 80:20 trials, but air was directed through an empty vial rather than a vial containing odorant solution. These odor omission trials served a two-fold purpose: they acted as controls to ensure behavior was indeed odor-guided and they allowed us to observe how absence of odor impacts search behavior. On these probe trials, mice performed at chance (binomial test, p=0.9989), with longer trial durations (Wilcoxon rank-sum test, p<0.05) and more tortuous trajectories (Wilcoxon rank-sum test, p<0.05) than on non-probe trials (Fig. 2C; n = 19, all data from 80:20 condition with probe trials). Performance drops with the concentration ratio (ΔC), consistent with our reasoning that mice would use odor gradient cues in this task (pairwise Wilcoxon rank-sum tests, p<0.05; Fig. 2D; n = 15). Varying 20 the concentration ratio from 80:20 to 60:40 did not affect trial duration or path tortuosity, defined as actual path length divided by direct path length (pairwise Wilcoxon rank-sum tests, p>0.05; Fig. 2D). However, trial duration and path tortuosity were slightly, but statistically significantly longer in the 100:0 condition (pairwise Wilcoxon rank-sum tests, p<0.05). Given that these results were obtained using a single absolute concentration (|C|) across ratios, mice could be solving our task with two distinct categories of sensory computation. One possibility is that information about source location is extracted from the odor gradient. An alternative strategy would be to make an odor intensity judgement that gates a response to positional information from non-olfactory cues, such as wind direction, visual landmarks, or self-motion. This computation would be reminiscent of the odor-gated visual and mechanosensory behaviors observed in insects (Álvarez-Salvado et al., 2018; Kennedy & Marsh, 1974; van Breugel & Dickinson, 2014). To distinguish between these possible strategies, we tested mice in sessions interleaving the air dilution ratios 90:30 and 30:10. 30 is the correct answer in one condition and incorrect in the other, so that mice cannot use an intensity judgement strategy to perform well in both ratio conditions. In both conditions, mice performed equally well in the first session of training (Wilcoxon rank-sum test, p=0.465; Fig. 2E; n = 5). This equal performance is true within the first 20 trials of the session (Wilcoxon rank-sum test, p=0.296; Fig. 4B). These results indicate that odor gradients guide olfactory search under these conditions. We next asked how the mice are sensing the concentration gradient. Many mammals can use stereo-olfaction: comparing odor concentration samples between the nares (Catania, 2013; Parthasarathy & Bhalla, 2013; Porter et al., 2007; Rabell et al., 21 2017; Rajan et al., 2006). To test the role of stereo comparisons in our olfactory search task, we performed naris occlusion experiments. Mice were tested in three conditions on alternating days: naris occlusion, sham occlusion, and no procedure. We found that naris occlusion did not significantly impact performance or path tortuosity (pairwise Wilcoxon rank-sum tests, p>0.05). When compared with the no-stitch condition, the naris stitch condition resulted in a slight, but statistically significant, increase in trial duration (pairwise Wilcoxon rank-sum test, p<0.05). This is not true when the stitch condition is compared with the sham condition (pairwise Wilcoxon rank-sum test, p>0.05) indicating this may be a result of undergoing a surgical procedure. These overall results indicate that stereo comparison is not necessary in this task (Fig. 2F; n = 13), and that temporal comparisons across sniffs (Catania, 2013; Parabucki et al., 2019) play a larger role under our task conditions. Sniff rate and occupancy are consistent across trials and gradient conditions To investigate active sampling over the time course of trials, we tracked the animals’ sniffing, position, and posture during behavioral sessions. Next, the mice emitted a rapid burst of sniffs, then sniffed more slowly as they approached the target (Fig. 3A). In this active behavioral state, inhalation and sniff durations were shorter during trials than during inter-trial intervals (p ≪ 0.01 for all mice; Kolmogorov-Smirnov test; Fig. 3B,C), and strikingly shorter than those observed in head-fixed rodents (Bolding & Franks, 2017; Shusterman et al., 2011; Wesson et al., 2009). The overall sniff pattern was consistent across trials with an inhalation just before trial initiation followed by a long exhalation or pause at the beginning of the trial (Fig. 3A). 22 Figure 3. Distributions of sniffs and nose positions during search task. A) Above. Sniff raster plot for three sessions. Each black point is an inhalation, each row is a trial aligned to trial initiation (dashed line). Rows are sorted by trial length. Below. Mean instantaneous sniff rate across all trials for all mice aligned to time from trial initiation. Thin lines are individual mice, the thick line is the mean across mice, and shaded region is ±1 standard deviation. B) Histogram of inhalation duration time across all mice (n = 11). Thick lines and shaded regions are mean and ±1 standard deviation, thin lines are individual mice. Green: within-trial sniffs, Pink: inter-trial interval sniffs. C) Histogram of sniff duration time across all mice (n = 11). D) The nose traces of each trial across a single session, colored by chosen side. E) Location of all inhalations across a single session, colored by chosen side. F) Two-dimensional histogram of occupancy (fraction of frames spent in each 0.5 mm2 bin). Colormap represents grand mean across mice (n = 19). G) Grand mean sniff rate colormap across mice (n = 11). 23 During this sniffing behavior, the mice moved their nose through tortuous trajectories that were not stereotyped from trial to trial (Fig. 3D,E). Although individual mice showed position biases (Fig. S5), these biases were not systematic across mice, so that the across- mouse mean occupancy distribution was evenly distributed across the two sides of the arena (Fig. 3F; n = 19). Consistent with this sniffing and movement pattern, the sniff rate was highest near the initiation port, and slower on the approach to target (Fig. 3G). These measures of active sampling were not statistically distinguishable across gradient or naris occlusion conditions, but changed significantly on odor omission probe trials, with more fast sniffing and head turns overall. Mice synchronize three-dimensional kinematic rhythms with sniffing during olfactory search To test the hypothesis that nose movement locks to respiration during olfactory search, we aligned movement dynamics with the sniff signal. Using Deeplabcut (Mathis et al., 2018; M. W. Mathis & Mathis, 2020), we tracked the position of three points: tip of snout, back of head, and center of mass (Fig. 4A). From the dynamics of these three points, we extracted the kinematic parameters nose speed, head yaw velocity, and Z- velocity (Fig. 4B-D). Synchrony between movement oscillations and sniffing is apparent on a sniff-by-sniff basis (Fig. 5), consistent across mice, and selectively executed during olfactory search. On average, nose speed accelerates during exhalation, peaks at inhalation onset, and decelerates during inhalation (Fig. 5A.i). Head yaw velocity, which we define as toward or away (Fig. 4; centripetal or centrifugal) from the body-head axis, reaches peak centrifugal velocity at inhalation, decelerates and moves centripetally over the course of inhalation (Fig. 5A.ii). 24 Figure 4. Quantifying kinematic parameters during olfactory search. A) Schematic of kinematic parameters. Left. Two example frames from one mouse, with the three tracked points marked: tip of snout, back of head, and center of mass. B) Quantified kinematic parameters: “nose speed”: displacement of the tip of the snout per frame (12.5ms inter-frame interval). “Yaw velocity”: change in angle between the line segment connecting snout and head and the line segment connecting head and center of mass. Centrifugal movement is positive, centripetal movement is negative. “Z-velocity”: change in distance between tip of snout and back of head. Note that this measure confounds pitch angle and Z-axis translational movements. C) Segments of example trajectories. Left. The trajectory of the nose during one second of trial time. Green: path during inhalations. Black: path during the rest of the sniff. Right. Same for an inter-trial interval trajectory. D) Traces of sniff and kinematic parameters during the time windows shown in C. Color scheme as in C. Although our videos are in two dimensions, we can approximate movement in depth by analyzing the distance between the tip of the snout and the back of the head (Fig. 4B). 25 This measure confounds pitch angular motion and vertical translational motion, so we conservatively refer to this parameter as “z-velocity”. Because mice point their head downward during task performance, shortening of the distance between the tip of the snout and the back of the head indicates downward movement, while increases in the distance correspond to upward movements. The z-velocity reaches peak upward velocity at inhalation onset, decelerates and goes downward during inhalation, and rises again at exhalation (Fig. 5A.iii). These modulations were absent from trial-shuffled data (1000 shuffles; Fig. S6). Cross-correlation and spectral coherence analysis further demonstrate the synchrony between nose movement and sniffing (Fig. 5B,C). These results demonstrate that kinematic rhythms lock to sniffing with tens of millisecond precision, consistent with a previous report demonstrating that rats make similar movements during novel odor-evoked investigative behavior (Kurnikova et al., 2017). Our findings show that precise cycle-by-cycle synchronization can also be a feature of goal-directed odor- guided behavior. Mice selectively deploy this pattern of sniff-synchronized three- dimensional nose movement. For nose speed, yaw velocity, and z-velocity, sniff synchrony is significantly reduced during the inter-trial interval when the mouse is returning from the reward port to initiate the next trial, even when the mouse is sniffing rapidly. Figure 5 (next page). Kinematic rhythms synchronize with the sniff cycle selectively during olfactory search. i-iii) Nose speed, yaw velocity, and z-velocity respectively (see Fig. 4 for definitions). 26 A) Top. Color-plot showing movement parameter aligned to inhalation onset for within- trial sniffs taken before crossing the decision line. Taken from one mouse, one behavioral session. Dotted line at time 0 shows inhalation onset, the second line demarcates the end of the sniff cycle, sorted by duration. Data are taken from one behavioral session. Middle. Color-plot showing each movement parameter aligned to inhalation onset for inter-trial interval sniffs taken before the first attempt at premature trial initiation. Bottom. Sniff- aligned average of each movement parameter. Thin lines represent individual mice (n = 11), bolded lines and shaded regions represent the grand mean ± standard deviation. Green: within-trial sniffs, Pink: inter-trial interval sniffs. B) Normalized cross correlation between movement parameter and sniff signal for the same sniffs as above. C) Spectral coherence of movement parameter and sniff signal for the same sniffs as above. 27 Modulations in nose speed were slightly different than trial-shuffled data, showing that sniff-synchronized movement is not totally absent during the inter-trial interval, whereas modulations in yaw velocity and z-velocity were indistinguishable from trial-shuffled data (Fig. S6). This reduction of kinematic synchrony when the mouse is not performing the task suggests that sniff synchronized movement is not an inevitable biomechanical accompaniment to fast sniffing, but rather reflects a strategic behavioral state. Further support for this idea comes from analyzing time intervals when the mouse attempts to initiate a trial before the end of the inter-trial interval. After such premature attempts at trial initiation, the mice execute sniff-synchronized movement, despite the absence of the experimenter-applied odor stimulus (Fig. S7). Lastly, sniff synchrony changes dramatically in the time interval between crossing the virtual decision line and entering the reward port, when odor is still present yet the animal has committed to a decision (Fig. S7). Taken together, our observations indicate that sniff synchronous movement is a proactive, odor-seeking strategy rather than a reactive, odor-gated reflex. State space modeling finds recurring motifs that are sequenced diversely across mice Figure 6 (next page). Recurring movement motifs are sequenced diversely across mice and consistently across stimuli. A) 8 example frames from one instance of a behavioral motif with tracking overlaid. B) Average motif shapes. Dots and lines show the average time course of posture for 8 frames of each of the 11 motifs (n = 9 mice). All instances of each motif are translated and rotated so that the head is centered and the head-body axis is oriented upward in the first frame. Subsequent frames of each instance are translated and rotated the same as the first frame. Time is indicated by color (dark to light). Background color in each panel shows the color assigned to each motif. 28 C) Across-trial motif sequences for two behavioral sessions for one mouse. Trials are separated into trials where the mouse chose left and those in which the mouse chose right. Trials are sorted by duration. Both correct and incorrect trials are included. Color scheme as in B. D) Linear classifier analysis shows that mice can be identified from motif sequences on a trial by trial basis. Grayscale represents the fraction of trials from a given mouse (rows) that are decoded as belonging the data of a given mouse (columns). The diagonal cells represent the accuracy with which the decoded label matched the true label, while off-diagonal cells represent trials that were mislabeled by the classifier. Probabilities along rows sum to 1. Cells marked with asterisks indicate above chance performance (label permutation test, p<0.01). E) Linear classifier analysis identifies odor omission trials above chance, but does not discriminate across odor concentration ratios (n = 9 mice). 29 In our olfactory search paradigm, the overall rhythm of nose movement synchronizes with sniffing (Fig. 4,5), and yet the mice move through a different trajectory on every trial (Fig. 3D). Given this heterogeneity, it was not obvious to us how to best quantify common features of movement trajectories across trials and subjects. Rather than guess at suitable features, we used an unsupervised machine learning tool, modeling the movement data with an Auto-Regressive Hidden Markov Model (AR-HMM) (Murphy, 2012; Poritz, 1982). This model parses continuous sequential data into a discrete set of simpler movement motif sequences, similarly to “Motion Sequencing” (MoSeq) (Wiltschko et al., 2015). We fit AR-HMMs to the allocentric three-point coordinate data (front of snout, back of head, and center of mass) pooled across a subset of mice and trial conditions (See Methods and Fig. 2; e.g. 80:20, 90:30, nostril stitch). Models were then tested for their ability to explain a separate set of held-out trials (see Methods). These models defined discrete movement patterns, or “motifs”, that recur throughout our dataset (e.g., Fig. 6A). We fit different AR-HMM models each constrained to find a particular number of motifs (between 6 and 100) and found that the cross-validated log-likelihood of these fits continued to rise up to 100 motifs (Fig. S8). For visualization, we will focus on a model with 16 states, which we narrow to 11, by excluding rare motifs that take up <5% of the assigned video frames (Fig. 6B; Fig. S8C,D). Models with more or fewer states gave equivalent results (Fig. S9 – S11). The motifs extracted by this model have interpretable spatiotemporal trajectories on average (Fig. 6B), although averaging masks considerable across-instance variability. Across trials for a given mouse, motifs occurred in consistent but non-stereotyped sequences (Fig. 6C). Across mice, these sequences appeared visually similar, but most 30 mice were uniquely identifiable from how they sequenced motifs across trials. A classifier trained to decode mouse identity from the motif sequences on a trial by trial basis was able to perform above chance for 8 out of 9 mice (p< 0.01; Fig. 6D). Across the different concentration ratios (Fig. 2D), movement sequences were not statistically distinguishable (Fig 6E). The only condition that gave distinguishable motif patterns were the odor omission trials (0:0), in which the mice made longer, more tortuous trajectories (Fig. 2C). Thus, although this model is sensitive enough to decode mouse identity (Fig. 6E), it does not detect stimulus-dependent modifications of sampling behavior, suggesting that the mice do not modify their sampling behavior in a gradient-dependent manner, at least in the movement parameters we measured. Movement motifs reveal two-state organization of olfactory search Many behaviors have hierarchical structure that is organized at multiple temporal scales. Brief movements are grouped into progressively longer modules, and are ultimately assembled into purposive behavioral programs (Berman et al., 2016; Gallistel, 1982; Tolman, 1932; Weiss, 1968). Figure 7 (next page). Behavioral motifs can be categorized into two distinct groups, which we putatively label as investigation (blue) and approach motifs (orange). A) Transition probability matrix. Grayscale represents the log probability with which a given motif (rows) will be followed by another (columns). Clustering by minimizing Euclidean distance between rows reveals two distinct blocks of motifs. We label the top-left block as “investigation” and the bottom-right block as “approach”. B) Distribution of onset times for each motif, normalized by trial duration. Investigation motifs tend to occur early in trials, while approach motifs tend to occur later (n = 9 mice). C) Across-trial motif sequences for two behavioral sessions for one mouse, with motifs classified into investigation and approach. Trials are separated into trials where the mouse chose left and those in which the mouse chose right. 31 Both correct and incorrect trials are included. Motif sequences are sourced from the same data as Fig. 6C. D) Temporal details of investigation-approach transitions with overlaid sniff signal. Data come from a subset of trials shown in Fig. 7C. In the sniff signal, green represents inhalations, black represents the rest of the sniff. E) Investigation and approach motifs differ in nose speed and sniff rate. Individual markers represent one motif from one mouse. Marker shapes correspond to the individual mice (n = 4). Sniff rate and nose speed are normalized within mice. F) Investigation and approach motifs differ in the kinematic rhythms (same parameters as in Figures 4 & 5). Thin lines represent individual mice (n = 4), thick lines and shaded regions represent the grand mean ± standard deviation. Blue: within-trial sniffs, orange: inter-trial interval sniffs. Top. Nose speed modulation, defined by a modulation index (𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 − 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚)/(𝑚𝑚𝑚𝑚𝑚𝑚 + 𝑚𝑚𝑚𝑚𝑚𝑚) calculated from the grand mean, is significantly greater for investigation motifs than approach motifs (p<0.001, permutation test; Fig. S12). Middle: Yaw velocity modulation is significantly greater for investigation motifs than approach motifs (p<0.001, permutation test; Fig. S12). Bottom: Z-velocity modulation does not significantly differ between approach motifs and investigation motifs (p=0.31, permutation test). 32 Olfactory search programs in smaller organisms are often organized into two overarching states: move straight when concentration is increasing, and reorient when concentration is decreasing (Bargmann, 2006; Berg, 2000; Gomez-Marin et al., 2011; Kennedy & Marsh, 1974; Lockery, 2011; van Breugel & Dickinson, 2014; Vickers & Baker, 1994). We hypothesized that olfactory search motifs in mice are organized similarly. To reveal higher-order structure in the temporal organization of these motifs, we applied a clustering algorithm that minimizes the Euclidean distance between rows of the Markov transition matrix (i.e., purely based on the conditional probabilities of motifs following them). This clustering separated motifs into two groups (Fig. 7A), with several distinct properties. These properties were present in models with more or fewer states (Fig. S9 – S11). Based on these differences (see below), we label these groups as putative “investigation” and “approach” states. First, investigation and approach motifs cluster their onset times in the trial, with investigation motifs tending to occur early in the trial, while approach motifs tend to begin later (Fig. 7B). Grouping motifs into these higher- order states shows a consistent trial sequence, with trials beginning with investigation and ending with approach (Fig. 7C,D). Importantly, entering the approach state is not a final, ballistic commitment to a given water port – switches from approach back to investigation were common (Fig. 7C,D). This pattern suggests that the mice are continuously integrating evidence about the odor gradient throughout their trajectory to the target. Second, these states correlated with distinct sniff rates and movement speeds. During investigation motifs, the mice moved more slowly and sniffed more rapidly, whereas the approach states were associated with faster movement and slower sniffing (Fig. 7E). Third, the sniff-synchronized kinematic rhythms (Fig. 4; Fig. 5) were distinct 33 in the two states (Fig. 7F; Kolmogorov-Smirnov test, p<0.01). Given the consistent sequence from investigation to approach and given that mice sniff faster during the early part of trial, these differences in kinematic parameters could reflect across-trial tendencies instead of within-trial synchrony. To test this possibility, we calculated the Kolmogorov-Smirnov statistic, which quantifies the difference between two cumulative distributions, for real and trial-shuffled data (Fig. S12). This analysis showed that nose speed and yaw velocity modulation exceeded what would be expected from across-trial tendencies (1000 shuffles, p<0.001), while the z-velocity modulation did not (p=0.31). Switches between the investigation and approach state mark behavioral inflection points that can be identified from trial to trial. We reason that these behavioral inflection points are a signature of key moments in the mouse’s evolving decision process. Thus, our analysis can provide a framework for temporal alignment of diverse movement trajectories with simultaneously-recorded physiological data (Markowitz et al., 2018). Investigation motif onsets are precisely locked to sniffing If motif transitions correspond to relevant behavioral events, their temporal structure should correlate with the temporal structure of neural activity (Markowitz et al., 2018) During fast sniffing, respiration matches with the rhythms of head movement (Fig. 4; Fig. 5), whisking, and nose twitches (Kurnikova et al., 2017; Moore et al., 2013; Ranade et al., 2013). These motor rhythms correlate with activity in numerous brain regions, including brainstem, olfactory structures, hippocampus, amygdala, and numerous neocortical regions (Karalis & Sirota, 2018; Kay, 2005; Macrides et al., 1982; Vanderwolf, 1992; Yanovsky et al., 2014; Zelano et al., 2016). We hypothesized that movement motifs would lock with these behavioral and neural rhythms, so we aligned 34 sniff signals with motif onset times. Importantly, the breath signal was not input to the model. Figure 8. Motif onsets synchronize to the sniff cycle. A) Alignment of the sniff signal to an example motif. Top. Color scheme shows sniff cycles aligned to the onsets of motif 6 (blue). Motif instances are in chronological order. Green: inhalation, black: rest of sniff. Bottom. Peristimulus time histogram of inhalation times aligned to the onset of motif 6. B) Alignment of sniff signal to onset times of all motifs across mice (n = 4). Colormap represents the grand means for peristimulus time histograms of inhalation times aligned to the onset of motifs. C) Alignment of motif onset times in sniff phase. Colormap represents peristimulus time histograms of motif onsets (bin width = 12.5ms) times aligned to inhalation onset, with all sniff durations normalized to one. Dotted line shows the mean phase of the end of inhalation. D) Motifs alignment to sniff phase is consistent across mice. Thin lines represent individual mice, black points are means, and whiskers are ±1 standard deviation (n = 4 mice). E) Investigation motifs are more synchronized to the sniff cycle than approach motifs. Dots represent the modulation index in time on the x coordinates and in phase on the y-coordinates. Filled dots represent motifs that are significantly modulated in both time and phase (p<0.01, permutation test). Half-filled dots represent motifs that are significantly modulated in time (left half filled) or phase (right half filled). This alignment revealed a striking organization of motif sequences relative to the sniff rhythm. For example, the onset times of motif 6 (dark blue) occurred in a precise timing 35 relationship with sniffing (Fig. 8A). To visualize the timing relationship between onsets of all motifs and sniffing, we calculated the equivalent of a peri-stimulus time histogram for inhalation times relative to the onset time of each motif, and took the grand mean across all mice (n = 4; Fig. 8B). Further, to determine how motif onset times are organized relative to the sniff cycle, for each motif we calculated a histogram of motif onset in sniff phase coordinates (relative position in the sniff cycle; Fig. 8C). Sharp peaks are apparent in both histograms for investigation motifs, and less so for approach motifs (quantified below; Fig. 8B,C). Importantly, these timing relationships are consistent across mice, with some motifs tending to occur early in the sniff cycle during inhalation, and others occurring later in the sniff cycle (Fig. 8D). Thus, parsing diverse movement trajectories into sequences of recurring movement motifs reveals additional sniff- synchronized kinematic structure in a consistent manner across mice. Are motif onsets timed with respect to inhalation times, or do they coordinate with the entire sniff cycle? In other words, is motif onset probability more modulated in time or phase? To quantify the sniff synchronization of motif onset times, we calculated a modulation index (𝑀𝑀𝑀𝑀 = (𝑚𝑚𝑚𝑚𝑚𝑚 −𝑚𝑚𝑚𝑚𝑚𝑚)/(𝑚𝑚𝑚𝑚𝑚𝑚 + 𝑚𝑚𝑚𝑚𝑚𝑚)) for each motif’s across-mouse mean histogram (n = 4). To test whether these trial-by-trial modulation indices exceeded what would be expected from across-trial tendencies, we compared real and trial-shuffled data (Fig. S13). All investigation motifs were significantly modulated for both time and phase coordinates (filled symbols, Fig. 8E; permutation test, p<0.001), with some having higher MI in time, and others in phase. One approach motif was significantly modulated in time coordinates (Fig. 8E, right-half filled symbol; p=0.003), while two approach motifs were significantly modulated in phase coordinates (Fig. 8E, left-half filled 36 symbols; p=0.015 and p<0.001). Comparing the modulation indices between time and phase coordinates does not reveal a consistent pattern of modulation in time vs phase -- some motifs had higher MI in phase, others in time. Thus, our data are inconclusive as to how motif onsets organize relative to the sniff cycle. Nevertheless, these analyses demonstrate that kinematic inflection points synchronize with breathing during olfactory search. Given that breathing synchronizes to other motor and brain rhythms, these motifs likewise correlate to the structure of activity of many neurons. We propose that the behavioral inflection points revealed by motif transition times indicate “decisive moments” when the animal chooses its next move. Thus our analysis will be a useful tool to pinpoint behaviorally relevant activity in widespread brain regions. DISCUSSION This study elucidates sensory computations and movement strategies for olfactory search by freely-moving mice. Mice learn our behavioral task in days, after which they perform approximately 150 trials daily, sometimes for months. Task performance worsens for shallower odor gradients at a fixed absolute concentration, but is unaffected by varying absolute concentrations at a fixed concentration gradient. Taken together, these results show that mice can navigate noisy gradients formed by turbulent odor plumes. This gradient-guided search is robust to perturbations including novel odorant introduction and naris occlusion. These results give insight into sensory computations for olfactory search and constrain the possible underlying neural mechanisms. Mice perform this task with a strategic behavioral program. During search, mice synchronize rapid three-dimensional head movements with fast sniffing. This synchrony is not a default accompaniment of fast sniffing – synchrony is absent when the mice are 37 not searching. Movement trajectories are not stereotyped, but vary considerably across trials. To manage this complexity, we took an unsupervised computational approach to parse heterogeneous trajectories into a small number of movement motifs that recur across trials and subjects. This analysis captures common movement features across mice, but individual mice can be identified by how they sequence these motifs. Our model was not constrained to find structure at a specific timescale, and consequently identified very brief, simple motifs. To find higher-order temporal structure in the data, we clustered motifs by their transition probabilities, which revealed two clear categories, putatively corresponding to investigation and approach. Investigation motifs tend to be executed early in the trial, and entail slower movement, faster sniffing, and more sniff synchrony than approach motifs. Even so, approach motifs are not ballistic commitments to an answer – switches from approach to investigation occurred on many trials. Lastly, the onset times of motifs were precisely locked to sniffing, with investigation motifs starting at characteristic phases of the sniff cycle. Taken together, the discrete categorization of movement motifs and their precise alignment with the sniff cycle provide a robust framework for the temporal alignment of behavior and neural activity. Olfactory navigation can be either guided or gated by odor (Smear et al., 2018). Some organisms operate in a regime where diffusion forms smooth chemical gradients, in which classical chemotaxis strategies can be effective (Bargmann, 2006; Berg, 2000; Gomez-Marin & Louis, 2012; Lockery, 2011). In contrast, other organisms, such as flying insects, often operate in a highly turbulent regime where concentration gradients are not reliably informative (Crimaldi et al., 2002; Murlis et al., 1992; Riffell et al., 2008). By design, mice in our task operate in an intermediate regime, where turbulent 38 odor plumes close to the ground form noisy gradients (Gire, David H et al., 2017; Riffell et al., 2008). By varying the absolute concentration and the concentration difference between the two sides, we tested whether performance in this regime is guided or gated by odor. Because behavior varies with the gradient and not the absolute concentration (Fig. 2C-E), we have shown that mice are guided by gradient cues in this regime. Our naris occlusion experiments demonstrate that performance is statistically indistinguishable with naris occlusion, suggesting that stereo olfaction does not play a major role in our task. This finding contrasts with previous studies of olfactory navigation in a different regime: following a depositional odor trail. In these studies, stereo manipulations had small but significant effects on performance, and led to changes in movement strategy (P. W. Jones & Urban, 2018; Khan et al., 2012). Importantly, a study of olfactory search in moles showed that stereo reversal did not affect navigation at a distance from the target, but reversed turning behavior in the target’s immediate vicinity (Catania, 2013). These results suggest that stereo cues may be informative near a source, where gradients are steep, but that stereo cues play less of a role at a greater distance from the source where gradients are more shallow. In this more distant condition, serial sniff comparisons have been hypothesized as a potential sensory computation for odor gradient following (Catania, 2013). We propose that our task design, in which mice must commit to a side at a distance from the source, forces mice out of the stereo regime, and perhaps into the serial sniff comparison regime. Neurons sensitive to sniff-to-sniff odor concentration changes have been observed in the olfactory bulb of head-fixed mice (Parabucki et al., 2019), providing a potential physiological mechanism for this sensory computation. 39 On the other hand, physiological mechanisms revealed in head-fixed mice may not generalize to the freely-moving search condition. The external stimulus obtained by moving the nose through a noisy gradient differs dramatically from the square odor pulses delivered during head-fixed or odor-poke olfactory tasks. Further, the sniff statistics we observe in our mice are qualitatively faster than those reported in head-fixed mice under most conditions (Bolding & Franks, 2017; Shusterman et al., 2011; Wesson et al., 2009). One exception is that mice sniff fast in response to a novel odor (Wesson et al., 2009). Such fast stimulation impacts the responsiveness of olfactory sensory neurons (Esclassan et al., 2012; Ghatpande & Reisert, 2011; Verhagen et al., 2007). In addition to the temporal properties of odor transduction, short- and long-term synaptic and network plasticity mechanisms will influence the olfactory bulb’s responses during fast sniffing (Beshel et al., 2007; D’iaz-Quesada et al., 2018; Gupta et al., 2015; Jordan et al., 2018; Mandairon & Linster, 2009; Patterson et al., 2013; Zhou et al., 2020). Without tapping into this stimulus regime, the understanding we can gain from head-fixed studies in olfaction will be incomplete at best. In the future, it will be necessary to complement well-controlled reductionist behavioral paradigms with less-controlled, more natural paradigms like ours. Mice execute a strategic behavioral program when searching, synchronizing fast sniffing with three-dimensional head movements at a tens of milliseconds timescale. It has long been known that rodents investigate their environment with active sniffing and whisking behaviors (Kepecs et al., 2006; Wachowiak, 2011; Welker, 1964). More recent work has established that under some conditions sniffing locks with whisking, nose twitches, and head movement on a cycle-by-cycle basis (Kurnikova et al., 2017; Moore et 40 al., 2013; Ranade et al., 2013). Sniffing also synchronizes with brain oscillations not only in olfactory regions, but also in hippocampus, amygdala, and neocortex (Karalis & Sirota, 2018; Kay, 2005; Macrides et al., 1982; Vanderwolf, 1992; Yanovsky et al., 2014; Zelano et al., 2016). Respiratory central pattern generators may coordinate sampling movements to synchronize sensory dynamics across modalities with internal brain rhythms (Kleinfeld et al., 2014). Further, locomotor and facial movement, which are often synchronized to respiration, drive activity in numerous brain regions, including primary sensory areas (McGinley et al., 2015; Musall et al., 2019; Niell & Stryker, 2010; Stringer et al., 2019). Why are respiration and other movements correlated with activity in seemingly unrelated sensory regions? In the real world, sensory receptors operate in closed loop with movement (Ahissar & Assa, 2016; Gibson, 1966). Consequently, sensory systems must disambiguate self-induced stimulus dynamics from changes in the environment. Further, active sampling movements can provide access to sensory information that is not otherwise available to a stationary observer (Gibson, 1962; Schroeder et al., 2010; Yarbus, 1967). Widespread movement-related signals may allow the brain to compensate for and capitalize on self-induced stimulus dynamics (Poulet & Hedwig, 2006; Sommer & Wurtz, 2008; Sperry, 1950; von Holst & Mittelstaedt, 1950; Webb, 2004). Our work advances understanding of how sensation and movement interact during active sensing. Rigorously quantifying the behavior of freely-moving animals is more feasible than ever, thanks to recent developments in machine vision, deep learning, and probabilistic generative modeling (Datta et al., 2019; Gomez-Marin et al., 2014; M. W. Mathis & Mathis, 2020), as our work shows. In particular, the motifs we have defined 41 provide a compact description of the behavior, while still capturing the idiosyncrasies of individual mice. Importantly, these motifs can be grouped into two larger-scale behavioral states that we putatively call “investigation” and “approach”. Two-state search strategies are common across phylogeny (Bargmann, 2006; Berg, 2000; Kennedy & Marsh, 1974; Lockery, 2011; van Breugel & Dickinson, 2014; Vickers & Baker, 1994). In smaller organisms, state switches have provided a useful behavioral readout for understanding the neural mechanisms of odor-guided behavior (Bi & Sourjik, 2018; Larsch et al., 2015; Smear et al., 2018). In mice, switches between investigation and approach may be similarly revealing. The transition points between ‘investigation’ and ‘approach’ serve as a principled template against which to compare neural activity. Our work thus establishes a framework for studying neural mechanisms of active sensing in an unrestrained mammal. METHODS AND MATERIALS Animals: Housing & Care All experimental procedures were approved by the Institutional Animal Care and Use Committee (IACUC) at the University of Oregon and are compliant with the National Institutes of Health Guide to the Care and Use of Laboratory Animals. C57BL/6J mice (2-14 months old) from the Terrestrial Animal Care Services (TeACS) at University of Oregon (19 male, 7 female) were used for behavioral experiments. Mice were housed individually in plastic cages with bedding & running wheels provided by TeACS. Mice were fed standard rodent chow ad libitum, and were water restricted, receiving a daily allotment (1mL - 1.5mL) of acidified or chlorinated water. Animal 42 health was monitored daily, and mice were taken off water restriction if they met the ‘sick animal’ criteria of a custom IACUC-approved health assessment. Behavioral Assay Design Arena & Task Structure. Mice were trained to perform a two-choice behavioral task where they must locate an odor source for a water reward. This 15 x 25cm behavioral arena was largely custom designed in lab (all designs available upon request). The behavioral arena contains a custom designed and 3D-printed honeycomb wall through which continuous clean air is delivered to the arena and a latticed wall opposite to the honeycomb allowing airflow to exit the arena. Two odor tubes (Cole-Parmer Instrument Company, #06605-27) are embedded inside the honeycomb wall and consistently deliver either clean or odorized air. There are three nose pokes in the arena: one trial initiation poke and two reward pokes. The initiation poke is embedded inside the latticed wall (where airflow exits) and is poked to initiate trials. The left and right reward pokes are embedded in the left and right arena walls against the honeycomb airflow delivery and are used for water reward delivery. Mice initiate odor release by entering the initiation poke. If the mouse locates the odor source successfully (by entering the quadrant of the arena containing the correct odor port), water (~6µL - 8µL) is available at the corresponding nose poke. An intertrial interval of 4 seconds is then initiated. If the mouse goes to the incorrect side, water is not made available and they must wait an increased intertrial interval of 10 seconds. Odor Delivery. Odor is delivered to the arena using two custom designed and built olfactometers. For a single olfactometer, air and nitrogen are run through separate mass flow controllers (MFCs) (Alicat Scientific, #MC-100SCCM-RD) that can deliver 43 1000mL/min and 100mL/min at full capacity, respectively. We can use these MFCs to control the percentage of total nitrogen flow (100mL/min) that runs through liquid odorant. Consequently, we can approximately control the amount of odor molecules in the resulting odorized air stream. Total flow is maintained at 1000mL/min (for example, if we are delivering 80mL/min of nitrogen, we will deliver 920mL/min of air). Nitrogen MFC output is directed through a manifold (NResearch Incorperated, #225T082) with embedded solenoids that direct flow to one of four possible vials. These vials contain odorant diluted in mineral oil or are empty. To odorize air, nitrogen is directed through a vial containing liquid odorant. The nitrogen aerosolizes the odorant and combines with airflow MFC output at the exit point of the manifold. If nitrogen is directed through an empty vial, un-odorized nitrogen will combine with airflow at the exit point. The resulting combined flow of air and nitrogen is then directed to a final valve (NResearch Incorporated, #SH360T042). Odorized air continuously runs to exhaust until this final valve is switched on at which point clean air is directed to exhaust and odorized air to the behavioral assay. Therefore, we can control the percentage of odorized flow (using the MFCs), the presence or absence of odorized flow (using the vials & solenoids), and the flow of odorized air to the assay (using the final valve). There are two olfactometers (one for each odor port), which are calibrated weekly to match outputs using a photoionization detector (PID). Video tracking. We use a Pointgrey Fly Capture Chameleon 3.0 camera (FLIR Integrated Imaging Solutions Inc, #CM3-U3-13Y3C) for video tracking. We capture frames at 80Hz at 1200x720 pixel resolution. All real-time tracking is executed using a custom Bonsai program. We isolate the mouse’s centroid by gray scaling a black mouse 44 on a white background and finding the center of the largest object. We track head position by applying red paint on the mouse’s implant between the ears and thresholding the real-time HSV image to identify the center of the largest red shape. We can then identify nose position by calculating the extremes of the long axis of the mouse shape and isolating the extreme in closer proximity to the head point. These three points are sent to python at 80 Hz for real-time tracking in our assay. We use this real-time tracking to determine successful odor localization; if the mouse enters the quadrant of the arena that contains the correct odor port, it has answered correctly. Bonsai is an open source computer vision software available online (Lopes et al., 2015), and our custom code is available upon request. For more rigorous behavioral analysis, we increased our tracking accuracy by using the open source tracking software Deeplabcut (Mathis et al., 2018; M. W. Mathis & Mathis, 2020). All Deeplabcut tracking occurred offline following experimentation. Sniff Recordings. We record sniffing using intranasally implanted thermistors (TE Sensor Solutions, #GAG22K7MCD419; see Methods: Surgical Procedures). These thermistors are attached to pins (Assmann WSW Components, #A-MCK-80030) that can be connected to an overhead commutator (Adafruit, #736) and run through a custom-built amplifier (Texas Instruments, #TLV2460, amplifier circuit design available upon request). Software. All behavioral experiments were run using custom code in Python, Bonsai, and Arduino. Behavioral boards designed at Janelia Research Farms that use Arduino software and hardware were used to control all hardware. Bonsai was used to execute real-time tracking of animals, and Python was used run the assay, communicate 45 with Arduino and Bonsai, and save data during experiments. All programs used are open source, and all custom code is available upon request. Surgical Procedures For all surgical procedures, animals were anesthetized with 3% isoflurane; concentration of isoflurane was altered during surgery depending on response of the animal to anesthesia. Incision sites were numbed prior to incision with 20mg/mL lidocaine. Thermistor Implantation. To measure respiration during behavior, thermistors were implanted between the nasal bone and inner nasal epithelium of mice. Following an incision along the midline, a small hole was drilled through the nasal bone to expose the underlying epithelium ~2mm lateral of the midline in the nasal bone. The glass bead of the thermistor was then partially inserted into the cavity between the nasal bone and the underlying epithelium. Correct implantation resulted in minimal damage the nasal epithelium. The connector pins were fixed upright against a ~3cm headbar (custom designed and 3D printed) placed directly behind the animals’ ears and the thermistor wire was fixed in place using cyanoacrylate. The headbar was secured against a small skull screw (Antrin Minature Specialties, #B002SG89OI) implanted above cerebellum. A second skull screw was placed at the juncture of the nasal bones to secure the anterior portion of the implant. All exposed skull and tissue were secured and sealed using cyanoacrylate. At the end of surgery, a small amount of fluorescent tempera red paint (Pro Art, #4435-2) was applied to the center of the headbar for tracking. Immediately following surgery, animals received 0.1mg/kg buprenorphine followed by 3 days of 0.03mg/kg ketoprofen. All but 9 mice were implanted prior to training. Mice that were 46 implanted post-training were taken off water restriction at least 2 days prior to surgery and were not placed back on water restriction for at least one week following all analgesic administration. Naris Occlusion. To test the necessity of stereo olfaction as a sampling strategy, we occluded the nostrils of C57BL/6J mice using 6-0 gauge surgical suture (SurgiPro, #MSUSP5698GMDL). Mice were given 0.03mg/kg ketoprofen and topical lidocaine on the nostril prior to induction. Suture was either pulled through the upper lip of the nostril and maxillary region to fully occlude the desired nostril or looped at the upper lip of the nostril for a sham stitch. Commercially available VetBond was applied to protect the suture knot. To ensure full occlusion, a small water droplet was placed on the occluded nostril. The absence of bubbles or seepage indicated a successful occlusion. Occlusion was re-tested in the same manner directly before each experimental session. All stitches were removed within a week of application, and animals were stitched a total of 3 times per nostril. Behavioral Training All mice were trained to locate an odor source from one of two possible sources in the olfactory arena. Mice were removed from training and future experiments if they lost sniff signal or did not exceed 50 trials/perform above 60% correct in 15 sessions. The training process was divided into four primary stages. Water Sampling. Mice were trained to alternate between the three pokes in the behavioral arena. Water (~5 - 8µL) was made available at the nose pokes in the following order: initiation port, left reward port, initiation port, right reward port (repeat). Mice were trained in this task for 30 minutes per session until the mouse completed 70 47 iterations. This took mice 2-9 sessions. Data are only shown for 19 mice, because earlier iterations of the system did not save training data. Odor Association. Mice were trained in the same sequence as water sampling. However, in odor association, water availability was removed from the initiation poke, and odor was released from whichever side water was available. Therefore, the mouse must initiate water availability by poking the initiation poke and then is further guided to the correct reward port by odor release. This task taught mice to initiate trials using the initiation poke and to associate odor with reward. However, in this step, odor is not required for reward acquisition as the task alternates left and right trials. Mice were trained in this task for 30 minutes per session until the mouse completed 70 iterations. This took mice 1-5 sessions. Data are only shown for 19 mice, because earlier iterations of the system did not save training data. 100:0. Mice were given the same task as odor association, but with odor now randomly being released from the left or right odor port following an initiation poke. 10% of these trials were randomly 0:0 condition trials. To correctly answer, animals had to enter the quadrant of the arena (as tracked by the overhead camera) where odor was being released. If they answered correctly, water was made available at the reward port on the corresponding side. If they answered incorrectly, water was not made available and the mouse received an increased intertrial interval. Mice were trained in this task for 40 minutes per session until they exceeded 80% accuracy, which took 1-4 sessions (n = 26). 80:20. When trials were initiated in this task, odor was released from both odor ports, but at differing concentrations. The animal had to enter the quadrant containing the odor port releasing the higher concentration. In this case, 80 means that the nitrogen MFC 48 was set to 80mL/min on one olfactometer (see Methods: Behavioral Assay). Therefore, one odor port would release roughly 80% of the total possible odorant concentration. If one olfactometer was set to 80, then the other olfactometer would be set to 20 in this condition. 10% of these trials were randomly 0:0 condition. Mice were trained in this task for 40 minutes per session, taking 1-9 sessions to exceed 60% performance (n = 24). Behavioral Experiments Variable ΔC, Constant |C|. This experiment tested how performance and sampling strategy changes with task difficulty. In this experiment, mice performed a two-choice behavioral task where they located an odor source for a water reward at varying concentration differences between the two ports. This experiment interleaved several possible conditions: 100:0 (all odor released from one port or the other), 80:20 (odor is released from both ports at different concentrations: 80% of the total possible airborne concentration & 20% of the total possible airborne concentration), and 60:40 (60% and 40%). Additionally, there was a control condition where all system settings were the same as the 80:20 condition, but nitrogen flow was directed through a clean vial so that the final flow was not odorized. 10% of the total number of trials were the 0:0 condition. Mice ran 40 minute experimental sessions and totaled 5-50 sessions (n = 19). These experiments were run with 1% liquid dilution of pinene. Novel Odorant. This experiment tested how mice generalized our olfactory search task. A subset of mice were run with 1% liquid dilution of vanillin, which, unlike pinene, does not activate the trigeminal system (n = 3). Constant ΔC, Variable |C|. This experiment tested if the animals use a thresholding strategy based on a fixed concentration threshold to solve the localization task. We ran 49 this experiment using air dilution delivering the concentration ratios 90:30 and 30:10 interleaved randomly (n = 5). Mice ran 40 minute sessions and we analyzed data from the first session. Naris Occlusion. This experiment tested the necessity of stereo olfaction in our localization task. Mice were run in the interleaved experiment (see above) initially. However, after observing no differences between concentration groups, we continued this experiment running mice in the 80:20 and 0:0 conditions only. Mice were run in one of five categories: left occlusion, left sham stitch, right occlusion, right sham stitch, and no stitch (see Methods: Surgical Procedures). Mice ran 40 minute experimental sessions and totaled 5-30 sessions (n = 13). Stitches were always removed after 4 days. These experiments were run using 1% pinene dilutions. Mapping the Olfactory Environment We used a photoionization detector (PID, Aurora Scientific Inc, #201A) to capture real time odor concentration at a grid of 7x5 sampling locations in the assay. Using vials of 50% liquid dilution of pinene, we captured ~15 two-second trials per sampling point. Odor maps were generated using the average concentration detected across all trials at each location. These maps were smoothed via interpolation across space. Data Analysis Analyses of odormaps, sniffing, DLC tracking, and motif sequences were performed in MATLAB. Inhalation and exhalation times were extracted by finding peaks and troughs in the temperature signal after smoothing with a 25ms moving window. Sniffs with duration less than the 5th percentile and greater than the 95th percentile were 50 excluded from analysis. For alignment of movement with sniffing, tracking and motif sequences were shifted forward in time by 25ms (two frames), the temporal offset revealed by video calibration (Fig. 1). Figure 1. Odormaps were visualized by smoothing the PID sampling grid with a gaussian, and colored using Cubehelix (Green, 2011). Figure 2. Sessions where mice performed less than 60% correct on 80:20 (90:30 for Constant ΔC, Variable |C|), were less than 80 trials, or had any missing folders or files were excluded. Trials longer than 10s were excluded. Percent correct was calculated by dividing the correct trials by total trials in a single session and was averaged across all sessions, all mice. Trial duration was measured between nose poke initiation and reward poke and was averaged across all trials, all sessions, all mice. Tortuosity was measured by dividing the total path length by the shortest possible path length and was averaged across all trials, all sessions, all mice. Statistical tests were performed in python using the scipy package (E. Jones et al., 2001). A binomial test was used to test statistical significance of above chance performance. Wilcoxon rank-sum tests were used for all group comparisons with pairwise comparisons for more than two groups. Two group comparisons were tested using all trials pooled together and pairwise comparisons of three groups or more were tested across mice using individual mouse averages. Figure 3. Occupancy and sniff rate colormaps were generated by down-sampling the tracking data to a 50x30 grid of bins. Occupancy colormaps are a 2D histogram of the nose position data. Sniff rate histograms were generated by dividing the sniff count in each position bin by the corresponding bin in the occupancy histogram. Both histograms 51 were gaussian-smoothed, and colored using Cubehelix (Green, 2011). Grand means are shown in Fig. 3F,G, while individual mouse occupancy heatmaps are shown in Fig. 4. Maps were colored using Cubehelix (Green, 2011). Figure 4 & 5. Nose speed, yaw velocity, and z velocity were calculated from the 3-point position time-series generated by Deeplabcut. For analysis, a 400ms window centered on each inhalation time was extracted from the kinematic timeseries. Colormaps in Fig. 4 show traces surrounding individual sniffs, while colormaps were generated using Bluewhitered (Childress, 2020). For within-trial sniffs, only those inhaled before the decision line were included. The inter-trial interval sniffs are taken from the time of reward port entry to the time of the first initiation port entry in the inter-trial interval. For cross-correlation and coherence analysis, we aligned the time-series of sniffing and kinematic parameters from the entire trial, or from the interval between reward and initiation port in the inter-trial interval. Tracking glitches were excluded by discarding trials or inter-trial intervals that contained frames with nose speed above a criterion value (100 pixels per frame). Figure 6. Average motif shapes were generated from the mean positions of the nose, head, and body points from the first 8 frames of every instance of a given motif as determined by the AR-HMM. Decoding analysis is described in the following section. Figure 7. The transition probability matrix was clustered by minimizing Euclidean distance between rows. For analyses separating investigation and approach sniffs, sniffs were defined as investigation or approach sniffs based on the state at the inhalation time. Colors for investigation and approach were selected from the Josef Albers painting, Tautonym, (B) (Albers, 1944). 52 Figure 8. Figures are generated by motif-onset triggered averages of inhalation times determined as described above. Fig. 8B,C are the grand mean of the motif onset- triggered average for each motif. Maps were colored using Cubehelix (Green, 2011). Sniff phase (relative time in sniff) was determined by dividing the motif onset latency from inhalation by the total duration (i.e., inhalation time to inhalation time) of each sniff. Modulation index was calculated as the difference between maximum and minimum instantaneous sniff rate, divided by the sum (𝑚𝑚𝑚𝑚𝑚𝑚 −𝑚𝑚𝑚𝑚𝑚𝑚/𝑚𝑚𝑚𝑚𝑚𝑚 + 𝑚𝑚𝑚𝑚𝑚𝑚). Sniff synchronization. Sniff cycles were compared with kinematics to determine the extent of movement modulation at individual sampling points. Individual sniffs were cross-correlated with each kinematic signal (i.e. nose speed) at -200ms from inhalation onset to +200ms from inhalation onset. To further determine synchrony between the two signals, we measured the coherence of signal oscillation between sniff signals and individual kinematic measurements at -200ms from inhalation onset to +200ms from inhalation onset. Auto-Regressive Hidden Markov Model Let 𝑚𝑚𝑡𝑡 denote the 6-dimensional vector of nose-head-body coordinates at video- frame t (sampled at 80 Hz), with components (𝑚𝑚nose,𝑦𝑦nose, 𝑚𝑚head,𝑦𝑦head, 𝑚𝑚body, 𝑦𝑦body). We fit an auto-regressive hidden Markov model (AR-HMM) to mouse trajectory data, {𝐱𝐱(𝑖𝑖)𝑡𝑡 }, across trials (indexed by i) from 13 out of 15 mice (two mice were excluded a priori due to low task performance). These mice performed olfactory search under the following experimental conditions: Variable ΔC, Constant |C|. (9 mice); naris occlusion (7 mice); and Constant ΔC, Variable |C| experiments (5 mice). 53 The generative view: Viewed as a generative model (that generates simulated data), the AR-HMM has two “layers”: a layer of hidden discrete states (corresponding to discrete movement motifs), and an observed layer which is the continuous trajectory 𝑚𝑚𝑡𝑡. We denote the temporal sequence of discrete states by 𝑧𝑧𝑡𝑡. In each time-step, 𝑧𝑧𝑡𝑡 ∈ {1,2, … , 𝑆𝑆}, i.e. it is one of an S number of states, or movement motifs. The discrete hidden states evolve in time according to a Markov chain: going from time-step t to t + 1, the discrete state may change to another state according to a transition probability matrix 𝜋𝜋𝑧𝑧1,𝑧𝑧2, which denotes the conditional probability of switching to 𝑧𝑧2 having started in 𝑧𝑧1. The probability distribution over the initial state, 𝑧𝑧𝑡𝑡=1, of the Markov chain at the start of each trial was taken to be the uniform distribution. Now suppose for time steps 𝑡𝑡1 to 𝑡𝑡2 (inclusive) the discrete layer remained in state z. The continuous or autoregressive part of the model dictates that, over this time interval, the continuous trajectory, 𝒙𝒙𝑡𝑡, evolves according to a linear autoregressive (AR) process. The parameters of this AR process can be different in different states or motifs, z. In other words, 𝒙𝒙𝑡𝑡 is governed by Eq. (1): 𝒙𝒙𝑡𝑡 = 𝐴𝐴𝑧𝑧𝒙𝒙𝑡𝑡−1 + 𝒃𝒃𝑧𝑧 + 𝜀𝜀𝑡𝑡 . 𝑡𝑡1 ≤ 𝑡𝑡 ≤ 𝑡𝑡2 Where 𝐴𝐴𝑧𝑧 is a 6x6 matrix and b is a 6x1 vector, and the noise vector 𝜀𝜀𝑡𝑡is sampled from the multi-variate zero-mean gaussian distribution 𝑁𝑁(0,𝑄𝑄𝑧𝑧) where 𝑄𝑄𝑧𝑧 is a 6 x 6 noise covariance matrix. Moroever, the parameters 𝐴𝐴𝑧𝑧, 𝒃𝒃𝑧𝑧, and 𝑄𝑄𝑧𝑧 depend on the discrete state z, and in general are different in different discrete states. The simple stochastic linear dynamics described by Eq. (1) can describe simple motions of the mouse, such as turning left/right, dashing towards a certain direction, freezing (when 𝐴𝐴𝑧𝑧 is the identity matrix 54 and 𝒃𝒃𝑧𝑧 is zero), etc. The switches between these simple behaviors allow the model to generate complex trajectories. The AR-HMM model is an example of a model with latent variables, which in this case are the discrete state sequence 𝑧𝑧(𝑖𝑖)𝑡𝑡 in each trial. The model, as a whole, is specified by the set of parameters (𝜋𝜋, {𝐴𝐴𝑧𝑧}, {𝒃𝒃𝑧𝑧}, {𝑄𝑄𝑧𝑧}), which we will denote by 𝜃𝜃. For a d-dimensional trajectory (d = 6 here) and S states, comprises 𝑆𝑆(𝑆𝑆 − 1) + 𝑆𝑆(𝑚𝑚2 + 𝑚𝑚 + 𝑚𝑚(𝑚𝑚 + 1)/2) = 𝑆𝑆(𝑆𝑆 − 1 + 3𝑚𝑚(𝑚𝑚 + 1)/2) parameters. Model fits: Models with latent variables are often fit using the expectation- maximization (EM) algorithm which maximizes the likelihood of the model in terms of the parameters 𝜃𝜃 ≡ (𝜋𝜋, {𝐴𝐴𝑧𝑧}, {𝒃𝒃𝑧𝑧}, {𝑄𝑄𝑧𝑧}) for a given set of observed data {𝒙𝒙 (𝑖𝑖) 𝑡𝑡 }. In this work, we did not use the EM algorithm, but adopted a fully Bayesian approach in which both the hidden variables and the model parameters were inferred by drawing samples from their posterior distribution (\cite{Wiltschko2015Mapping}). The posterior distribution combines the model likelihood and Bayesian priors imposed on its parameters, according to Bayes' rule. If we denote the joint-likelihood of observed trajectories, {𝒙𝒙(𝑖𝑖)𝑡𝑡 }, and the latent variables, {𝑧𝑧(𝑖𝑖)𝑡𝑡 }, by 𝑃𝑃�{𝐱𝐱 (𝑖𝑖), z(𝑖𝑖)𝑡𝑡 𝑡𝑡 }�𝜃𝜃� and the prior distribution over model parameters by 𝑃𝑃(𝜃𝜃), then up to normalization, the joint posterior distribution of latent variables and model parameters is given by Eq. (2): 𝑃𝑃�{𝑧𝑧(𝑖𝑖)𝑡𝑡 },𝜃𝜃�{𝒙𝒙 (𝑖𝑖) 𝑡𝑡 }� ∝ 𝑃𝑃 �{�𝒙𝒙 (𝑖𝑖) (𝑖𝑖) 𝑡𝑡 , 𝑧𝑧𝑡𝑡 �}�𝜃𝜃� 𝑃𝑃(𝜃𝜃). For the AR-HMM model, the (logarithm of the) joint log-likelihood is given by 55 Eq. (3): 𝑇𝑇𝑖𝑖 log𝑃𝑃 �{𝒙𝒙(𝑖𝑖)𝑡𝑡 , 𝑧𝑧 (𝑖𝑖) 𝑡𝑡 }�𝜃𝜃� = ��[ log𝜋𝜋 (𝑖𝑖) (𝑖𝑖) 𝑧𝑧(𝑖𝑖) ,𝑧𝑧(𝑖𝑖) + 𝑙𝑙𝑙𝑙𝑙𝑙𝑁𝑁 �𝒙𝒙𝑡𝑡 �𝐴𝐴𝑧𝑧(𝑖𝑖)𝒙𝒙𝑡𝑡−1 + 𝒃𝒃𝑧𝑧(𝑖𝑖),𝑄𝑄𝑧𝑧(𝑖𝑖)�]. 𝑡𝑡−1 𝑡𝑡 𝑡𝑡 𝑡𝑡 𝑡𝑡 𝑖𝑖 𝑡𝑡=2 1 𝑇𝑇 −1 Where 𝑇𝑇𝑖𝑖 is the length of trial i, and we use the notation 𝑁𝑁(𝒙𝒙|𝜇𝜇,𝑄𝑄) = 𝑚𝑚 −2(𝑥𝑥−𝜇𝜇) 𝑄𝑄 (𝑥𝑥−𝜇𝜇)/ �|2𝜋𝜋𝑄𝑄| to denote the density at point x of a multivariate gaussian with mean vector 𝜇𝜇 and covariance matrix Q. We imposed loose conjugate priors on the model parameters, which were factorized over the parameters of the AR process, ({𝐴𝐴𝑧𝑧}, {𝒃𝒃𝑧𝑧}, {𝑄𝑄𝑧𝑧}), in different discrete states z, and the different rows of the Markov transition matrix, 𝜋𝜋. On the rows of 𝜋𝜋, we imposed Dirichlet distribution priors with uniform distribution means, and concentration hyperparameter 𝛼𝛼, which was set to 4. We imposed matrix normal inverse-Wishart priors on the AR parameters, independently for different discrete states. Under this prior, the noise covariance 𝑄𝑄𝑧𝑧 has an inverse Wishart distribution with a “scale matrix” hyperparameter, which was set to the d x d (= 6 x 6) identity matrix, and a “degrees-of- freedom” scalar hyperparameter set to d + 2 = 8. Conditional on 𝑄𝑄𝑧𝑧, the remaining AR parameters, (𝐴𝐴𝑧𝑧,𝒃𝒃𝑧𝑧), have a joint multivariate normal distribution under the prior, which can be specified by the prior mean and joint prior covariance matrix of 𝐴𝐴𝑧𝑧 and 𝑏𝑏𝑧𝑧. The prior means of 𝐴𝐴𝑧𝑧 and 𝒃𝒃𝑧𝑧 were set to the d x d identity matrix and the d-dimensional zero vector, respectively, while the prior covariance matrix of the concatenation (𝐴𝐴𝑧𝑧,𝒃𝒃𝒛𝒛) was given by the tensor product of 𝑄𝑄𝑧𝑧 and the (d + 1) x (d + 1)(= 7 x 7) identity matrix (equivalently, under this prior, 𝑏𝑏𝑧𝑧 and different columns of 𝐴𝐴𝑧𝑧 are independent and uncorrelated, while each of these column vectors has a prior covariance equal to the (prior) AR noise covariance, 𝑄𝑄𝑧𝑧). 56 Bayesian model inference was carried out by sampling from (instead of maximizing) the joint posterior distribution of the model parameters and latent state variables conditioned on the observed trajectory data, Eq. (2). We did this by Gibbs sampling (an example of Markov Chain Monte Carlo; not to be confused with the Markov Chain in the AR-HMM model), which works in a manner conceptually similar to the EM algorithm: it switches between sampling 𝑧𝑧(𝑖𝑖)𝑡𝑡 in all trials, conditioned on previously sampled parameters, and then sampling the parameters 𝜃𝜃 given the previous sample of {𝑧𝑧(𝑖𝑖)𝑡𝑡 }. To carry out this model inference procedure, we used the Python package developed by M. J. Johnson and colleagues, publicly available at https://github.com/mattjj/pyhsmm. We ran the Gibbs sampler for 300 iterations, and burned the first 200 samples, retaining 100. We used the remaining samples to obtain the posterior probabilities of hidden discrete states at each time step of each trial (by calculating the frequency of different state in that time step and trial, across the retained Gibbs samples), as well as posterior expectation of the model parameters (by calculating their averages over the retained Gibbs samples). We refer to the AR-HMM with parameters given by these latter posterior expectations as the “fit model”. Model selection: We fit AR-HMM's with different numbers of states (motifs), S, to mouse trajectory data pooled across animals. To evaluate the statistical goodness-of-fit of these fit model and select the best S (the number of states or motifs), we evaluated the log-likelihoods of fit models on trajectory data from a held-out set of trials, not used for model fitting. The corresponding plot of log-likelihoods is shown in Figure S8C. As seen, the log-likelihood keeps increasing with S, up to S = 100. This shows that, up to at least 57 S = 100, additional motifs do have utility in capturing more variability in mouse trajectories. These variabilities may include differences in movement across mice, as well as movement variations in the same mouse but across different trials or different instances of the same movement; for example, a clockwise head turn executed with different speeds in different instances or trials. In the AR-HMM model, the AR observation distribution of a given Markov state corresponds to a very simple (linear) dynamical system which cannot capture many natural and continuous variations in movement, such as changes in movement speed. Nevertheless AR-HMM models with higher S can capture such variations with more precision, by specializing different discrete Markov states, with different AR distributions, to movement motifs of different mice, or, for example, to capture different speeds of the same qualitative movement motif. The goal for this modelling was to give a compact description of recurring movement features across animals and conditions, suitable for visualization and alignment. For these purposes, the goodness-of-fit did not provide a suitable criterion, because the log-likelihood plots did not peak or plateau even at very large numbers of states. Guided by visual inspection, we thus chose the model with S = 16, for the main figures (Fig. 6-8). Although this was a somewhat arbitrary choice, we show that the findings in Figures 6, 7, and 8 do not depend on the choice of S – models with S = 6, 10, or 20 gave equivalent results (Fig. S9 – S11). MAP sequences: The Gibbs sampling algorithm which we used for model inference yields (timewise marginal) Maximum A Posteriori (MAP) estimates of the latent variables {𝑧𝑧(𝑖𝑖)𝑡𝑡 }, as follows. Using the Gibbs samples for the latent variables we can 58 estimate the posterior probability of the mouse being in any of the S states in any given time-step of a given trial. We made MAP sequences by picking, at any time step and trial, the state with the highest posterior probability. The inferred MAP motifs tended to have high posterior probability, which exceeded 0.8 in 66.2% of all time-steps across the 17195 trials in the modeled dataset. Decoding Analysis We decoded experimental conditions and animal identities from single-trial MAP motif sequences inferred using the AR-HMM model. Specifically, we trained multi-class decoders with linear decision boundaries (Linear Discriminant Analysis) to decode the above categorical variables from the single-trial empirical state transition probability matrices derived from the MAP sequence of each trial. If 𝑧𝑧�(𝚤𝚤)𝑡𝑡 is the motif MAP sequence for trial i, the empirical transition probability, 𝜋𝜋�(𝚤𝚤)𝑎𝑎,𝑏𝑏, from state a to state 𝑏𝑏(𝑚𝑚, 𝑏𝑏 ∈ {1, … ,𝐾𝐾}), for that trial was calculated by: Eq. (4): (𝑖𝑖) 𝜋𝜋�(𝚤𝚤) 𝑚𝑚 ≡ 𝑎𝑎,𝑏𝑏𝑎𝑎,𝑏𝑏 ∑𝐾𝐾 𝑚𝑚(𝑖𝑖) . 𝑐𝑐=1 𝑎𝑎,𝑐𝑐 Eq. (5): 𝑇𝑇(𝑖𝑖)−1 𝑚𝑚(𝑖𝑖)𝑎𝑎,𝑏𝑏 ≡ � 𝑀𝑀(𝑧𝑧�𝑡𝑡 = 𝑚𝑚)𝑀𝑀(𝑧𝑧�𝑡𝑡+1 = 𝑏𝑏) . 𝑡𝑡=1 where 𝑇𝑇(𝑖𝑖) is the length of trial i, and 𝑀𝑀(⋅) is an indicator function, returning 1 or 0 when its argument is true or false, respectively. 59 We used the decoder to either classify experimental condition or mouse identity, in different trials (Fig. 6D,E). For decoders trained to classify the trials' experimental condition, we used pooled data across mice. For decoders trained to classify mouse identity, we only used data from the 80:20 odor condition. Data was split into training and test dataset in a stratified 5-fold cross-validation manner, ensuring equal proportions of trials of different types in both datasets. The trial type was the combination of left vs right decision, experimental condition, and mouse identity. To calculate the statistical significance of decoding accuracies, we performed an iterative shuffle procedure on each fold of the cross-validation. In each shuffle, the training labels which the classifer was trained to decode were shuffled randomly across trials of the training set, and the classifer's accuracy was evaluated on the unshuffled test data-set. This shuffle was performed 100 times to create a shuffle distribution of decoding accuracies for each fold of the cross-validation. From these distributions we calculated the z-score of decoding accuracy for each class in each cross-validation fold. These z-scores were then averaged across the folds of cross-validation and used to calculate the overall p-value of the decoding accuracy obtained on the original data. 60 SUPPLEMENTARY MATERIAL Supplementary Figure 1. Calibrating alignment of video frames with sniff signal. A) Sinusoidal signals (5, 8, 10, and 15 Hz) were simultaneously sent to the analog input channel (used to capture sniffing) and to a phosphor-display oscilloscope (Tektronix). The display of the oscilloscope was reflected by mirrors to allow it to be video-captured inside the behavioral arena. B) The timing relationship is given by the lag between peaks in the analog input channel and the vertical peaks in the position of the oscilloscope trace. Analog input led video frames by 23.5 ± 15.7 ms (mean ± sd; approximately two frames at 80 frames/second). 61 Supplementary Figure 2. Color maps of average odor concentration across ~15 two- second trials captured by a 7x5 grid of sequential photoionization detector recordings. - Each row represents trial type (left correct or right correct). A) 80:20 odor condition (see Methods: Behavioral Training: 80:20). B) 60:40 odor condition (see Methods: Interleaved: 60:40). 62 Supplementary Figure 3. Session statistics across trainer sessions. - Individual mice are depicted by colored lines, average across mice are black points, and whiskers are ±1 standard deviation from the average across mice. Mice 2054-2062 did not have trainer 1 and 2 recorded (this accounts for increasing n) and mice were commonly removed from the experiment if they lost sniff signal (this accounts for the reducing n). Above. Number of trials performed or percent of correct trials. Middle. Average trial duration. Below. Average trial path tortuosity (total path length/shortest possible path length). A) Session statistics for the first trainer, water sampling (n = 19). B) Session statistics for the second trainer, odor association (n = 19). C) Session statistics for the third trainer, 100:0 or olfactory search (n = 26). Mice perform above 70\% in first session. D) Session statistics for final training step, 80:20, that preceded experiments shown in Figure 2 (n = 24). 63 Supplementary Figure 4. Mice generalize search task to novel odorants and variable |C| session. – A) Performance, trial duration, and trial tortuosity (total path length/shortest possible path length) for the last session of pinene training in 80:20 and the first session of vanillin in 80:20 across mice (n = 3). B) Grouped by stimulus condition (90:30, 30:10, 0:0), each line represents the rolling average across mice (window=10) for the first session (n = 5). Shaded regions represent ±1 standard deviation. 64 Supplementary Figure 5. Idiosyncratic occupancy distributions across individual mice. Two-dimensional histogram of occupancy (fraction of frames spent in each 0.5mm2 bin). 65 Supplementary Figure 6. Sniff synchronization shuffle test. Sniff-aligned grand mean (n = 11 mice) of A) nose speed, B) yaw velocity, and C) Z-velocity for within-trial (Top) and inter-trial interval (Bottom) sniffs, overlaid on 1000 iterations of trial-shuffled grand means. Thin black lines represent individual iterations, all of which are shown. 66 Supplementary Figure 7. Kinematic rhythms for premature initiations during the intertrial interval and between decision line and reward port during trials. Sniff- aligned average of A) nose speed, B) yaw velocity, and C) z-velocity. Thin lines represent individual mice (n = 11), bolded lines and shaded regions represent the grand mean ± standard deviation. Green: within-trial sniffs from the time between crossing the decision line and entering the reward port. Pink: inter-trial interval sniffs from the time between the first premature trial initiation attempt and the successful initiation of the next trial. 67 Supplementary Figure 8. Motif statistics and examples and linear decoder results for 80:20 experiments. - A) Example nose trace across a single trial colored by motif identity. B) Linear decoder (Fig. 6; Methods: Linear decoding section) results for Variable |C| experiments (n = 5). C) Cross-validated log-likelihood (evaluated on trials not used for model fitting) for fit AR-HMM models with different numbers of motifs, S, shows that model log-likelihood does not peak or plateau up to S = 100. D) Fraction of motif usage across all mice (n = 8) for the model with S = 16. Black points are individual mice, black line is average across mice, and shaded region is ±1 standard deviation. Colors on x axis represent motifs used in analysis (Fig. 6) and y axis are fractions of frames that motif occupies. E) The average dwell time of each motif across all mice (n = 8) for the model with S = 16. Black points are individual mice, black line is average across mice, and shaded region is ±1 standard deviation. Colors on x axis represent motifs used in analysis (Fig. 6) and y axis are fractions of frames that motif occupies.} 68 Supplementary Figure 9. Motif shapes, sequences, transition matrices, and sniff synchronization for an AR-HMM capped at a maximum of 6 states. 69 Supplementary Figure 10. Motif shapes, sequences, transition matrices, and sniff synchronization for an AR-HMM capped at a maximum of 10 states. 70 Supplementary Figure 11. Motif shapes, sequences, transition matrices, and sniff synchronization for an AR-HMM capped at a maximum of 20 states. 71 Supplementary Figure 12. Shuffle test for the difference in sniff synchronization between investigation and approach motifs for movement parameters. We quantified the difference by calculating the Kolmogorov-Smirnov statistic for the comparison between the sniff triggered averages in the two states, first for real data, and then for 1000 iterations of trial-shuffled data. Red shows the value for the real data, while the black histogram plots the distribution of Kolmogorov-Smirnov statistic for the 1000 iterations. 72 Supplementary Figure 13. Shuffle test for sniff synchronization of motif onset for investigation and approach motifs. We calculated a modulation index (𝑀𝑀𝑀𝑀 = (𝑚𝑚𝑚𝑚𝑚𝑚 − 𝑚𝑚𝑚𝑚𝑚𝑚)/(𝑚𝑚𝑚𝑚𝑚𝑚 + 𝑚𝑚𝑚𝑚𝑚𝑚) for each motifs’ across-mouse mean histogram (n = 4), and calculated the same for 1000 trial-shuffled across-mouse mean histograms. Blue and orange lines give the value from the real data, while the black histogram shows the distribution of MI across shuffle iterations. 73 CHAPTER III UNRESTRAINED ELECTROPHYSIOLOGICAL ASSAY DEVELOPMENT INTRODUCTION Motor actions play a pivotal role in sensory processing. Self-movement pervasively drive cortical activity, even in regions traditionally considered sensory areas (Musall et al., 2018; Steinmetz et al., 2018; Stringer et al., 2019). In the previous chapter of this dissertation, we characterized movements associated with olfactory search behavior in mice. Rhythmic oscillations were observed in nose and head movements that synchronize reliably with sniffing during olfactory search (Findley et al., 2020). Further, we identified two categories of behavioral state during our search task which exhibit distinct motor features (Findley et al., 2020). Because self-movement influences sensory processing and is a vital component of closed-loop active sensing, this section takes the next steps to further elucidate how sampling movements correlate with and influence neural activity in the olfactory bulb of mice. We built a system to synchronize precise pose tracking to electrophysiological recordings in unrestrained mice performing search. This system will be used to examine how local field potentials in the olfactory bulb encode sampling movements, sensory features, and behavioral state. The aggregate electrical activity across a neural region of interest, or the local field potential (LFP), is oscillatory by nature. The power, frequency, and coherence of these 74 oscillations have been implicated in neural network communication (Engel et al., 2001; Fries, 2005; Kay & Freeman, 1998; Lachaux et al., 1999), selective attention (Börgers et al., 2005; Fries et al., 2001; Jensen et al., 2007), and feature encoding (Barbieri et al., 2014; Henrie & Shapley, 2005; Jia et al., 2013; Ray & Maunsell, 2010). Coherence in LFP signals between brain regions is commonly used as an indicator of increased communication between neural regions (Engel et al., 2001; Fries, 2005; Kay & Freeman, 1998; Lachaux et al., 1999). The phase of these oscillations also plays an important role in communication; faster bands in one brain region that nest within slower bands in another region can phase-modulate each other (Canolty et al., 2006; Lakatos et al., 2005). At the scale of single neurons, the spike timing of individual cells with respect to LFP phase in sensory cortical regions has been shown to correlate with the muscle activity in the whisker pads and elsewhere in the body (Cardin et al., 2009; Siegel et al., 2009; Van Elswijk et al., 2010). LFP frequency bands can also encode the presence or absence of sensory input and selective attention. In the absence of visual stimuli, visual cortex activity fluctuates at a low frequency. Upon visual stimulation, fast oscillations in gamma band dominate LFP signals in visual cortex (Fries et al., 2001; Pesaran et al., 2002) while individual neurons begin to phase-lock to the gamma band (Berens et al., 2008; Rasch et al., 2008; Ray et al., 2008). In humans, gamma-band phase synchronization is more prevalent in the visual cortex areas that encode selectively attended sections of the visual field versus unattended sections, indicating that selective attention drives gamma band activity in cortex (Bauer et al., 2006; Doesburg et al., 2008; Gruber et al., 1999). This is further supported by gamma-band bursts during movement preparation (Schoffelen et al., 2011) and trial anticipation (Kay & Freeman, 1998). Finally, LFP can encode specific 75 features of sensory input, such as image contrast in visual cortex activity (Henrie & Shapley, 2005; Jia et al., 2013; Ray & Maunsell, 2010) as well as other quantifiable image features (Barbieri et al., 2014). Given the breadth of information LFP signals can encode, we ask how LFP represents behavioral state and sampling movements in the olfactory bulb during search. The oscillatory nature of respiration makes the olfactory system ideal for LFP encoding. Sniffing couples tightly with LFP theta oscillations in the olfactory bulb (Adrian, 1950; Cury & Uchida, 2010; Fontanini et al., 2003; Rojas-Líbano et al., 2014). Further, respiration phase drives delta and gamma waves in barrel cortex (Ito et al., 2014), which controls whisking movements. Accordingly, whisking phase-locks with sniffing during exploratory fast sniffs with the onset of a sniff cycle resetting the whisking phase (Moore et al., 2013). In fact, the breathing cycle has been hypothesized to serve as a global clock for orofacial movements and sensation (Kleinfeld et al., 2014). This hypothesis is supported by evidence that rodents move their nose and face muscles in synchronization with their breathing cycle and, during exploratory movement, whisking cycle (Kurnikova et al., 2017). Additionally, rodents rotate their heads during exploratory behavior in synchronization with the sniff cycle (Kurnikova et al., 2017), which has been further supported and elaborated on by our recent behavioral work in olfactory search (Findley et al., 2020). Finally, computational work specific to the olfactory system suggests spike timing within field activity phase can operate as an efficient means for pattern recognition (Hopfield, 1995). In summary, from the movement of individual nares to the motion of the head, active sampling movements synchronize with sniffing and, therefore, the theta oscillations of 76 the olfactory bulb. Are these movements more specifically represented at the level of the olfactory bulb population activity? Do higher frequency bands such as gamma encode behavioral state (in our task, investigation versus approach)? Do the micro-movements of the head and nose synchronize with other bands of LFP oscillation besides theta? Are features of movement (such as a right turn versus a left) represented in the LFP power, peak frequency, or shape? In order to address these questions, we built a system that can track small movements with even greater accuracy than our original behavioral system and that can align with electrophysiological recordings at the millisecond timescale. Our system uses cutting-edge tools to execute robust 3D tracking, reliable sniff measurements, and long-term electrophysiological recordings where we can directly compare head-fixed and freely moving activity and address the above questions in a comprehensive and naturalistic task. Future experiments will use this system to investigate how LFP encodes movement during olfactory search behavior. RESULTS We designed a system intended to address questions about the neural mechanisms that underlie olfactory search behaviors. Our first goal was to capture 3D motion of the nose, head, and body of a freely moving mouse with minimal errors in tracking and accommodation for a wide range of experimental techniques (i.e. electrophysiology, optogenetics, fiber photometry, etc.). We have shown z-axis head movement that synchronizes with sniffing (Findley et al., 2020) (see Ch. II), and this system will allow us to more accurately measure vertical head movements. To this end, we improved our system design from Chapter I by implementing semi-transparent flooring, video capture from below, and an angled mirror to capture z-axis movement of the mouse (Fig. 1A). By 77 imaging from below, we eliminate possible tracking errors due to cable obstruction and can easily change the features/mechanics/cabling of the head implant without impacting our tracking network. Figure 1. Electrophysiological assay for freely-moving olfactory search. A) Behavioral assay for capturing movement aligned with electrophysiological recording and sniffing. Camera captures from below one-directional transparent flooring and side profile mirror allowing 3-dimensional tracking using a single camera. Build accommodates future olfactory search assay (see Ch. II). B) Schematic of implant for electrophysiological and sniff recordings. Signals from NeuroNexus 16 channel electrode array implanted in the M/T layer of the olfactory bulb are locally amplified and digitized. Lightweight, minimally invasive thermistor records sniffing. Titanium headbar accommodates head-fixation. C) Schematic of data workflow for electrophysiological assay. Camera frames are recorded separately through SpinView software, but are synchronized with data recording via a frame capture trigger sent to the Open Ephys data acquisition board. This allows for precise post-hoc alignment of all data. 78 Further, we installed one-direction privacy film on the transparent flooring to prevent mice from viewing the open platform while allowing the camera to capture images from below (Fig. 1A; Fig. 2A). This reduces the risk of fearful behaviors that may confound our behavioral results. Finally, we installed an angled mirror to capture z-axis movement of the mouse using the same camera capturing the bottom profile. This simplistic design eliminates the need to synchronize two cameras, while greatly improving the 3- dimensional accuracy of our tracking. Using the most recent release of the open source program Deeplabcut (M. W. Mathis & Mathis, 2020), we can precisely and accurately track the nose, head, and body of mice in this system. Further, using their latest 3D tracking additions, we can accurately triangulate body positions in 3-dimensional space with ease. Free moving neural recordings were performed in the olfactory bulb of a single mouse using standard Si-based electrodes on a custom built microdrive in conjunction with an Intan headstage, thermistor, and standard titanium headbar (~ 3g). We chose to use these NeuroNexus probes, because multiple shanks increase lateral sensitivity across the brain and, given the depth of the M/T cell layer, the number of tetrodes allow us to encompass the brain region of interest and filter for individual units. Further, these probes will accommodate parallel experiments in our lab comparing single cell responses in head-fixed versus freely moving mice. As detailed in Figure 1B, the thermistor bead was implanted intranasally to dynamically record sniff (Fig. 1B). Open Ephys software was used to capture and align data from an Open Ephys Intan technology-based data acquisition board, FLIR BlackFly camera, and analog thermistor during experimentation (Fig. 1C; Fig. 2B). Future experiments will use the open source computer vision program 79 Bonsai (Lopes et al., 2015) to incorporate the SpinView software (used to operate the FLIR camera) and Open Ephys software into a single, easily executable program. Figure 2. Preliminary recordings in an unrestrained mouse. A) Example frame of bottom and side profile tracking with nose position in red, head position in green, and body position in blue. Right. Schematic of calculated body part triangulation using Deeplabcut3D. B) Example data from single freely moving recording. Top. Extracted GPIO triggers that act as a camera frame counter (30 Hz) through the Open Ephys data acquisition board. Middle. Example sniff trace in red. Bottom. 16 electrode channels in green aligned with above sniff trace and frame counter. C) Coherence of each electrode channel signal against sniffing. Black traces are signal coherence and red traces are coherence where the electrode signal is randomly shuffled. 80 Preliminary recordings were obtained from a freely moving mouse using our chronic preparation in the olfactory bulb (Fig. 2). While COVID-19 related lab closures have significantly impacted this work, this data from our single chronic implantation provides a proof of concept. We demonstrate an example frame of x, y, and z axis tracking of the nose, head, and body and a schematic of the triangulation of those body parts (Fig. 2A). We show an example of extracted camera frame GPIO triggers aligned with sniffing and electrophysiological signals from 16 electrode channels (Fig. 2B). While there is still work to be done on noise reduction in our electrophysiological recordings, the sniff signal is coherent with each of our electrode channels within the frequency band of sniffing (~5- 12 Hz), as should be expected (Fig. 2C). This is not true when the electrode channel data is randomly shuffled (Fig 2C). Despite this promising preliminary analysis, we have not yet ruled out that this coherence is due to unwanted motion artifacts. As we regain lab operations during the summer of 2020, further preliminary recordings will be taken using newly implanted mice to ensure reliable theta band LFP synchronization with sniffing and to reduce noise by grounding the system. DISCUSSION We developed a system for investigating the neural mechanisms that underlie active sampling behaviors during olfactory search,. Our system accurately and precisely tracks 3-dimensional nose, head, and body movement of the mouse and accommodates a wide variety of experimental techniques and assays. This is a novel and important technological development for the field of olfaction. Our sniffing and electrophysiological recordings align to camera frame capture with high temporal resolution. Further, our preliminary data demonstrates the viability of extracting LFP 81 from the olfactory bulb which synchronizes with sniffing. Subsequent experiments will serve to both verify and fine-tune our chronic preparation and neural recordings in preparation for investigation of LFP signals during olfactory search. Specifically, we plan to use this system to interrogate LFP in the olfactory bulb during the search task detailed in Chapter II. In doing so, we can investigate how sampling behaviors are encoded in early sensory areas and, consequently, how they drive sensory input. Despite the established nature of LFP in the field of neuroscience, the difficulty of developing a robust search assay that can produce many trials has prevented investigation of this kind in the past. Our extensive behavioral work from Chapter II of this manuscript lays the foundation for the success of this assay; we can record neural activity in a controlled search task across many trials, sessions, and days. Finally, our work described in Chapter II not only provides the behavioral assay, but our characterization of the behavior has identified two distinct behavioral states during our search task. This allows us to ask how neural activity is impacted by attentional state during olfactory search. We anticipate that the prominence of gamma band activity will alter between investigative and approach states during our search task. This assay offers both versatility and adaptability. Using it, we can conduct investigations that were previously inaccessible to the field. For example, one principal challenge in olfaction is control and accurate detection of naturalistic olfactory stimuli; the nature of odor plumes is dynamic and unpredictable. This system can be used to record from OSNs using either electrophysiological techniques or fiber photometry. Recording OSN activity not only acts as a proxy for odor concentration, but incorporates the fine-tuning movements of the head, nose, and whiskers into the incoming sensory 82 signal, making it a powerful tool for comparing sensory input against behavior. Another experimental method for addressing complex odor gradients is the optogenetic generation and delivery of fictive odor gradients. This has already been implemented in Drosophila larvae (Tastekin et al., 2018). The versatility of our system easily accommodates both optogenetic and fiber photometry techniques (with the addition of a fiber commutator) that would allow us full access or control of odor gradients during odor search. This assay is a step within a larger movement towards unrestrained recordings in the field of sensory neuroscience. We have demonstrated in this manuscript that oscillatory movement is pervasive in olfactory search. Further, current literature demonstrates that motion is globally encoded across sensory signaling and that it drives sensory input in the form of active sampling (Ahissar & Assa, 2016; Churchland, P.S., Ramachandran, V.S., & Sjenowski, 1994; Gibson, 1962; Musall et al., 2018; Steinmetz et al., 2018; Stringer et al., 2019; Yarbus, 1967). Investigation into unrestrained sensation is therefore key to comprehensively understanding sensory processing. Our first manuscript represents a modern approach to sensory neuroscience research; it accesses natural behaviors and allows freedom of movement while exercising the experimental rigor in data collection, replication, and analyses necessary to draw conclusions. Our future experiments will contribute greatly to the field’s understanding of the role motion plays in directed sensory search and how it influences sensory processing. MATERIALS & METHODS Animals: Housing & Care All experimental procedures were approved by the Institutional Animal Care and Use Committee (IACUC) at the University of Oregon and are compliant with the 83 National Institutes of Health Guide to the Care and Use of Laboratory Animals. C57BL/6J mice (2-14 months old) from the Terrestrial Animal Care Services (TeACS) at University of Oregon were used for electrophysiological experiments. Mice were housed individually in plastic cages with bedding & running wheels provided by TeACS. Mice were fed standard rodent chow and chlorinated water ad libitum. Animal health was monitored daily, and mice were taken off water restriction if they met the ‘sick animal’ criteria of a custom IACUC-approved health assessment. Assay Design Arena. All experiments were conducted in a 38x20cm custom designed behavioral arena (all designs available upon request). The floor of the arena is glass that is covered in one-way privacy viewing film. This prevents mice from seeing through the glass (as they are fearful of open platforms) while permitting video capture from below. By tracking from below, we can easily change implants/connecting wires without affecting our tracking or needing to re-train the tracking network. A mirror on the side of the arena allows a single camera from below to capture both bottom and side profiles of the mouse, resulting in precise 3D tracking of the nose, head, and body. The arena cover is easily removeable for cleaning and to accommodate future adaptations. Our arena contains a custom designed and 3D-printed honeycomb wall through which continuous clean air can be delivered to the arena and a latticed wall opposite to the honeycomb that allows airflow to exit the arena. Odor ports can be embedded inside the honeycomb wall for odor delivery. There are three nose pokes in the arena: one trial initiation poke and two reward pokes. The initiation poke is embedded in the latticed wall where airflow exits and is poked to initiate trials. the left and right reward pokes are 84 embedded in the left and right arena walls against the honeycomb airflow delivery and are used for water reward delivery. For further details on the long-term experimental set up and task structure, see Chapter I, Methods. For head-fixed experiments, we use a removeable 3D-printed mouse holder with metal screws that fix the headbar in place. This holder can be easily and quickly removed from the chamber for head-fixed to freely moving recordings. 3D video tracking. We use a FLIR Blackfly S USB3 camera (FLIR Integrated Imaging Solutions Inc, #BFS-U3-16S2M-CS) for video capture. We capture frames at 150 Hz at 1440x1080 pixel resolution. Raw video is captured and saved using SpinView recording software. We synchronize frames with electrophysiological data collection by sending a frame-activated GPIO trigger to an Open Ephys analog input. Following data collection, videos are cropped into bottom and side profiles and run through a Deeplabcut (M. W. Mathis & Mathis, 2020) 3D tracking network for tracking of the nose, head, and body. Sniff recordings. We record sniffing using intranasally implanted thermistors (TE Sensor Solutions, #GAG22K7MCD419; see: Surgical Procedures). These thermistors are attached to pins (Assmann WSW Components, #A-MCK-80030) that can be connected to an overhead commutator and run through a custom-built amplifier (Texas Instruments, #TLV2460, amplifier circuit design available upon request). Electrophysiological recordings. We acquire electrophysiological recordings using a chronically implanted NeuroNexus probe (16 or 32 channel, tetrode configuration, H package, see: Surgical Procedures) in the mitral and tufted cell layers of the olfactory bulb. To minimize noise and crosstalk, an Intan amplification/digitation 85 chip is plugged directly into the headstage. Custom thin 12 wire cable then passes the signal to the main board with excess length provided in the box to prevent twisting during behavior. The open Ephys data acquisition board, utilizing Intan chip technology, simultaneously records and synchronize the analog sniff, camera GPIO triggers, and electrode signals. This recording system is viable for both head-fixed and freely-moving experiments. Software. All data was recorded using the Open Ephys GUI and FLIR SpinView software (both freely available online). Camera frames were synchronized with Open Ephys recordings via a frame capture-triggered GPIO trigger run through the Open Ephys data acquisition board. Body parts were tracked using Deeplabcut (Mathis et al., 2018) offline. All electrophysiological, sniffing, and frame counter data were analyzed using custom code in Python and MATLAB. All custom code is available upon request. Surgical Procedures For all surgical procedures, animals were anesthetized with 3% isoflurane; concentration of isoflurane was altered during surgery depending on response of the animal to anesthesia. Incision sites were numbed prior to incision with 20mg/mL lidocaine. Chronic Electrode Implantation. Recordings were performed with microdrives prepared at Janelia (generous gift of Josh Dudman) in conjunction with standard 16 or 32 unit silicon shank electrodes with a tetrode configuration (NeuroNexus H package configuration). The electrode tips were disinfected by 3% hydrogen peroxide solution for 15 minutes and rinsed with 70% ethanol directly before implantation. A craniotomy was made directly above the olfactory bulb and recording electrodes were gently lowered into 86 the brain region of interest with an electrical manipulator. Once properly positioned, the microdrive was fixed in place using dental cement. The exposed brain area was covered in a mixture of wax and paraffin. A titanium headbar was fixed using cyanoacrylate directly behind the ears and the connector pins for the electrodes were fixed against this headbar. All exposed skull and tissue were secured and sealed using cyanoacrylate. Immediately following surgery, animals received 0.1mg/kg buprenorphine followed by 3 days of 0.03mg/kg ketoprofen. Thermistor implantation. To measure respiration during behavior, thermistors were implanted between the nasal bone and inner nasal epithelium of mice. Following an incision along the midline, a small hole was drilled through the nasal bone to expose the underlying epithelium ~2mm lateral of the midline in the nasal bone. The glass bead of the thermistor was then partially inserted into the cavity between the nasal bone and the underlying epithelium. Correct implantation resulted in minimal damage the nasal epithelium. The connector pins were fixed upright against the headstage (see electrode implantation) and the thermistor wire was fixed in place using cyanoacrylate. A skull screw was placed at the juncture of the nasal bones to secure the anterior portion of the implant. All exposed skull and tissue were secured and sealed using cyanoacrylate. Immediately following surgery, animals received 0.1mg/kg buprenorphine followed by 3 days of 0.03mg/kg ketoprofen. Data analysis All data was analyzed using custom code in Python and MATLAB. Data pre- processing was done using the SciPy package in Python (E. Jones et al., 2001). All data signals were read into Python and smoothing using a rolling average. GPIO triggers were 87 identified using peak detection. Data shuffling was done using the standard random shuffle SciPy package in Python. Coherence between two signals was measured using the SciPy coherence package using Welch’s method. 88 REFERENCES CITED Adrian, E. D. (1942). Olfactory reactions in the brain of the hedgehog. The Journal of Physiology, 100(4), 459–473. https://doi.org/10.1113/jphysiol.1942.sp003955 Adrian, E. D. (1950). The electrical activity of the mammalian olfactory bulb. Electroencephalography and Clinical Neurophysiology, 2(1–4), 377–388. https://doi.org/10.1016/0013-4694(50)90075-7 Ahissar, E., & Assa, E. (2016). Perception as a closed-loop convergence process. ELife, 5(May 2016), 1–26. https://doi.org/10.7554/eLife.12830 Albers, J. (1944). Tautonym, B. The Josef and Anni Albers Foundation/Artists Rights Society (ARS), New York. Álvarez-Salvado, E., Licata, A. M., Connor, E. G., McHugh, M. K., King, B. M. N. M., Stavropoulos, N., Crimaldi, J. P., Nagel, K. I., Victor, J. D., Crimaldi, J. P., & Nagel, K. I. (2018). Elementary sensory-motor transformations underlying olfactory navigation in walking fruit-flies. BioRxiv, 7, e04577. https://doi.org/10.1101/307660 Andersen, R. A., & Mountcastle, V. B. (1983). The influence of the angle of gaze upon the excitability of the light-sensitive neurons of the posterior parietal cortex. Journal of Neuroscience, 3(3), 532–548. https://doi.org/10.1523/jneurosci.03-03-00532.1983 Barbieri, F., Mazzoni, A., Logothetis, N. K., Panzeri, S., & Brunel, N. (2014). Stimulus dependence of local field potential spectra: Experiment versus theory. Journal of Neuroscience, 34(44), 14589–14605. https://doi.org/10.1523/JNEUROSCI.5365- 13.2014 Bargmann, C. I. (2006). Comparative chemosensation from receptors to ecology. Nature, 444(7117), 295–301. https://doi.org/https://doi.org/10.1038/nature05402 Bauer, M., Oostenveld, R., Peeters, M., & Fries, P. (2006). Tactile spatial attention enhances gamma-band activity in somatosensory cortex and reduces low-frequency activity in parieto-occipital areas. Journal of Neuroscience, 26(2), 490–501. https://doi.org/10.1523/JNEUROSCI.5228-04.2006 Berens, P., Keliris, G. A., Ecker, A. S., Logothetis, N. K., & Tolias, A. S. (2008). Comparing the feature selectivity of the gamma-band of the local fi eld potential and the underlying spiking activity in primate visual cortex. Frontiers in Systems Neuroscience, 2(June), 199–207. https://doi.org/10.3389/neuro.06.002.2008 Berg, H. C. (2000). Motile behavior of bacteria. Physics Today, 53(1), 24. https://doi.org/10.1063/1.882934 89 Berman, G. J., Bialek, W., & Shaevitz, J. W. (2016). Predictability and hierarchy in Drosophila behavior. Proceedings of the National Academy of Sciences of the United States of America, 113(42), 11943–11948. https://doi.org/10.1073/pnas.1607601113 Beshel, J., Kopell, N., & Kay, L. M. (2007). Olfactory Bulb Gamma Oscillations Are Enhanced with Task Demands. Journal of Neuroscience, 27(31), 8358–8365. https://doi.org/10.1523/JNEUROSCI.1199-07.2007 Bhattacharyya, U., & Singh Bhalla, U. (2015). Robust and Rapid Air-Borne Odor Tracking without Casting. ENeuro, 2(6), 1–26. https://doi.org/10.1523/ENEURO.0102-15.2015 Bi, S., & Sourjik, V. (2018). Stimulus sensing and signal processing in bacterial chemotaxis. Current Opinion in Microbiology, 45, 22–29. https://doi.org/10.1016/j.mib.2018.02.002 Bolding, K. A., & Franks, K. M. (2017). Complementary codes for odor identity and intensity in olfactory cortex. ELife, e22630. https://doi.org/10.7554/eLife.22630 Börgers, C., Epstein, S., & Kopell, N. J. (2005). Background gamma rhythmicity and attention in cortical local circuits: A computational study. Proceedings of the National Academy of Sciences of the United States of America, 102(19), 7002–7007. https://doi.org/10.1073/pnas.0502366102 Budick, S. A., & Dickinson, M. H. (2006). Free-flight responses of Drosophila melanogaster to attractive odors. Journal of Experimental Biology, 209(15), 3001– 3017. https://doi.org/10.1242/jeb.02305 Canolty, R. T., Edwards, E., Dalal, S. S., Soltani, M., Nagarajan, S. S., Kirsch, H. E., Berger, M. S., Barbaro, N. M., & Knight, R. T. (2006). High Gamma Power Is Phase-Locked to Theta Oscillations in Human Neocortex. Science, 313(5793), 1626–1628. Cardin, J. A., Carlén, M., Meletis, K., Knoblich, U., Zhang, F., Deisseroth, K., Tsai, L. H., & Moore, C. I. (2009). Driving fast-spiking cells induces gamma rhythm and controls sensory responses. Nature, 459(7247), 663–667. https://doi.org/10.1038/nature08002 Catania, K. C. (2013). Stereo and serial sniffing guide navigation to an odour source in a mammal. Nature Communications, 4, 1441–1448. https://doi.org/10.1038/ncomms2444 Childress, N. (2020). bluewhitered. MATLAB Central File Exchange. Churchland, P.S., Ramachandran, V.S., & Sjenowski, T. J. (1994). A critique of pure vision. In J. L. Koch, C., & Davis (Ed.), Large-scale neuronal theories of the brain (pp. 23–60). MIT Press. 90 Cometto-Muniz, J. E., & Abraham, M. H. (2010). Odor Detection by Humans of Lineal Aliphatic Aldehydes and Helional as Gauged by Dose-Response Functions. Chemical Senses, 35(4), 289–299. https://doi.org/https://doi.org/10.1093/chemse/bjq018 Connor, E. G., McHugh, M. K., & Crimaldi, J. P. (2018). Quantification of airborne odor plumes using planar laser-induced fluorescence. Experiments in Fluids, 59(9), 1–11. https://doi.org/10.1007/s00348-018-2591-3 Crimaldi, J. P., Wiley, M. B., & Koseff, J. R. (2002). The relationship between mean and instantaneous structure in turbulent passive scalar plumes. J Turbul, 3, N14. https://doi.org/10.1088/1468-5248/3/1/014 Cury, K. M., & Uchida, N. (2010). Robust Odor Coding via Inhalation-Coupled Transient Activity in the Mammalian Olfactory Bulb. Neuron, 68(3), 570–585. https://doi.org/10.1016/j.neuron.2010.09.040 D’iaz-Quesada, M., Youngstrom, I. A., Tsuno, Y., Hansen, K. R., Economo, M. N., & Wachowiak, M. (2018). Inhalation Frequency Controls Reformatting of Mitral/Tufted Cell Odor Representations in the Olfactory Bulb. Journal of Neuroscience, 38(9), 2189–2206. https://doi.org/10.1523/JNEUROSCI.0714- 17.2018 Datta, S. R., Anderson, D. J., Branson, K., Perona, P., & Leifer, A. (2019). Computational Neuroethology: A Call to Action. Neuron, 104(1), 11–24. https://doi.org/10.1016/j.neuron.2019.09.038 Doesburg, S. M., Roggeveen, A. B., Kitajo, K., & Ward, L. M. (2008). Large-scale gamma-band phase synchronization and selective attention. Cerebral Cortex, 18(2), 386–396. https://doi.org/10.1093/cercor/bhm073 Doty, R. L., Brugger, W. E., Jurs, P. C., & Orndorff, M. A. (1978). Intranasal trigeminal stimulation from odorous volatiles: psychometric responses from anosmic and normal humans. Physiology & Behavior, 20(2), 175–185. https://doi.org/https://doi.org/10.1016/0031-9384(78)90070-7 Duhamel, J., Colby, C. L., & Goldberg, M. E. (1992). The updating of the representation of visual space in parietal cortex by intended eye movements. Science, 255(5040), 90–92. https://doi.org/10.1126/science.1553535 Engel, A. K., Fries, P., & Singer, W. (2001). Dynamic predictions: Oscillations and synchrony in top–down processing. Nature Reviews Neuroscience, 2(10), 704–716. https://doi.org/10.1038/35094565 Esclassan, F., Courtiol, E., Thévenet, M., Garcia, S., Buonviso, N., & Litaudon, P. (2012). Faster, Deeper, Better: The Impact of Sniffing Modulation on Bulbar Olfactory Processing. PLoS ONE, 7(7), e40927. https://doi.org/10.1371/journal.pone.0040927 91 Falke, J. J., Bass, R. B., Butler, S. L., Chervitz, S. A., & Danielson, M. A. (1997). The Two-Component Signaling Pathway of Bacterial Chemotaxis: A Molecular View of Signal Transduction by Receptors, Kinases, and Adaptation Enzymes. Annual Review of Cell and Developmental Biology, 13(1), 457–512. https://doi.org/10.1146/annurev.cellbio.13.1.457 Findley, T. M., Wyrick, D. G., Cramer, J. L., Brown, M., Attey, R., Yeh, D., Monasevitch, E., Nouboussi, N., Cullen, I., Songco, J., King, J. F., & Ahmadian, Y. (2020). Sniff-synchronized, gradient-guided olfactory search by freely-moving mice. BioRxiv, 1–38. Fontanini, A., Spano, P. F., & Bower, J. M. (2003). Ketamine-xylazine-induced slow (<1.5 Hz) oscillations in the rat piriform (olfactory) cortex are functionally correlated with respiration. Journal of Neuroscience, 23(22), 7993–8001. https://doi.org/10.1523/jneurosci.23-22-07993.2003 Fries, P. (2005). A mechanism for cognitive dynamics: Neuronal communication through neuronal coherence. Trends in Cognitive Sciences, 9(10), 474–480. https://doi.org/10.1016/j.tics.2005.08.011 Fries, P., Neuenschwander, S., Engel, A. K., Goebel, R., & Singer, W. (2001). Rapid feature selective neuronal synchronization through correlated latency shifting. Nature Neuroscience, 4(2), 194–200. https://doi.org/10.1038/84032 Gallistel, C. R. (1982). The Organization of Action: a new synthesis. In Erlbaum Associates. https://doi.org/https://doi.org/10.4324/9780203780794 Ghatpande, A. S., & Reisert, J. (2011). Olfactory receptor neuron responses coding for rapid odour sampling. The Journal of Physiology, 589(9), 2261–2273. https://doi.org/10.1113/jphysiol.2010.203687 Gibson, J. J. (1962). Observations on active touch. Psychological Review, 69(6), 477– 491. https://doi.org/https://doi.org/10.1037/h0046962 Gibson, J. J. (1966). The senses considered as perceptual systems. Houghton Mifflin. Gire, David H; Kapoor, Vikrant; Arrighi-Allisan, Annie; Seminara, Agnese; Murthy, V. N., Gire, D. H., Kapoor, V., Arrighi-Allisan, A., Seminara, A., Murthy, V. N., & Gire, David H; Kapoor, Vikrant; Arrighi-Allisan, Annie; Seminara, Agnese; Murthy, V. N. (2017). Mice Develop Efficient Strategies for Foraging and Navigation Using Complex Natural Stimuli. Current Biology, 26(10), 1261–1273. https://doi.org/10.1016/j.cub.2016.03.040.Mice Gomez-Marin, A., & Louis, M. (2012). Active sensation during orientation behavior in the Drosophila larva: more sense than luck. Current Opinion in Neurobiology, 22(2), 208–215. https://doi.org/10.1016/j.conb.2011.11.008 92 Gomez-Marin, A., Paton, J. J., Kampff, A. R., Costa, R. M., & Mainen, Z. F. (2014). Big behavioral data: psychology, ethology and the foundations of neuroscience. Nature Neuroscience, 17(11), 1455–1462. https://doi.org/https://doi.org/10.1038/nn.3812 Gomez-Marin, A., Stephens, G. J., & Louis, M. (2011). Active sampling and decision making in Drosophila chemotaxis. Nature Communications, 2(441), 441. https://doi.org/10.1038/ncomms1455 Green, D. A. (2011). A colour scheme for the display of astronomical intensity images. Bulletin of the Astronomical Society of India, 39, 289–295. Gruber, T., Müller, M. M., Keil, A., & Elbert, T. (1999). Selective visual-spatial attention alters induced gamma band responses in the human EEG. Clinical Neurophysiology, 110(12), 2074–2085. https://doi.org/10.1016/S1388-2457(99)00176-5 Gupta, P., Albeanu, D., & Bhalla, U. (2015). Olfactory bulb coding of odors, mixtures and sniffs is a linear sum of odor time profiles. Nature Neuroscience, 18, 272–281. https://doi.org/https://doi.org/10.1038/nn.3913 Hasler, A. D., Scholz, A. T., & Horrall, R. M. (1978). Olfactory imprinting and homing in salmon. American Scientist, 66(3), 347–355. Henrie, J. A., & Shapley, R. (2005). LFP power spectra in V1 cortex: The graded effect of stimulus contrast. Journal of Neurophysiology, 94(1), 479–490. https://doi.org/10.1152/jn.00919.2004 Hopfield, J. J. (1995). Pattern recognition computation using action potential timing for stimulus re... Pattern Recognition, 376, 33–36. Hummel, T., Iannilli, E., Frasnelli, J., Boyle, J., & Gerber, J. (2009). Central processing of trigeminal activation in humans. Annals of the New York Academy of Sciences, 1170(1), 190–195. https://doi.org/10.1111/j.1749-6632.2009.03910.x Ito, J., Roy, S., Liu, Y., Cao, Y., Fletcher, M., Lu, L., Boughter, J. D., Grün, S., & Heck, D. H. (2014). Whisker barrel cortex delta oscillations and gamma power in the awake mouse are linked to respiration. Nature Communications, 5, 1–10. https://doi.org/10.1038/ncomms4572 Jensen, O., Kaiser, J., & Lachaux, J. P. (2007). Human gamma-frequency oscillations associated with attention and memory. Trends in Neurosciences, 30(7), 317–324. https://doi.org/10.1016/j.tins.2007.05.001 Jia, X., Xing, D., & Kohn, A. (2013). No consistent relationship between gamma power and peak frequency in macaque primary visual cortex. Journal of Neuroscience, 33(1), 17–25. https://doi.org/10.1523/JNEUROSCI.1687-12.2013 Jones, E., Oliphant, T., Peterson, P., & and others. (2001). SciPy: Open source scientific tools for Python. 93 Jones, P. W., & Urban, N. N. (2018). Mice follow odor trails using stereo olfactory cues and rapid sniff to sniff comparisons. BioRxiv, 293746. https://doi.org/10.1101/293746 Jordan, R., Kollo, M., & and Schaefer, A. (2018). Sniffing Fast: Paradoxical Effects on Odor Concentration Discrimination at the Levels of Olfactory Bulb Output and Behavior. ENeuro, 5(5). https://doi.org/10.1523/ENEURO.0148-18.2018 Karalis, N., & Sirota, A. (2018). Breathing Coordinates Limbic Network Dynamics Underlying Memory Consolidation. SSRN Electronic Journal. https://doi.org/10.2139/ssrn.3283711 Kay, L. M. (2005). Theta oscillations and sensorimotor performance. Proceedings of the National Academy of Sciences of the United States of America, 102(10), 3863–3868. https://doi.org/10.1073/pnas.0407920102 Kay, L. M., & Freeman, W. J. (1998). Bidirectional processing in the olfactory-limbic axis during olfactory behavior. Behavioral Neuroscience, 112(3), 541–553. https://doi.org/10.1037/0735-7044.112.3.541 Kennedy, J. S., & Marsh, D. (1974). Pheromone-regulated anemotaxis in flying moths. Science (New York, NY), 184(4140), 999–1001. https://doi.org/10.1126/science.184.4140.999 Kepecs, A., Uchida, N., & Mainen, Z. F. (2006). The sniff as a unit of olfactory processing. Chemical Senses, 31(2), 167–179. https://doi.org/https://doi.org/10.1093/chemse/bjj016 Khan, A. G., Sarangi, M., & Bhalla, U. S. (2012). Rats track odour trails accurately using a multi-layered strategy with near-optimal sampling. Nature Communications, 3, 703. https://doi.org/10.1038/ncomms1712 Kleinfeld, D., Ahissar, E., & Diamond, M. E. (2006). Active sensation: insights from the rodent vibrissa sensorimotor system. Current Opinion in Neurobiology, 16(4), 435– 444. https://doi.org/10.1016/j.conb.2006.06.009 Kleinfeld, D., Deschênes, M., Wang, F., & Moore, J. D. (2014). More than a rhythm of life: Breathing as a binder of orofacial sensation. Nature Neuroscience, 17(5), 647– 651. https://doi.org/10.1038/nn.3693 Kurnikova, A., Moore, J. D., Liao, S.-M. M., Deschênes, M., & Kleinfeld, D. (2017). Coordination of Orofacial Motor Actions into Exploratory Behavior by Rat. Current Biology, 27(5), 688–696. https://doi.org/10.1016/j.cub.2017.01.013 Lachaux, J. P., Rodriguez, E., Martinerie, J., & Varela, F. J. (1999). Measuring phase synchrony in brain signals. Human Brain Mapping, 8(4), 194–208. https://doi.org/10.1002/(SICI)1097-0193(1999)8:4<194::AID-HBM4>3.0.CO;2-C 94 Lakatos, P., Shah, A. S., Knuth, K. H., Ulbert, I., Karmos, G., & Schroeder, C. E. (2005). An oscillatory hierarchy controlling neuronal excitability and stimulus processing in the auditory cortex. Journal of Neurophysiology, 94(3), 1904–1911. https://doi.org/10.1152/jn.00263.2005 Larsch, J., Flavell, S. W., Liu, Q., Gordus, A., Albrecht, D. R., & Bargmann, C. I. (2015). A Circuit for Gradient Climbing in C. elegans Chemotaxis. Cell Reports, 12(11), 1748–1760. https://doi.org/10.1016/j.celrep.2015.08.032 Leitch, K. J., Ponce, F., van Bruegel, F., & Dickinson, M. H. (2020). The long-distance flight behavior of Drosophila suggests a general model for wind-assisted dispersal in insects. BioRxiv. https://doi.org/https://doi.org/10.1101/2020.06.10.14516 Liu, A., Papale, A. E., Hengenius, J., Patel, K., Ermentrout, B., & Urban, N. N. (2020). Mouse Navigation Strategies for Odor Source Localization. Frontiers in Neuroscience, 14, 1–16. https://doi.org/10.3389/fnins.2020.00218 Lockery, S. R. (2011). The computational worm: Spatial orientation and its neuronal basis in C. elegans. Current Opinion in Neurobiology, 21(5), 782–790. https://doi.org/10.1016/j.conb.2011.06.009 Lopes, G., Bonacchi, N., Frazão, J., Neto, J., Atallah, B. V, Soares, S., Moreira, L., Matias, S., Itskov, P. M., Correia, P. A., Medina, R. E., Calcaterra, L., Dreosti, E., Paton, J. J., & Kampff, A. R. (2015). Bonsai: an event-based framework for processing and controlling data streams. Frontiers in Neuroinformatics, 9(10), 52:1- 14. https://doi.org/https://doi.org/10.3389/fninf.2015.00007 Macrides, F., Eichenbaum, H. B., & Forbes, W. B. (1982). Temporal relationship between sniffing and the limbic theta rhythm during odor discrimination reversal learning. The Journal of Neuroscience : The Official Journal of the Society for Neuroscience, 2(12), 1705–1717. https://doi.org/10.1523/JNEUROSCI.02-12-01705 Malnic, B., Hirono, J., Sato, T., & Buck, L. B. (1999). Combinatorial receptor codes for odors. Cell, 96(5), 713–723. https://doi.org/10.1016/S0092-8674(00)80581-4 Mandairon, N., & Linster, C. (2009). Odor Perception and Olfactory Bulb Plasticity in Adult Mammals. Journal of Neurophysiology, 101(5), 2204–2209. https://doi.org/10.1152/jn.00076.2009 Markowitz, J. E., Gillis, W. F., Beron, C. C., Neufeld, S. Q., Robertson, K., Bhagat, N. D., Peterson, R. E., Peterson, E., Hyun, M., Linderman, S. W., Sabatini, B. L., & Datta, S. R. (2018). The Striatum Organizes 3D Behavior via Moment-to- Moment Action Selection. Cell, 174(1), 44–58. https://doi.org/10.1016/j.cell.2018.04.019 Mathis, A., Mamidanna, P., Cury, K. M., Abe, T., Murthy, V. N., Mathis, M. W., & Bethge, M. (2018). DeepLabCut: markerless pose estimation of user-defined body parts with deep learning. Nature Neuroscience, 21(9), 1281–1289. https://doi.org/10.1038/s41593-018-0209-y 95 Mathis, M. W., & Mathis, A. (2020). Deep learning tools for the measurement of animal behavior in neuroscience. Current Opinion in Neurobiology, 60, 1–11. https://doi.org/10.1016/j.conb.2019.10.008 McAfee, S. S., Ogg, M. C., Ross, J. M., Liu, Y., Fletcher, M. L., & Heck, D. H. (2016). Minimally invasive highly precise monitoring of respiratory rhythm in the mouse using an epithelial temperature probe. Journal of Neuroscience Methods, 263, 89– 94. https://doi.org/10.1016/j.jneumeth.2016.02.007 McGinley, M. J., David, V. S., & McCormick, D. A. (2015). Cortical Membrane Potential Signature of Optimal States for Sensory Signal Detection. Neuron, 87(1), 179–192. https://doi.org/10.1016/j.neuron.2015.05.038 Mech, L.D., & Frenzel, L. D. (1971). Ecological studies of the timber wolf in northeastern Minnesota (52nd ed.). US North Central Forest Experiment Station. Moore, J. D., Deschênes, M., Furuta, T., Huber, D., Smear, M. C., Demers, M., & Kleinfeld, D. (2013). Hierarchy of orofacial rhythms revealed through whisking and breathing. Nature, 497(7448), 205–210. https://doi.org/10.1038/nature12076 Moran, A. K., Eiting, T. P., & Wachowiak, M. (2019). Diverse dynamics of glutamatergic input underlie heterogeneous response patterns of olfactory bulb mitral and tufted cells in vivo. BioRxiv. https://doi.org/https://doi.org/10.1101/692574 Murlis, J., Elkinton, J. S., & Carde, R. T. (1992). Odor plumes and how insects use them. Annual Review of Entomology, 37(86), 505–532. https://doi.org/10.1146/annurev.en.37.010192.002445 Murphy, K. P. (2012). Machine learning: a probabilistic perspective (adaptive computation and machine learning series). In Mit Press. ISBN. Musall, S., Kaufman, M. T., Gluf, S., & Churchland, A. K. (2018). Movement-related activity dominates cortex during sensory-guided decision making. BioRxiv. Musall, S., Kaufman, M. T., Juavinett, A. L., Gluf, S., & Churchland, A. K. (2019). Single-trial neural dynamics are dominated by richly varied movements. Nature Neuroscience, 22, 1677–1686. https://doi.org/https://doi.org/10.1038/s41593-019- 0502-4 Nevitt, G. A., Dittman, A. H., Quinn, T. P., & Moody, W. J. (1994). Evidence for a peripheral olfactory memory in imprinted salmon. Proceedings of the National Academy of Sciences of the United States of America, 91(10), 4288–4292. https://doi.org/10.1073/pnas.91.10.4288 Niell, C. M., & Stryker, M. P. (2010). Modulation of Visual Responses by Behavioral State in Mouse Visual Cortex. Neuron, 65(4), 472–479. https://doi.org/10.1016/j.neuron.2010.01.033 96 O’Connor, D. H., Peron, S. P., Huber, D., & Svoboda, K. (2010). Neural activity in barrel cortex underlying vibrissa-based object localization in mice. Neuron, 67(6), 1048– 1061. https://doi.org/10.1016/j.neuron.2010.08.026 Parabucki, A., Bizer, A., Morris, G., Munoz, A. E., Bala, A. D. S. S., Smear, M., & Shusterman, R. (2019). Odor concentration change coding in the olfactory bulb. ENeuro, 6(1), 1–13. https://doi.org/10.1523/ENEURO.0396-18.2019 Parthasarathy, K., & Bhalla, U. S. (2013). Laterality and Symmetry in Rat Olfactory Behavior and in Physiology of Olfactory Input. Journal of Neuroscience, 33(13), 5750–5760. https://doi.org/https://doi.org/10.1523/JNEUROSCI Patterson, M. A., Lagier, S., & Carleton, A. (2013). Odor representations in the olfactory bulb evolve after the first breath and persist as an odor afterimage. Proceedings of the National Academy of Sciences, 110(35), E3340–E3349. https://doi.org/10.1073/pnas.1303873110 Pesaran, B., Pezaris, J. S., Sahani, M., Mitra, P. P., & Andersen, R. A. (2002). Temporal structure in neuronal activity during working memory in macaque parietal cortex. Nature Neuroscience, 5(8), 805–811. https://doi.org/10.1038/nn890 Peters, R. P., & Mech, L. D. (1975). Scent-marking in wolves. American Scientist, 63(6), 628–637. https://doi.org/10.2307/27845779 Poritz, A. B. (1982). Linear predictive hidden Markov models and the speech signal. ICASSP, IEEE International Conference on Acoustics, Speech and Signal Processing - Proceedings. https://doi.org/10.1109/ICASSP.1982.1171633 Porter, J., Craven, B., Khan, R. M., Chang, S.-J. J., Kang, I., Judkewitz, B., Judkewicz, B., Volpe, J., Settles, G., & Sobel, N. (2007). Mechanisms of scent-tracking in humans. Nature Neuroscience, 10(1), 27–29. https://doi.org/10.1038/nn1819 Poulet, J. F. A., & Hedwig, B. (2006). The cellular basis of a corollary discharge. Science, 311(5760), 518–522. https://doi.org/10.1126/science.1120847 Rabell, J. E., Mutlu, K., Noutel, J., del Olmo, P. M., & Haesler, S. (2017). Spontaneous Rapid Odor Source Localization Behavior Requires Interhemispheric Communication. Current Biology, 27(10), 1–12. https://doi.org/10.1016/j.cub.2017.04.027 Rajan, R., Clement, J. P., & Bhalla, U. S. (2006). Rats smell in stereo. Science (New York, NY), 311(5761), 666–670. https://doi.org/10.1126/science.1122096 Ranade, S., Hangya, B., & Kepecs, A. (2013). Multiple Modes of Phase Locking between Sniffing and Whisking during Active Exploration. The Journal of Neuroscience : The Official Journal of the Society for Neuroscience, 33(19), 8250–8256. https://doi.org/10.1523/JNEUROSCI.3874-12.2013 97 Rasch, M. J., Gretton, A., Murayama, Y., Maass, W., & Logothetis, N. K. (2008). Inferring spike trains from local field potentials. Journal of Neurophysiology, 99(3), 1461–1476. https://doi.org/10.1152/jn.00919.2007 Ray, S., & Maunsell, J. H. R. (2010). Differences in Gamma Frequencies across Visual Cortex Restrict Their Possible Use in Computation. Neuron, 67(5), 885–896. https://doi.org/10.1016/j.neuron.2010.08.004 Ray, S., Niebur, E., Hsiao, S. S., Sinai, A., & Crone, N. E. (2008). High-frequency gamma activity (80-150 Hz) is increased in human cortex during selective attention. Clinical Neurophysiology, 119(1), 116–133. https://doi.org/10.1016/j.clinph.2007.09.136 Ressler, K. J., Sullivan, S. L., & Buck, L. B. (1994). Information coding in the olfactory system: Evidence for a stereotyped and highly organized epitope map in the olfactory bulb. Cell, 79(7), 1245–1255. https://doi.org/10.1016/0092- 8674(94)90015-9 Riffell, J. A., Abrell, L., & Hildebrand, J. G. (2008). Physical Processes and Real-Time Chemical Measurement of the Insect Olfactory Environment. Journal of Chemical Ecology, 34(7), 837–853. https://doi.org/https://doi.org/10.1007/s10886-008-9490-7 Rojas-Líbano, D., Frederick, D. E., Egaña, J. I., & Kay, L. M. (2014). The olfactory bulb theta rhythm follows all frequencies of diaphragmatic respiration in the freely behaving rat. Frontiers in Behavioral Neuroscience, 8, 1–12. https://doi.org/10.3389/fnbeh.2014.00214 Royet, J. P., Distel, H., Hudson, R., & Gervais, R. (1998). A re-estimation of the number of glomeruli and mitral cells in the olfactory bulb of rabbit. Brain Research, 788(1– 2), 35–42. https://doi.org/10.1016/S0006-8993(97)01504-7 Schoffelen, J. M., Poort, J., Oostenveld, R., & Fries, P. (2011). Selective movement preparation is subserved by selective increases in corticomuscular gamma-band coherence. Journal of Neuroscience, 31(18), 6750–6758. https://doi.org/10.1523/JNEUROSCI.4882-10.2011 Schroeder, C. E., Wilson, D. A., Radman, T., Scharfman, H., & Lakatos, P. (2010). Dynamics of Active Sensing and perceptual selection. Current Opinion in Neurobiology, 20(2), 172–176. https://doi.org/10.1016/j.conb.2010.02.010 Serizawa, S., Ishii, T., Nakatani, H., Tsuboi, A., Nagawa, F., Asano, M., Sudo, K., Sakagami, J., Sakano, H., Ijiri, T., Matsuda, Y., Suzuki, M., Yamamori, T., Iwakura, Y., & Sakano, H. (2000). Mutually exclusive expression of odorant receptor transgenes. Nature Neuroscience, 3(7), 687–693. https://doi.org/10.1038/76641 98 Serizawa, S., Miyamichi, K., Nakatani, H., Suzuki, M., Saito, M., Yoshihara, Y., & Sakano, H. (2003). Negative Feedback Regulation Ensures the One Receptor-One Olfactory Neuron Rule in Mouse. Science, 302(5653), 2088–2094. https://doi.org/10.1126/science.1089122 Shepherd, G. M., & Greer, C. A. (1998). Olfactory bulb. In The synaptic organization of the brain, 4th ed. (pp. 159–203). Oxford University Press. Shusterman, R., Smear, M. C., Koulakov, A. A., & Rinberg, D. (2011). Precise olfactory responses tile the sniff cycle. Nature Neuroscience, 14(8), 1039–1044. https://doi.org/10.1038/nn.2877 Siegel, M., Warden, M. R., & Miller, E. K. (2009). Phase-dependent neuronal coding of objects in short-term memory. Proceedings of the National Academy of Sciences of the United States of America, 106(50), 21341–21346. https://doi.org/10.1073/pnas.0908193106 Smear, M. C., Baker, K. L., Dickinson, M., Findley, T. M., Gire, D. H., Louis, M., Suver, M. P., Verhagen, J. V., Nagel, K. I., Smear, M. C. M. C., & Smear. (2018). Algorithms for Olfactory Search across Species. The Journal of Neuroscience, 38(44), 9383–9389. https://doi.org/10.1523/JNEUROSCI.1668-18.2018 Sobel, E. C., & Tank, D. W. (1993). Timing of odor stimulation does not alter patterning of olfactory bulb unit activity in freely breathing rats. Journal of Neurophysiology, 69(4), 1331–1337. https://doi.org/10.1152/jn.1993.69.4.1331 Sommer, M. A., & Wurtz, R. H. (2002). A pathway in primate brain for internal monitoring of movements. Science, 296(5572), 1480–1482. https://doi.org/10.1126/science.1069590 Sommer, M. A., & Wurtz, R. H. (2008). Brain Circuits for the Internal Monitoring of Movements. Annual Review of Neuroscience, 31, 317–338. https://doi.org/10.1146/annurev.neuro.31.060407.125627 Sperry, R. W. (1950). Neural basis of the spontaneous optokinetic response produced by visual inversion. Journal of Comparative and Physiological Psychology, 43(6), 482. https://doi.org/https://doi.org/10.1037/h0055479 Steinmetz, N., Zatka-Haas, P., Carandini, M., & Harris, K. (2018). Distributed correlates of visually-guided behavior across the mouse brain. BioRxiv. https://doi.org/10.1101/474437 Stringer, C., Pachitariu, M., Steinmetz, N., Reddy, C. B., Carandini, M., & Harris, K. D. (2019). Spontaneous behaviors drive multidimensional, brainwide activity. Science, 364(6437), eaav7893-13. https://doi.org/10.1126/science.aav7893 99 Tastekin, I., Khandelwal, A., Tadres, D., Fessner, N. D., Truman, J. W., Zlatic, M., Cardona, A., & Louis, M. (2018). Sensorimotor pathway controlling stopping behavior during chemotaxis in the drosophila melanogaster larva. ELife, 7, 1–38. https://doi.org/10.7554/eLife.38740 Tolman, E. C. (1932). Purposive Behavior in Animals and Men. In Purposive Behavior in Animals and Men. Appleton-Century. van Breugel, F., & Dickinson, M. H. (2014). Plume-tracking behavior of flying drosophila emerges from a set of distinct sensory-motor reflexes. Current Biology, 24(3), 274–286. https://doi.org/10.1016/j.cub.2013.12.023 Van Elswijk, G., Maij, F., Schoffelen, J. M., Overeem, S., Stegeman, D. F., & Fries, P. (2010). Corticospinal beta-band synchronization entails rhythmic gain modulation. Journal of Neuroscience, 30(12), 4481–4488. https://doi.org/10.1523/JNEUROSCI.2794-09.2010 Vanderwolf, C. H. (1992). Hippocampal activity, olfaction, and sniffing: an olfactory input to the dentate gyrus. Brain Research, 593(2), 197–208. https://doi.org/https://doi.org/10.1016/0006-8993(92)91308-2 Verhagen, V. J., Wesson, D. W., Netoff, T. I., White, J. A., & Wachowiak, M. (2007). Sniffing controls an adaptive filter of sensory input to the olfactory bulb. Nature Neuroscience, 10(5), 631–639. https://doi.org/https://doi.org/10.1038/nn1892 Vickers, N. J., & Baker, T. C. (1994). Reiterative responses to single strands of odor promote sustained upwind flight and odor source location by moths. Proceedings of the National Academy of Sciences of the United States of America, 91(13), 5756– 5760. https://doi.org/10.1073/pnas.91.13.5756 von Holst, E., & Mittelstaedt, H. (1950). Das Reafferenzprinzip. Naturwissenschaften, 37(20), 464–476. https://doi.org/https://doi.org/10.1007/BF00622503 Wachowiak, M. (2011). All in a Sniff: Olfaction as a Model for Active Sensing. Neuron, 71(6), 962–973. https://doi.org/10.1016/j.neuron.2011.08.030 Wallace, D. J., Greenberg, D. S., Sawinski, J., Rulla, S., Notaro, G., & Kerr, J. N. D. (2013). Rats maintain an overhead binocular field at the expense of constant fusion. Nature, 498(7452), 65–69. https://doi.org/10.1038/nature12153 Webb, B. (2004). Neural mechanisms for prediction: Do insects have forward models? Trends in Neurosciences, 27(5), 278–282. https://doi.org/10.1016/j.tins.2004.03.004 Weiss, P. (1968). Self-differentiation of the basic patterns of coordination. In Dynamics of Development: Experiments and Inferences (pp. 486–581). Academic Press. https://doi.org/10.1016/b978-1-4832-2919-5.50027-1 100 Welker, W. I. (1964). Analysis of sniffing of the albino rat. Behaviour, Leiden, 22(3–4), 223–244. https://doi.org/https://doi.org/10.1163/156853964X00030 Wesson, D. W., Carey, R. M., Verhagen, V. J., Wachowiak, M., Verhagen, J. V., & Wachowiak, M. (2008). Rapid encoding and perception of novel odors in the rat. PLoS Biology, 6(4), 717–729. https://doi.org/10.1371/journal.pbio.0060082 Wesson, D. W., Verhagen, J. V., Wachowiak, M., Verhagen, V. J., & Wachowiak, M. (2009). Why sniff fast? The relationship between sniff frequency, odor discrimination, and receptor neuron activation in the rat. Journal of Neurophysiology, 101(2), 1089–1102. https://doi.org/10.1152/jn.90981.2008 Wiltschko, A. B., Johnson, M. J., Iurilli, G., Peterson, R. E., Katon, J. M., Pashkovski, S. L., Abraira, V. E., Adams, R. P., & Datta, S. R. (2015). Mapping Sub-Second Structure in Mouse Behavior. Neuron, 88(6), 1121–1135. https://doi.org/10.1016/j.neuron.2015.11.031 Yanovsky, Y., Ciatipis, M., Draguhn, A., Tort, A. B. L., & Branka k, J. (2014). Slow Oscillations in the Mouse Hippocampus Entrained by Nasal Respiration. Journal of Neuroscience, 34(17), 5949–5964. https://doi.org/10.1523/JNEUROSCI.5287- 13.2014 Yarbus, A. L. (1967). Eye Movements and Vision. Springer, Boston, MA. https://doi.org/10.1007/978-1-4899-5379-7 Zelano, C., Jiang, H., Zhou, G., Arora, N., Schuele, S., Rosenow, J., & Gottfried, J. A. (2016). Nasal respiration entrains human limbic oscillations and modulates cognitive function. Journal of Neuroscience, 36(49), 12448–12467. https://doi.org/10.1523/JNEUROSCI.2586-16.2016 Zhou, F.-W., Shao, Z.-Y., Shipley, M. T., & Puche, A. C. (2020). Short-term plasticity in glomerular inhibitory circuits shapes olfactory bulb output. Journal of Neurophysiology, 123(3), 1120–1132. https://doi.org/10.1152/jn.00628.2019 101