## ABSTRACT

Several organisms, from slime molds to humans, are known to violate normative principles of economic rationality in decision making. In animals, the neural circuitry underlying behaviors that violate or conform to normative rationality is relatively poorly understood. We investigated whether zebrafish, a model organism with a strong suite of functional neuroimaging and genetic manipulation tools, showed rational behavior with respect to the principle of the Independence of Irrelevant Alternatives (IIA). We examined IIA in social decision making by measuring revealed preferences from spatial trajectories of freely swimming individual zebrafish in an arena where they could view and perform shoaling behavior near conspecific zebrafish in adjacent display tanks. IIA was tested in terms of the invariance of shoaling choices between binary and ternary sets of various display fish group sizes. We provide the first report of evidence for violation of IIA in zebrafish, both in terms of the constant ratio rule and in terms of the principle of regularity. This also is a rare example of violation of rationality in a single attribute dimension, and it opens up a range of possibilities to study the neural basis of context dependent decision making.

## Introduction

The normative principles of economic rationality define individuals as behaving rationally when they make consistent choices that maximize their utility. Such consistent choices can be represented through a stable ordinal utility function that maximizes ‘expected utility’, from which axiomatic principles of transitivity and independence of irrelevant alternatives (IIA) follow^{1}. Transitivity is complied with if in a choice set of A, B and C, an individual who has a stable preference of A over B, and B over C, always prefers A over C. IIA refers to the consistency of preference of A over B regardless of the presence of other items in the choice set^{2}. Specifically, Luce’s choice axiom of constant ratios IIA(L) is upheld when the ratio of the probabilities of choosing A and B in the choice set A,B remains constant even with a larger choice set A,B,C^{3}. Another specific derivative principle of IIA, the principle of regularity, is met when the addition of an alternative to the choice set does not increase the absolute preference for any existing option^{4,5}.

Choices made by behavioral agents can be tested for whether they meet the conditions of these axiomatic principles. If so, these agents would be considered rational relative to each operationalized definition of rationality. Tests suggest transitivity and IIA are violated by humans^{6–8} and several other animals^{9–12}. These violations of rationality largely stem from the context dependence of decision making and suggest that the brain may calculate value relative to context, or through a process of comparison between choice attributes across available options^{13}. Models of value-first decision making, on the other hand, posit an absolute, context independent process of valuation underlying rational choices, where choice attributes have stable values represented in a cognitive utility scale^{13}. Dynamic models of decision making, where option valuation, comparison and decision formation are dynamic and intertwined, have accounted for several context effects^{14–16}.

IIA refers to one specific aspect of context that can change preferences between two options: the availability of further options - known as distractors or decoys - in the choice set. These context effects are largely reported in studies where the options differ in two or more attribute dimensions with decoy asymmetrically placed such that its effect dominates relative to one of the attributes, which might result in context specific interactions between the psychophysical value functions of the attributes^{4,5,9,10,17–23}. Decoy effects of various kinds: for example, the commonly reported attraction effect, the similarity effect, and the compromise effect, have been reported in multi-attribute human^{8} and animal^{5} studies where the two main choice options are on an iso-preference line relative to at least two attributes that trade-off. The attraction effect describes the phenomenon where a decoy that is slightly inferior to one of the option values enhances the relative preference for that option^{24}; while the similarity effect describes the opposite phenomenon when a decoy reduces the relative preference for the option to which it is most similar^{25}. The compromise effect is seen when the decoy has an extreme value and therefore enhances the preference for the option which represents a compromise between the decoy and the competitor^{26}.

More comprehensive work on integrating these decoy effects into a single model^{8,27} suggests that the effect of a decoy on changing the relative accuracy of choice of the more highly valued of two options depends both on the value of the decoy relative to those two options, as well as the task difficulty: the gap between the values of these two options^{27}. Studies suggest that the relative accuracy of choosing the more highly valued of two options decreases with increasing decoy value, consistent with a divisive normalization model where the neural activity encoding a stimulus is modulated based on the values of other stimuli encoded by the pooled activity of neurons contributing to the spatiotemporal receptive field^{12,28–31}. Other studies suggest that increasing the value of the decoy improves choice accuracy^{28}, consistent with a biophysical cortical attractor model based on the competing representation of the values of the two options in a neural network, with larger decoys strongly activating a common pool of inhibitory interneurons which in turn have a larger inhibitory effect on neurons representing the smaller valued option^{28}. Some of these results have not been replicated and a third model of value-based attentional capture has been posited instead, where the decoy distracts from the two options and reduces absolute, if not relative choice accuracy^{32}. Another explanation for these different effects is a model incorporating neural imaging data that suggests that different models might operate in different parts of the brain - divisive normalization in the intraparietal sulcus but not in the ventromedial prefrontal cortex, with both decision making processes running in parallel to produce different decoy effects in different regions of decision space^{28}.

The neural computations underlying behaviors that conform to and violate rationality are best studied in systems that enable large scale, high-resolution neural recordings, and genetic manipulations. So far, IIA has been only investigated in two model organisms: mice^{18} and *C. elegans*^{33}. We report a violation of rationality for the first time in zebrafish - a larger, more complex vertebrate model system than *C. elegans* that is likewise equipped with neural imaging and electrophysiological tools, and amenable to genetic and pharmacological manipulation. This is crucial in order to understand the neural basis of context-dependent decision making.

The behavior in which we investigate IIA is shoal size choice. Very few studies have investigated decoy effects with the two options varying with respect to a single attribute, and these have revealed that different decoy effects may be seen with different attributes^{10,18,34}. A number of fish species show preferences for larger shoal sizes^{35–40}. Shoal size decisions are usually attributed to numerical competence and have been reported to follow Weber’s law i.e. the perceived difference between shoal size sets, or numerical sets in general, is represented on a log scale rather than linearly^{39,41,42}. Reding & Cummings (2019) investigated rationality in shoal size decision making relative to the use of a decoy in mosquitofish and reported no IIA violations. In the present study, we investigate decoy effects in adult zebrafish (*Danio rerio*) using a shoal size choice behavioral task design adapted from Reding & Cummings (2019)^{43}.

## Results

### Change in relative preference and absolute preference at the population level

We presented 2 shoal size choice sets in a randomized counterbalanced sequence to the focal fish in the central arena - one display group of 4 fish versus another of 2 fish, and another set comparing 6 fish to 3; and for each set, we used a single fish as the decoy for trichotomous choices. The focal fish was tracked using the DeepLabCut pose estimation software^{44} for a period of 5 minutes, and the time spent in each sector was quantified using the fish’s trajectory data. Based on the time spent in each zone in initial trials with no display fish, we concluded that there was no zone bias of the focal fish in the set up (Supplementary Figure S1).

We found a shift in the population level relative preference in the presence of a decoy, violating the principle of rationality. The population level relative preference for the larger shoal did not significantly depart from random chance (0.5) for the dichotomous presentation, but shifted to being statistically significantly above chance for the trichotomous presentation with a decoy shoal set size of 1 fish, for both the shoal choice size sets used: 4 versus 2 and 6 versus 3 (Figure 2 A B ; 4 versus 2: dichotomous: Mean = 0.55, SD = 0.19; one sample t-test: t = 1.5148, p-value = 0.1419, n = 27; trichotomous: Mean = 0.59, SD = 0.17; one sample t-test: t = 2.6366, p-value = **0.013**, n = 27. 6 versus 3: dichotomous: Mean = 0.56, SD = 0.16; one sample t-test: t = 1.7336, p-value = 0.0958, n = 25; trichotomous: Mean = 0.60, SD = 0.15; one sample t-test: t = 3.7236, p-value = **0.001**, n = 25). In all cases there was a considerable spread of the preferences of individual fish preferences in the dichotomous presentations, rendering a nonsignificant departure away from chance, and rendering a nonsignificant difference between the population level preference in a direct comparison of the preference shift between the dichotomous and trichotomous trials using a paired t-test (4 versus 2 : t = -0.80483, p-value = 0.42, n = 27; 6 versus 3 : t = -1.2477, p-value = 0.2242, n = 25).

An analysis of the proportion of time spent in each sector also reveals a violation of the principle of regularity. As expected, fish spent significantly more time in the decoy+empty sectors in the trichotomous trials in both 4 versus 2-decoy 1 (paired t-test: t = -2.9656, p-value = **0.006397**, n=27) and 6 versus 3-decoy 1 (paired t-test: t = -3.8689, p-value = **0.0007333**, n=25) choice sets. The introduction of the decoy significantly reduced the absolute time spent shoaling in the dichotomous shoal choice sectors taken together, but this consisted of a nonsignificant but large decrease in the time spent in the sector with the smaller display fish shoal size (2 or 3) (paired t-test; 4 versus 2-1: t = 1.6937, p-value = 0.1023, n = 27; 6 versus 3-1: t = 1.208, p-value = 0.2388, n = 25), and a slight nonsignificant increase in the proportion of time spent with the larger group (4 or 6) in the presence of the decoy (paired t-test ; 4 versus 2-1: t = -0.37863, p-value = 0.708, n = 27; 6 versus 3-1: t = -0.15226, p-value = 0.8803, n = 25), for both shoal size sets of 4 versus 2-decoy 1 and 6 versus 3-decoy 1 (Figure 2 C and D). The increase in the mean proportion of time spent with the larger shoal with the introduction of the decoy violates the principle of regularity. The fish spent a similar amount of time investigating the smaller shoal and the decoy during trichotomous choices(4 versus 2-decoy 1: Proportion of time with 2 = 0.23 ± 0.09, Proportion of time with 1: 0.24 ± 0.10; 6 versus 3-decoy 1: Proportion of time with 3 0.22 ± 0.07, Proportion of time with 1: 0.22 ± 0.08)

### Relative preference and absolute preference at the individual level

At an individual level, some fish display rational behavior while others display choice reversal: the addition of the decoy reversed the relative preference for a larger shoal. The individual fish whose data fall along the inclined line of a plot of the preference index for the larger shoal in the trichotomous choice set against the same preference index in the dichotomous choice set, display rational choice consistency (Figure 3. A and B). The individual fish in the top left quadrant showed a choice reversal from preferring the smaller shoal in dichotomous choices to the larger shoal in the presence of the decoy, outnumbering those in the bottom right quadrant which showed a choice reversal towards preferring the smaller shoal in trichotomous choices.

In the 6 versus 3-decoy 1 choice set, the choice reversals were mostly in the direction of preferring the larger shoal in the presence of the decoy (top left quadrant; 7 out of 10 choice reversals i.e., 70%). In the 4 versus 2-decoy 1 choice set the choice reversals were in both directions (6 out of 11 choice reversals i.e., 54%). The opposite choice reversals i.e., switching from choosing the larger shoal to the smaller shoal, were also observed, more in the 4 versus 2-decoy 1 than the 6 versus 3-decoy 1 choice sets.

In the ternary overlay of individual changes in the proportion of time allocation to each sector, this is visible as a shift in the density of points towards the larger shoal–decoy axis in both 4 versus 2-decoy 1 and 6 versus 3-decoy 1 choice sets (Figure 3. C D). Fish that spent more time shoaling with the smaller shoal in the dichotomous choice trials in both the sets, showed a shift towards the decoy in the trichotomous choice set. The point density cloud in the trichotomous choice trials was most dense near the smaller shoal-decoy indifference region with a few points near the larger shoal (6 and 3) time allocation region (Figure 3. C D).

The fact that the fish with a weaker preference index for the larger shoal spent more time with the decoy also manifests as a significant negative correlation between the relative preference index for the larger shoal size of 4 in the trichotomous condition and the proportion of time spent in decoy+empty zone (Figure 3. E; R = -0.51, p-value = **0.0067**). There was only a weak negative relationship between the preference index and the proportion of time allocated in decoy+empty zones for the larger shoal size of 6 (Figure 3. F; R = -0.23, p-value = 0.25). This indicates that fish that show a strong relative preference for four or six in trichotomous choices also spend relatively less time investigating the decoy.

### Trajectory density analysis

We rotated and overlapped the individual trajectories of fish during the shoaling period along the 4 versus 2 and 6 versus 3 choice axis to produce Kernel density estimation (KDE) based density plots to infer the probability density underlying the position trajectory data of fish.

We found support for the existence of a decoy effect in both the 4 versus 2 (Figure 4 A and B) and 6 versus 3 (Figure 4 C and D) trichotomous choice sets with a decoy of 1 fish. With the introduction of the decoy fish, we observed a dampening of density around the smaller shoal size (2 and 3) without any effect on the density near the larger shoals (4 and 6). We performed a Kernel density-based location two-sample test to find locally significant differences in regions of density space using the *kde*.*loct*.*test* of the R package *ks:kernel smoothing*. The trajectory region facing the smaller shoals (2 and 3, respectively, in the two choice sets) was the major region that was significantly different in the two distributions (Figure 4. Red region in E and F). This supported our previous results of finding a dampening of the preference of the smaller shoal in the trichotomous choices. The violation of regularity was also statistically upheld, with a significant increase in the time spent in the region on the periphery facing the larger-sized shoal in the trichotomous condition (Figure 4. Green region in E and F).

Individual trajectory probability density plots for these fish using the kernel density estimation approach revealed several instances of fish demonstrating choice reversal in the preference between the larger and the smaller shoal sizes upon introducing the decoy fish in trichotomous trials as compared to dichotomous trials in both the 4 versus 2-decoy 1 and 6 versus 3-decoy 1 choice sets (Supplementary Figure S2 and S3).

### Repeatability analysis of change in relative preference at the individual level

We tested whether the similarity in the decoy effect seen at the population level in both the 4 versus 2 and 6 versus 3 choice sets is reflected in repeatability at the level of individual performance. We compared the difference of the preference Index for the larger shoal between dichotomous and trichotomous trials (D-T) for the same set of fish across the two choice sets (4 versus 2-decoy 1 and 6 versus 3-decoy 1) using a Pearson correlation test. We failed to find any significant correlation when comparing 4 versus 2-1 and 6 versus 3-1 choice trials for the same set of fish (Figure 5A; R= -0.026, p = 0.9). We also estimated repeatability using a linear mixed effect-based approach where repeatability R is calculated as the fractional group-level variance relative to the sum of variance from the group-level and population-level and found no significant or sizeable estimate of R using parametric bootstrapping (Figure 5B).

### Temporal effect of decoy on the relative preference

We calculated the preference index for each 30-second time bin (10 bins of 30 seconds each of total 5 min videos) for both dichotomous and trichotomous shoal choice sets for each of the 4 versus 2-decoy 1 and 6 versus 3-decoy 1 cases to observe the way the decision between shoal size sets varied over time.

We performed a linear mixed effect analysis of the relationship between preference index and time bin and choice set type (dichotomous versus trichotomous), with Bin, Choice set, and Interaction of Bin and Choice set as fixed effects and the Fish ID as a random effect. Results showed no significant main effect of the Choice set in the 4 versus 2-decoy 1 (Supplementary Table 1, Choice set: estimate = 0.45, CI = -0.00 -0.29, p = 0.05) or 6 versus 3-decoy 1 choice set (Supplementary Table 2, Choice set: 0.05, CI = -0.08-0.17, p = 0.49). We did not find any significant relationship among all the pairwise comparisons in Bins and Choice set interactions in either the 4 versus 2-decoy 1 or in the 6 versus 3-decoy 1 choice set (Supplementary Table 3 4).

However, with the lack of statistical significance using traditional hypothesis testing methods, we cannot rule out the presence of worthwhile effect size. Therefore, we used a ‘Two One-Sided Test’ (TOST) approach^{45} where we set a theoreticalvalue of upper (Δ*U*) and lower (-Δ*L*) equivalence bounds based on the smallest effect size of interest (SESOI). Two one-sided hypotheses are tested: H 01: Δ ≤-Δ*L*, H 02: Δ ≥Δ*U*, and upon rejection of both - that is if the 90 % confidence interval (CI) is fully bound by the SESOI, we conclude -Δ L ≤ Δ ≤ ΔU i.e., the observed effect size is statistically smaller than the smallest effect size of interest. Equivalence bounds for the one-sample t-test were calculated separately for 4 versus 2-decoy 1 with a sample size of 27 and 6 versus 3-decoy 1 with a sample size of 25, for statistical power of 80% and alpha 0.05 which was ± 0.11 and ± 0.09 respectively, using the powerTOSTone.raw function of the R package TOSTER^{46}.

In the case of 4 versus 2 dichotomous choice trials, the 90% CI crossed the equivalence bound only after 200 seconds (Figure 6A) while in the 6 versus 3 dichotomous choice trials the 90% CI crossed the equivalence bound from the very first 30-sec bin (Figure 6B). The introduction of the decoy in the case of the 4 versus 2-decoy 1 trichotomous choice set also led to the 90% CI crossing the bound starting from the first 30-sec bin, suggesting that the decoy reduced the decision time.

## Discussion

Our data provide the first evidence for violation of rationality in decision making with respect to IIA along a single attribute dimension of shoal size choice in zebrafish *(Danio rerio)*, a neurobiologically and genetically tractable model organism. We report a decoy effect and violations of specific derivatives of IIA, such as the constant ratio rule (at the population level) and the principle of regularity (at the individual and population level).

The decoy effect and the independence of irrelevant alternatives are well-documented human cognitive biases that have been measured only in a few animal model systems. Previous attempts in mice^{18} reported no violation of IIA, while work on *C. elegans* showed both rationality in some decisions and the violation of rationality with respect to specific combinations of odorants. Context effects in decision making have been reported in the fish literature, largely with respect to multi-attribute mate choice by females - for example in the peacock blenny, *Salaria pavo*^{47} and the green swordtail, *Xiphophorus helleri*^{35}. The investigation of IIA in shoal size choice decisions has only been conducted in mosquitofish, *Gambusia affinis* where no violation of the constant ratio rule was found^{43}. We used a similar experimental design to theirs in our shoal size choice task in order to avoid the replication crisis seen in human decoy effect studies^{18,27,28,32} where small variations in the task and stimulus modality may have been responsible for the differing decoy effects found. Our finding of a violation of IIA in the same task in a different model system is unlikely to be based on differences in the setup or stimulus modality and could suggest that decision making and IIA for the same task varies between species.

We report a violation of the constant ratio rule^{3} since the zebrafish in our study showed a population-level sharpened relative preference for the larger shoal in the presence of the decoy. We also see a dampening of the absolute preference for the smaller shoal in the presence of decoy fish, as revealed by the trajectory kernel density-based analysis, with the fish allocating a similar proportion of time to the smaller shoal and the decoy in the trichotomous trials, in line with the similarity effect, rather than the attraction or compromise effect.

In finding that the fish show a proportional increment in the time allocated to the larger shoal, we also find a violation of the principle of regularity^{4,48}. Regularity is violated to the extent of observing individual choice reversals from preferring smaller shoals to preferring larger shoals in the presence of a decoy. In its most minimal form the principles of IIA propose choice order stability. Choice reversals also rule out the possibility that the change in relative preference that we see here is due to the “random dilution effect” proposed by Bateson et al. (2002)^{4}, where a proportion of choices are randomly allocated between options. A third option may absorb these even with no change of bias between the two main options, thereby diluting the masking effect of the random noise on the existing choice bias and appearing to change the relative preference^{34}. Apart from choice reversals, we observe that the time allocation to the decoy in the trichotomous choices does not uniformly portion out from the time allocated to the existing two choices, with a large dip from the time allocated to the smaller shoal being allocated towards the decoy and even slightly increasing the time allocated to the larger shoal - the latter violating the principle of regularity.

Our work reports a violation of IIA along a single dimension or attribute: shoal size. Unidimensional violation of IIA has been rarely reported^{10}. Such work is essential because of the difficulty with interpreting multi-attribute context effects, with multiple plausible underlying models mapping to the same outcome. Morgan et al. (2012) also demonstrate different decoy effects at play during single attribute manipulations for different attributes^{10}. Different mechanisms might also be expected to mediate context effects in various single attribute choices, and these must be investigated to arrive at a comprehensive understanding of decision making relative to various attributes considered together. Our use of visual stimuli where context effects and the underlying neural circuitry are very well understood in zebrafish, rather than gustatory stimuli, will also help establish this system as a useful model to explore context effects.

We also found that the introduction of the decoy reduced the decision time, measured as the time taken for a shift in the binned preference index towards the larger shoal using a TOST-based analysis, and also that the decoy shows a similarity effect in enhancing the preference for the higher value option, in the case of 4 versus 2 choice set with the decoy of size 1. This temporal effect is different from the lengthening of decision time due to a decoy expected from the conventional cortical attractor model and is in line with the specific biophysical cortical attractor model for multiple choices proposed by Furman & Wang, 2008^{49}. The latter model predicts that when the two options are close together in value space, the overlap in the neural representation between these two can impair the accuracy of preference for the higher valued option, ramping up the network dynamics as a whole, leading to a shorter decision making time.

We did not find any significant correlation between the context-dependent change in preference for individuals across choice contexts of 4 versus 2 and 6 versus 3, suggesting that fish may not use the same general rule or mechanism for these two sets of comparison pairs at the individual level. We would also need to investigate repeatability within the context of a given shoal size set to further examine the possibility that context-dependent effects may not be stable or repeatable over time^{50}. In our study, zebrafish failed to show any significant population-level relative preference in terms of time spent in each sector, in dichotomous choices for the larger shoal size of four over two or six over three. However, we see evidence for the preference for the larger shoal both in the case of 4 versus 2 and 6 versus 3 dichotomous trials through trajectory density analysis, where the more dense regions were near the larger shoal. Previous studies on shoaling preference report that zebrafish can discriminate between shoal sizes of 6 versus 3 in dichotomous choices, although many studies indicate a failure to discriminate 4 versus 2 shoal sizes^{39,51}.However, both those studies also use a different rectangular three-tank shoal choice set up from ours, and one^{39} used a perforated divider through which shoaling decisions were based on olfactory and not just visual cues from the display fish.

In our study, we establish decoy effects that violate normative economic principles of behavioral rationality in a zebrafish model system relative to a single attribute: shoal size decision making. A wide range of pharmacological, genetic, neurobiological, and behavioral tools available in this system will enable future work on comprehensively understanding context effects in this model organism, and examining the underlying mechanisms behind contextual decision making.

## Methods

### Subjects

Two batches of adult zebrafish *(Danio rerio)* (age <1 year) were bought from a local pet store in Daryaganj, New Delhi, India, and were used for two sets of experiments. Local pet stores capture and breed zebrafish from local rivers and ponds where wild zebrafish are found. The fish were procured in March 2021 and experiments were carried out in August-October 2021. All fish were maintained in the ZebTec Active Blue - Stand Alone system (Tecniplast, PA, USA) and maintained on a 12:12 light: dark (10 a.m. - 10 p.m.) circadian cycle at 7.50-8.50 pH, 28-30°C and 650-700 µS conductivity at Ashoka University, Sonipat, Haryana, India. Fish were fed ad libitum twice a day with powdered Tetra-Tetramin flakes.

For the experiments, 30 fish were randomly picked from the population, but complete data for analysis were obtained for only 27 fish for the 4 versus 2 choice task, out of which 14 were females. Data for only 25 fish were complete for analysis for the 3 versus 6 choice task, out of which 12 were females. Fish were kept isolated in separate tanks for 2-4 weeks before the shoaling experiments began in the ZebTec fish system, such that they could see and smell each other through a shared water circulation system with olfactory cues. The remaining fish from the same population were randomly chosen as display fish for the shoal choice assay.

## Shoal choice apparatus

The shoaling apparatus consisted of a cylindrical shoaling transparent acrylic tank (referred to henceforth as the focal tank) of diameter 24cm (4mm thickness), centered within a larger 54cm × 54cm × 31 cm square plexiglass tank (henceforth referred to as the main tank), similar to the setup used by Reding and Cummings, (2019)^{43}. Transparent rectangular plexiglass 27 cm × 10 cm × 30cm display tanks were centrally placed and glued to the sides of the main square tank, such that their occupants could be viewed equidistant from the central focal tank. The distance between the boundary of the central tank and display tanks was 4cm. All edges were sealed using a water-resistant silicone sealant (DOWSILTM GP silicone sealant). The bottom surface of the main tank was placed on a raised platform. All the outer faces of the main tank were covered with opaque paper to block visual cues from the outside, and each of the perpendicular faces of each of the display tanks was also covered with laminated black paper to bar the display fish from seeing each other.

An LED light strip (Mufasa Copper Non-Waterproof LED Strip 5050) of uniform length was attached to each of the display tanks to provide a light source from within the setup and to avoid any shadow formation of the tripod. We placed a dummy tripod (without a camera), rising to the same height and approaching the existing camera tripod from the diagonally opposite end. The entire set-up was covered by a 10ft X 10ft black photography cloth curtain of the dimensions to prevent any influx of external visual cues, such that the sole light source came from the display tanks. The space between the display tanks and the focal tank was filled with water to reduce any distortion caused by refraction. The background face of the display tanks, behind the display fish, was covered with a green sheet of laminated paper, as per Lucon-Xiccato et. al (2017)^{52}. The camera used for these recordings was a GoPro Hero 8 (1080p|30fps|linear) and all recordings were made in .MP4 format.

## Experimental design

A cylindrical sheet of white paper laminated with transparent plastic was used to cover the central focal tank to keep the focal fish and display fish mutually visually isolated before the trial began. Before every treatment trial, 5 minutes of no-fish trials were performed where the subject fish were exposed to empty display tanks after 2 minutes of visual isolation from display tanks. During the 2 minute visual isolation period, fish were introduced to the display tanks in group sizes numbers corresponding to the choice set. The order of dichotomous and trichotomous choice set trials was counterbalanced i.e., in half of the trials dichotomous were presented first and vice-versa. Each trial ended after 5 minutes of video recording the shoaling responses of the focal fish followed by a 3 minute resting period during which the display fish were changed. For each trial, we used the *Sample()* function in R to first randomly decide the axis of presentation of the dichotomous choice (axis with respect to the camera view), followed by randomizing the side of the presentation of the larger shoal (4 or 6), and finally the side of the presentation of the third choice (for trichotomous trials).

## DeepLabCut based fish tracking

All videos were converted to .MP4 format and cropped for any extra recording time to a fixed duration of 5 minutes, starting from the moment of raising of the sheet covering the focal tank, using the Python-based video editing tool Moviepy. The videos were then processed using DeepLabcut, a Python-based pose estimation package^{44} to track the head, body, and tail of the fish.

A few videos were randomly chosen to generate the training frames where the pre-defined body parts were manually marked. Default Artificial Neural Network ResNet 50 was trained for at least 1,50,000 iterations for any set of analyses. The videos were then processed, and labeled videos were generated to check the efficiency of tracking. The tracking data for each of the body parts were converted and stored in .csv format. We chose the body part which was most efficiently tracked by inspecting the labeled tracked videos, which in most cases was the ‘body’ point, rather than the head or tail.

### Analysis

#### 1 Relative preference and absolute preference

The trajectory data obtained from the DLC tracking was processed using a custom R script DLC-Analyzer^{53} for the time spent in each sector data. The preference index for the larger shoal was calculated using the time spent in each sector data as :
As a test for the Independence of Irrelevant Alternatives (IIA), we tested for the change in the relative preference for the larger shoal with and without the decoy option of a single display fish. The change in the relative preference upon adding a decoy was tested both in a direct comparison between performance with the dichotomous and trichotomous choice sets, and for each set preference was tested against random chance (0.5). The proportion of time the fish spent shoaling in each sector in a choice set was calculated as the time spent in that sector divided by the total time in each trial (300 seconds, or 5 minutes). The proportion of time allocated to each of the options in the dichotomous and corresponding trichotomous choice set was calculated to test the principle of regularity. Both the distributions of relative preference and the proportion of time allocation did not deviate from normality when tested using the Shapiro-Wilk’s test for all choice sets.

#### 2 Individual-level relative preference and absolute preference

Choice reversals at the individual level were visualized by plotting the relative preference for the larger shoal in trichotomous versus dichotomous trials for both the 4 display fish versus 2 and the 6 versus 3 fish choice sets. The individuals along the inclined line of the plot showed invariance in performance with or without decoy i.e., following the principle of the independence of irrelevant alternatives. The top left and bottom right sector on such a plot represent individual fish that exhibit choice reversals. The proportion of time allocation to each of the choice options for individual fish was visualized using a ternary plot using the *ggtern* package in R. The proportion of time spent in the decoy and empty sectors in the case of the trichotomous trials were pooled to reduce the variables to three for a ternary plot visualization of the time spent with the decoy+empty sectors, relative to the two sectors with the same number of display fish as the corresponding dichotomous trial. The *stat_density_tern()* function of the package *ggtern* was used to represent the kernel density estimates to visualize the shift in the density of points between the dichotomous and trichotomous conditions.

#### 3 Trajectory analysis

The trajectories of individual fish in all trials were rotated to fit the same dichotomous choice axis, directed toward the larger shoal in the top left sector and toward the smaller shoal in the bottom right sector. All the rotated trajectories were then superimposed by concatenating each of the X and Y coordinate vectors for all fish, separately for dichotomous and trichotomous trials for the 4 versus 2-decoy 1 choice set and 6 versus 3-decoy 1 choice set. Bivariate kernel density plots were generated for each of the choice conditions and choice sets using the *k2de()* function from the library *MASS* in R. We used default parameters, except that the grid numbers on each axis were set to 100. KDE plots for individual trajectories were also produced in the same way. Trajectory KDE-based global two-sample comparisons between the dichotomous and trichotomous conditions for each of the choice sets were performed using the *kde*.*test()* function of the package *ks:kernel* smoothing in R on the population trajectory data. The locally significant region plot was produced using the *kde*.*local*.*test()* function of the package *ks:kernel smoothing* in R.

#### 4 Repeatability analysis

The repeatability of the difference in individual relative preference for the larger shoal, between dichotomous and trichotomous choice conditions (D-T) was estimated across the 4 verses 2 and 6 versus 3 choice set, using a Pearson correlation test and a linear mixed effect model-based repeatability estimation. The Pearson correlation test was performed along with the *ggscatter()* plot function of the package *ggpubr* in R software. The linear mixed-effect model approach partitions the variance into within-group and between-group sources^{54}. The repeatability estimate R is calculated as :
We calculated adjusted repeatability using the package *rptR* in R by including the fixed effect of the choice set (4 versus 2-decoy 1, and 6 versus 3-decoy 1) along with the random effect of fish ID. We set the number of bootstraps to 1000 and the permutation number to 10 to account for uncertainty around the estimation of R.

#### 5 Time-bin analysis of relative preference

We sectioned the trajectory data into 30-second bins and calculated the relative preference for the larger shoal for each bin, in both dichotomous and trichotomous choice conditions for both the 4 versus 2 and 6 versus 3 choice sets. Linear mixed-effect model analysis was carried out using the *lme()* function of the package *nlme* in R. The choice condition (dichotomous and trichotomous) and the interaction of the Choice condition and bins (choice_condition*bin) were defined as fixed factors and fish ID was a random factor with the Preference index as a response variable.

We also performed a test of equivalence called TOST (two one sided tests) using the package TOSTER in R^{46}. We calculated the equivalence bounds based on the smallest effect size of interest (SESOI) calculated for one sample t-tests for each of the choice sets (4 versus 2 and 6 verses 3) based on the statistical power of 80%, the given sample size, and an alpha of 0.05. When the 90% Confidence Interval was not completely bound by SESOI based equivalence bounds, the effect size was considered worthwhile.

## Author contributions statement

The study was designed by AS, KK, and BKR; the apparatus was made by AS and KK; the data was collected by AS and KK; data analysis was performed by AS and BKR; and the manuscript was written by AS and BKR.

## Competing Interest

The authors declare no competing interest.

## Additional Information

CSPCA national and institutional guidelines were followed for the care and use of animals. Ethical approval was obtained from Ashoka University’s Institutional Animal Ethics Committee (approval no. 01/Bio/BKR/2020).

## Data Availability

Supplementary information and all raw data files that support the findings of this study are openly available in figshare at http://doi.org/10.6084/m9.figshare.20745865.

## Acknowledgements

This research was supported by the Ashoka University Annual Faculty Research grant provided to BKR and the infrastructure provided by the Research Office at Ashoka University. AS would like to thank his Ph.D. Research Committee members Aurnab Ghose, Krishna Melnattur and Joby Joseph for feedback on the experiments and manuscript. The authors would like to thank LS Shashidhara for feedback on the manuscript and Thasya Shetty and Misha Singh for proofreading the manuscript.

## Footnotes

↵* abhishek.singh_phd19{at}ashoka.edu.in, bittu{at}ashoka.edu.in

https://figshare.com/articles/dataset/Rationality_in_Zebrafish/20745865