The geometry of decision-making

Choosing among spatially-distributed options is a central challenge for animals, from deciding among alternative potential food sources or refuges, to choosing with whom to associate. Using an integrated theoretical and experimental approach (employing immersive virtual reality), we consider the interplay between movement and vectorial integration during decision-making regarding two, or more, options in space. In computational models of this process we reveal the occurrence of spontaneous and abrupt “critical” transitions (associated with specific geometrical relationships) whereby organisms spontaneously switch from averaging vectorial information among, to suddenly excluding one, among the remaining options. This bifurcation process repeats until only one option—the one ultimately selected—remains. Thus we predict that the brain repeatedly breaks multi-choice decisions into a series of binary decisions in space-time. Experiments with fruit flies, desert locusts, and larval zebrafish reveal that they exhibit these same bifurcations, demonstrating that across taxa and ecological context, there exist fundamental geometric principles that are essential to explain how, and why, animals move the way they do.

through a window of space (corresponding to the critical angle for the respective geometry they 151 are experiencing) in which their brain spontaneously becomes capable of discriminating 152 between very small differences between options (e.g. a very small difference in neuronal 153 activity being in 'favor' of one option; see Fig. S3D and SI Appendix for details). This highly-154 valuable property (for decision-making) is not built into the model, but is rather an emergent 155 property of the inherent collective dynamics. 156 157 In many real biological systems, including the ones we consider here, the (neural) system size 158 is typically not large enough to consider true phase transitions (which only occur for very large 159 systems, as per the mean-field approximation), but rather 'phase-transition-like', or 'quasi-160 phase transition', behavior. Even though real biological systems are not necessarily close to the 161 infinite size limit of the mean-field approximation, we see very similar dynamics for both small 162 and large system sizes (Fig. S6). 163 164 Decision-making beyond two options 165 While the majority of decision-making studies consider only two options (due to both 166 theoretical and experimental tractability (14, 25, 26)), animals moving in real space frequently 167 encounter a greater number than this. Here we consider how animals will be expected to select 168 among three, or more, options (possible targets) in space. First we begin with three identical 169 options ( 1 = 2 = 3 ) since this gives us the clearest insight into the relationship between 170 motion and decision-making dynamics. Then we relax these assumptions and consider 171 differences between options (Fig. S3E) as well as a greater number of options (Fig. 2). Note 172 that we do not modify our model in any way prior to introducing these additional complexities. 173 that the direction in which the animal moves is a function of the angular difference between 176 the targets. When relatively far from the targets, it moves in the average of these three 177 directions. Upon reaching a critical angular threshold between the leftmost and rightmost 178 option (from the animal's perspective), however, the neural system spontaneously eliminates 179 one of them and the animal begins moving in the direction average between the two remaining 180 options (Fig. 1D,E). It continues in this direction until a second critical angle is reached, and 181 now the animal eliminates one of the two remaining options and moves towards the only 182 remaining target (Figs. 1F and S5B). Thus we predict that the brain repeatedly breaks multi-183 choice decisions into a series of binary decisions in space-time. Such bifurcation dynamics are 184 not captured in models of decision-making that do not include the required feedbacks, such as 185 if individuals simply sum noisy vectors (or PDFs) to targets in their sensory field (19). For the 186 case of three targets, vectors/votes to the leftmost option would tend to cancel those that favor 187 the rightmost option, resulting in the selection of the central option, an issue we will return to 188 later when considering collective animal behavior. Simulating a larger number of options (Fig.  189 2) and varying environmental geometries (Figs. S8 and S9) demonstrate the robustness of this 190 mechanism in the face of environmental complexity and the more complex spatial dynamics 191 that emerge as organisms undergo repeated bifurcations. 192

194
Since the decision-process is predicted to be sequential, and dependent on the geometry with 195 respect to the targets from an egocentric perspective, it should be possible to visualize it directly 196 from the trajectories taken by animals when making spatial decisions. In this respect, our 197 theoretical studies make a key testable prediction: if neural groups within the decision-making 198 ensemble exhibit relatively local excitation, and long-range/global inhibition, we should observe bifurcations in the animals' trajectories as they choose among identical options; and 200 that if animals face three (or more) such options, then the complex decision task should be 201 broken down to a series of binary decisions. identical black pillars as targets in an otherwise white environment. We record trajectories of 214 our focal animals (solitary flies or locusts) as they choose to move towards one of these pillars, 215 thus obtaining a behavioral readout of the decision-making process (see SI Appendix for 216 experimental details; Figs. S11 and S12 show raw trajectories of flies and locusts respectively). 217

218
As predicted by our theory (Fig. 1B,C), we find that, in the two-choice case, most flies and 219 locusts that choose one of the presented targets initially move in the average of the egocentric 220 target directions until a critical angular difference (Fig. S13), at which point they select 221 (randomly) one, or the other, option and move towards it (randomization test where 222 −coordinates between trajectories were swapped showed that the bifurcation fit to our 223 experimental data was highly significant; < 0.01 for both flies and locusts; Figs. 1G and 224 S13). Here, we note that there may be multiple factors that affect the animals' direction of 225 movement. For example, it could be that animals repeatedly switch between fixating on each 226 of the two options before reaching the critical angular difference, following which it selects 227 one. However, quantification of their heading relative to the targets, and to the average 228 direction between the targets (Fig. S13), finds no evidence for this; instead, prior to the 229 bifurcation, both flies and locusts exhibit a heading towards the average of the egocentric target 230 directions. In the three-choice case, the animals' movements are also consistent with our 231 theory; as predicted ( Fig. 1E,F) they break the three-choice decision into two sequential binary 232 decisions ( < 10 −4 for both flies and locusts; Fig. 1H). For both animals, the observed angle 233 of bifurcation (~110° for flies and ~90° for locusts) is much larger than their visual spatial 234 resolution (~8° and ~2° for flies (34) and locusts (35, 36), respectively). We note ~30% of 235 animals in our experiments (both flies and locusts) did not exhibit the sequential bifurcations 236 (see Figs. S11 and S12) described above, and instead moved directly towards one of the 237 presented targets (Figs. S11 and S12). Such variability in response is expected in animals, and 238 is consistent with recent work on the visual response of flies, which demonstrates a link 239 between stochastic (non-heritable) variation in brain wiring within the visual system and 240 strength of visual orientation response to a vertical stripe target (37). Furthermore, flies that 241 experience high temperatures during development appear to exhibit a particularly strong 242 orientation tendency, exhibiting the most direct paths to targets while flies that experience low 243 developmental temperatures exhibit wandering paths to targets (38). In our model such 244 differences can be accounted for by variation in directional tuning of the neural groups, with 245 high directional tuning (low ) being associated with a strong orientational response, and such 246 individuals exhibiting direct tracks to targets from the outset (see Fig. S14). 247 For example, in (39), it was shown that approximately 25% of Drosophila were either strongly 250 left-biased or right-biased when moving on a Y-maze, and that these consistent differences 251 among flies were similarly non-heritable. This experimental design did not assess whether a 252 further subset are biased to go directly forwards if offered three directional choices (such as 253 could occur in a hypothetical Ψ maze). In such cases, it is certainly possible that these intrinsic 254 directional biases break symmetry (Fig. S3D,E), resulting in directed paths to different targets. 255

256
We note that individuals predisposed to exhibit direct paths to targets would be expected to 257 make faster, yet less accurate, decisions, a prediction we plan to test in future studies. 258

259
Our zebrafish experiments consider spatial decision-making in a social context. We present 260 virtual conspecifics (see SI Appendix for methodological details) that move back-and-forth in 261 the arena parallel to each other as targets (Figs. 3A and S15A) and behave (Fig. S16), and are 262 responded to (Fig. S17), in the same way as real fish. Because they are social, the real fish 263 respond to these virtual fish by tending to follow at a (relatively) fixed distance behind them 264 (Fig. S15E). Our data are best represented within this moving frame of reference (the virtual 265 fish; Fig. S15). Theoretically we predict that for two virtual fish we should see a single 266 bifurcation, where the real fish will suddenly switch from averaging the target directions to 267 deciding among them (i.e. swimming predominantly with one of the virtual fish), as a function 268 of increasing the lateral distance, , between the virtual fish (Figs. 3B and S18; see SI Appendix 269 for details of model implementation). The existence of this bifurcation is clearly seen in our 270 experiments (Fig. 3C). When considering three moving virtual conspecifics, the model predicts 271 that real fish will spontaneously break the three-choice decision to two binary decisions, and a 272 comparison of the theoretical prediction and experimental results demonstrates this to be the 273 case (c.f. Fig. 3E,F). 274

275
We also test predictions under conditions where there is an asymmetric geometry whereby two 276 fish swim closer to each other than the central one does to the third fish (Fig. 4A). As predicted 277 by our theory (Fig. 4B), the real fish tends to swim between the two closely-associated fish, or 278 close to the third, more distant, fish (Fig. 4B). Note that, also as predicted, the real fish spends There are key features that are essential to produce the bifurcation patterns observed in our data 289 i.e. for any decision-making system to break multi-choice decisions to a series of binary 290

decisions. 291
• Feedback processes that provide the system directional persistence, and drive such 292 bifurcations, are crucial to exhibit the observed spatio-temporal dynamics. In the neural 293 system, this is present in the form of local excitation and long-range/global inhibition 294 (7, 16, 17). However, as shown in our model of collective animal behavior below, we 295 expect that similar dynamics will be observed if the necessary feedbacks are also 296 incorporated into other models of decision-making, such as to PDF-sum-based models, 297 for example (19). 298 • Observing similar decision dynamics requires a recursive (embodied) interplay 299 between neural dynamics, and motion in continuous space. Here, the animal's 300 geometrical relationship with the targets changes as it moves through physical space. We demonstrate here, however, that while ubiquitous, such models of collective animal 326 behavior fail to account for the known capability for animal groups to make decisions among 327 spatially discrete targets (see Fig. S19A,B). To do so, it is essential that the necessary 328 feedbacks, as described above for collective decision-making among neurons, are incorporated. 329 While these feedbacks are inherent to our neural model, they can also be included in other 330 models in the form of social interactions, or in the animals' response to their environment (51). travel (a form of longer-range inhibition between informed subsets). However, because 339 'uninformed' individuals tend to average the direction of all 'informed' individuals that recruit 340 them, we find that this type of feedback functions more as a social glue, and is only able to 341 explain bifurcations when the group is choosing between two options. In a decision-making 342 context with three options, this type of feedback, alone, results in the group almost always 343 moving towards the central target (Fig. S19D). 344

A means of resolving this issue is for individuals to change the strength of their goal-346
orientedness as a function of their experienced travel direction; for example, individuals that 347 find themselves consistently moving in a (group) direction that differs from their preferred 348 target direction could weaken the strength of their preference over time (a form of 349 forgetting/negative feedback, effectively resulting in long-range/global inhibition; and once 350 this preference is lost, they will tend to spontaneously reinforce the majority-selected direction 351 (45), a form of positive feedback). We find that this biologically-plausible mechanism (40) will 352 allow individuals within the group to recover the capability to come to consensus even in the 353 absence of uninformed individuals (Fig. 5), and for a greater number of options than two (Fig.  354   5B).

368
We demonstrate that, across taxa and contexts, explicitly considering the time-varying 369 geometry during spatial decision-making provides new insights that are essential to understand how, and why, animals move the way they do. The features revealed here are highly robust, 371 and we predict that they occur in decision-making processes across various scales of biological 372 organization, from individuals to animal collectives (see Figs. 5 and S19, and SI Appendix), 373 suggesting they are fundamental features of spatiotemporal computation.

508
We construct a simple, spatially-explicit model of neural decision-making to study how the 509 brain reduces choice in the presence of numerous spatial options (adapted from (52)). 510 Theoretical predictions obtained were then tested experimentally by exposing invertebrate 511 In our model, the brain is composed of individual components, called "spins", that, collectively, 527 as a "spin system", represent neural activity. Spin systems, which have been long-studied in 528 physics due to their ability to give insight into a wide range of collective phenomena, from 529 magnetic to quantum systems (56), were first introduced in the study of neurobiology by underlying unsupervised learning and associative memory. In its simplest (and most common) 532 formulation, as in Hopfield networks, a spin system is comprised of entities, spins, that can 533 each be in state 0 or 1, or in the terminology of physics either 'up' or 'down'. Spin systems 534 have consistently provided deep insights into complex collective phenomena, from spin and 535 molecular systems, to neural systems, undergoing phase transitions (58, 59) (see SI Appendix 536 for details and discussion). 537 538 Here, the animal's brain is characterized by a system of $N$ spins. Each spin $i$ encodes 539 direction to one of the presented goals $\hat{p}_i$, and exists in one of two states: 540 $\sigma_i=0$ or $\sigma_i=1$. We do not imply that a spin is equivalent to a neuron, but 541 rather, as we show via a mathematical derivation, that the collective properties of interacting 542 spins in our model is equivalent to the firing rate in the neural ring attractor model (see SI 543 Appendix for details). Consequently, we refer to the individual components with which we 544 model our system as "spins", and "neural activity" as a term to represent this "firing rate" 545 equivalent. The energy of the system (for any given configuration) is given by its Hamiltonian, 546 . 547 where, is the number of options available to the individual and is the interaction strength 549 between neurons and . Here, is given by 550 where, is the angle between preferred directions of neurons and , and represents the 552 neural tuning parameter. For = 1, the interactions become "cosine-shaped" = cos( ), 553 and the network has a Euclidean representation of space (Fig. S1). For < 1, the network has 554 more local excitation and encodes space in a non-Euclidean manner (Fig. S1). System Experiments were conducted in a flyVR setup procured from loopbio GmbH. 60 tethered 575 Drosophila melanogaster were exposed to either a two-choice or a three-choice decision task 576 (30 and 30 individuals, respectively) in the virtual reality environment. Each experimental trial lasted 15 min where flies were exposed to five sets of stimuli-three experimental sets and two 578 control sets. The experimental stimuli sets consisted of two or three black cylinders (depending 579 on the experimental condition) that were presented to the animal in an otherwise white 580 environment. A control stimulus with a single pillar was presented before and after the 581 experimental conditions. We rotated all trajectories such that the −axis points from the 582 origin, to the centre of mass of the targets. To visualise trajectories in the various experimental 583 conditions, we created time-normalised (proportion of maximum across a sliding time window) 584 density maps. We then folded the data about the line of symmetry, = 0 and applied a density 585 threshold to the time-normalised density map. A piecewise phase transition function was then 586 fit to quantify the bifurcation. 587 where is the critical point, is the critical exponent, and is the proportionality constant. 589 We also performed randomisation tests for each bifurcation where we conducted the exact fit 590 procedure described above to data where the trajectories were randomised by keeping the -591 coordinates, and swapping the -coordinates with values from other random events. 592 Randomizations show that the resultant fit to our experimental data were highly significant 593 ( < 0.01 for binary choice and < 10 −4 for the three-choice case). 594 595 Based on the amount of time it took flies to reach one of the available targets, we also classified 596 individual fly tracks into one of two categories-direct tracks and non-direct tracks (60) (see 597