Dissecting the Functional Organization of the C. elegans Serotonergic System at Whole-Brain Scale

SUMMARY Serotonin controls many aspects of animal behavior and cognition. But how serotonin acts on its diverse receptor types in neurons across the brain to modulate global activity and behavior is unknown. Here, we examine how serotonin release from a feeding-responsive neuron in C. elegans alters brain-wide activity to induce foraging behaviors, like slow locomotion and increased feeding. A comprehensive genetic analysis identifies three core serotonin receptors that collectively induce slow locomotion upon serotonin release and three others that interact with them to further modulate this behavior. The core receptors have different functional roles: some induce behavioral responses to sudden increases in serotonin release, whereas others induce responses to persistent release. Whole-brain calcium imaging reveals widespread serotonin-associated brain dynamics, impacting different behavioral networks in different ways. We map out all sites of serotonin receptor expression in the connectome, which, together with synaptic connectivity, helps predict serotonin-associated brain-wide activity changes. These results provide a global view of how serotonin acts at defined sites across a connectome to modulate brain-wide activity and behavior.


36
Serotonin signaling is evolutionarily ancient and is critical for the control of behavior and 37 cognition. In humans, dysfunction of the serotonergic system has been implicated in major 38 depressive disorder, anxiety disorders, and other psychiatric diseases. It is the most common 39 target of psychiatric drugs, and many psychotropic chemicals like psilocybin and LSD exert their while ser-1 could not ( Fig. 2A-B). These results suggest that the serotonergic control of 191 locomotion is mediated by activation of a set of six receptors that interact to modulate behavior.

192
To decipher how these receptors interact, we crossed the NSM::Chrimson strain to the 193 64 different mutant backgrounds that lacked all possible combinations of the six serotonin 194 receptors. We then quantified their locomotion changes in response to different patterns of NSM 195 stimulation. We analyzed these datasets in several ways. First, we identified the subset of 196 receptors that are required for slowing. The results across this full set of genotypes indicate that 197 mod-1, ser-4, and lgc-50 are the primary receptors that drive slow locomotion, so we refer to 198 them as the "driver" receptors. The triple mutant lacking all three of these receptors displayed a 199 slowing deficit that was almost as severe as the sextuple mutant, and the double mutants 200 lacking combinations of these three receptors had more mild phenotypes (Fig. 2C). In addition, 201 the quadruple and quintuple mutants that lacked all three of these receptors (plus other receptor 202 mutations) still had severe deficits in slowing (Fig. 2C). Finally, as described above, quintuple 203 mutants that had any of these three receptors intact displayed NSM-induced slowing, though to 204 different degrees ( Fig. 2A-C). This indicates that there are three serotonin receptors whose 205 activation reduces locomotion speed, and concurrent activation of all these receptors produces 206 the slowing response observed in wild-type animals.

207
The remaining three receptors, ser-1, ser-5, and ser-7, had modulatory roles in 208 controlling NSM-induced slowing (referred to as the "modulator" receptors). They were not 209 strictly required for serotonin-induced slowing, since the triple mutant lacking all three receptors 210 had no deficit in slowing, compared to wild-type (Fig. 2D). In addition, they could not support 211 robust slowing on their own: the three quintuple mutants with each of these receptors intact 212 were very similar to the sextuple mutant lacking all receptors ( Fig. 2A-C). However, in many 213 strains with different combinations of other serotonin receptors deleted, the loss of these 214 receptors caused large deficits in NSM-induced slowing. Fig. 2E shows the effects of deleting 215 each of these receptors in each possible genetic background (displayed as the difference in 216 slowing behavior between a given mutant with the receptor of interest intact versus absent). We 217 found that ser-7 primarily inhibits slowing, since its deletion most commonly causes animals to 218 display stronger NSM-induced slowing (Fig. 2E, orange bars are mostly negative). ser-1 (red 219 bars) and ser-5 (blue bars) had mixed effects (promoting or inhibiting slowing, or having no 220 effect) depending on the background. However, their deletion had little to no effect if the main 221 drivers of slowing (mod-1, ser-4, and lgc-50) were already deleted (Fig. 2C), suggesting that 222 they can modulate slowing induced by these receptors. Together with the above analyses, 223 these results suggest that there is one subset of serotonin receptors (mod-1, ser-4, and lgc-50) 224 whose activation can elicit changes in locomotion behavior. In addition, there is a second subset 225 of receptors (ser-1, ser-5, and ser-7) that, when co-activated together with the other receptors, 226 can modulate the responses.

227
To discern the exact form of these receptor interactions, we used a modeling approach.

228
Specifically, we constructed a linear model that could predict the amplitude of NSM-induced 229 slowing across all the genotypes, based on which serotonin receptors were present (Fig. 2F).

230
We found that a linear model with six predictor terms, indicating the presence or absence of 231 each receptor, was only able to predict slowing across the genotypes with partial accuracy, 232 even when trained on all the genotypes (Fig. 2G). This indicates that slowing across the full set 233 of genotypes cannot be described as a simple weighted sum of which receptors are present.

234
Therefore, we added additional predictor terms to the model that described the joint presence of same age and the same fasting duration). This suggests that the impact of MOD-1 and LGC-50 286 receptor activation on neural circuit activity may be enhanced by fasting.

287
To examine whether fasting also alters the functional interactions between the receptors, we 288 recorded NSM-stimulated behavioral responses in well-fed and fasted conditions for all 64 289 serotonin receptor mutant strains. We asked whether the effect of deleting a given serotonin 290 receptor in each possible genetic background (i.e. mutant background with a specific subset of 291 serotonin receptors already deleted) was different in well-fed versus fasted animals (Fig. 3C).

292
We only considered there to be a difference between fed and fasted conditions if three criteria  In analyzing the serotonin receptor mutants' behavioral phenotypes, we observed that 315 different serotonin receptors exhibited striking differences in terms of the behavioral dynamics 316 that they support. This is readily apparent in the quintuple mutants that have only one serotonin 317 receptor intact (Fig. 4A-B shows a direct comparison). For the three "driver" receptors that can 318 drive slow locomotion on their own, the maintenance of the slow locomotion during continued 319 NSM stimulation differed dramatically. Whereas mod-1-only mutants displayed reduced 320 locomotion as long as NSM was active, the ser-4-only mutants only displayed a transient 321 reduction in locomotion speed at stimulation onset that rapidly decayed. lgc-50-only animals 322 displayed an intermediate decay rate (Fig. 4A-B). In addition, in contrast to mod-1-only animals, 323 ser-4-only animals did not show different responses to short versus long optogenetic stimuli 324 ( Fig. 4C-D). This suggests that mod-1-only animals can track the continued release of 325 serotonin, whereas ser-4-only animals cannot. These effects could not be explained as an 326 indirect consequence of different magnitudes of slowing, since these differences in decay rates 327 were consistent across several different NSM stimulation intensities that evoked different levels 328 of slowing. We also asked whether these differences observed in the quintuple mutants suggest that activation of different serotonin receptors drives different dynamical changes in 333 behavior.

334
The difference in the behavioral dynamics supported by mod-1 and ser-4 was especially 335 striking, suggesting that mod-1 conferred behavioral responses to continued NSM activation, while ser-4 only conferred responses to the onset (or high positive derivative) of NSM activation.

337
To more closely examine this, we compared these strains' behavioral responses to other 338 temporal patterns of NSM activation. A stimulation pattern with an immediate activation of examined responses to an NSM stimulation pattern with a slow, ramping onset that never 342 contained a high positive derivative. mod-1-only animals slowed in response to this optogenetic 343 stimulus. However, ser-4-only animals did not respond at all, further confirming that this receptor 344 only confers a response to a sharp increase in NSM activation (Fig. 4G).

345
We wanted to examine whether these findings generalize to natural stimuli that evoke 346 NSM activation and, more broadly, examine how mod-1 and ser-4 contribute to transient and persistent food-driven behavioral changes. Thus, we examined mutant animals' speed upon 348 bacterial food patch encounter, which leads to immediate and robust activation of NSM (  ser-4 induces slowing immediately after food encounter, but has no effect at later timepoints.

357
This also provides a qualitative match to the optogenetic results. Together, these data suggest 358 that mod-1 confers sustained behavioral responses to sustained NSM activation, while ser-4 359 confers responses to the onset of NSM activation. 360 mod-1 is a serotonin-gated chloride channel (a 5HT3 homolog) and ser-4 is a Gi/o-361 coupled G protein-coupled receptor (a 5HT1A homolog). Previous work has suggested that both 362 act in an inhibitory fashion (Olde and McCombie, 1997;Ranganathan et al., 2000). In principle, 363 the difference in the locomotion dynamics of the quintuple mutants with only mod-1 or ser-4 364 could be caused by differences in serotonin release dynamics (due to feedback to NSM, etc), 365 the molecular properties of the receptors, or the properties of the neurons where these inhibitory 366 receptors are expressed (for example, their extent of recurrent connectivity that could shape 367 neurons' ongoing dynamics). To distinguish among these possibilities, we first examined 368 whether altered serotonin release dynamics could explain these effects. If serotonin release 369 dynamics are different in these two mutants, then other NSM-induced behavioral changes 370 should also show different dynamics. We tested this by examining the dynamics of NSM-371 induced feeding behavior in mutant animals with mod-1 or ser-4 present (along with ser-7, the 372 serotonin receptor required for serotonin-induced feeding) (Hobson et al., 2006). The difference 373 in locomotion decay rates was still clearly evident when comparing mod-1/ser-7-only animals to 374 ser-4/ser-7-only animals (Fig. 4H). However, the dynamics of NSM-stimulated feeding behavior 375 were indistinguishable when comparing the two strains ( Fig. 4H; feeding behavior was not 376 saturated by NSM stimulation, as we found that these mutants with ser-7 intact pump at ~5Hz in We next tested whether these functional differences between mod-1 and ser-4 were due 381 to the different cell types in which they were expressed or, alternatively, their different molecular 382 properties. Given that they are both inhibitory receptors, we tested this by swapping their sites

389
matching the mod-1-only mutants and Pmod-1::mod-1 animals ( Fig. 4I-J). Thus, the functional 390 roles of the receptors tracked the promoter used, rather than the molecular identity of the 391 receptor being expressed. We note that the expression patterns of these promoters might only 392 partially recapitulate the native expression patterns of these genes. Nevertheless, these results 393 provide direct evidence that the sites of expression of these two receptors, rather than their

412
To determine the ground-truth identities of the fluorescently labeled neurons in each of 413 these six strains, we crossed the NeuroPAL transgene into each of the mNeonGreen reporter  (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint al., 2021), though there were differences (both cells detected via sequencing, but absent here; 427 and cells detected here, but absent in the sequencing data).
We performed several analyses on these expression data to examine how the serotonin 429 receptors were distributed across the connectome. First, we examined the similarity of the 430 expression patterns of the receptors. While each serotonin receptor was expressed in a unique 431 pattern, the level of overlap between the receptors was higher than expected by chance for 432 most of the pairs (Fig. 5D). This resulted in some individual neuron classes expressing as many 433 as five different serotonin receptor genes. Importantly, we used an identical strategy to construct T2A-mNeonGreen reporters for several other GPCRs (in the olfactory receptor gene family) that   (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint using a pan-neural promoter (tag-168) and found that this led to a full rescue of the locomotion 473 phenotype (Fig. 6B), indicating that Cre expression can successfully invert the mod-1 gene in 474 neurons and rescue mod-1 function.

475
We next performed cell-specific rescues in the majority of the mod-1-expressing 476 neurons, using a panel of Cre drivers that drive expression in unique sets of these neurons. We

496
The above results suggest that serotonin release from NSM activates several different 497 serotonin receptor types in distinct neuron classes to modulate locomotion. We next sought to 498 examine how NSM's ongoing activity was associated with changes in neural activity in these 499 distributed circuits. Therefore, we performed brain-wide calcium imaging in freely-moving 500 animals as they navigated to and encountered a food patch, a natural context in which NSM is 501 activated to modulate locomotion. For these recordings, we used a strain expressing NLS-  the animal centered in view as it freely moves. We used our recently-described automated data 510 processing pipelines to extract GCaMP traces and behavioral variables from these videos, 511 which we previously confirmed faithfully extracts calcium traces from single neurons over time 512 (Atanas et al., 2022). In addition, we previously recorded animals expressing pan-neuronal 513 NLS-GFP and NLS-mNeptune to estimate motion artifacts in data recorded on this imaging 514 platform and found that they are negligible (Atanas et al., 2022). Nevertheless, we use GFP 515 recordings to correct and control for any small motion artifacts in all analyses below (see 516 Methods). These tools allow us to record brain-wide activity and behavior as animals freely 517 navigate to and encounter a food patch.

518
. CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint We recorded data from seven animals over 16 minutes as they navigated towards and eventually encountered a bacterial food patch (Fig. 7A). Animals were fasted for three hours 520 prior to the recording in order to make the role of serotonin in behavioral control more prominent 521 (Rhoades et al., 2019;Sawin et al., 2000). As expected, animals abruptly slowed down upon sharply increased upon food encounter and it showed phasic bouts of activity while animals 525 moved and ate (Fig. 7B, bottom). We examined whether NSM's ongoing activity was correlated 526 with ongoing changes in speed, head bending, and feeding. To do so, we examined the 527 correlation of the NSM GCaMP signal to these behavioral variables when animals were on food.

528
We favored this approach over an analysis of all pre-and post-food-encounter time points, 529 because NSM is activated upon food encounter and an analysis across all time points would 530 inevitably lead to the conclusion that NSM is associated with all food-induced behaviors, even if 531 such relationships are not convincingly time-locked. Indeed, we found that NSM activity showed 532 a significant negative correlation with speed and the rate of head movement, indicating that 533 time-varying increases in NSM activity were associated with reduced speed and head 534 movement ( Fig. 7H; see Methods for a description of shuffle controls and statistics). NSM 535 activity was also frequently associated with increased feeding. This suggests that under our 536 recording conditions, animals display NSM-associated reductions in speed and head 537 movements and an increase in feeding when they encounter food.

538
We next examined brain-wide activity in these recordings (an example dataset is shown 539 in Fig. 7D). First, we determined the main modes of neural dynamics across all the recorded 540 neurons after animals encountered the food patch. We again restricted this analysis to the on-541 food time period to focus on the main modes of dynamics during ongoing serotonin release. We 542 used principal component analysis (PCA) to extract these main modes of dynamics (Fig. 7E). In 543 every dataset, one of the top three PCs (i.e. the axes of neural activity that explain the most 544 variance in activity across the neurons) was strongly correlated with NSM's activity (Fig. 7E). In 545 addition, in most animals, one of the other top three PCs was a close match to the derivative of 546 NSM's activity (Fig. 7E). This suggests that the activity of NSM, as well as the derivative of its 547 activity, are associated with a large portion of the variance in neural activity across the brain 548 when animals encounter food and begin feeding.

549
To characterize these widespread changes in brain activity more precisely, we examined

554
Therefore, we used the following approach to examine whether a given neuron had activity 555 dynamics associated with NSM. We convolved NSM's activity with a set of temporal filters that 556 could result in, at one extreme, NSM's original activity and, at the other extreme, a smoothened 557 and shifted version of NSM's activity (-/+ 10sec). For each neuron simultaneously recorded with 558 NSM, we asked which of these filtered NSM traces was most strongly correlated with it and 559 used an analysis of shuffle controls to test for significance (see Methods). Given that NSM's 560 derivative was a prominent mode of brain dynamics, we also performed a parallel analysis 561 where NSM's activity was convolved with filters that take its derivative (NSM activity was not 562 correlated with its own derivative, Fig. S7B-C). Across animals, 33% of the neurons that we 563 recorded showed a significant association with NSM and 21% showed a significant association 564 with its derivative (45 ± 9.1% of neurons were associated with NSM in at least one of these 565 manners). Neurons displayed positive or negative correlations with NSM, though negative 566 correlations were far more prevalent. The optimal kernels to explain the temporal relationships 567 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023.

574
We examined this set of NSM-associated neurons more closely. Specifically, we asked 575 which behavioral networks they participate in by examining how their activity encoded behavior 576 prior to NSM activation (i.e. during the pre-food-encounter time epoch; Fig. 7F, bottom). To 577 quantify this, we used our recently described modeling approach that can reveal whether a 578 given recorded neuron displays significant encoding of the animal's velocity, head curvature, or 579 feeding (Atanas et al., 2022). This analysis showed that neurons that encoded forward velocity 580 or head curvature prior to food encounter were significantly more likely to display activity that 581 was inversely correlated with NSM after food encounter (Fig. 7I), suggesting that increased 582 NSM activity was associated with inhibition of the networks that encode locomotion and head 583 bending.

585
Mapping NSM-associated brain dynamics onto the defined neuron classes of the C. 586 elegans connectome, and relating serotonin receptor expression to functional dynamics 587 Finally, we mapped out which exact neurons in the connectome showed functional 588 associations with NSM. To do so, we performed additional freely-moving brain-wide recordings 589 using the same microscopy platform. However, we used a strain expressing both the pan-590 neuronal GCaMP7f transgene and the multi-spectral NeuroPAL transgene described above (we 591 used otIs670, a low brightness integrant previously shown to be phenotypically wild type in 592 several respects). After the freely-moving recordings, we immobilized each animal and captured 593 multi-spectral fluorescence. We then used the NeuroPAL images to determine the ground-truth 594 identities of the imaged neurons and registered those images back to the freely-moving data.

595
This method, which we have described in detail recently (Atanas et al., 2022), allows us to 596 determine the identities of neurons recorded during freely-moving GCaMP imaging.

597
The results from the NeuroPAL recordings were consistent with our other brain-wide 598 recordings. NSM activity was significantly correlated with reduced speed and head movements 599 and a similar fraction of neurons was significantly associated with NSM (29% vs 33% above; 600 NSM derivative-associated neurons were slightly less prevalent, 9% vs 21% above). We (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint defined groups of neurons in the connectome in different ways.
Taking advantage of these datasets, we examined whether the serotonin receptor expression profiles of neurons could predict their functional correlations with NSM. Indeed, 618 neuron classes that were significantly associated with NSM were more likely to express at least 619 one serotonin receptor ( Fig. 8D; Fig. 8E, left). However, a considerable number of neurons did 620 not follow this rule: some neurons with no serotonin receptors were correlated to NSM and 621 some neurons that express serotonin receptors showed no significant correlation (Fig. 8A). We

628
We also asked whether information about the presynaptic inputs onto a neuron could 629 predict whether a neuron class was associated with NSM. Neurons with a higher fraction of 630 synaptic inputs coming from neurons that express serotonin receptors were not significantly 631 more likely to be associated with NSM than other neurons ( Fig. 8F-G). However, neurons were 632 significantly more likely to be associated to NSM when they had a higher fraction of synaptic 633 inputs coming from presynaptic partner neurons that were functionally associated with NSM 634 (Fig. 8H-I). This association was only significant for the set of neurons that did not themselves 635 express any serotonin receptors (Fig. 8I). This suggests that NSM-associated dynamics in 636 neurons that do not express serotonin receptors are inherited from their presynaptic inputs.

637
Taken together with the above analyses, these results indicate that NSM activity dynamics are 638 associated with widespread changes in brain activity that impact distinct behavioral circuits in 639 different ways, inhibiting the circuits that control movement and activating those that control 640 feeding. The serotonin receptor expression profiles of neurons within these circuits provide a 641 general prediction of how the circuit's activity will relate to NSM, but additional synaptic 642 interactions in the network further influence the overall activity patterns to give rise to the 643 widespread brain dynamics associated with NSM activity.

646
Serotonin signaling is critical for the control of behavior and cognition, but our 647 mechanistic understanding of how serotonin acts through diverse receptor types to alter brain 648 activity and behavior remains limited. Here, we examined this problem at brain-wide scale in the 649 C. elegans nervous system. We used a behavioral paradigm in which we activated NSM, a 650 feeding-responsive neuron whose extra-synaptic release of serotonin drives behavioral changes 651 associated with foraging, including slow movement and increased feeding. A comprehensive 652 genetic analysis revealed how the full set of serotonin receptors in this organism mediate the 653 effects of serotonin on behavior: one group of "driver" receptors induced slow locomotion upon 654 serotonin release and another group of receptors further modulated these behavioral changes.
655 Surprisingly, we found that different driver receptors supported different dynamical changes in (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint expression of the six receptors across the C. elegans nervous system. We performed brain-661 wide calcium imaging in freely-moving animals with knowledge of cellular identity during 662 serotonin release, providing, for the first time, a view of how serotonin release is associated with 663 changes in activity across the defined cell types of an animal's brain. This revealed that the sites 664 of serotonin receptor expression can partially predict how individual neurons change activity 665 during serotonin release, but the pervasive brain-wide activity changes that accompany 666 serotonin release extend far beyond these cells to others in the extensive networks that control 667 behavior. Overall, these results provide a global view of how serotonin acts on a diverse set of 668 receptors distributed across a connectome to modulate brain-wide activity and behavior.

669
We found that NSM serotonin release alters locomotion in a manner that depends on all

706
To examine the impact of serotonin on brain dynamics, we recorded native brain-wide 707 activity while animals encountered and ate bacterial food. This is a natural context where NSM 708 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint is activated to drive slow locomotion. We observed widespread brain dynamics across ~45% of the brain that was directly associated with time-varying changes in NSM activity or the derivative

726
Collectively, our observations suggest that even finer levels of resolution may be 727 necessary to fully understand serotonergic modulation of brain-wide activity and behavior. For      (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint were washed twice, then placed onto a 6 cm NGM plate with no bacterial lawn present. After 3 805 hours on this no-food plate, animals were washed twice and recorded immediately on the 10 cm 806 NGM plate with no food.

807
Streampix software was used to record animals at 3 fps. 625nm light illumination from a Mightex

814
To record multiple C. elegans motor programs, we used a previously described custom

850
. CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint Streampix software and the hardware described above were used to record animals at 3 fps for 851 1 hour. Videos were analyzed and data was plotted via custom MATLAB scripts.   (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint following manner. The model initially contained no interaction terms (just the six predictor terms 896 described above). We then asked whether interaction terms describing the joint presence of two 897 receptors (all 2-mer combinations were tested) could be justified based on the data. To do so, 898 we obtained model parameters for a model trained on 3 genotypes: the sextuple mutant and the 899 two quintuple mutants with each of the two receptors (for the 2-mer in question) present. We 900 then used these parameters to predict the level of slowing in the quadruple mutant with both 901 receptors present and compared this to the data from actual animals. If these two values were 902 significantly different (assessed with empirical p-value that the difference was non-zero), then 903 the presence of an interaction term was justified and it was added to the model. If they were not 904 significantly different, no interaction term was added to the model. After all 2-mers were 905 evaluated, they were added to the model and included in a similar analysis to test whether 906 addition of 3-mer interaction terms could be justified (i.e., this evaluation was based on a model 907 that already included the necessary 2-mer interaction terms, and asked whether beyond those 908 any 3-mer interaction terms also needed to be added). This was iterated again for 4-mers. This

962
Each SWF702 animal was starved for 1.5-2 hours before the mounting procedure. E.

963
coli OP50 was spread evenly to form a circular lawn of 0.5 cm diameter, and the animal was 964 mounted at the center of the food lawn. Imaging was performed immediately after the mounting 965 procedure to capture the initial phase of food-induced neural activity.

966
Data processing. Whole-brain GCaMP/mNeptune data were processed into normalized 967 calcium traces using the Automated Neuron Tracking System for Unconstrained Nematodes 968 (ANTSUN) data processing pipeline that we have previously described (Atanas et al., 2022).

969
Briefly, this software package uses the mNeptune signal to identify the neurons in all frames 970 and to register volumes from different time points to one another. The end result is a 971 Fluorescence (F) measurement for each neuron, which is the ratio of GCaMP7F signal divided 972 by mNeptune2.5 signal for that neuron. Behavioral data were extracted from the NIR videos 973 using previously described methods.

974
Procedure for neuroPAL imaging. NeuroPAL recording procedures were carried out 975 as previously described. Briefly, animals were imaged as described above, but they were 976 subsequently immobilized by cooling, after which multi-spectral information was captured. A 977 closed-loop temperature controller (TEC200C, Thorlabs) with a micro-thermistor (SC30F103A, 978 Amphenol) embedded in the agar was used to keep the agar temperature at the 1 °C set point.

979
We then captured a series of images necessary for NeuroPAL-based neural identification:

1009
Whole-brain calcium imaging data analysis dynamics in our recordings, we performed PCA on our neural datasets. To do so, we used the 1012 F/F20 GCaMP traces and performed PCA on all traces from a given recording using the post-1013 food-encounter time epoch. Analyzing the full datasets (pre-and post-food-encounter) gave rise 1014 to qualitatively similar results, but it was more obvious that the PCs arising from that analysis 1015 would be related to NSM, which is activated by feeding. By performing the analysis on only were related to NSM activity. To relate the resulting principal components to NSM, we 1018 performed the analysis described below for single neurons. However, instead of relating NSM to another's neuron's GCaMP signal, we correlated NSM activity to each principal component that 1020 explained >2% of the overall variance in neural activity.

1021
Statistical procedure to determine how NSM activity is associated with behavior.

1022
For each brain-wide recording, we examined whether NSM activity was associated with ongoing 1023 behavioral changes. Here, we focused on the relationship between NSM and behavior only in 1024 the post-food-encounter time epoch. This is because NSM is activated by feeding and analyzing 1025 all data (pre-and post-food-encounter) could potentially lead to the spurious conclusion that 1026 NSM is correlated with all feeding-induced behaviors, even when the time-locked association is 1027 weak. By focusing on the post-food-encounter-time epoch, we were able to ask whether 1028 ongoing changes in NSM activity were precisely associated with ongoing behavioral changes.

1029
We examined NSM's relationship to five behavioral variables: velocity, speed, head curvature,  (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint <5% of neurons were significant for these analyses (vs 44.9% in actual analyses). All statistical analyses of the whole-brain imaging data were performed using Julia 1.8.0.
Determining the encoding properties of recorded neurons. For many of our recordings, it was of interest to determine how each recorded neuron "encoded" behavior.
behavior. To perform this analysis, we used a previously-described statistical method (Atanas et is also described here. Briefly, we attempted to fit each recorded neuron with a probabilistic encoding model that attempts to use behavioral predictor terms (for velocity, movement 1103 direction, head curvature, and feeding) to describe the neuron's activity. The form of the model 1104 allows neurons to encode behavior over varying timescales and potentially represent multiple 1105 behaviors. We fit the model using the probabilistic computing so that we can determine the full 1106 posterior distribution of model parameters that could explain the neural/behavioral data. This 1107 allows us to establish our confidence in a given model parameter, for example the parameter 1108 that explains how much the neuron's activity reflects head curvature. Finally, we use these 1109 posterior distributions to test for significance. In this study, we asked whether each neuron

1118
. CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint to modulate food-seeking behavior. eLife 11, e79557.
Structural and developmental principles of neuropil assembly in C. elegans. Nature 591, 1272 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint                  (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint  (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint

1514
. CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made     . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made

1577
Feeding is omitted because there were not a sufficient number of neurons detected to warrant 1578 meaningful analysis (Note: this is not due to there being no feeding; it is because the variance in 1579 feeding behavior during pre-food-encounter was extremely low. Because feeding was at a 1580 nearly constant rate over time, the encoding model had no way to distinguish whether a given 1581 neuron encoded feeding).

1582
. CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint Figure 8 1584 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint

1625
. CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint  (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint Note that baseline speeds are not significantly different from one another. n=45-496 animals per 1683 genotype. Data are shown as means ± standard deviation.

1684
. CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023.

1748
***p<0.001, two-sided Wilcoxon rank sum test between the indicated groups over the 1749 indicated time ranges. 1750 . CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023.

1758
. CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint each serotonin receptor gene. For each reporter line, we show the fraction of animals where 1761 each mNeonGreen was detected in each cell. Cells that are not listed had 0% detected.

1763
. CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint

1796
. CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint again, but they are overlaid with NSM that has been convolved with a differentiator kernel (i.e.

1800
showing NSM derivative) so that this relationship can be more easily inspected. Note that the 1801 differentiator kernel on the right has a flipped sign, so that the black trace is basically the inverse (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint

1827
. CC-BY 4.0 International license available under a (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint this version posted January 18, 2023. ; https://doi.org/10.1101/2023.01.15.524132 doi: bioRxiv preprint