R Escobedo

V Lecheval

V Papaspyros

F Bonnet

F Mondada

C Sire

G Theraulaz
email: guy.theraulaz@univ-tlse3.fr

A data-driven method for reconstructing and modelling social interactions in moving animal groups

Group-living organisms that collectively migrate range from cells and bacteria to human crowds, and include swarms of insects, schools of fish, and flocks of birds or ungulates. Unveiling the behavioural and cognitive mechanisms by which these groups coordinate their movements is a challenging task. These mechanisms take place at the individual scale and can be described as a combination of interactions between individuals and interactions between these individuals and the physical obstacles in the environment. Thanks to the development of novel tracking techniques that provide large and accurate data sets, the main characteristics of individual and collective behavioural patterns can be quantified with an unprecedented level of precision. However, in a large number of studies, social interactions are usually described by force map methods that only have a limited capacity of explanation and prediction, being rarely suitable for a direct implementation in a concise and explicit mathematical model. Here, we present a general method to extract the interactions between individuals that are involved in the coordination of collective movements in groups of organisms. We then apply this method to characterize social interactions in two species of shoaling fish, the rummy-nose tetra (Hemigrammus rhodostomus) and the zebrafish (Danio rerio), which both present a burst-and-coast motion. From the detailed quantitative description of individual-level interactions, it is thus possible to develop a quantitative model of the emergent dynamics observed at the group-level, whose predictions can be checked against experimental results. This method can be applied to a wide range of biological and social systems. 43 atic. Indeed, the way in which individuals interact is 44 strongly influenced and modulated by the physical char-45 acteristics of the environment in which the organisms 46 live, such as temperature, humidity, brightness, or even 47 by the presence of air currents (see for instance [5, 6] 48 in social insects). The situation is quite different in 49 the laboratory, where conditions can be precisely con-50 trolled and monitored. Moreover, new tracking tech-51 niques make it possible to record the behaviour of in-52 dividuals alone or in groups for relatively long periods 53 of time [7, 8, 9, 10, 11]. Using large sets of tracking 54 data, one can then reconstruct and model the social in-55 teractions between two individuals of the same species, 56 and between them and the obstacles present in their 57 environment [12, 13]. 58 Explaining collective behaviour in groups of orga-59 nisms consists in describing the mechanisms by which 60 the behaviours of an individual is influenced by the be-61 haviour of the other group members that are present in 62 its neighbourhood [14, 15]. This social influence is often 63 assumed to result from the additive combination of pair-64 wise interactions of the individual with part or all the 65 members of the group. Determining how these pairwise 66 interactions may be combined, and which neighbours 67 must be taken into account, is a central problem in the 68 study of collective behaviour [16]. 69 The behavioural response of an individual is the set 70 of its successive positions during a given period of time, 71 usually at some discrete time steps. From these data, 72 it is possible to draw the trajectories of all the indi-73 viduals in a group and calculate their instantaneous 74 velocity and acceleration, their distance and angle of 75 incidence to obstacles (e.g., the wall of an experimen-76 tal tank), their heading, as well as relative quantities 77 such as the distance between individuals, the angle of 78 their relative position, and group quantities such as co-79 hesion and heading polarization. These measures can 80 reveal individual behavioural patterns such as the aver-81 age velocity or the frequency of heading changes close 82 to obstacles, and also collective behavioural patterns 83 such as the level of cohesion and polarization of the 84 group. Thus, the analysis of collective behaviour con-85 sists in measuring behavioural changes at the individual 86 variables must be taken into account to describe the be-311 haviour of fish. Other issues are not exclusive of force 312 maps. For example, data can be scarce; not only be-313 cause they are difficult to collect, but also because the 314 phenomenon under observation rarely produce data of 315 a given kind. This is what happens for instance when 316 we consider the repulsive interactions: as individuals 317 repel each other, there are very few cases in which the 318 distance between them is small, so that repulsive inter-319 actions are very difficult to describe when the distance 320 between fish is small. This particular issue is common 321 to other methods, including ours. More importantly, 322 data are rarely homogeneously distributed, so that dif-323 ferent regions of the map can result from averaging a 324 very disparate number of data, meaning that similar 325 colour intensities do not have the same relevance. For 326 instance, Fig. 4 shows that the relative position of the 327 neighbour of fish i is not homogeneously distributed on 328 the (d, ψ)-plane, and is differently distributed in both 329 panels, so that information from, e.g., the frontal region 330 in Panel A is more relevant to describe the behaviour 331 of H. rhodostomus, than the information from the same 332 region in Panel B to describe the behaviour of D. rerio. 333 Thus, the relative simplicity to visualise and inter-334 pret data with force maps comes at the cost of impor-335 tant limitations and oversimplifications. Four of the 336 most critical of these limitations are the following: 337 i) The reduced number of state variables involved 338 in individual behaviour that force maps can han-339 dle is limited to 2, at most 3. This limitation 340 leads to the use of projections and average values 341 that can hide crucial features of the phenomenon 342 under study. Moreover, when data are not ho-343 mogeneously distributed, the same limitation can 344 even produce wrong or inaccurate observations or 345 conclusions. 346 ii) The difficulty of identifying and disentangling in-347 termediate contributions such as attraction and 348 alignment to behavioural patterns; 349 iii) The difficulty of finding simple analytical expres-350 sions of the interaction functions in order to im-351 plement them in a mathematical model; 352 iv) The difficulty of distinguishing the effects of vari-353 ables (e.g., the distance between fish d ij ) from the 354 effect of parameters (e.g., the body length of fish).

355 Let us describe these limitations in more detail.

356

(i) When a function depends on more than two 357 variables, force maps are mere projections of the func-358 tion on a 3D surface, where the value of the function 359 has been averaged with respect to one or more vari-1350 results in a similar behaviour for the geometrical leader 1351 and follower, whereas the leader and follower have a 1352 very distinct behaviour in H. rhodostomus.

Introduction

The identification and characterization of interactions between the constituent elements of a living system is a major challenge for understanding its dynamic and adaptive properties [START_REF] Kaneko | Life: An Introduction to Complex Systems Biology[END_REF][START_REF] Solé | Phase Transitions[END_REF]. In recent years, this issue is also at the heart of research conducted in the field of collective behaviour in animal societies [START_REF] Camazine | Self-Organization in Biological Systems[END_REF][START_REF] David | Collective Animal Behavior[END_REF]. However, the identification from field data of the interaction rules between individuals in species whose level of cog-nitive complexity can be quite high remains problem-scale that likely result from social interactions, and to associate these measures with the relative state of the individuals involved in these interactions [START_REF] Calovi | Disentangling and Modeling Interactions in Fish with Burst-and-Coast Swimming Reveal Distinct Alignment and Attraction Behaviors[END_REF]. The relative state of an individual j with respect to a focal individual i is determined by the distance d ij between i and j, its relative velocity v ij , its angular position with respect to i, ψ ij (viewing angle), and its relative heading φ ij (see Fig. 1). The behavioural changes are precisely given by the variations of an individual's position and velocity, or, equivalently, by the position, speed and heading variations.

In fish that have a burst-and-coast swimming mode, the behavioural changes of an individual correspond to significant variations of its heading that occur exactly at the onset of the acceleration phase (i.e., the bursts). These discrete behavioural decisions are called "kicks" [START_REF] Calovi | Disentangling and Modeling Interactions in Fish with Burst-and-Coast Swimming Reveal Distinct Alignment and Attraction Behaviors[END_REF][START_REF] Mwaffo | A Jump Persistent Turning Walker to Model Zebrafish Locomotion[END_REF]. Other quantities such as the intensity of the acceleration in the direction perpendicular to the direction of motion, or simply the turning direction (right or left), can be used to detect behavioural changes. The task is thus to relate the heading variation of a focal fish δφ i with its state variables, that is, to find a function δφ i (d, v, ψ, φ).

In this article, we first show that force maps, that are widely used to describe the effects of social interactions on the behaviour of individuals, have important limitations when it comes to describe these interactions.

These limitations result mostly from the limited number of variables that force maps can handle, the difficulty of identifying intermediate contributions to behavioural patterns, and the difficulty of distinguishing the effects of state variables from constitutive parameters. We then describe in detail a method to analyse behavioural data obtained from digitized individual trajectories. The method allows us [START_REF] Kaneko | Life: An Introduction to Complex Systems Biology[END_REF] to quantify the social interactions between two individuals and describe how the intensities of these interactions vary as a function of the state variables of the individuals, and, (2) to reconstruct the interaction functions and to derive an explicit and concise mathematical model reproducing the observed behaviours. Finally, we apply this method to the analysis of the social interactions in two species of fish that both have a burst-and-coast type of swimming and that are characterized by very different levels of coordination when swimming in groups. The reconstruction of interaction rules allows to understand the origin of the differences in the level of coordination, and to predict in which experimental conditions other behavioural differences can arise.

Use and limitations of force maps to infer social interactions

A first way to infer social interactions between individuals directly from experimental data consists in using the force-map technique [START_REF] Zienkiewicz | Data-Driven Modelling of Social Forces and Collective Behaviour in Zebrafish[END_REF][START_REF] Katz | Inferring the Structure and Dynamics of Interactions in Schooling Fish[END_REF]. This technique has been used, for instance, to estimate from experiments per-142 formed with two fish the effective turning and speeding 143 forces experienced by an individual, once the relevant 144 variables on which they may depend have been cho-145 sen [START_REF] Romero-Ferrero | idtracker.ai: tracking all individuals in small or large collectives of unmarked animals[END_REF][START_REF] Katz | Inferring the Structure and Dynamics of Interactions in Schooling Fish[END_REF][START_REF] Herbert-Read | Inferring the Rules of Interaction of Shoaling Fish[END_REF]. This is a simple way to visualise the 146 strength and direction of behavioural changes. How-147 ever, force maps have strong limitations that can induce 148 profound misunderstandings. The value f ij is then considered as the value of f (x, y) 168 at the middle point of the ij-box, x i = (x i + xi+1 )/2, 169 y i = (ŷ i + ŷi+1 )/2. The resulting points (x i , y j , f ij ) are 170 then represented in a colour surface, after optional in-171 terpolation with, for instance, multilevel B-splines [START_REF] Lee | Scattered data interpolation with multilevel B-splines[END_REF]. These force maps provide some information about 187 the individual behaviour of fish. In H. rhodostomus, 188 Fig. 2A shows that the focal fish tends to turn towards 189 its neighbour, to the left (resp. right) when the neigh-190 bour is on the left (resp. right), except when the neigh-191 bour is very close. In that case, the behaviour is quite 192 complex, the fish performs small angular changes of am-193 plitude ≈ 30-60 • , probably due to collision avoidance manoeuvres. When the neighbour is further away from the focal fish, it maintains its heading (i.e., the white circular region at d ij ≈ 1-2 BL). From this force map, one could conclude that a fish is attracted by its neighbour when it is beyond a distance of about 2 BL, and repulsed when its neighbour is too close (d ij < 1 BL).

The force map in Fig. 2B shows that the focal fish turns left (resp. right) when the relative heading of the neighbour is shifted to the left (resp. right). The larger the heading difference, the stronger the turn: the colour intensity increases as |φ ij | grows from 0 to 120 • . When fish swim in more or less opposite directions, the intensity of the heading change is small. This force map reveals that a fish tends to align with its neighbour.

In D. rerio, Fig. 3A shows that the focal fish turns towards its neighbour when they are close to each other (d ij ≈ 1-2 BL) or when the neighbour is located behind the focal fish (|ψ ij | > 90 • , whatever the distance).

When the neighbour is at d ij ≈ 2-3 BL in front of the focal fish (|ψ ij | < 60 • ), the focal fish turns away from its neighbour, as well as when its neighbour is very close to it (d ij < 0.5 BL). The reaction to neighbour's heading is less intense than in H. rhodostomus, as shown by the wide white regions in Fig. 3B. When fish are beyond 3 BL from each other, the focal fish turns to adopt the same orientation of its neighbour. At short distances, the behaviour is more complex, with changes of smaller size than those observed in H. rhodostomus.

The visualisation of the data by means of force maps therefore suggests the presence of two distinct types of interaction: an attraction interaction, which leads a fish to turn towards its neighbour to get closer to it, and an alignment interaction, that leads a fish to turn so as to adopt the same heading than its neighbour. However, nothing can be deduced from these colour maps about what happens when both contributions to heading variation have different signs. Thus, would a fish turn right or left when its neighbour is on its left side? Attraction alone would induce the focal fish to turn left. However, if the relative heading of the neighbour is turned to the right, alignment alone would induce the focal fish to turn right. This difficulty comes from the fact that a function (δφ) that depends on three variables (d ij , ψ ij , and φ ij ) cannot be represented in 3D. To overcome this limitation, some authors use a kind of force map where the relative position of a fish with respect to a focal fish is decomposed in the left-right (LR) and front-back (FB) distances [START_REF] Zienkiewicz | Data-Driven Modelling of Social Forces and Collective Behaviour in Zebrafish[END_REF]. In Fig. 2A, (d ij , ψ ij ) are the polar coordinates of fish j in the system of reference centred on fish i pointing north. This is a continuous system of reference in which all the relative positions of fish can be represented. Instead, the LR and FB distances are projections of the relative position of a neighbour with respect to the focal fish on the d ij -axis, where all the points of Fig. 2A that are in the left semicircle of radius

(d ij , ψ ij , φ ij ) = -δφ(d ij , -ψ ij , φ ij ) = 366 -δφ(d ij , ψ ij , -φ ij ) [12].

418

For instance, how does φ i vary when j points to the left 419 1 The average function of a(x, y) with respect to the variable x is given by a x (y) =

x p(x, y)a(x, y)dx, where p(x, y) is the probability of occurrence of the state (x, y). However, force maps calculate the a x (y) as the mean of the values of a(x, y) over all the values of x, i.e., a x (y) =

x a(x, y)/ x 1, as if p(x, y) = 1 for all (x, y), because knowing p(x, y) is part of the problem. on the three state variables [START_REF] Calovi | Disentangling and Modeling Interactions in Fish with Burst-and-Coast Swimming Reveal Distinct Alignment and Attraction Behaviors[END_REF]. Moreover, attraction and alignment can have opposite contributions, so that their combined effect can be cancelled as if the fish were isolated from each other, while both forces are in action.

Force maps are not able to identify which part of the heading change is due to the attraction or the alignment, that is, the functions a(x, y) and b(x, y) cannot be directly extracted from force maps. Even if representations in 7D were possible, these "maps" would not allow to identify intermediate contributions.

(iii) Extracting analytical expressions from a colour map is difficult unless the relation between variables is very simple. However, it is essential to build mathematical models to understand how the combination of social interactions gives rise to the observed behaviour [START_REF] Lopez | From Behavioural Analyses to Models of Collective Motion in Fish Schools[END_REF][START_REF] Weitz | Modeling Collective Animal Behavior with a Cognitive Perspective: A Methodological Framework[END_REF].

The simulations of these models will then be used to make predictions in other experimental situations, to draw phase portraits, etc. Simple piecewise linear functions interpolating the data are not suitable because they lack the physical or biological meaning and do not help to build explicit and concise mathematical models. Will such a difference be observed if larger groups are considered? Force maps cannot be extrapolated from one experimental situation to another.

(iv) Finally, it is difficult to distinguish the effect of a variable from the effect of a parameter in a force map, e.g., the effect of the instantaneous distance between fish at each instant of time, from the effect of the fixed body length of individuals. Are the differences observed in the previous maps of each species due to the experi-mental conditions (e.g., the radius of the arena, which 479 is a variable of the experimental setup), or to the phys-

Data collection and preparation

The method starts by carrying out experiments, motivated by a fundamental question, or the results of the previous cycle of an ongoing modelling process. Then, data are collected and prepared in the form of individual trajectories u i (t) resulting from a tracking procedure conveniently purged from identification errors (step 1 in Figs. 5 and6). The velocity vector v i of an individual i is calculated from successive positions with finite differences, and its heading φ i is extracted directly from the tracking data, or, alternatively, taken as the orientation of the velocity vector.

Identification and analysis of state variables and observables

The second step consists in identifying and analysing the state variables and the relevant observables that can be used to describe the phenomenon under study (step 2 in Figs. 5 and6).

In the case considered here, the individual state of a fish is characterized by its position and velocity vectors, or, equivalently, by its speed and its distance and orientation to the wall, v, r w , and θ w , respectively. The state of a fish i with respect to another fish j is characterized by the distance between them d ij , the relative speed v ij , the viewing angle with which j is perceived by i, ψ ij ( = ψ ji ), and their relative heading φ ij = φ j -φ i . The heading angle change δφ S resulting from social interactions is thus a function of four variables.

Then, an analysis is performed on a series of observables that can be used to describe both the individual and collective behaviour of fish when swimming in pairs.

These observables are the probability density function (PDF) of the spatial distribution of individuals, their velocity, their distance and orientation to obstacles, their heading variation, the distance between individuals (cohesion), their relative positions, and their relative heading (polarization). Fig. 7 shows the PDF of d ij , ψ ij and φ i corresponding to the species of fish studied here.

The analysis of these observables relies exclusively on the experimental data and is independent of a model.

Eventually, force maps can be drawn.

Modelling hypotheses

The next step consists in defining a class of models that can provide the more suitable description of the observed phenomenon (step 3 in Figs. 5 and6). This is by far the crucial part of the method.

This process has been described in detail in [START_REF] Calovi | Disentangling and Modeling Interactions in Fish with Burst-and-Coast Swimming Reveal Distinct Alignment and Attraction Behaviors[END_REF] in the case of H. rhodostomus; here we simply summarise it, as it is identical for D. rerio. We first consider that fish move straight during short time intervals of different duration. These time intervals are separated by instantaneous "kicks" during which fish adjust their direction and make an abrupt acceleration, after which the speed decays exponentially as the fish glides between two kicks. These assumptions come from the analysis of the trajectories and the variation of the velocity [START_REF] Calovi | Disentangling and Modeling Interactions in Fish with Burst-and-Coast Swimming Reveal Distinct Alignment and Attraction Behaviors[END_REF].

587

We also assume that the effects of social interactions oc- in [START_REF] Calovi | Disentangling and Modeling Interactions in Fish with Burst-and-Coast Swimming Reveal Distinct Alignment and Attraction Behaviors[END_REF].

599

The equations for the time-evolution of the vector position u(t) and and the heading φ(t) of a fish are

u(t + dt) = u(t) + l(t) e(φ(t + dt)), φ(t + dt) = φ(t) + δφ(t),
where l(t) is the length of the kick, performed in the 600 direction of the angle φ(t + dt), given by the unitary 601 vector e(φ(t + dt)). The choice of the kick length is de-602 scribed in detail in [START_REF] Calovi | Disentangling and Modeling Interactions in Fish with Burst-and-Coast Swimming Reveal Distinct Alignment and Attraction Behaviors[END_REF]. Here we focus on the equation 603 for the heading variation δφ, that, we hypothesize, ac-604 counts for the effects of the social interactions between 605 fish, and reads

606 δφ(t) = δφ R (t) + δφ w (t) + δφ S (t), (1)
where δφ R is a random angle change accounting for the 607 spontaneous decisions of the fish, δφ w is due to the re-608 pulsion of the wall when the fish is close to a tank wall,

609

and δφ S is due to the social interactions with other fish, 610 usually attraction, alignment, or a combination of both, 611 so that

612 δφ S (t) = δφ Att (t) + δφ Ali (t). (2)
Eqs. ( 1)-( 2) are based on the hypotheses that δφ R , δφ w , 613 δφ Att , and δφ Ali are the main contributions to the head-614 ing variation of a fish, and that these contributions are 615 combined linearly (additive hypothesis). 1) can be 628 rewritten as a system of Ω equations and Ω unknowns,

629 δφ w (r q , θ p ) + δφ S (d i , ψ j , φ k , v m ) = δφ qpijkm , (3)
where the noise term δφ R vanishes as it is assumed to The key hypothesis to the procedure consists in assuming that the contribution of each state variable to each kind of interaction can be separated in a product form, which is the case for physical particles [START_REF] Calovi | Disentangling and Modeling Interactions in Fish with Burst-and-Coast Swimming Reveal Distinct Alignment and Attraction Behaviors[END_REF]:

δφ w (r w , θ w ) = f (r w ) ḡ(θ w ), ( 4
)
δφ Att (d, ψ, φ, v) = f (d) g(ψ) h(φ) l(v), ( 5
)
δφ Ali (d, ψ, φ, v) = f (d) ĝ(ψ) ĥ(φ) l(v). ( 6
)
Note that functions with a hat are in general different from the functions without hat, (i.e., f (d) = f (d), etc.).

With this additional hypothesis, the procedure provides analytical expressions of the interaction functions of attraction and alignment, and of the contribution of each of them to the heading variation. In the case where the contribution of one of the interactions is non-existent, for instance, if there is no explicit alignment, then the procedure will detect it.

For the sake of simplicity, we consider here the case where fish are far enough from the tank wall so that the contribution of δφ w to the heading variation can be neglected with respect to the effects of social interactions.

The procedure can easily be extended to extract both the social interactions and the interaction with the wall, but to the cost of more complicated notations. We refer the reader to the work of Calovi et al. [START_REF] Calovi | Disentangling and Modeling Interactions in Fish with Burst-and-Coast Swimming Reveal Distinct Alignment and Attraction Behaviors[END_REF], in which the disentangling of the combined effects of a tank wall and social interactions between fish is described in detail.

Hence, we are left with 4 state variables, so that the heading change δφ(t) is averaged in 4-dimensional ijkm-boxes. We introduce the notation f

(d i ) = f i , g(ψ j ) = g j , .
. . , l(v m ) = l m , so that, after removing the interaction with the wall, the system (3) becomes

f i g j h k l m + fi ĝj ĥk lm = δφ ijkm , (7)
which is a system of I × J × K × M equations with D = 2(I +J +K +M ) unknowns, which is much smaller than the number of boxes, and in practice, to the usual number of data available.

The goal is now to solve this system of equations.

This will provide the discrete values of the interaction functions (the unknowns f i , g j , . . . , lm ) in function of the known values δφ ijkm (calculated from the experimental data as the mean heading change in each box).

Systems with more equations than unknowns are called overdetermined systems and rarely have a solution. One way of overcoming this problem consists in reducing the overdetermined system to a solvable one by minimizing the error ∆ with which the overdetermined system is satisfied by a candidate solution that is updated iteratively. This corresponds to the step 4.1 in the flowchart of Fig. 6, which is described in detail in Box 1 and in the next section 3.2 for a simple 2D-case where the equa-680 tion is f i g j = a ij . Fig. 9 shows how the error function 681 is built in this simple case.

682

The error function is a function ∆( X) of D = 2(I + J + K + M ) variables which returns a real value calculated as follows:

∆( X) = I i=1 J j=1 K k=1 M m=1 ǫ ijkm (δφ S,ijkm -δφ ijkm ) 2 , ( 8
)
where X is the vector of dimension

D 683 X = (f 1 , . . . , f I , g 1 , . . . , g J , h 1 , . . . , h K , l 1 , . . . ,
all the I × J × K × M boxes.
The result is a positive 697 real value ∆( X) that must be as small as possible, so 698 that an optimal X must be found.

709

For the gradient to be zero, we must have

710 ∂∆ ∂f 1 = 0, ∂∆ ∂f 2 = 0, . . . , ∂∆ ∂f I = 0, . . . , ∂∆ ∂l M = 0.
For the component f i , the partial derivative of ∆ is

711 ∂∆ ∂f i = 2 J j=1 K k=1 M m=1 ǫ ijkm g j h k l m (δφ S,ijkm -δφ ijkm ),
so the condition ∂∆/∂f i = 0 is equivalent to

f i = - J j=1 K k=1 M m=1 ǫ ijkm g j h k l m ( fi ĝj ĥk lm -δφ ijkm ) J j=1 K k=1 M m=1 ǫ ijkm (g j h k l m ) 2 . ( 9
)
The corresponding equations for the other components obtained by replacing "g j " by "f i ", "j = 1" by "i = 1", 717 and "J" by "I", and the equation for a function with replaced by "g j ", and so on. . . ).

722

The resulting set of explicit equations for each com-

723
ponent can be written in the following form,

724 f 1 = R 1 (g 1 , .
. . , g J , h 1 , . . . , ĥK , l1 , . . . , lM ),

f 2 = R 2 (g 1 , .
. . , g J , h 1 , . . . , ĥK , l1 , . . . , lM ), . . . = . . .

f I = R I (g 1 , .
. . , g J , h 1 , . . . , ĥK , l1 , . . . , lM ),

g 1 = R I+1 (f 1 , . . . , f I , h 1 , . . . , ĥK , l1 , . . . , lM ), . . . = . . . ĝJ = R I+J (f 1 , . . . , f I , h 1 , . . . , ĥK , l1 , . . . , lM ), . . . = . . . lM = R D (f 1 , . . . , f I , g 1 , . . . , ĝJ , ĥ1 , . . . , ĥK )).
To find the solution of such a system, it is possible to 725 write it in a compact form as X = R( X), where R is for two levels of noise:

778 a(x, y) = √ 2e -(x/x0) 2 sin y, (10)
with x 0 = 0.1 and L = 2. The map is built as follows.

779

We first discretise the 2D-space (x, y) in Ω = I × J

796

We now apply the procedure described in Sec. 3.1.4,

797

which provides analytical expressions of the interaction 798 functions of x and y that give rise to this colour map.

799

The key hypothesis is that there exist two decoupled functions f (x) and g(y) such that a(x, y) = f (x) g(y). Evaluating these functions in each ij-cell, this means that

f i g j = a ij , i = 1, . . . I, j = 1, . . . , J. ( 11
)
The values of f i and g j are unknown for all i and all j.

The values of a ij are known for all ij because it is the mean value of the data found in the ij-cell. These I × J equations and I + J unknowns constitute precisely the overdetermined system [START_REF] Branson | Highthroughput ethomics in large groups of Drosophila[END_REF]. Following the procedure to reduce this overdetermined system, we write the error function ∆( X), for X = (f 1 , . . . , f I , g 1 , . . . , g J ),

∆( X) = I i=1 J j=1 ǫ ij (f i g j -a ij ) 2 , ( 12
)
which has the same form as the one shown in Eq. ( 27)

of Box 1. Fig. 9 shows how ∆( X) is calculated as the 801 sum of all the squared local errors in each box, denoted 802 by the vertical green line between the yellow and green 803 balls corresponding to a ij and f i g j respectively.

804

To minimize the error function, we look for the zeros of its gradient. The partial derivatives are

∂∆ ∂f i = 2 J j=1 ǫ ij g j (f i g j -a ij ), ( 13
)
∂∆ ∂g j = 2 I i=1 ǫ ij f i (f i g j -a ij ), (14)
and they are equal to zero when

f i = J j=1 ǫ ij g j a ij J j=1 ǫ ij g 2 j , ( 15
)
g j = I i=1 ǫ ij f i a ij I i=1 ǫ ij f 2 i . ( 16
)
Note that each component is explicitly given by a com- Eq. ( 9) does not appear here.

814

Thus, starting from an initial guess of the solution,

815 X 0 = (f 0 1 , f 0 2 , . . . , f 0 I , g 0 1 , g 0 2 , . . . , g 0 J ), it is possible to ob- 816
tain the values of the f i 's and the g j 's after one iteration,

817 that is, X 1 = (f 1 1 , f 1 2 , . . . , f 1 I , g 1 1 , g 1 2 , . . . , g 1 J ), repeating 818 this process iteratively, X 1 → X 2 → X 3 → . . . until 819 convergence, i.e., X n+1 ≈ X n .
When the jumps between iterations are excessively abrupt, for example if the initial guess is far from a solution, it is convenient to smooth or relax the iterative process by averaging the new values with those of the previous step weighted with a larger coefficient:

f n+1 i = λf n i + (1 -λ) f n i , ( 17
)
g n+1 j = λg n j + (1 -λ)g n j . ( 18
)
Here f n i and gn j are calculated from the values of X n 821 in the previous step with the formulas ( 15)-( 16), and

a(d, ψ) = sin ψ ∞ k=0 c k (d) cos(kψ). (19)
In order to be separable as a(d, ψ) = f (d)g(ψ), the functions c k (d) in ( 19) have all to be proportional to some

880 f (d), that is, c k (d) = α k f (d), with α k constant for all k.
881 Then, g(ψ) = sin ψ ∞ k=0 α k cos(kψ).

882

A simple and biologically meaningful example, inspired by the fish interaction functions, would consist in writing [START_REF] Herbert-Read | Inferring the Rules of Interaction of Shoaling Fish[END_REF] and using only the modes k = 0 and 2:

c k (d) = α k exp[-d 2 /(2l 2 k )] in
a(d, ψ) = sin ψ α 0 e -d 2 /(2l 2 0 ) + α 2 e -d 2 /(2l 2 2 ) cos(2ψ) .
When l 2 = l 0 , the variables are separable and we have

a(d, ψ) = α 0 e -d 2 /(2l 2 0 ) sin ψ 1 + α 2 α 0 cos(2ψ) , ( 20
)
which, when d,ψ) and the solution found by the reconstruction procedure f i g j . The general shape is quite well reproduced, and differences appear only at a relatively small scale. Fig. 12CD shows the reconstructed functions f (d), g(ψ) for which we have found the following analytical expressions,

α 0 = √ 2, l 0 = x 0 / √ 2,
f (d) = β 0 e -d 2 /[2( l0) 2 ] , (21) g(ψ) = β 1 sin ψ [1 + β 2 cos(2ψ)] , ( 22
)
with β 0 = 0.72, l0 = l 0 = 0.071, β 1 = 1.86, β 2 = 0.62. The resulting interaction function is

f (d)g(ψ) = 1.34e -d 2 /[2( l0) 2 ] sin ψ 1 + 0.62 cos(2ψ) ,
where the first term is quite close to the one of b 1 (d, ψ) (with 1.34 instead of 1.41), and the second is not

905

A similar qualitative result is obtained in the second case with b 2 (d, ψ), as shown in Fig. 13. In that case, we found β 0 = 0.69, l0 = 0.078, β 1 = 1.99, β 2 = 0.9, so the interaction function provided by our procedure is

f (d)g(ψ) = 1.37e -d 2 /[2( l0) 2 ] sin ψ 1 + 0.9 cos(2ψ)
In both examples, the worst agreement between the re-906 constructed interaction and the actual one is obtained 907 for the angular dependence of the interaction at very 908 large distance (blue curves in Figs. 12D and13D), 909 and for the radial dependence of the interaction at 910 ψ = ±π/2 (red curves in Figs. 12C and13C). However, 911 both cases correspond to situations where the interac-912 tion is the weakest and the reconstructed interaction 913 matches perfectly the actual one in situations where the 914 interaction is most significant (black and red curves in 915 both panels D; black and blue curves in both panels C).

916

Let us now discuss the general validity of the prod-917 uct assumption on the illustrative example of the inter-918 action of a fish with a circular wall. In this case, the 919 heading angle change between two time steps (kicks) 920 is δφ(r w , θ w ), where r w is the distance of the fish from 921 the wall, and θ w is the angle between the fish heading 922 and the normal to the wall. Here, the product hypoth-923 esis amounts to assume that δφ(r w , θ w ) = f (r w )g(θ w ).

924

As explained in [START_REF] Calovi | Disentangling and Modeling Interactions in Fish with Burst-and-Coast Swimming Reveal Distinct Alignment and Attraction Behaviors[END_REF], the product assumption is veri-

946

In fact, we generally expect only a few Fourier modes 947 to be relevant in the above expansion (in [START_REF] Calovi | Disentangling and Modeling Interactions in Fish with Burst-and-Coast Swimming Reveal Distinct Alignment and Attraction Behaviors[END_REF], it was 948 found that only 1 or 2 non-zero modes were enough to describe all interactions; see next section). Hence, the product assumption can be only severely invalidated if the few relevant functions c k (r w ) have very different behaviour. However, on general biological grounds, we expect that all these functions characterizing the interaction with the wall should decay smoothly with the distance r w . Similarly, for the corresponding functions describing the attractive interaction between two fish, we expect them to first increase with distance between the fish before decaying at larger range. Hence, even if these few functions are not strictly proportional to each other, their similar anticipated behaviour should lead to effective product interactions grasping the most important features of the actual interactions.

In conclusion of this section, the product assumption allows for an efficient method to reconstruct the individual one-variable interaction functions, only requiring a moderate amount of experimental data. Even if the product assumption is not strictly verified by the actual interactions, general biological considerations ensure that the product interactions would still describe their main features. In any case, the product form offers an explicit representation of the interactions, separating the different contributions (interaction with the wall, attraction/repulsion and alignment between individuals). The reconstructed one-variable interaction functions can be fitted by simple analytic forms (see next section) and the full interaction functions can then be straightforwardly implemented in an explicit and concise model whose predictions can be checked against experimental results, hence providing a further validation of the product assumption. In addition to ultimately producing models for the dynamics of animal groups, the simple and explicit form of the interactions allows for a precise analysis of the behavioural interactions at play in the system, and in particular, for the disentangling of their different components.

Extraction and comparison of social interactions in different species of fish

The model proposed in Sec. 3 is based on the assumption that social interactions are combined in an additive form (see step 3, Fig. 6). In Eq. ( 2), two functions δφ Att and δφ Ali were introduced to account for the attraction and alignment interactions, for which no a priori assumptions were made except that their dependence on the state variables d ij , ψ ij and φ ij is decoupled; see Eqs. ( 5)-( 6). Steps 4.1 to 4.3 in Fig. 6 provide us with functional forms, but do not determine which functional form corresponds to which kind of interaction.

To do that, the analysis of the relevant observables (step 2 in Fig. 6) is used to say that δφ must change sign when ψ ij and φ ij both change sign, and that, consequently, the same must happen for δφ Att and δφ Ali .

This way, the parity of the angular components of the 1004 interaction functions is univocally determined. Thus, to 1005 have an interaction of attraction, the fish must turn left 1006 (resp. right) if its neighbour is on its left (resp. right); This allows us to rewrite the interaction functions 1018 from Eqs. ( 5)-( 6) as follows:

1007 that is, δφ > 0 if ψ ij > 0 (resp. δφ < 0 if ψ ij < 0).
1019 δφ Att (d ij , ψ ij , φ ij ) = F Att (d ij ) O Att (ψ ij ) E Att (φ ij ), ( 23
) δφ Ali (d ij , ψ ij , φ ij ) = F Ali (d ij ) E Ali (ψ ij ) O Ali (φ ij ), ( 24
)
where function names "O" and "E" stand for "odd" method (Fig. 6), that is, with the procedure described 1041 in Section 3 (points in Fig. 14).

1042

These expressions are, for the intensity of the social interaction of attraction and alignment, as follows:

F Att (d) = γ Att d d Att -1 1 1 + d l Att 2 (25) F Ali (d) = γ Ali d d Ali exp - d l Ali 2 , ( 26
)
where the values of the parameters depend on the simplified with respect to the one obtained in [START_REF] Calovi | Disentangling and Modeling Interactions in Fish with Burst-and-Coast Swimming Reveal Distinct Alignment and Attraction Behaviors[END_REF] and In H. rhodostomus, a fish i is subject to a stronger 1100 attraction when the other fish j is at its right or left 1101 side (O Att reaches its highest values when ψ ij ≈ ±90 • ; 1102 see Fig. 14B) and moves more or less perpendicular to 1103 it (E Att is higher when φ ij ≈ 90-100 • ; see Fig. 14C).

1104

Alignment is stronger when the other fish is in front the case of a continuous time dynamics). This mini-future to test our models on a robotic platform [START_REF] Bonnet | Development of a mobile robot to study the collective behavior of zebrafish[END_REF].

Such a platform could also allow us to study bidirectional interactions between robots reproducing the trajectories generated by our models and real fish, to obtain a more representative validation of our models of interactions [START_REF] Papaspyros | Bidirectional interactions facilitate the integration of a robot into a shoal of zebrafish danio rerio[END_REF].

Yet, the advantages and benefits of our approach are numerous. First, the number of fitting parameters (typically 30 for each of the typically 5-8 interaction functions), although apparently large (a total of typically 150-300 parameters), is in general much smaller than the number of data points in the available experimental trajectories (typically 10 4 for human groups [START_REF] Jayles | Collective information processing in human phase separation[END_REF], and 10 5 for fish [START_REF] Calovi | Disentangling and Modeling Interactions in Fish with Burst-and-Coast Swimming Reveal Distinct Alignment and Attraction Behaviors[END_REF]). In comparison, a complete force map in typically 5 or more dimensions (one dimension per relevant variable) on a mesh involving 30 5 boxes, with enough data points in each of them, would require millions if not billions of experimental data points, which is in general impossible to achieve. Two-dimensional force maps obtained after projection (i.e., averaging on the other 5 -2 = 3 variables), although less noisy than the original force map, cannot be exploited to build a model, since it can be shown that they are strongly affected by the existing correlations between these variables along actual trajectories. For instance, if a fish is very close to a wall, there is a high probability that it swims parallel to the wall, so that its distance from the wall is strongly correlated with its heading angle. On the other hand, it can be shown [START_REF] Calovi | Disentangling and Modeling Interactions in Fish with Burst-and-Coast Swimming Reveal Distinct Alignment and Attraction Behaviors[END_REF] that our methodology to extract interaction functions is not at all affected by the likely correlations present in the system, and actually exploit them.

Our method is also robust with respect to the presence of noise in the data (intrinsic behavioural noise or unwanted experimental noise), and can actually be used to measure the spontaneous fluctuations of the speed and heading angle of the individuals [START_REF] Calovi | Disentangling and Modeling Interactions in Fish with Burst-and-Coast Swimming Reveal Distinct Alignment and Attraction Behaviors[END_REF][START_REF] Escobedo | Measuring and modeling individual level interactions in a swarming crowd[END_REF]. Moreover, the extraction of interaction functions requires very limited computing power, being obtained within a few seconds on a standard workstation. Ultimately, the analysis of the resulting interaction function allows to make general qualitative conclusions about the interaction at play for the considered species. Force maps can also help in this analysis, but our approach allows for an even finer analysis thanks to the disentangling of interactions by means of separate and explicit interaction functions, instead of mere projected colour maps affected in an uncontrolled manner by the inherent correlations present in the system and the mixing of the different interaction contributions. More importantly, our methodology ultimately leads to a concise and explicit model which can be exploited to understand and explain diverse experimental features and various forms of collective behaviour, and which has a predictive power, while force maps cannot be directly exploited to build such explicit models. Note that the structure of the model should be robust for different species having comparable motion mode. For instance, this structure is the same for H. rhodostomus and D. re-rio (or for any species with a burst-and-coast or run- we have also found that the interaction functions char-1327 acterizing their interaction with the wall are very similar 1328 (see [START_REF] Calovi | Disentangling and Modeling Interactions in Fish with Burst-and-Coast Swimming Reveal Distinct Alignment and Attraction Behaviors[END_REF] for H. rhodostomus), which explains their com- In the case of D. rerio, the experimental setup had dimensions of 100×100×25 cm 3 , inside which a circular tank of radius R = 29 cm was placed. The sides and bottom part of the tank were covered with a Teflon plate to avoid reflections. Furthermore, the setup was confined behind white sheets to isolate the fish from external stimuli in the room, while also maintaining a consistent lighting environment inside the setup bounds. A uniform luminosity for the room was provided by four 110 watt fluorescent lamps placed at each of the four sides of the tank. Prior to placing fish in the experimental setup, we ensured that the height of the water was 6 cm. Then, 10 videos of 70 min duration each were recorded in the circular tank. Subsequently, a group of fish was randomly selected and caught from the rearing tanks to participate in the experiment. A pair of fish was then chosen and placed in the setup. The fish were allowed to habituate for 5 min before starting the 70 min long recording. After a single experiment was 1422 completed, the fish were returned to the original rear-1423 ing tank without being re-inserted in the selected group 1424 (i.e., no individual was used twice in the same day).

1425

The positions of fish on each frame were tracked with id-1426 Tracker 2.1 [START_REF] Pérez-Escudero | idTracker: Tracking individuals in a Group by Automatic Identification of Unmarked Animals[END_REF]. Time series of positions were converted 1427 from pixels to meters and the origin of the coordinate : State variables of a focal fish i with respect to its neighbour j. Fish position is determined by the position of the centre of mass of the fish (black circles) in a orthonormal system of reference Oxy. d ij : distance between fish; v ij = v j -v i : relative velocity of j with respect to i; ψ ij : viewing angle with which i perceives j; φ ij = φ j -φ i : relative heading of j with respect to i. Angles are measured with respect to the horizontal axis of coordinates Ox; we use the convention that angles are positive in the counterclockwise direction. Figure 6: Flowchart of the methodology, with a special emphasis on the procedure of extraction of the interaction functions (step 4). When the test at point 6 is not verified, the cycle starts again at a previous step, depending on the reason for which the test failed: if the model has to be revised (e.g., because the relation between observables and state variables is not well reproduced), then go to step 3; if other state variables or observables have to be considered in the model (e.g., because they may contribute to some observed effect), then go to step 2; if new experiments must be carried out (e.g., because there are not enough data or some important case has not been observed), then go to step 1. The square error is formulated in each box, (f i g j -a ij ) 2 , and summed up along all boxes. Starting from an initial guess of I + J values f 0 i , g 0 j , i = 1, . . . , I, j = 1, . . . , J, which produces a set of I × J green balls (one per ij-box), the iterative process is carried out. At each iteration, the green balls of each box converge globally towards the yellow balls, until a minimum of the error ∆( X) is reached. The final values f n i , g n j (blue and red points respectively) are then fitted by means of analytical expressions, which are the interaction functions represented by the blue and red solid curves. Note that n is the index of iteration, not the time discretisation index. ) sin ψ cos(2ψ) and (B) the solution found by the reconstruction procedure f (d)g(ψ) = 1.34e -d 2 /(2l 2 0 ) sin ψ + 0.83e -d 2 /(2l 2 0 ) sin ψ cos(2ψ). Red and blue solid lines: Cuts of the surface of b 2 (d, ψ) for a fixed value of (C) ψ = π/2 (red) and ψ = π/4 (blue), and (D) d = 0.03 (red) and d = 0.1 (blue). Black dots denote the reconstructed functions f i in (C) and g j in (D). Solid black lines in both panels are the analytical expressions found for the reconstructed functions. Red and blue dots are cuts of the reconstructed solution f i g j corresponding to the respective cut of the non-separable function b 2 (d, ψ). Values of the cuts are f (0.03) = 0.23, f (0.1) = 0.29, g(π/2) = 0.66 and g(π/4) = 1.38. A noise of the same amplitude as the one measured in the experimental data of H. rhodostomus was added to b 2 (d, ψ) to create the data set for the reconstruction procedure. The same data structure (number of data per box) as the one found in real fish has been used. We have used I = 21 and J = 31.

f(d) f(d) a(d,π/2) a(d,π/4) f i f i g j (π/2) f i g j (π/ 4

Box 1. Minimizing the error between data and a product form

Let us consider a N × M two-dimensional array a ij , for instance, built after averaging some quantity obtained from experiments on a N × M grid. We look for the best approximation of a ij under a product or separable form, a ij ≈ x i × y j , i = 1, . . . , N , j = 1, . . . , M (see the system [START_REF] Branson | Highthroughput ethomics in large groups of Drosophila[END_REF], in the more general case when more than two dimensions are involved). Note that under the product form, the number of unknown variables is only N + M , compared to the much larger size N × M of the original array of data a ij . In order to quantify the accuracy of the product description, we define the quadratic error function ∆: ∆(x 1 , . . . , x N , y 1 , . . . , y M ) =

N i=1 M j=1 ǫ ij (x i y j -a ij ) 2 . ( 27
)
Here ǫ ij is the number of data that fall in the cell ij. For systems that derive from physical and biological phenomena, it is fundamental to modulate the contribution of each cell, not only to give a higher weight to the more frequent values, but also to preserve actual correlations arising between the variables. The goal is thus to find a set of values x 1 , . . . , x N , y 1 , . . . , y M that minimizes the error ∆. ∆ = 0 implies that x i y j = a ij , for all i and j, and that the original data had exactly a product form. Finding the minima of a function requires finding the zeros of its derivative, which, in high dimensions, is the gradient vector ∇∆, given by the partial derivatives of ∆ with respect to its components; see the Box Finding minima below.

Finding minima

A minimum of a one-vatiable function f (x) is a point x m where the derivative vanishes, f ′ (x m ) = 0, and the second derivative is positive, f ′′ (x m ) > 0.

In several dimensions, the "derivative" of a function F : R D → R is the gradient vector ∇F ( x), whose components are given by the partial derivatives of the function with respect to each component of x: ∇F ( x) = (∂F/∂x 1 , ∂F/∂x 2 , . . . , ∂F/∂x D ). The gradient vector points in the direction of maximum variation of F , and is therefore zero (i.e., equal to the null vector 0) when x is a extremum, and in particular, a minimum: ∂F/∂x 1 = 0, ∂F/∂x 2 = 0, . . . , ∂F/∂x D = 0.

In principle, to ensure that the extremum is indeed a minimum, one also has to check that the Hessian matrix of second-order partial derivatives has only strictly positive eigenvalues, a condition generically satisfied for squared error functions like the one considered here.

Differentiating [START_REF] Robie | Machine vision methods for analyzing social interactions[END_REF] with respect to x k gives

∂∆ ∂x k = N i=1 M j=1 ∂ ∂x k ǫ ij (x i y j -a ij ) 2 = 2 M j=1 ǫ ij y j (x k y j -a kj ), (29)
where we used the fact that x i y j does not depend on x k , if i = k. Then,

∂∆ ∂x k = 2x k M j=1 ǫ ij y 2 j -2 M j=1 ǫ ij y j a kj , ( 30
)
and the conditions ∂∆/∂x i = 0 and ∂∆/∂y j = 0 for all i and j can be rewritten as

x i = M j=1 ǫ ij y j a ij M j=1 ǫ ij y 2 j , i = 1, . . . , N, y i = M i=1 ǫ ij x i a ij M i=1 ǫ ij x 2 i , j = 1, . . . , M. ( 31
)
This is a system of N +M equations and unknowns that can be solved with different methods. Due to the large dimension of the systems arising in social interaction analysis, iterative method are often used. See Box 2.

Box 2. Fixed point iterations

A point x * ∈ R is a fixed point of a function f : R → R if f (x * ) = x * . Fixed points can be found under certain conditions a by means of the iterative method

x n+1 = f (x n ). ( 32
)
Starting from an initial point x 0 , the method builds a sequence x 1 , x 2 , x 3 , ... that converges to (one of) the fixed point(s) of f ; see Fig. 15.

In d dimensions, a vector x * ∈ R d is a fixed point of a function F :

R d → R d if F ( x * ) = x * .
When the dimension of the system d = N + M is very large, and in order to improve the stability of the recursion dynamics, it is convenient to use a relaxation method,

x n+1 = λ x n + (1 -λ) F ( x n ), (33)
where λ ∈ (0, 1) is the weight of the previous iteration in the value of the new iteration, averaged with what would have been the new iteration. a The function f must be contractive and the initial value of the iterations must be sufficiently close to the fixed point.

151

  Force maps are planar representations of two-dimensio-152 nal functions of the form f (x, y) where the variation of 153 the value of the function is represented by a colour gra-154 dient. Generating and interpreting force maps is easy 155 and this explains their success for inferring interactions 156 between moving groups of individuals. 157 A 2D function f (x, y) given by a data set is a sequen-158 ce of N triplets (x n , y n , f n ), where the index n denotes 159 for example the instant of time t n , n = 1, . . . , N . To 160 build a force map of this function, the (x, y)-space is dis-161 cretised in I × J boxes of the form [x i , xi+1 ] × [ŷ j , ŷj+1 ], 162 where the nodes xi and ŷj are given by 163 xi = xmin + (i -1)(x max -xmin )/I, i = 1, . . . , I + 1, ŷj = ŷmin + (j -1)(ŷ max -ŷmin )/J, j = 1, . . . , J + 1, and the data (x n , y n , f n ) is placed in the ij-box such 164 that x n is in [x i , xi+1 ] and y n is in [ŷ j , ŷj+1 ]. Then, the 165 number of data ǫ ij in the ij-box and the mean value f ij 166 of the values of f n that fell in the ij-box are calculated.

  167

172Figs. 2

 2 Figs. 2 and 3 show the force maps of the heading

  186

Fig. 2

 2 Fig. 2 and 3 show the force maps of δφ for two different species of fish. Significant differences appear between maps, e.g., in Panels A, the left-right symmetry of the heading change with respect to the position of the neighbour in H. rhodostomus, while in D. rerio the symmetry is with respect to the position of the focal fish; in Panels C, the half-planes of homogeneous colour are horizontal in H. rhodostomus, but vertical in D. rerio.

518 3 . 1 Outline of the method 519 Fig. 5

 315195 Fig.5provides a general overview of the method used to 520

  531

588

  cur exclusively when kicks are performed, that is, at the 589 decision times when fish adjust their heading. Then, we 590 provide an explicit equation for the heading variation of 591 the focal fish δφ when the fish performs a kick, in terms 592 of the quantities that can potentially have an effect on 593 δφ. The selection of the duration and length of the 594 gliding phase and the motion of the fish, with quasi-595 exponential decay of the velocity between two kicks, 596 are given by simple analytical probability distributions 597 fairly reproducing the experimental ones, as described 598

616 3 . 1 . 4 Extraction of interactions functions from 617 trajectory data 618 Step 4 ,

 3146184 which is the one we wish to emphasize in this ar-619 ticle, consists in extracting, from the experimental data, 620 the interaction functions determining the contributions 621 of a neighbouring fish and of the obstacles in the en-622 vironment to the instantaneous heading variation of a 623 fish. It is a relatively long step that involves several 624 substeps, for which an overview is presented in Fig. 8. 625 Discretising the 6 state variables in Ω = Q × P × I × 626 J × K × M boxes, and calculating the mean value of δφ 627 in each box from the experimental data, Eq. (

630

  have zero mean in each box. We used the convention 631 that unknowns are written in the left hand side of the 632 equation and the knowns values in the right hand side. Event if one could build seven-dimensional representations, the contributions of each variable would still be entangled, and intermediate functions impossible to detect in the corresponding behavioural maps of social interactions.

699

  The minima of ∆( X) are obtained by finding the ze-700 ros of the gradient of ∆ (see the inset in Box 1). Find-701 ing the zeros of a function (or root finding) can be car-702 ried out by different methods such as descent methods 703 or other iterative methods. Here, we use an iterative 704 method based on the fact that the equation that each 705 component must verify is linear in this component, so 706 that each component can be written explicitly in terms 707 of the other components. This relation is found as fol-708 lows.

712

  are derived in the same way and all have the same struc-713 ture where each component is given by an explicit com-714 bination of the other components and the known values 715 δφ ijkm and ǫ ijkm . For instance, the equation of g j is 716

3 . 1 . 5

 315 726 a function from R D to R D , and consider the problem 727 as finding a fixed point X 0 of the function R. This 728 is done by means of an iterative method, as explained 729 in detail in Box 2, which also shows how this method 730 works in the 1D-case. Again, note that the number 731 D = 2(I + J + K + M ) of fitting parameters is much 732 smaller than the number of boxes I × J × K × M . 733 In the end, the procedure provides the values of each 734 interaction function at the points representing each box 735 minimizing the error functions. Depending on the num-736 ber of boxes, a satisfactory analytical form of each one-737 variable function can be obtained, based on physical 738 principles and specific observations. This part corre-739 sponds to the step 4.3 in Fig. 6 and depends on the spe-740 cific phenomenon under study; it is detailed in Sec. 4 741 for the case of fish swimming in pairs. For example, 742 the function of the angle of perception g(ψ) must be odd, i.e., g(-ψ) = -g(ψ), because the attractive effect 744 of a neighbour on the heading change of a focal fish 745 has the same intensity wherever the neighbour is lo-746 cated at the right or at the left of the focal fish, but has 747 opposite directions, and hence opposite signs, in each 748 case: if the neighbour is at the right (resp. left) side, 749 the focal fish would turn right (resp. left) to approach 750 the neighbour. Physical properties of the interactions 751 at play, such as the exponential decay of some interac-752 tions, must be taken into account and guide the choice 753 of the final analytical expressions. 754 Numerical simulations of the model 755 The last step consists in performing numerical simula-756 tions of the model with the double purpose of 1) veri-757 fying that the simulation results are in good agreement 758 with the experimental results, and 2) making new pre-759 dictions that can be ultimately confirmed by new exper-760 iments. If one of these two points is not satisfactorily 761 verified, then it is necessary to go back to a previous 762 step: step 3 to revise or reformulate the model, step 2 763 to use alternative state variables or observables, or even 764 step 1 to carry out new experiments or measures of the 765 data (Fig. 6).

766 3 . 2

 32 Figs. 10AB show the colour map of a real function

780

  rectangular cells [x i , xi+1 ] × [ŷ j , ŷj+1 ], where 781 xi = (i -1) L I , i = 1, . . . , I + 1, ŷj = -π + (j -1) 2π J , j = 1, . . . , J + 1. Then, we evaluate the function a(x, y) on 100000 points 782 randomly selected, and place each point on the corres-783 ponding cell ij. After that, we count the number of 784 points in each cell, ǫ ij , and we assign to a ij the aver-785 age of the values of the function for all the points that 786 are in the cell ij. To simulate the effect of the noise, 787 which is always present in real data sets, for each point 788 found in the cell ij, we add a small noise of zero mean 789 and standard deviation = 0.35 to the value of a ij . This 790 value corresponds to the noise intensity observed in the 791 experiments with pairs of real fish [12]. The resulting 792 value is then considered as the measured value of the 793 function a(x, y) in the corresponding cell, denoted by 794 (x i , y j ), and usually defined as the middle point of the 795 cell: x i = (x i+1 -xi )/2, y j = (ŷ j+1 -ŷj )/2.

822λ∈ 825 Fig. 11

 82511 Fig.11shows the successive values that each com-

and α 2

 2 Figs. 12AB show the colour maps of b 1 (d, ψ) and the solution found by the reconstruction procedure f i g j . The general shape is quite well reproduced, and differences appear only at a relatively small scale. Fig.12CDshows the reconstructed functions f (d), g(ψ) for which we have found the following analytical expressions,

892

  too far from the corresponding one of b 1 (d, ψ), with 893 1.34 × 0.62 = 0.83 instead of 1.13, apart from the dif-894 ferent decreasing rate of the exponential. 895 Although the procedure provided an apparently sat-896 isfactory result (panels A and B of Fig. 12 are quite 897 similar), the reconstructed functions fail to reproduce 898 some features such as the (two) changes of variation of 899 the intensity along the radial coordinate (first increas-900 ing, then decreasing) when the neighbour is at one side 901 of the focal individual (ψ ≈ ±π/2), and introduce an 902 artificial slight decrease in the intensity when the neigh-903 bour is far (d ≈ 3 BL) and at one side (ψ ≈ ±π/2) of 904 the focal individual (see Fig. 12CD).

925

  fied for physical particles interacting with a wall via a 926 conservative force (deriving from a potential energy), 927 with g(θ w ) given exactly by g(θ w ) = sin(θ w ) (projec-928 tion of the central force on the normal to the veloc-929 ity, i.e., on the angular acceleration). For animals, and 930 in particular fish, the anisotropic perception of their 931 environment generally leads to non conservative inter-932 actions. The product hypothesis assumes that this 933 anisotropic perception can be fully encoded in a non-934 trivial function g(θ w ) generally different from a simple 935 sinus, while the function remains odd if the left/right 936 symmetry is preserved. As explained above, δφ(r w , θ w ) 937 for animals takes the general Fourier expansion form 938 of Eq. (19), δφ(r w , θ w ) = sin(θ w ) ∞ k=0 c k (r w ) cos(kθ w ). 939 Strictly speaking, δφ(r w , θ w ) can be separated into the 940 product of two functions of r w and θ w only if all func-941 tions c k (r w ) are proportional to each other. However, 942 if these functions decay similarly with the distance to 943 the wall r w , the proportionality assumption and hence 944 the product assumption would be only weakly invalid, 945 as illustrated in the practical examples presented above.

Fig. 14

 14 Fig.14shows the social interaction functions recon-

1043

  species and on the size of the arena. Note that the 1044 expression of the intensity of the alignment has been 1045

1046l

  now has one less parameter. Here, γ Att and γ Ali are the 1047 (dimensionless) intensities of the attraction and align-1048 ment interactions, d Att is the distance below which at-1049 traction changes sign and becomes repulsion, l Att and 1050 Ali are the ranges of each interaction (the higher the 1051 value, the longer the range), and d Ali = 1 BL is a 1052 characteristic length used to make γ Ali dimensionless. 1053 Having dimensionless factors γ Att and γ Ali allows di-1054 rect comparison between intensities of social interac-1055 tions and with the intensity of the interaction with ob-1056 stacles δφ w and the spontaneous decision term δφ R in 1057 Eq. (1).

  1063 D. rerio in circular arenas of radius 0.25 m and 0.29 m 1064 respectively. 1065 Regarding the normalized angular functions for D. rerio, we found the following expansions (with at most 2 Fourier modes in addition to the trivial zero mode): O Att (ψ) = 1.66 sin(ψ)[1 -0.77 cos(ψ) + 0.6 cos(2ψ)], E Att (φ) = 0.81[1 -0.95 cos(φ) + 0.12 cos(3φ)], E Ali (ψ) = 0.54[1 + cos(ψ) -2 cos(2ψ)], O Ali (φ) = 1.53 sin(φ)[1 + 0.24 cos(φ)]. Following the step 5 of our methodology (Fig. 6), 1066 these analytical expressions should be implemented in 1067 the model introduced in Section 3. Then, numeri-1068 cal simulations of the model should be performed and 1069 compared with the known experiments, and predictions 1070 should be made, that must be verified a posteriori. This 1071 corresponds to the step 6 of our methodology (Fig. 6); 1072 it was done for H. rhodostomus in [12], and will be done 1073 elsewhere for D. rerio and other species. 1074 Comparing the interaction functions found for both 1075 species, we observe that they have a similar shape, espe-1076 cially the angular functions (see the angular functions of 1077 attraction in Fig. 14B, for which one can use the same 1078 function of the angle of perception ψ ij ). The intensi-1079 ties of attraction and alignment have the same order of 1080 magnitude in both species: the maximum of the attrac-1081 tion is around 0.4 in both species, and the maximum of 1082 the alignment is around 0.2-0.3 (Fig. 14A). 1083 The most important difference between the two 1084 species is that the range of the interactions is much 1085 larger in H. rhodostomus than in D. rerio: in H. rhodos-1086 tomus, the maximum intensities of attraction and align-1087 ment are around 7 BL and 3.5 BL respectively, while in 1088 D. rerio these maxima are both near 1.5 BL. Moreover, 1089 the intensity of these interactions decays more rapidly 1090 in D. rerio than in H. rhodostomus, especially with re-1091 spect to the fish body length (in D. rerio, the alignment 1092 intensity is zero beyond 5 BL ≈ 22.5 cm, but it is still 1093 noticeable at a distance of 10 BL ≈ 30 cm in H. rhodos-1094 tomus). Attraction almost always dominates alignment 1095 in D. rerio (the intersection of the red and blue lines 1096 in Fig. 14A is at around 0.5 BL), while, in H. rhodos-1097 tomus, alignment was found to dominate attraction at 1098 short distances (under 2.5 BL).

  1099

1105(E

  Ali is higher when |ψ ij | < 80 • ). In D. rerio, attrac-1106 tion is stronger when the other fish is clearly behind 1107 the focal fish (O Att is higher when ψ ij ≈ ±135 • ) and 1108 moves in the opposite direction (E Att is higher when 1109 |φ ij | > 100 • ; see Figs. 14EF). 1110 In both species, the strength of the alignment van-1111 ishes when fish are already almost aligned (O Ali ≈ 0 1112 when |φ ij | < 30 • ; see panels C and F in Fig. 14). In 1113 D. rerio, the strength of the alignment is active essen-1114 tially when both fish are perpendicular to each other 1115 (the high intensity of |O Ali | ≈ 1.5 is reached when 1116 φ ij ≈ ±85 • ) and the focal fish has its neighbour at 1117 one of its sides (E Ali is peaked at ψ ij ≈ ±85 • ), while 1118 in H. rhodostomus, the ranges of interaction both in 1119 the angle of relative heading and in the angle of per-1120 ception of the neighbour are much wider: alignment 1121 is active when the neighbour is ahead of the focal 1122 fish (|ψ ij | < 100 • ) and fish are simply slightly aligned 1123 (45 • < |φ ij | < 135 • ). 1124 In summary, when swimming in pairs, H. rhodosto-1125 mus interact in a much wider range of situations than 1126 D. rerio. This is true with respect to the three state 1127 variables of a focal fish: 1) the distance d ij at which 1128 both attraction and alignment interactions are active is 1129 much larger in H. rhodostomus than in D. rerio; 2) the 1130 zone around a focal fish where the strength of the inter-1131 actions with a neighbour is important is much wider in 1132 H. rhodostomus than in D. rerio, and 3) the same is true 1133 for the range of relative headings for which the intensity 1134 of interactions between fish is not negligible. Finally, 1135 the maximum intensity of the interaction is similar in 1136 both species, although high intensity values are reached 1137 in a much wider range of situations in H. rhodostomus 1138 than in D. rerio.

1139 5

 5 Discussion and conclusions 1140 Behavioural biology has recently become a "big-data 1141 science" mainly supported by the advances in imaging 1142 and tracking techniques. These new tools have revolu-1143 tionized the observation and quantification of individual 1144 and collective animal behaviour, improving to unprece-1145 dented levels the variety and precision of available data 1146 [9, 26, 27, 28]. As the access to large volumes of data 1147 is gradually stepping animal behaviour research into a 1148 new era, there is also a growing need for understand-1149 ing interactions between individuals and the collective 1150 properties that emerge from these interactions. Ani-1151 mal societies are complex systems whose properties are 1152 not only qualitatively different from those of their indi-1153 vidual members, but whose behaviours are impossible 1154 to predict from a prior knowledge of individuals [3, 4]. 1155 However, understanding how the interactions between 1156 individuals in swarms of insects, schools of fish, flocks 1157 of birds, herds of ungulates, or human crowds give rise the considered species, their motion mode, and their an-1196 ticipated interactions. For instance, for the fish species 1197 that have a burst-and-coast swimming mode, the dy-1198 namical model is intrinsically discrete in time and re-1199 turns the angle change of an individual after each kick. 1200 For humans or some other fish species with a smooth 1201 swimming mode, a continuous-time model is necessary. 1202 The unknown interaction functions defined in the 1203 structure of the model are not constrained, and the aim 1204 of the extraction procedure (step 4 in Fig. 6) is to mea-1205 sure them, without any a priori assumption about their 1206 form or intensity. In order to achieve that, each un-1207 known single-variable interaction function is tabulated 1208 on a one-dimensional grid, and their values at each grid 1209 point are the fitting parameters. These parameters are 1210 then determined by minimizing the mean quadratic er-1211 ror between the prediction of the model and the ex-1212 perimental angle changes after a kick (in the case of 1213 discrete dynamics) or the experimental acceleration (in 1214

  1322 and-tumble motion mode), and the behavioural differ-1323 ences between the species is solely and fully encoded in 1324 their different measured interaction functions. 1325 In the specific case of H. rhodostomus and D. rerio, 1326

1329Fig. 14 )

 14 Fig. 14), which is wider for D. rerio and extends up to 1346

1428Figure 1

 1 Figure1: State variables of a focal fish i with respect to its neighbour j. Fish position is determined by the position of the centre of mass of the fish (black circles) in a orthonormal system of reference Oxy. d ij : distance between fish; v ij = v j -v i : relative velocity of j with respect to i; ψ ij : viewing angle with which i perceives j; φ ij = φ j -φ i : relative heading of j with respect to i. Angles are measured with respect to the horizontal axis of coordinates Ox; we use the convention that angles are positive in the counterclockwise direction.

Figure 2 :

 2 Figure 2: Force maps of H. rhodostomus swimming in a circular arena of radius 0.25 m. Heading change δφ of a focal fish, located at the origin and pointing north in the four panels, as a function of (A) the distance to its neighbour d ij and the angle of perception of its neighbour ψ ij , (B) the distance d ij and its relative heading φ ij , (C) the left-right distance d LR ij and φ ij , and (D) the relative heading φ ij and the front-back distance d FB ij . The colour scale shown in the right represents the average value of heading change δφ. Distances are measured in body lengths (BL), angles in degrees.

Figure 3 :

 3 Figure 3: Force maps of D. rerio swimming in a circular arena of radius 0.29 m. Heading change δφ of a focal fish, located at the origin and pointing north in the four panels, as a function of (A) the distance to its neighbour d ij and the angle of perception of its neighbour ψ ij , (B) the distance d ij and its relative heading φ ij , (C) the left-right distance d LR ij and φ ij , and (D) the relative heading φ ij and the front-back distance d FB ij . The colour scale shown in the right represents the average value of heading change δφ. Distances are measured in body lengths (BL), angles in degrees.

Figure 4 :

 4 Figure 4: Density maps of the location of a neighbouring fish j in the system of reference centred on the focal fish i. (A) H. rhodostomus in an arena of radius 0.25 m, and (B) D. rerio in the arena of radius 0.29 m, when the focal fish is at least at 2 BL (6 cm) in H. rhodostomus and 1 BL (4.5cm) in D. rerio from the wall of the tank. The vertical arrow pointing north located at the centre of the coordinate system indicates the position and orientation of the focal fish i.

Figure 5 :

 5 Figure 5: General overview of the methodology. The successive steps carried out in our method are labeled with a number and illustrated with a representative picture: 1: Trajectories of real fish from experimental data; 2: Observables of collective behaviour, the distance d ij between fish, the relative position φ ij , and the relative orientation φ ij , and PDF of d ij ; 3: Model equations of the heading angle changes δφ; 4: Extracted interaction functions F Att , F Ali , E Att , O Att , O Ali , and O Ali , and their dependence on d ij , ψ ij , and φ ij ; 5: Trajectories resulting from the numerical simulations of the model. The dark blue arrow illustrates the possibility that the cycle starts again, which includes the realisation of a new set of experiments or the design of a new setup, to check the predictions of the model or to deepen our understanding of the mechanisms at work.

Figure 7 :

 7 Figure7: Probability density functions (PDF) of (A) distance between fish d ij , (B) difference of heading φ ij , and (C) angle ψ follower with which a fish i perceives its neighbour j when |ψ ij | < |ψ ji | (the "geometrical follower" is hence the fish which would have to turn the less to face the other fish, the latter being called the "geometrical leader"). Blue lines: H. rhodostomus in a circular arena of radius 0.25 m, red lines: D. rerio in a circular arena of radius 0.29 m. The vertical dashed lines in panel (A) denote the relative radius R/BL of the arena with respect to fish body length of each species, 8.3 in H. rhodostomus and 6.4 in D. rerio (with 1 BL= 0.03 m in H. rhodostomus and 0.045 m in D. rerio).

Figure 8 :

 8 Figure 8: Detailed description of the successive substeps involved in the extraction of the interaction functions (step 4 of our method). For each substep, a short text describes what is done and the main formulas used to carrying it out.

Figure 9 :

 9 Figure9: Construction of the error function ∆( X) in a simple two-dimensional case where a(x, y) = f (x)g(y). After discretising the variables x and y in I and J intervals respectively, the values of a(x, y) are distributed in the resulting ij-boxes. The number of data in each box ǫ ij is counted, and the mean value of a(x, y) in each box, a ij , is calculated. The square error is formulated in each box, (f i g j -a ij ) 2 , and summed up along all boxes. Starting from an initial guess of I + J values f 0 i , g 0 j , i = 1, . . . , I, j = 1, . . . , J, which produces a set of I × J green balls (one per ij-box), the iterative process is carried out. At each iteration, the green balls of each box converge globally towards the yellow balls, until a minimum of the error ∆( X) is reached. The final values f n i , g n j (blue and red points respectively) are then fitted by means of analytical expressions, which are the interaction functions represented by the blue and red solid curves. Note that n is the index of iteration, not the time discretisation index.

Figure 10 :

 10 Figure10: Force maps and reconstruction of the interaction functions in a simple case. (AB) Force maps of the function a(x, y) + η(x, y) for two levels of noise, of zero mean and amplitude (A) 0.35, which is the one observed in the experiments with H. rhodostomus, and (B) 3.5, a level of noise ten times higher. We used the same distribution of points ǫ ij than the one observed in the experiments with H. rhodostomus. (CD) Reconstruction of the interaction functions (C) f (x) and (D) g(y) extracted with our procedure (red dots and blue circles), compared to the analytical expressions exp[-(x/x 0 ) 2 ] and √ 2 sin(y) respectively (black lines). The red dots correspond to the case of a noise of amplitude 0.35, where we used 20 nodes in x and 31 in y, and the blue circles to the case with a much higher level of noise (3.5) and with less nodes in x, 11 instead of 20. Note that the function g(y) is normalized.

Figure 11 :

 11 Figure 11: Evolution of the iterative process for the minimization of the error function ∆( X) in the simple case where a(x, y) = √ 2 exp[-(x/x 0 ) 2 ] sin(y). Blue circles denote the successive values of the I + J components of the unknown functions f n i and g n j during the first 120 steps of the iterative process. Red lines show the initial guess of each function f 0 i = g 0 j = 1, i = 1, . . . , I and j = 1, . . . , J, and the final state of convergence. Note that n is the index of iteration, not the time discretisation index.

Figure 12 :Figure 13 :

 1213 Figure 12: Colour maps of (A) the non-separable function b(d, ψ) = √ 2e -d 2 /(2l 2 0 ) sin ψ+1.13e -d 2 /(2l 2 2) sin ψ cos(2ψ) and (B) the solution found by the reconstruction procedure f (d)g(ψ) = 1.34e -d 2 /(2l 2 0 ) sin ψ + 0.83e -d 2 /(2l 2 0 ) sin ψ cos(2ψ). Red and blue solid lines: Cuts of the surface of b 1 (d, ψ) for a fixed value of (C) ψ = π/2 (red) and ψ = π/4 (blue), and (D) d = 0.03 (red) and d = 0.1 (blue). Black dots denote the reconstructed functions f i in (C) and g j in (D). Solid black lines in both panels are the analytical expressions found for the reconstructed functions. Red and blue dots are cuts of the reconstructed solution f i g j corresponding to the respective cut of the non-separable function b 1 (d, ψ). Values of the cuts are f (0.03) = 0.67, f (0.1) = 0.26, g(π/2) = 0.73 and g(π/4) = 1.36. A noise of the same amplitude as the one measured in the experimental data of H. rhodostomus was added to b 1 (d, ψ) to create the data set for the reconstruction procedure. The same data structure (number of data per box) as the one found in real fish has been used. We have used I = 21 and J = 31.

Figure 14 :

 14 Figure 14: Analytical expressions of the social interaction functions of H. rhodostomus (ABC) and D. rerio (DEF) swimming in arenas of radius 0.25 and 0.29 m respectively (solid lines), interpolating the discrete values extracted from the experimental data with the procedure described in Sec. 3 (dots). (AD) Intensity of the attraction (red) and alignment (blue), modulated by the angular functions of (BE) attraction and (CF) alignment.

Figure 15 :

 15 Figure 15: Iterations converging to (x * , x * ). Red line: function f (x); brown line: y = x; thin polygonal: iteration process; coloured dots: successive values of x n .

  Then, for instance, huge variij = 1 BL, ψ ij = 90 • and φ ij = 10 • with respect 377 to a focal fish i, is the same than the probability of be-

	370
	371	a crucial feature of the behaviour can be hidden by the
	372	averaging process. Second, averaging by simply adding
	373	the values and dividing by the number of values implic-
		itly assumes that the probability of occurrence is the
	378
		ing at (d ij , ψ ij , φ ij ) = (2, 0, 180), which is clearly not
	392
	393	Note that even if the true interactions were in fact sep-
	394	arable into a product of one-variable interaction func-
	395	tions, δφ = f (d)g(ψ)h(φ), the 2D projection would then
	396 397	be δφ(ψ, φ) = g(ψ)h(φ) × tegral term (averaging over the distance between the ∞ 0 C(r, ψ, φ)f (r) dr. The in-
	398	two fish) leads to an unknown and non trivial function
	399	of ψ, and φ, which is in general not separable unless the
	400	correlation function is itself separable... And it is not:
	401 402	if 2 fish are close, they are likely to be aligned (φ ≈ 0), whereas if they are far, their headings are much less cor-
	403	related (φ nearly uniformly distributed). This simple
	404	example demonstrates that force map projections not
	405	only do not recover the true interaction (g(ψ)h(φ) in
	406	this case), but can artificially produce a non-separable
	407	interaction, even if the actual interaction takes a prod-
	408	uct form!
	409	As a consequence, the small number of dimensions
	410	that can be represented by force maps constitutes a cru-
	411	cial limitation for an accurate description of behaviour,
	412	especially if more variables are taken into account, as,
	413	e.g., the relative speed v ij , or the interaction of fish with
	414	an obstacle (such as the wall of a tank), which would
	415	require two more variables r w,i and θ w,i , the distance
	416	and angle to the wall, respectively. Even for the de-
	417	picted intermediate values, the precise contributions of
		each variable on the heading change are still entangled.

367

ations of δφ with respect to ψ ij , but of different sign, 368 can cancel each other and yield a small average value, 369 as if δφ was almost independent of ψ ij . In other words, 374 same for all the possible states.

1

This would mean for 375 instance that the probability for a fish j of being at the 376 state d 379 the case, at least in H. rhodostomus

[START_REF] Calovi | Disentangling and Modeling Interactions in Fish with Burst-and-Coast Swimming Reveal Distinct Alignment and Attraction Behaviors[END_REF]

. 380 Thus, even if averaging over some state variables to 381 obtain a 2D force map can provide qualitative informa-382 tion, it can also hide crucial effects and can even pro-383 duce a completely misleading result due to the strong 384 correlations between the states variables along the ac-385 tual trajectories. For instance, averaging the interac-386 tion between 2 fish (and neglecting the effect of the 387 wall) over their distance d, to only keep the depen-388 dence on the two angular variables ψ (viewing angle) 389 and φ (heading difference) in a 2D representation, in-390 volves the unknown correlation function C(d, ψ, φ) be-391 tween d, ψ, and φ along the experimental trajectories.

Method to extract and model 494 social interactions from be- 495 havioural data

	480
	481	ical characteristics of the species (e.g., the body length,
	482	which is a fixed parameter of the species)?
	483	The method we present below does not have these
	484	limitations, first, because it can handle a large number
	485	of state variables (i.e., of dimensions), and second, be-
	486	cause the analytic expressions it provides are precisely
	487	the optimal way to disentangle the interaction functions
	488	at play and to describe the role of each state variable
	489	and each parameter of the system. These analytic ex-
	490	pressions can then be exploited to build an explicit and
	491	yet concise model, whose agreement with experiment
	492	can be tested, and whose predictions can be further in-
		vestigated experimentally.
	496
	497	Section 2 shows that force maps are representations of
	498	one quantity (action force, acceleration, heading varia-
	499	tion, etc.) as a function of pairs of other quantities (rela-
	500	tive position, velocity or orientation, angle of perception
	501	of other individuals, etc.). These quantities only make
	502	sense in a framework of the physical world described
	503	by a mathematical model which, even if it is often not
	504	mentioned explicitly in studies [18, 19, 22, 23] (but see
	505	also [13, 24, 25]), is usually based on equations of mo-
	506	tion built in analogy with Newtonian mechanics.
	507	The method consists essentially in defining this
	508	framework and deriving the mathematical model de-
	509	scribing the relation between the quantities used to
	510	quantify the behavior of an organism and its interac-
	511	tions with other organisms or physical objects that are
	512	present in its environment.
	513	Of course, our procedure requires the measurements
	514	(i.e., the distribution) of the heading changes δφ, and
	515	also to calculate the average in each box of the discre-
	516	tised grid. However, our procedure does not require at
	517	any moment to represent heading changes as a function
		of two or more variables, i.e., using force maps.

493 3

  l M , f1 , . . . , fI , ĝ1 , . . . , ĝJ , ĥ1 , . . . , ĥK , l1 , . . . , lM ), and where δφ S,ijkm = f i g j h k l m + fi ĝj ĥk lm is the dis-

	684
	685	cretisation of the social force in each ijkm-box (the
		unknowns), δφ ijkm is the mean heading change in the

686 ijkm-box (calculated from experimental data), and 687 ǫ ijkm is the number of data in the ijkm-box. By weight-688 ing the regions with more data, the factor ǫ ijkm allows 689 to preserve the structure of the dataset and the corre-690 lations between variables resulting from the dynamics 691 (see also note 1 in Sec. 2). For a given X, the local 692 error in the ijkm-box is defined as the difference be-693 tween X and the experimental data, δφ S,ijkm -δφ ijkm . 694 Then, the local error is squared and weighted by the 695 number of data in the box, ǫ ijkm , and summed up over

696

3 On the hypothesis of separation of 868 variables of interaction functions

  ). Typical values of λ can be much Such a function can always be expanded in Fourier series as

	833
	834	smaller (λ = 0.75), depending on how close the initial
	835	guess is from the solution.
	836	The final state to which the iterative method has
	837	converged, that is, the points {f i } I i=1 and {g j } J j=1 that solve the reduced system (31), is shown in Figs. 10CD.
	869
		The central assumption of the extraction procedure is

838

There is an excellent agreement with the original data, 839 despite the addition of noise, including in the case of a 840 much larger noise than the one inferred in the actual 841 data of our fish experiments.

842

Note that if f and g are a solution of (31), then 843 the functions (1/α)f and αg, where α is a real num-844 ber, are also a solution of

[START_REF] Bonnet | Development of a mobile robot to study the collective behavior of zebrafish[END_REF]

, since the product of the 845 two functions remains invariant. Hence, we need to im-846 pose an additional condition in order to account for this 847 under-determination and to generally allow for a proper 848 comparison of reconstructed interaction functions. Fol-849 lowing [12], we chose to normalize all angular functions 850 so that their squared average is equal to 1. In particu-851 lar, g is normalized such that (1/2π) π -π g(y) 2 dy = 1, a 852 normalization applied in Figs. 10CD. 853 The last step consists in finding simple analytical 854 expressions that interpolate the discrete values of the 855 reconstructed interaction functions, in order to imple-856 ment them in an explicit mathematical model. There 857 is an infinite number of combinations, so that one must 858 be guided by key physical features of the phenomenon 859 under study that are well established, properties such 860 as symmetries, analogies with other physical systems. 861 For example, in the case of angular functions, the par-862 ity is often easily identifiable from the data or can be 863 asserted from general principles (mirror symmetry, left-864 /right symmetry...), so that few Fourier modes can be 865 sufficient to interpolate the angular functions from the 866 data that result from the reconstruction procedure.

867 3.870 the separation of variables made in (4)-(6). Without 871 this hypothesis, the solution of Eq. (3) far from the wall 872 is δφ S (d i , ψ j , φ k , v m ) = δφ ijkm , and we are lead back to 873 force maps, with all contributions still entangled and 874 no analytical expressions of the interaction functions. 875 Variables separability is thus crucial for our method. 876 However, what happens if the interaction functions do 877 not satisfy this condition? 878 Consider a 2D-function a(d, ψ), odd in ψ.

  Asis turned to the right; that is, δφ Ali must be 1016 an odd function of φ ij , and thus an even function of ψ ij .

	1008
	1009	suming perfect left/right symetry, this exactly means
	1010	that δφ Att must be an odd function of ψ ij , and thus
	1011	an even function of φ ij , provided fish do not have side
	1012	preferences to turn (that is, fish do not prefer turning
	1013	left to turning right). Similarly, to have an interaction
	1014	of alignment, the fish must turn left when the relative
	1015	heading of its neighbour is turned to the left, and turn
	right if it 1017

Table 1 .

 1 Table 1 shows the parameter values correspond-Parameter values for H. rhodostomus and

	1058
	1059	ing to each species. Note that the values for H. rhodos-
	1060	tomus have been adapted from those in [12], according
	1061	to the slightly different expression used here.
			H. rhodostomus D. rerio
		R (m)	0.25	0.29
		R/BL	8.33	6.44
		γ Att	0.124	0.42
	1062	d Att (m)	0.03	0.015
		l Att (m)	0.193	0.042
		γ Ali	0.092	0.32
		d Ali (m)	0.03	0.045
		l Ali (m)	0.16	0.1

718

a hat (e.g., " fi ") is obtained by replacing the functions Acknowledgements 1451

ducted under authorization approved by the state eth-1360 ical board of the Department of Consumer and Veteri-1361 nary Affairs of the Canton de Vaud (SCAV) of Switzer-1362

that have a hat by the same functions without the hat, 720 and vice versa (i.e., "g j " is replaced by "ĝ j ", "ĝ j " is tively, and α 2 = 0.8α 0 ≈ 1.13 in both functions. Note


est destinée au dépôt

  Long-term safety and efficacy of dupilumab in patients with moderate-to-severe asthma (TRAVERSE): an open-label extension study Michael Wechsler, Linda Ford, Jorge Maspero, Ian Pavord, Alberto Papi, Arnaud Bourdin, Henrik Watz, Mario Castro, Natalia Nenasheva, Yuji Tohda, et al. To cite this version: Michael Wechsler, Linda Ford, Jorge Maspero, Ian Pavord, Alberto Papi, et al.. Long-term safety and efficacy of dupilumab in patients with moderate-to-severe asthma (TRAVERSE): an open-label extension study. The Lancet Respiratory Medicine, 2021, 10.1016/S2213-2600(21)00322-2. hal-


Jana De Brandt

Chris Burtin

Pascal Pomiès

Frank Vandenabeele

Kenneth Verboven

Joseph Aumann

Laura Blancquaert

Inge Everaert

Lisa Van

Carnosine, oxidative and carbonyl stress, antioxidants and muscle fiber characteristics of quadriceps muscle of patients with COPD

à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.