Emilie Hummel

Claudio Pacchierotti

Valérie Gouranton

Ronan Gaugne

Theophane Nicolas

Anatole Lécuyer

Haptic Rattle: Multi-Modal Rendering of Virtual Objects Inside a Hollow Container ⋆

Keywords: Haptics, Multi-modal rendering, Interaction

The sense of touch plays a strong role in the perception of the properties and characteristics of hollow objects. The action of shaking a hollow container to get an insight of its content is a natural and common interaction. In this paper, we present a multi-modal rendering approach for the simulation of virtual moving objects inside a hollow container, based on the combination of haptic and audio cues generated by voice-coils actuators and high-fidelity headphones, respectively. We conducted a user study. Thirty participants were asked to interact with a target cylindrical hollow object and estimate the number of moving objects inside, relying on haptic feedback only, audio feedback only, or a combination of both. Results indicate that the combination of various senses is important in the perception of the content of a container.

Introduction

The action of shaking a hollow container to get an insight of its content is a natural reflex [START_REF] Plaisier | How many objects are inside this box[END_REF]. This way of interacting can be of great value in Virtual and Augmented Reality applications, e.g., for the manipulation of virtual instruments such as maracas or to get insights on the number of incoming messages on a smartphone [START_REF] Williamson | Shoogle: excitatory multimodal interaction on mobile devices[END_REF]. When interacting with a hollow container that houses one or multiple objects inside, we take advantage of multiple senses to identify various characteristics of the hidden objects, e.g., their shape, weight, size, material, all of them affecting the way they interact with the hollow object when shacked.

This paper introduces a multi-modal method for the rendering of multiple virtual moving objects inside a hollow container, combining audio and haptic feedback for applications in Virtual and Augmented Reality. Starting from an acceleration-based interaction model of the moving objects with respect to the hollow object, we generate the interactions to be rendered through the audio and/or haptic output systems. We called the proposed approach "Haptic Rattle", and performed a user study to assess this approach.

Related Work

The perceptual and interaction aspects of manipulating a hollow container filled with small moving objects have been investigated in the literature. Sekiguchi et al. [START_REF] Sekiguchi | Haptic Interface using Estimation of Box Contents Metaphor[END_REF] evaluated the perception of feeling a moving object inside a larger container using two solenoids. They assessed the user's ability to discriminate between four interaction models representing a box with an object inside, with only one model faithfully simulating such interaction. Results showed that users were able to effectively discriminate each interaction model [START_REF] Sekiguchi | Inertial Force Display to Represent Content Inside the Box[END_REF]. Tanaka et al. [START_REF] Tanaka | Shaking a Box to Estimate the Property of Content[END_REF] assessed the ability of users to discriminate changes in the inner parameters of their model to render the presence of moving objects in a container, using voice coil motors. Similarly, Yamamoto et al. [START_REF] Yamamoto | Recognition of Weight through Shaking Interaction[END_REF] tested the perception between a real and virtual model for solid and liquid content inside a container, with no significant difference between the two models. On another line, the Gravity Grabber of Minamiza et al. used two motors to actuate the motion of a belt onto the fingertip of the user, providing the sensation of holding a glass with liquid inside [START_REF] Minamizawa | Gravity grabber: wearable haptic display to present virtual mass sensation[END_REF]. Such approach ignores the proprioceptive/kinesthetic aspects of holding a mass, but still offers a reliable feeling of weight and the ability to discriminate between objects with different levels of liquid [START_REF] Minamizawa | Interactive representation of virtual object in hand-held box by finger-worn haptic display[END_REF]. Other works aim at improving the realism of simulating the presence of one or multiple objects inside a container using the combination of a voice coil motor and impact actuators [START_REF] Park | Realistic haptic rendering of collision effects using multimodal vibrotactile and impact feedback[END_REF], the high-speed change of the rotational inertia [START_REF] Shimizu | Unident: Providing impact sensations on handheld objects via high-speed change of the rotational inertia[END_REF], physics-based haptic vibrations interface [START_REF] Williamson | Shoogle: excitatory multimodal interaction on mobile devices[END_REF] or library [START_REF] Park | A physics-based vibrotactile feedback library for collision events[END_REF].

While effective, these works focus on rendering the motion of single objects inside a hollow container. On the other hand, Plaisier and Smeets [START_REF] Plaisier | How many objects are inside this box[END_REF] performed an experiment on the ability to perceive the numerosity of objects inside a container, using a tangible box filled with real spheres. Their experiment assessed the number of spheres the participants could accurately detect using audio and haptic or only audio cues, considering between one and five spheres. Results showed that participants accurately detected up to three spheres but underestimated their numerosity when presented with four or five. Finally, results were significantly more accurate when the participants had audio and haptic feedbacks with respect to when they were provided only with audio feedback.

With respect to the abovementioned works, we present a simplified physicinteraction virtual model that can be easily evaluated at runtime for an arbitrary number of virtual moving hidden objects. To assess the viability of our rendering model, we carry out a user study inspired by the work of Plaisier and Smeets [START_REF] Plaisier | How many objects are inside this box[END_REF].

Methods

When interacting with a container filled with one or more moving objects, the manipulation of the hollow container provides various feedbacks, such as the feeling of the objects hitting or rolling on the inner surface of the container. If the container is rigid, this feedback has audio and haptic components that are characterized by many factors, such as the magnitude of the container's movement and the materials and size of the moving objects. The user's imparted movement on the container is essential in this perception as it directly causes the interactions of the moving objects and thus the resulting audiohaptic sensations. To render such interactions, we propose an interactive acceleration-based model combined with a multi-modal audio-haptic rendering.

Apparatus

As a proof-of-concept, we use a 3D-printed hollow cylinder which dimensions allow comfortable grasping, containing two haptic voice coil actuators on each base (HapCoil-One, Actronika, FR) and an IMU MPU6050 with a sampling rate of 1kHz, a 3-axis gyroscope and a 3-axis accelerometer in the middle (see Fig. 1a). The voice coils are connected to a TDA3116D2 dual-channel amplifier, powered by a 5V power supply, and a stereo 24-bit 96kHz MOTU sound card. The actuators are used to simulate the interaction of virtual spheres inside the container, while the IMU registers the cylinder accelerations when it is shaken by the user. The haptic actuators are inserted symmetrically inside the cylinder, to avoid favoring one handedness over the other. The IMU is set up in a plane position to minimize the impact of rotational movements.

Acceleration-Based Rendering Model

We chose a simple acceleration-based model to enable the fast simulation of an arbitrary number of moving objects inside the container. It registers the data from the IMU and then provides the acceleration parameters for the multi-modal rendering. The acceleration data is filtered using a low-pass filter at frequency ω 0 = 60Hz and then integrated to output the movement velocity. When the acceleration is higher than a threshold a t = 0.5 m/s 2 , the magnitude and direction of the movement are transmitted to the rendering algorithm. The frequency ω 0 and the threshold a t are tuned based on empirical data coming from pilot experiments, so as to correctly detect when the user is shaking the cylinder. In the world reference frame, the forces acting on the system are the gravity, the inertia of each element, and the force applied by the user. The force applied on each sphere is induced by the acceleration induced by the cylinder movement. Each sphere follows the simple equation: ⃗ F + ⃗ g + ⃗ i = m⃗ a, with ⃗ F being the acceleration applied to the cylinder by the user, ⃗ g the acceleration gravity, ⃗ i the inertia component, m the mass and ⃗ a the acceleration of the sphere. The gravity and inertial physic interactions are handled through the physics engine of Unity 3D, in which we add the forces induced by the user movements. In the cylinder's reference frame, the sphere follows the movement applied by the user with a small delay, induced by the inertia, which depends on the mass of the object. The inertia has an impact on the realism of the interaction [START_REF] Park | Realistic haptic rendering of collision effects using multimodal vibrotactile and impact feedback[END_REF], however, the simulated spheres are small objects with a small mass. The induced inertia is therefore small as well. For this reason, to reduce the complexity of the algorithm, we considered inertia negligible.

Vibrations and sounds generated by the interaction of the spheres with the cylinder are highly dependant on the inner properties of the cylinder itself. The vibratory impact of a small object against a surface can be simplified as the combination of a sinusoidal signal and an exponential decay, inspired by the model of [START_REF] Okamura | Vibration feedback models for virtual environments[END_REF] (see eq. ( 1)). The resulting low-frequency signal depends on a decay constant B, and the frequency ω. B and ω depend on the modulus of elasticity of the material, and on the density and geometry of the object,

Q(t) = e -Bt sin(ω • t) (1)
If we consider objects with a regular shape, this equation allows to tune the interaction for any material by recording repeated impacts and fitting the sinusoidal waveform and decay to match the record. This signal corresponds to the output feedback and only needs to be modulated by the object velocity ⃗ ν before being displayed through the audio and/or haptic output systems. In our implementation, we used voice-coil actuators for haptic feedback and hi-fi headphones for audio feedback. The signal is displayed through two audio channels, which are independently controlled depending on the direction/location of the impact. Doing so, when the user shakes the container, the system is able to detect its movement and effectively simulate the presence of an arbitrary number of spheres moving inside. Fig. 2 shows a diagram of the rendering process. The IMU acceleration data are computed into an estimated velocity vector ⃗ ν. f (ν) is a linear function computing a gain factor from each sphere acceleration, based on ν value and the configuration of the spheres inside the container. This factor is used to modulate the audio and haptic signals. Audio signal S a (t) is then computed based on signal R(t) of recorded impact sounds from the desired objects, e.g. wooden spheres, with multiple frequencies and intensities of impact,

S a (t) = f (ν)R(t) (2)
On the other hand, the parameters (B, ω) are chosen according to a wood material (B = 154 s -1 ; ω = 67 rad/s) to compute Q(t) in eq. ( 1), on which is based the haptic signal S h (t),

S h (t) = f (ν)Q(t) (3)
These signals are then duplicated according to the number of spheres n and displayed according to the feedback condition considered, with a randomized delay between two empirical values (0 ms and 100 ms) to give a natural effect of collisions.

User Study

We conducted a user study to assess the effectiveness of our approach in simulating the presence of an arbitrary number of virtual moving objects inside a hollow container. A video is available at https://youtu.be/cMXTvAOvQtc.

Population, Materials and Setup

Thirty participants volunteered to participate in this experiment, aged between twenty and fifty-five years old. Among the participants were eight women and twenty-two men, five left-handed and twenty-five right-handed. The setup is that described in Sec. 3.1 and shown in Fig. 1b. Users are asked to sit comfortably in front of a computer screen while manipulating the hollow cylinder. The screen shows the instructions of the experiment and enables the user to answer the related questions. Users also wear a pair of headphones for providing audio feedback when this type of feedback is considered, as well as for masking any external audio cues when dealing with haptics-only conditions, e.g., they can mask the audio cues coming from the vibrating voice-coil actuators.

Experimental Conditions and Hypotheses

The design of our user study was inspired by that of Plaisier and Smeets [START_REF] Plaisier | How many objects are inside this box[END_REF]. Participants were asked to power grasp the cylinder with their dominant hand, as shown in Fig. 1b, shake the cylinder along its main axis (left-right movement) for five seconds, and answer the question: "How many spheres do you feel moving inside the container?". As the cylinder was shaken, the rendering algorithm described in Sec. 3 provided the user with compelling audio or/and haptic feedback to simulate the presence of multiple spheres. We considered three feedback conditions: combined haptics and audio feedback (H+A), audio-only feedback (A), and haptics-only feedback (H). For each condition, the number of simulated spheres inside the hollow container varies from one to five. Each participant carried out 15 repetitions of the trial per condition and per number of spheres, yielding 15 (repetitions) × 3 (feedback conditions) × 5 (number of simulated spheres) = 225 trials, that were randomized. Following the results of Plaisier and Smeets [START_REF] Plaisier | How many objects are inside this box[END_REF] (see Sec. 2), our hypotheses (HP) are as follows:

HP1: Participants can effectively discriminate the presence of up to three spheres inside the container. HP2: Participants underestimate the number of spheres when there are four or five spheres in the container. HP3: Participants show a better recognition score with composite audiohaptic (H+A) feedback than with audio (A) or haptic (H) only feedback.

Our objective is to achieve a performance as close as possible to that that humans achieve when interacting with a hollow container filled with real objects.

Results

The following results are the analysis of the experiment data. We observed a learning effect on the five first trials for each participant and therefore removed the related answers, leaving seventy trials for each condition. Two subjects were considered outliers and removed from this data analysis, as they were unable to follow the experiment indications and did not understand the experimental task. To avoid any bias, we did not provide them with additional information with respect to the other participants. Fig. 3 shows the mean and standard deviation of the user's answer in discriminating the number of spheres inside the container, for each actual rendered number of spheres and conditions. We evaluated the error between the user's reported numerosity and the actual rendered one, computed simply as the absolute value of the difference between the actual and reported numerosity. Then, we carried out statistical analysis to see whether there is a difference with respect to the feedback condition (H+A, A, H) or the number of rendered spheres [START_REF] Minamizawa | Gravity grabber: wearable haptic display to present virtual mass sensation[END_REF][START_REF] Minamizawa | Interactive representation of virtual object in hand-held box by finger-worn haptic display[END_REF][START_REF] Okamura | Vibration feedback models for virtual environments[END_REF][START_REF] Park | Realistic haptic rendering of collision effects using multimodal vibrotactile and impact feedback[END_REF][START_REF] Park | A physics-based vibrotactile feedback library for collision events[END_REF]. Boxplots of the reported number of spheres and error per condition and number of presented spheres are reported in Fig. 4. We used non-parametric tests because the user's response is not on a continuous scale. The Kruskal-Wallis rank sum test for error according to the conditions shows a significant difference between at least two conditions (p < 0.001, χ 2 (2)=33.279). The pairwise Wilcoxon rank sum test with continuity correction confirms these results, with a significant difference between conditions (H) vs. (A), z = 3.83 and p < 0.001, and (H) vs. (H+A), z = 5.62 and p < 0.001, but no significant difference between (A) vs. (H+A), z = 1.83 and p > 0.1.

Discussion and Conclusion

This paper introduces a multi-modal rendering approach for presenting an arbitrary number of virtual moving objects inside a hollow container, using voicecoil actuators and audio headphones to provide haptic and audio feedback about their interaction, respectively. We carried out a user study to assess the capability of human users to effectively discern the number of virtual spheres moving inside the hollow container, providing them with audiohaptic feedback (H+A), audio feedback only (A), or haptic feedback only (H). Results summarized in Figs. 3 and4 show that, in general, subjects were quite good at estimating the number of spheres rendered inside the hollow container, proving the effectiveness of the proposed rendering techniques. This is especially true when 1 to 3 spheres were rendered, confirming the results of [START_REF] Plaisier | How many objects are inside this box[END_REF] and HP1. As also seen in [START_REF] Plaisier | How many objects are inside this box[END_REF], as the number of rendered spheres augments, users tend to underestimate their number, confirming also HP2. Indeed, after 3 rendered spheres the curves shown in Fig. 3 flatten and never reach 5. This phenomenon is stronger for condition (H), and it is very similar in conditions (A) and (H+A). Also, the standard deviation increases as the number of rendered spheres increases. The statistical analysis of the results reveals that performance under (H) is significantly different (worse) than the two other conditions, but no significant difference between (H+A) and (A) was found, partially disproving hypothesis HP3.

Asking the users about their strategies revealed a certain similarity. They fall into two main categories: the first one consists of repeatedly and energetically shaking the container and comparing the intensity of the feedback with previous trials; the second one consists of counting the impacts on one extremity of the cylinder after a single energetic stroke. These two strategies can be of course mixed together and carried out one after the other.

After the experiment, participants shared their impressions. While they agreed that the task was difficult, some of them expressed that they were "impressed by the realism of the sensation". One participant added that he was "surprised to actually feel the spheres moving in the middle of the cylinder". About the difficulty of the task, participants mostly referred to conditions (A) and (H). Finally, even if we do not measure a significant difference between (A) and (H+A), participants indicated condition (H+A) as significantly easier. (H+A) was overall the preferred condition.

As for future work, it would be interesting to consider the inertia of the simulated spheres, which adds to the realism of the interaction [START_REF] Park | Realistic haptic rendering of collision effects using multimodal vibrotactile and impact feedback[END_REF]. We could also study whether a continuous variation of frequency for the audio feedback has an impact.

Finally, it could be interesting to study a comparison between simulated and real interactions and the impact of the number of actuators inside.

  (a) Hollow container. (b) Experimental setup.

Fig. 1 .

 1 Fig. 1. (a) Our cylindrical prop, housing an IMU and two voice-coil actuators (b) Experimental setup for the manipulation of the device.

Fig. 2 .

 2 Fig. 2. Diagram of the rendering process: from the data sensed by the IMU to the feedback output.

Fig. 3 .

 3 Fig. 3. Presented vs. Reported numerosity of the spheres inside the container. Mean and standard deviation are plotted.

Fig. 4 .

 4 Fig. 4. (Left) Presented vs. Reported numerosity of the spheres inside the container, per condition. (Right) Presented numerosity vs. error, per condition.

⋆ This project has received funding from the European Union's Horizon 2020 program under grant agreement No 801413; project "H-Reality".


Ross Mcvinish

Judith Rousseau

Kerrie Mengersen

BAYESIAN GOODNESS OF FIT TESTING WITH MIXTURES OF TRIANGULAR DISTRIBUTIONS

Keywords: Bayesian nonparametrics, consistency, goodness of fit

We consider the consistency of the Bayes factor in goodness of fit testing for a parametric family of densities against a nonparametric alternative. Sufficient conditions for consistency of the Bayes factor are determined and demonstrated with priors using certain mixtures of triangular densities.

Introduction

A problem common to many statistical analyses is to determine if a sample of n independent and identically distributed observations have been generated from a distribution described by a finite dimensional parametric model. This problem may be stated formally as a test of hypotheses on a density p * ;

H 0 : p * ∈ F 0 against H 1 : p * ∈ F 1 \F 0 ,
where F 0 denotes a set of density functions with a particular finite dimensional parametric representation and F 1 is some encompassing set of density functions such as the set of bounded and continuous densities. All densities are assumed to be with respect to the same dominating measure µ.

Central to the Bayesian approach to hypothesis testing is the Bayes factor which requires the specification of a prior for p * . Let the prior probabilities on H 0 and H 1 be denoted by α and (1 -α), respectively, and let the prior distributions on the sets F 0 and F 1 be denoted by π 0 and π 1 . It is assumed that π 1 (F 0 ) = 0 and we will consider π 1 as a prior on F 1 \F 0 . The overall prior for the density p * may be written as π(A) = α • π 0 (A) + (1 -α) • π 1 (A), for any A ⊂ F 1 . The Bayes factor is then defined by

B n = π (F 0 | Y n ) π (F 1 | Y n ) × π (F 1 ) π (F 0 ) , where π(• | Y n ) = π(• | Y 1 , . . . , Y n )
is the posterior distribution formed with the prior π.

There have been some examinations of the asymptotic properties of the Bayes factor for various F 0 , F 1 . [START_REF] Gelfand | Bayesian model choice: Asymptotics and exact calculations[END_REF] studied the case where both F 0 and F 1 have a parametric representation, in the setup of model choice. In a goodness of fit setup [START_REF] Verdinelli | Bayesian goodness-of-fit testing using infinitedimensional exponential families[END_REF] considered the case where F 0 is a singleton and F 1 is nonparametric. Using an infinite dimensional exponential family prior on F 1 they were able to determine sufficient conditions for consistency. This problem was also studied by [START_REF] Dass | A note on the consistency of Bayes factors for testing point null versus non-parametric alternatives[END_REF] who, based on an application of Doob's theorem, were able to give sufficient conditions for consistency with a general prior π 1 . [START_REF] Walker | On priors with a Kullback-Leibler property[END_REF] studied the related problem where F 0 , F 1 may be arbitrarily defined but the true density p * is not contained in either set.

The objective of this paper is to study the case where F 0 is parametric and F 1 is non-parametric, which is of considerable practical importance. The consistency of the Bayes factor in this general framework is a more delicate problem than the consistency of the Bayes factor in a goodness of fit problem where the null hypothesis is a singleton.

Very recently [START_REF] Ghosal | Nonparametric Bayesian model selection and averaging[END_REF] have provided sufficient conditions for consistency of the Bayes factor when F 0 is parametric. Their main condition given in equation (4.1) is tighter than necessary as can be seen when applying it to nested parametric models.

In section 2 we provide weaker sufficient conditions for the Bayes factor to be consistent in testing a parametric family against a nonparametric alternative and demonstrate that they are close to being necessary.

In practice, the choice of the nonparametric prior is not only determined by theoretical properties but also by the ease of implementation. Various priors have been used for goodness of fit problems in the literature including Dirichlet processes [START_REF] Carota | On Bayes factors for nonparametric alternatives[END_REF], Polya trees [START_REF] Berger | Bayesian and conditional frequentist testing of a parametric model versus nonparametric alternatives[END_REF] and infinite dimensional exponential families [START_REF] Verdinelli | Bayesian goodness-of-fit testing using infinitedimensional exponential families[END_REF]. With priors such as these, verifying that the general conditions given in section 2 hold is far from trivial. In order to overcome this difficulty we consider in section 3 a class of priors based on certain mixtures of triangular distributions which were proposed in [START_REF] Perron | Bayesian nonparametric modeling using mixtures of triangular distributions[END_REF]. Using these priors, we discuss in section 4 the consistency of the Bayes factor for testing a parametric family, giving simple conditions on the parametric family for the Bayes factor to be consistent.

An example is provided where one of the conditions given in section 2 does not hold and the Bayes factor is inconsistent. The rate of convergence for the Bayes factor in the case where F 0 is a singleton is also studied. We conclude with a discussion in section 5. The technical details are presented in the Appendix.

We now give some notations that will be used throughout this paper. For a distribution P with density p, let P n and P ∞ denote its n-fold product and infinite product distribution, respectively. Expectations with respect to these measures will be denoted E n and E ∞ , respectively. The most common measures of distance between two densities p, q are the L 1 -distance, denoted by p -q 1 , and the Hellinger distance h (p, q) = p 1/2 -q 1/2 2 . We allow d to stand for either of these distances. Finally, we let H(L, β) denote the set of Hölder continuous functions, that is the set of functions f

such that f (m) (x) -f (m) (y) < L |x -y| β for β ∈ (m, m + 1].

Consistency of Bayes Factors

Recall that the Bayes factor is said to be consistent if

lim n→∞ B n =    ∞, in P ∞ * probability if p * ∈ F 0 0, in P ∞ * probability if p * ∈ F 1 \F 0 .
In other words any decision in the form : H 0 is accepted if B n > t for some fixed level t gives asymptotically the right answer. In goodness of fit tests (or other tests of nested hypotheses) the null distribution can be regarded as being part of the alternative, therefore inconsistency of the Bayes factor in this case means inconsistency of its answer to the question: is the null hypothesis true?

Here we shall consider the case where F 0 = {p : p = p θ , θ ∈ Θ} where Θ ⊂ R d . As the prior probabilities on H 0 and H 1 have no effect on the consistency we will take α = 1/2.

The Bayes factor for our hypothesis test is given by

B n = Θ n i=1 p θ (Y i ) π 0 (dθ) F 1 n i=1 p (Y i ) π 1 (dp) -1
.

To study the asymptotic behaviour of B n we need to introduce some assumptions. Our first two assumptions were also used by [START_REF] Ghosal | Nonparametric Bayesian model selection and averaging[END_REF] in their examination of the consistency of Bayes factors.

Assumption A1: The nonparametric posterior from π 1 is strongly consistent at p * with rate n , that is

π 1 (p : d(p, p * ) > n | Y n ) → 0, in P ∞ * probability. Assumption A2: For any θ ∈ Θ ⊂ R d π 0 θ : K(p θ , p θ ) < cn -1 , V (p θ , p θ ) < cn -1 > Cn -d/2
, where K (p, q) is the Kullback-Leibler divergence defined by K (p, q) = log(p/q)p dµ and V (p, q) = log(p/q) 2 p dµ.

Assumption A1 is satisfied by many nonparametric priors. Consistency of the posterior is actually a minimal condition to require since there cannot be a full subjective (informative) construction of a prior on an infinite dimensional parameter set. [START_REF] Diaconis | On the consistency of Bayes estimates[END_REF] discuss the importance of consistency of the posterior distribution. Sufficient conditions for establishing rates of convergence of the posterior distribution in the setting of density estimation have been determined by [START_REF] Ghosal | Convergence rates of posterior distributions[END_REF]. This assumption is very weak, considering that there is no constraint on n other than lim n n = 0. Assumption A2 is used to provide a lower bound on the marginal likelihood under the parametric model and it is satisfied by any regular parametric model with positive continuous prior density. It is possible to replace this assumption with a Laplace expansion of the marginal likelihood, however any model with a valid Laplace expansion will most likely satisfy A2.

The next assumption is weaker than the condition given in equation (4.1) of [START_REF] Ghosal | Nonparametric Bayesian model selection and averaging[END_REF].

Assumption A3: If A n (θ) = {p : d(p, p θ ) < C n } , where n is the rate of convergence given in Assumption A1, then sup θ π 1 (A n (θ)) = o(n -d/2 ).
Assumption A3 compares the amount of probability the nonparametric prior π 1 places near the parametric family with the prior mass of the parametric prior near each parameter value θ ∈ Θ. This is the key assumption as will be demonstrated in section 4.1.

Our final assumption is a technical assumption which will be satisfied by most regular models.

Assumption A4: Θ is a compact subset of R d and p θ is continuous in L 1 as a function of θ.

The compactness of Θ is used here to make the proof clearer. In the non compact case, we can go back to the compact case by assuming for instance some regularity conditions on the model so that the maximum likelihood estimator under the parametric model converges to the projection of p * on {p θ , θ ∈ Θ} [START_REF] Arcones | Moderate deviations for M-estimators[END_REF].

The following theorem holds for general classes of prior distributions both on the alternative and on the parametric models.

Theorem 1. Assume that given P * the data Y 1 , . . . , Y n are independent and identically distributed on [0, 1]. Assume also that assumptions A1-A4 hold.

-If p * ∈ F 0 then B n → ∞ in P ∞ * probability. -If p * ∈ F 1 \F 0 and p * is in the Kullback-Leibler support of π 1 then B n → 0,
exponentially fast, almost surely with respect to P ∞ * .

Proof. Assume that p * ∈ F 0 , i.e. there exists θ * such that p * = p θ * . Let A n = A n (θ * ), then the Bayes factor can be written as

B -1 n = F 1 n i=1 p (Y i ) π 1 (dp) Θ n i=1 p θ (Y i ) π 0 (dθ) -1 = A n n i=1 p (Y i ) π 1 (dp) Θ n i=1 p θ (Y i ) π 0 (dθ) -1 × π -1 1 (A n | Y 1 , . . . , Y n ) .
Under assumption A1, π 1 (A n | Y 1 , . . . , Y n ) converges to one in P ∞ * probability. From A3 we may apply lemma 1 of [START_REF] Shen | Rates of convergence of posterior distributions[END_REF] to give that when δ is small enough

P n * Θ n i=1 p θ (y i ) p * (y i ) π 0 (dθ) < δn -d/2 ≤ C (-log δ)
.

Applying the Markov inequality, for any > 0,

P n * A n n i=1 p (y i ) p * (y i ) π 1 (dp) > δn -d/2 < ( δ) -1 n d/2 π 1 (A n ) .
Combining the above two inequalities and letting , δ → 0 at an appropriate rate, we see that under A4 this probability will converge to zero and hence B -1

n → 0 in P ∞ * probability. Now assume that p * ∈ F 1 \F 0 . Define for i = 1, 2, . . . Φ i = 1 0 y i p * (y) dy and Φ i (θ) = 1 0 y i p θ (y) dy, for all θ ∈ Θ. Define Θ 0 = Θ and Θ n = Θ n-1 ∩ {θ : Φ n (θ) = Φ n }.
If there exists a θ ∈ Θ n for all n = 1, 2, . . . then p θ = p * , µ-a.e. by the uniqueness of the Hausdorff moment problem and as p * ∈ F 1 \F 0 we have a contradiction. Therefore, there exists an m such that Θ m = ∅, i.e. the first m moments of p * and p θ can not be equal for any θ ∈ Θ. By A2 Φ i (θ) is a continuous function of θ for all i and hence g(θ) = sup i=1,...,m |Φ i -Φ i (θ)| is also a continuous function of θ. As there is no θ ∈ Θ such that g(θ) = 0 and Θ is a closed set then there exists an > 0 such that g(θ) > for all θ ∈ Θ.

The set Θ can be partitioned as

Θ = m i=1 {θ : Φ i -Φ i (θ) > } {θ : Φ i (θ) -Φ i > } .
The functions y i can be used to form a strictly unbiased test of p = p * against p ∈ [START_REF] Ghosh | Bayesian nonparametrics[END_REF] there exists an exponentially consistent test.

{p θ : Φ i (θ) -Φ i > } and of p = p * against p ∈ {p θ : Φ i (θ) -Φ i < }. Applying proposi- tion 4.4.1 of
By applying their lemmas 4.4.1 and 4.4.2 it follows that

{θ:h i -h i (θ)> } n i=1 p θ (Y i ) p * (Y i ) π (dθ) F 1 n i=1 p(Y i ) p * (Y i ) π 1 (dp) -→ 0, P ∞ * -almost surely,
exponentially fast. The Bayes factor is bounded by a finite sum of these terms and hence it must converge to zero P ∞ * -almost surely, exponentially fast.

Remark 1. The restriction of Y i to [0, 1] was only introduced to simplify the construction of a weak neighbourhood around p * which did not intersect F 0 . It is possible to alter this assumption for random variables on other ranges. For example, if the support of the Y i is [0, ∞) then using functions e -my , m = 1, 2, . . . can be used to form weak neighbourhood of p * and the same arguments hold. We need only consider m = 1, 2, . . . since a distribution on [0, ∞) is uniquely identified by the sequence of values of its Laplace transform at integer values [START_REF] Feller | Interpolation of completely monotone functions[END_REF].

Remark 2. Note that we obtain also an upper bound on the rate of convergence of the Bayes factor under H 0 since we have proved that

lim C→∞ lim sup n P n * B -1 n > Cn -d/2 π(A n ) = 0.
We therefore obtain the significant result that B -1 n is controlled, when H 0 is true, by the ratio of the prior probabilities of effective neighbourhoods of the true density under π 1 and π 0 respectively.

The conditions of theorem 1 can be difficult to verify as they require finding upper bounds on the prior probabilities in non-regular cases. Despite this difficulty, [START_REF] Rousseau | Approximating Interval hypothesis : p-values and Bayes factors[END_REF] has provided a general framework where assumptions A1 and A3 hold. This is the case of the embedded prior, that is where the nonparametric prior is constructed on the embedded model

{p θ,g (x) = p θ (x)g(P θ (x)), θ ∈ Θ, g ∈ G},
where G is the set of density functions on [0,1]. In such cases the prior mass of neighbourhoods under the nonparametric model will be typically much smaller than those under the parametric model, as described in section 4.1.1 of [START_REF] Rousseau | Approximating Interval hypothesis : p-values and Bayes factors[END_REF].

The following two sections consider the mixture of triangular priors as a prior for which these conditions can be verified. They also provide an illustration of difficulties that can be encountered.

Mixtures of triangular priors

3.1. Definitions. A mixture of triangular distributions is defined as follows. Let the

sequence 0 = t 0 < t 1 < . . . < t k-1 < t k = 1 be a partition of [0, 1]. The function ∆ i (x)
is the triangular density function with support on the interval [t i-1 , t i+1 ] and mode at t i for i = 1, . . . , k -1. The density ∆ 0 (x) is the triangular distribution on [t 0 , t 1 ] with mode at t 0 , similarly ∆ k (x) has support [t k-1 , t k ] and mode t k . A mixture of triangular distributions then has the density function p (x) = k i=0 w i ∆ i (x) , where w i ≥ 0 and k i=0 w i = 1. As in [START_REF] Perron | Bayesian nonparametric modeling using mixtures of triangular distributions[END_REF] we consider the two cases: I For each k, the partition of [0, 1] is assumed fixed so that t i = i/k and the weights w i are varied. The density is denoted p(x; w(k)) where w(k) = (w 0 , . . . , w k ).

II For each k, the weights w i are fixed at w 0 = w k = 1/(2k), w i = 1/k, i = 1, . . . , k -1 and the partition is varied. The density is denoted by p(x; ψ(k))

where ψ(k) = (t 0 , . . . , t k ) denotes the partition of [0, 1].

When needed, we generically denote by ξ(k) the vector of parameters of a mixture of triangulars with k components and by S k the set of these parameters. The loglikelihood shall be denoted by l n (ξ(k)) = n i=1 log p(Y i ; ξ(k)) and the prior on the pa-

rameter (ξ(k), k) is written π(ξ(k), k) = π(ξ(k) | k)π(k), in the mixture of triangular distributions prior.
There are a number of reasons for choosing to work with mixtures of triangular distributions. Firstly, as the resulting density functions are piecewise linear functions on [0, 1] interpolating the points (t i , w i ∆ i (t i )), they are easy to manipulate and simplify some necessary calculations. The flexibility of the densities allows them to approximate smooth density functions well which leads to good asymptotic properties for the posterior distribution. Finally, they can be relatively easy to implement in practice.

Since the rate of convergence of the posterior is relevant to obtaining consistency of the Bayes factor, we first give a few results on posterior rates of convergence under such priors. When there is no possibility of confusion we shall denote the mixture of triangular prior by π instead of π 1 .

3.2. Type I mixture -rates of convergence. As with the Bernstein polynomial priors, for a given k, this class of mixtures is a simple convex combination of density functions which are bounded by a multiple of k. Thus consistency (strong and weak) and rates of convergence can be proved using very similar techniques to those used for Bernstein polynomials [START_REF] Ghosal | Convergence rates for density estimation with Bernstein polynomials[END_REF][START_REF] Petrone | Consistency of Bernstein polynomial posteriors[END_REF].

Theorem 2. Assume that p * belongs to the Hölder class H(L, β) with β ≤ 2 and satisfies p * (x) ≥ ax(1 -x) for some constant a > 0. Assume also that the Type I mixture of triangular distributions prior satisfies for all k, c 1 e -C 1 k log k ≤ π (k) ≤ c 2 e -C 2 k for some constants c 1 , c 2 , C 1 , C 2 > 0 and for each k the prior on w(k) is a Dirichlet distribution with parameters uniformly bounded in k. Then there exists an R > 0 such that

E n * [π p : d (p, p * ) > Rn -β/(2β+1) (log n) (4β+1)/4β | Y n ] ≤ n -H ,
for all H > 0 and all n sufficiently large.

The proof of theorem 2 is given in Appendix (i).

3.3.

Type II Mixtures -rates of convergence. The type II mixture is slightly more complicated to study than the type I, in the same way as the free knot splines are more complicated to study than fixed splines estimators. However here, the problem is made easier since the weights are fixed. As in the case of fixed partition and free weights we obtain the minimax rate of convergence up to a log n term.

Theorem 3. Assume that p * belongs to the Hölder class H(β, L) with β ≤ 2 Assume also that p * ≥ a > 0 on [0, 1]. In addition, assume that the prior satisfies the following conditions:

• The prior on the number of components k is such that there exists c 1 , c 2 > 0 satisfying e -c 1 n log n ≤ π (k > n) ≤ e -c 2 n log n for all n sufficiently large.

• For any k ≤ k 0 n 1/(2β+1) , where k 0 is some positive constant, the prior places very small probability on two points in the partition being close. Specifically, there exist α, γ > 0 satisfying, for all c > 0

π max i |t i -t i-1 | < e -αn γ | k < exp(-cn 1/(2β+1) log n),
for all n sufficiently large. Moreover, for any k the prior has a positive density with respect to the Lebesgue measure µ k on {ψ(k) = (t 0 , ..., t k ); 0 < t 1 < ... < t k-1 < 1}:

there exists r > 0 such that for all k > 1 π(ψ(k) | k) ≥ c k µ k (ψ(k)), c k > c/Γ(k) r .
Then there exists an R > 0 such that

E n * π p : d (p, p * ) > Rn -β/(2β+1) log n Y n ≤ n -H ,
for all H > 0 and all n sufficiently large.

The proof of theorem 3 is given in point (ii) of the Appendix.

Remark 3. As a simple example of a prior satisfying the conditions of theorem 3 consider a Poisson process with continuous intensity on [0, 1]. This prior can also be viewed as a

Poisson prior on k and conditional on k, any density absolutely continuous with respect to the distribution of the order statistic of a k sample of uniforms on [0, 1].

Remark 4. Note that the above classes of priors, both for the Types I and II mixtures of triangular densities lead to adaptive estimators with respect to the smoothness parameter β, on β ∈ (0, 2], up to a log n term.

4. Bayes factors with mixtures of triangular prior 4.1. Bayes factor with a parametric null hypothesis. Now consider the hypothesis test of the introduction where the prior on F 1 is one of the mixture of triangular priors that we have described. We note that it is also possible to specify the prior on F 1 in a goodness of fit setting by embedding the parametric model p θ in the nonparametric model through p θ (y)g(P θ (y)) where g is a nonparametric density on [0, 1] and P θ is the cumulative distribution function. This is the approach taken in Verdinelli & Wasserman (1998) and [START_REF] Robert | A mixture approach to Bayesian goodness of fit[END_REF]. Although the former can have some desirable properties [START_REF] Rousseau | Approximating Interval hypothesis : p-values and Bayes factors[END_REF], we think that, due to the popularity of using mixtures to directly model density functions, it is of interest to investigate if such direct modeling can be applied to goodness of fit problems. To apply theorem 1 with a mixture of triangular distributions prior to theorem we need to verify assumptions A1 -A4 hold. A1 holds by either theorem 2 or theorem 3 depending on the choice of prior. Assumptions A2 and A4 depend on the parametric family. To verify that A3 holds we introduce a new assumption on the parametric family to be tested. (1)

As we have assumed that for all θ ∈ Θ, p θ satisfies A3 then

inf θ∈Θ inf ξ(k)∈S k d (p θ , p(• ; ξ(k))) ≥ ck -α ,
where d(., .) can be either L 1 or Hellinger distance. Therefore, for a mixture of k triangular densities to be an element of A n (θ) we need k > -1/α n c = k n . Since theorem 2 and theorem 3 together with the regularity condition of A3 imply that n < Cn -3/7 (log n) 2 , it follows that a mixture of triangular densities will need at least Cn 3/(7α) (log n) -2/α components. Thus

π (A n ) ≤ π(k ≥ k n ) ≤ e -C kn ,
from the conditions on the priors on k and we finally obtain

π (A n ) ≤ Be -bn γ ,
for some B, b > 0 and any γ < 3/(7α). Therefore, n d/2 π (A n ) → 0 for any finite d and assumption A3 is satisfied.

As an example of a parametric family to be tested, consider the two-dimensional exponential family

p θ (y) = f (y) exp (θ 1 b 1 (y) + θ 2 b 2 (y) + α(θ 1 , θ 2 )) , (2)
where Θ is a compact subset of R 2 , b 1 , b 2 , α are smooth functions and y ∈ [0, 1]. It is easily seen that A2 is satisfied. Also, since for all θ, θ ∈ Θ, h(p θ , p θ ) < C|θ -θ | it follows that A4 is satisfied. If on some interval f (y) has a bounded third derivative and its second derivative is non-zero then assumption A3 is satisfied. Also, if f (y) is a finite mixture of triangular densities then assumption A3 will be satisfied provided (0, 0) / ∈ Θ.

The Bayes factor therefore can provide a consistent test of this parametric family.

We now give a situation where failure of assumption A3 to hold leads to an inconsistency in the Bayes factor, that is under H 0 , B n → 0 in P ∞ * probability. Consider again the parametric density (2) where (0, 0) ∈ Θ and f ≡ 1; in other words there exists θ ∈ Θ such that p θ is the uniform density. In this case assumption A3 is no longer satisfied since from theorem 2 or theorem 3 π 1 (A n (θ)) > cn -2/5 (log n) 9/8 , for θ = (0, 0) and some c > 0 sufficiently small. When P * is the uniform distribution we can bound the marginal likelihood for the parametric model using a Laplace approximation so that

Θ n i=1 p θ (y i )π 0 (dθ) < Cn -1 (log n) with P ∞
* probability tending to one. Sufficient conditions for the Laplace approximation to be valid are given in theorem 8 of [START_REF] Kass | The validity of posterior expansions based on Laplace's method[END_REF] and can easily be verified for (2).

Inconsistency of the Bayes factor will have been demonstrated if we can show that

F 1 n i=1 p (Y i ) π 1 (dp) > c n n -1 (log n), (3)
with P ∞ * probability tending to one, for some sequence c n → ∞. We answer this question in the following subsection where we obtain a lower bound on the marginal likelihood under the prior π 1 by studying the rate of convergence of the Bayes Factor under a point null hypothesis. 4.2. Bayes Factor with a point null hypothesis. We now give a few results on the rate of convergence of the Bayes factor when the null hypothesis is the singleton {p 0 }, where p 0 is the uniform density. The test of hypothesis becomes H 0 : p * = p 0 against H 1 : p * = p 0 and the Bayes factor is given by

B -1 n = F 1 n i=1 p (Y i ) π 1 (dp) .
The following theorem demonstrates that the Bayes factor goes to infinity under the null at a rate smaller than n 1/2 and hence verifies that inequality (3) holds. This completes the example of inconsistency of the Bayes factor at the end of section 4.1 where assumption A3 fails to hold.

Theorem 4. Assume that for Type I mixtures the prior on π(w | k = 1) has a strictly positive and continuously differentiable density in a neighbourhood of w = 1/2, then under H 0 (p 0 ≡ 1)

P n 0 B -1 n ≤ C 0 / √ n ≤ n -H , (4)
for all H > 0 and all n sufficiently large. Assume that for Type II mixtures the prior on π(w | k = 2) has a strictly positive and continuously differentiable density in a neighbourhood of w = 1/2, then under H 0 (4) holds.

Remark 5. The case k = 1 in the Type II mixtures corresponds to a point mass at the uniform density, so that it does not make sense to put positive mass on it under the alternative.

Proof. The proof is only given for type I mixture of triangular distributions prior since the proof for type II mixtures follows essentially the same argument. For a type I mixture of triangular distributions prior

B -1 n = ∞ k=1 B n,k = ∞ k=1 π(k) S k n i=1 p(Y i ; w(k)) dπ(w(k) | k) (5) ≥ B n,1 = π(k = 1) 1 0 n i=1 p(Y i ; w(1)) dπ(w(1) | 1).
The true distribution corresponds to w(1) = w 1 = 1/2. This integral is bounded from below by considering only the integral on

w 1 ∈ (1/2 -δ n , 1/2 + δ n ), δ n = K log n/ √ n.
We now take a Taylor expansion of the log-likelihood l n (w 1 ) and the log of the prior around the maximum likelihood estimator ŵ1 and we bound the remaining term. This leads to

l n (w 1 ) -l n ( ŵ1 ) + log π(w 1 |1) -log π( ŵ1 |1) = - n(w 1 -ŵ1 ) 2 ĵ1 2 + R n ,
where

|R n | ≤ Cn|w 1 -ŵ1 | 3 sup |w-ŵ1 |≤4δn ∂ 3 (l n /n)(w) ∂w 3 + C|w 1 -ŵ1 | sup |w-ŵ1 |≤4δn ∂ log π(w) ∂w = R n,1 + R n,2 ,
where ĵ1 is the empirical Fisher information. In a neighbourhood of w 1 = 1/2, log p(y; w 1 ) is 3 times continuously differentiable with finite moments of all order (uniformly bounded for w 1 near 1/2. Therefore, for all δ > 0, H > 0 and all n sufficiently large

P n 0 sup |w 1 -ŵ1 |≤δn |R n,1 | n(w 1 -ŵ1 ) 2 > δ ĵ1 ≤ Cn -H .
Similarly, we have assumed that π is positive at 1/2 and is continuously differentiable around 1/2. Therefore, for all δ > 0, H > 0 and all n sufficiently large

P n 0 sup |w 1 -ŵ1 |≤δn |R n,2 | > δ ≤ Cn -H . It follows that 1 0 e ln(w 1 ) π(w 1 | k = 1)dw 1 ≥ e -δ (1 + δ) -1/2 exp{l n ( ŵ1 )}π( ŵ1 | k = 1) ĵ-1/2 1 n -1/2 ,
with probability greater than 1 -n -H for all H > 0 and all n sufficiently large. Since e ln( ŵ1 ) ≥ 1 and

P n 0 ĵ-1/2 1 > c ≤ n -H
for all H > 0 and n sufficiently large, we may now take C 0 sufficiently small so that

P n 0 B -1 n ≤ C 0 n -1/2 ≤ P n 0 B n,1 ≤ C 0 n -1/2 ≤ n -H , (6)
for all n sufficiently large.

By imposing additional mild conditions on the priors it is possible to strengthen the result of the above theorem to show that the Bayes factor is actually of order n 1/2 under the null up to a log n term.

Theorem 5. Assume the prior on k satisfies π (k > n/ log n) < e -nc for some c > 0. For a Type I mixtures prior assume π(w 0 , . . . , w k | k) is absolutely continuous with respect to the Lebesgue measure on the simplex with a density bounded by M Γ(k + 1) for all k and some M > 0. Then there exists C, C > 0 such that for all δ > 0 and all n ≥ 1,

P n 0 B -1 n ≥ C(log n) 2 n -1/2 ≤ C (log n) -(1-δ) 2 . ( 7
)
For a type II mixtures prior assume that π(t 0 , . . . , t k | k) is absolutely continuous with respect to the Lebesgue measure on the simplex with a density bounded by M Γ(k + 1) for all k ≥ 2 and some M > 0. Assume also that there exist α, γ > 0 satisfying,

π max i |t i -t i-1 | < e -αn γ | k < exp(-cn 1/(2β+1) log n),
for all c > 0 and all n sufficiently large. Then there exists C, C > 0 such that (7) holds.

Proof. Using the decomposition (5) of B n then for any

v n = v 0 n -1/2 (log n) P n 0 B -1 n ≥ v n ≤ P n 0 [B n,1 ≥ v n /2] + P n 0 ∞ k=2 B n,k ≥ v n /2 .
The proof is first given for type I mixtures. Define the sets

G n = {w(k) : 2 ≥ k ≥ k n }, V n,k = {w(k) : p 0 -p < r n } and V n = ∪ k V n,k where r n = r 0 n -1/2 log n and k n = k 0 (log n) 2 . Denote I 1 = Vn∩Gn n i=1 p (Y i ) π (dp) = kn k=2 π(k) V n,k n i=1 p(Y i ; w(k)) π(w(k)|k), I 2 = V c n ∩Gn n i=1 p (Y i ) π (dp) = kn k=2 π(k) V c n,k n i=1 p(Y i ; w(k)) π(w(k)|k), I 3 = G c n n i=1 p (Y i ) π (dp) = ∞ k=kn+1 B n,k .
Applying the Markov inequality

P n 0 [I 1 ≥ v n /6] ≤ 6v -1 n kn k≥2 π(k)π(V n,k | k).
Applying lemma 2 in Appendix (iii) and the fact that the prior density on the weights is bounded, it follows that

π(V n,k | k) ≤ M r k n Γ(k + 1)π k+1/2 /Γ(k/2 + 3/2).
From Stirling's approximation of the Gamma function

kn k=2 M r k n Γ(k + 1)π k+1/2 /Γ(k/2 + 3/2) ≤ Cr 2 n kn k=2 exp (k -2) log(k 1/2 r n ) + log k ,
and hence

P n 0 [I 1 ≥ v n /6] ≤ Cv -1 n r 2 n .
An application of lemma 4 in Appendix (iii) yields P n 0 [I 2 ≥ v n /6] ≤ n -H for any H > 0 and n sufficiently large. Also

P n 0 [I 3 ≥ v n /6] ≤ v -1 n k≥kn π(k) ≤ v -1 n exp(-rk n ) < n -H ,
for any H > 0 and n sufficiently large.

Finally, we treat B n,1 using a Laplace expansion in a similar manner to (6), in other words we can bound the integral on |w 1 -1/2| < δ n similarly to the proof of theorem 3.5. However we must bound from above the integral outside the δ n neighbourhood of ŵ1 . To do so note that the model is regular and that for all > 0 there exists δ > 0 such

that if |w 1 -1/2| > , ||1 -p w 1 || 1 > δ.
Moreover w 1 ∈ (0, 1) a bounded interval in R so that we can construct tests [START_REF] Ghosal | Convergence rates of posterior distributions[END_REF] such that E n 0 [φ n ] ≤ e -cnδ 2 n and for all

|w 1 -1/2| > δ n , E n w 1 [1 -φ n ] ≤ e -cnδ 2
n . This implies that for all H > 0,

P n 0 |w 1 -1/2|>δn e ln(w 1 ) π(w 1 )dw 1 > e -ncδ 2 n /2 ≤ e -ncδ 2 n /2 = O(n -H ).
We need also to control l n ( ŵ1 ), which under the uniform follows asymptotically a Chisquare random variable and satisfies for all δ > 0,

P n 0 [l n ( ŵ1 ) > log log n] = P n 0 χ 2 1 > log logn -δ + n -H ≤ C (log n) 1-δ ,
leading finally to (7).

For Type II mixtures it is necessary to make some small changes to the proof. Define

G n = {ψ(k); 3 ≤ k ≤ k n , |t i -t i+1 | > n -a(log n) 2 , i ≤ k -1} and let k n = k 0 (log n) 2 r n = r 0 n -1/2 (log n) -3 and v n = v 0 n -1/2 (log n).
From remark 5 B n,2 plays the role of B n,1 in the proof of type I mixtures. The main difference in the proof being in the treatment of

P n 0 [I 1 ≥ v n /6].
To control this term, we use lemma 3 in Appendix (iii) so that

k-2 j=1 (t j+1 -t j ) 4 |(t j+2 -t j ) -2/k| (t j+2 -t j ) + |(t j+1 -t j-1 ) -2/k| (t j+1 -t j-1 ) + 1 2kt 2 |t 1 -t 2 /2| + 1 2k(1 -t k-2 ) |(1 -t k-1 ) -(1 -t k-2 )/2| ≤ r n . Since k n r n = o(1), |1 -t k-1 -(t k-1 -t k-2 )| ≤ 2r n (1 + o(1)) so that |t k-1 -(1 -1/k)| ≤ 8r n (1 + o(1)) and |t k-2 -(1 -2/k)| ≤ 8r n (1 + o(1)).
We then iterate the formula using

|t k-j-1 -(1 -(j + 1)/k)| ≤ 8r n (1 + o(1)) + |t k-j -(1 -j/k)| so that when k ≤ k n , π p 0 -p ψ(k) 1 ≤ r n | k ≤ π (|t j -j/k| ≤ 8kr n , j ≤ k -1 | k) .
The bound on P n 0 [I 1 ≥ v n /6] becomes

P n 0 [I 1 ≥ v n /6] ≤ v -1 n kn k=3 π(V n,k | k)π(k) ≤ Cv -1 n r 2 n .
The proof now follows the same arguments as for the type I mixture.

Remark 6. The above theorems state that when testing the point null hypothesis, p 0 is uniform, against the nonparametric alternative, the inverse Bayes factor B -1 n converges to zero in probability under the null at a rate of n -1/2 . In order to increase the rate at which the Bayes factor converges to zero it is necessary to restrict the amount of prior probability placed near the uniform distribution.

Remark 7. Another application of the results of this section is when the null hypothesis is the singleton {p 0 }, with p 0 any density, not necessarily uniform. In this case one can apply the cumulative distribution function transform of p 0 to transform the data. This brings us back to the case where the null hypothesis is the uniform on [0, 1]. The effect is similar to the embedding of a parametric family in the nonparametric model. Note that the rate of convergence of the marginal likelihood only applies to the given p 0 .

Discussion

This paper has provided sufficient conditions for the consistency of the Bayes factor in testing goodness of fit of a parametric density function and the conditions are verified for the mixture of triangular distributions prior. We have also shown that if these conditions are not satisfied then the Bayes factor may be inconsistent. These results complement the result of [START_REF] Rousseau | Approximating Interval hypothesis : p-values and Bayes factors[END_REF] who has given a necessary condition for consistency of the Bayes factor. We believe the study of consistency is an important issue in goodness of fit and other testing problems. Not only does it provide a frequentist validation of the Bayesian procedure, but it also aids our understanding of how intergrating over the parameter space accounts for parameter uncertainty.

Mixture of triangular distributions can be useful priors since they have good theoretical properties and are simple to implement. An interesting problem for further study is to establish conditions for consistency of the Bayes factor which are both necessary and sufficient. We believe that the conditions presented here are close to being so. Another problem of interest is to consider goodness of fit testing in other contexts such as regression. Using the results in [START_REF] Ghosal | Convergence rates of posterior distributions for noniid observations[END_REF] it may be possible to establish a result similar to our theorem 1. As before, the main challenge in applying such a result would be to determine appropriate upper bounds on the prior probability in a neighbourhood of the parametric model. Both of these problems deserve further consideration. lemma 8.3 of [START_REF] Ghosal | Convergence rates of posterior distributions[END_REF] we need only bound the prior probability on the set {p : h 2 (p * , p) p * /p ∞ < ˜ 2 n }. Define p i * = p * (i/k) ∨ k -β for i = 0, . . . , k. Consider the set of densities N (k, ; p * ) defined by

p (x ; w(k)) = S -1 (p i (1 -k(x -i/k)) + p i+1 k(x -i/k)), x ∈ [i/k, (i + 1)/k],
where S = (p 0 + p k )/(2k) + k-1 i=1 p i /k and |p i -

p i * | ≤ Cp i * .
It is seen that these densities are type I mixtures of triangular densities. Let p(•; w 0 (k)) denote the density where

p i = p i * .
It is seen that S • p(x; w 0 (k)) is, with minor modification near x = 0 and x = 1, the linear interpolation of p * so sup 0≤x≤1 |p * (x) -S • p (x; w 0 (k))| ≤ Ck -β . In this case

S = 1 + O(k -β ) and sup 0≤x≤1 |p * (x) -p (x; w 0 (k))| ≤ Ck -β . For densities on N (k, ; p * ) we have S = 1 + O(k -β + ) and sup 0≤x≤1 |p * (x) -p (x; w(k))| ≤ C k -β + .
Now we determine a bound on the Hellinger distance between p * and p(•; w(k)). The squared Hellinger distance is bounded by

h 2 (p * , p(•; w(k))) ≤ 1 0 (p (x; w(k)) -p * (x)) 2 p (x; w(k)) dx.
The range of integration is divided into small intervals to obtain the bound. Assuming

< k -β (log k) -1 , k -1 0 (p (x; w(k)) -p * (x)) 2 p (x; w(k)) dx = k -1 0 (p * (x) -p 0 (1 -kx) -p 1 kx) 2 p 0 (1 -kx) + p 1 kx dx, ≤ k -1 0 p * (x) -p 1 * kx + O( + k -β ) 2 p 0 (1 -kx) + p 1 kx dx, ≤ C k -1 0 + k -β 2 p 0 (1 -kx) + p 1 kx dx, = C(k -β + ) 2 log p 1 -log p 0 k(p 1 -p 0 ) ,
with the convention that (log x -log y)/(x -y) = x -1 when x = y. The second last inequality is obtained by taking Taylor expansions for p * (x) and p * (1/k) around zero.

Noting that if β < 1, then p 0 = p 1 = k -β and if β ≥ 1, then p 0 = k -β and p 1 = p(1/k) we obtain that the above term is bounded by a constant times k -2β log k. The integral over [1 -1/k, 1] can be bounded in a similar manner. Finally

1-k -1 k -1 (p (x; w(k)) -p * (x)) 2 p (x; w(k)) dx ≤ C(k -β + ) 2 1-k -1 k -1 p (x; w(k)) -1 dx ≤ C(k -β + ) 2 k -1 k-1 i=1 1 p i ≤ C(k -β + ) 2 log k.
Hence, for densities in N (k, ; p * ),

h 2 (p * , p(•; w(k))) ≤ C(k -β + ) 2 log k.
For x ∈ (i/k, (i + 1)/k) we can bound p * (x)/p(x) for all p ∈ N (k, ; p * ) as

p * (x) p(x) ≤ p * (x) p i ∧ p i+1 ≤ 2p * (x) (k -β ∨ p * (i/k)) ∧ (k -β ∨ p * ((i + 1)/k))
.

Taking a Taylor expansion of p * (x) around x = i/k and x = (i + 1)/k it is seen that p * /p ∞ < C for k sufficiently large. The prior probability on N (k, ; p * ) can be bounded below using lemma A.1 of [START_REF] Ghosal | Convergence rates for density estimation with Bernstein polynomials[END_REF] and the fact that π 2β+1) and n sufficiently large. The remainder of the proof follows theorem 2.3 of [START_REF] Ghosal | Convergence rates for density estimation with Bernstein polynomials[END_REF] to give convergence in probability. To bound the expectation we follow the proof of theorem 2.2 in [START_REF] Ghosal | Convergence rates of posterior distributions[END_REF] (also lemma 8.4) so that

(k = k n ) ≥ e -n 2 for c 1 n 1/(2β+1) < k n < c 2 n 1/(
P ∞ * Π p : d (p, p * ) > Rn -β/(2β+1) (log n) (4β+1)/4β | Y n > exp(-B 1 n 2 n ) < exp(-B 2 n 2 n ).
(ii) Proof of theorem 3.

This result is proved by verifying that the conditions of theorem 2.1 in [START_REF] Ghosal | Convergence rates for density estimation with Bernstein polynomials[END_REF] hold. The first step is to provide a lower bound on the prior probability for the set of densities

N ( , p * ) = p : K(p * , p) < 2 , V (p * , p) < 2 .
For a given k we take ψ(k) = (t 0 , t 1 , ..., t k ) where P * (t i ) = i/k, i = 0, . . . , k. From the mean value theorem ) 2 ] + O(k -β-1 ).

P * (t i+1 ) -P * (t i-1 ) = 2/k = p * (t * i ) (t i+1 -t i-1 ) , t * i ∈ (t i-1 , t i+1 ) , for i = 1, . . . , k -1. For i = 0, k P * (t 1 ) -P * (t 0 ) = 1/k = p * (t * 0 ) (t 1 -t 0 ) , t * 0 ∈ (t 1 , t 0 ) , P * (t k ) -P * (t k-1 ) = 1/k = p * (t * k ) (t k -t k-1 ) , t * k ∈ (t k-1 , t k ) .
Together these equations imply that

p * (t i ) -p * (t * i ) = -p * (t i )/2[(t i+1 -t i ) -(t i -t i-1 )] + O(k -β ) = O(k -β ).
The same argument can be applied to show p * (t i ) -p * (t * i ) = O(k -β ). Therefore, the absolute difference of p * and p(•; ψ(k)) is bounded by Ck -β for some C > 0. Let η(k) be Therefore, the number of points in the net defined by the above constraint is bounded by

N n = k n Cαn γ 0 * n log n
kn ≤ e k 0 Cn 1/(2β+1) log n , with k n = k 0 n 1/(2β+1) and C some generic constant. Finally, the bound on the prior probability for the set G c n is easily determined. These bounds can be used to verify that the conditions of theorem 2.1 of [START_REF] Ghosal | Convergence rates for density estimation with Bernstein polynomials[END_REF] hold and so the rate of convergence in probability is found. The bound in expectation can be obtained by similar arguments as used in the proof of Equation ( 2).

(iii) A few lemmas that are considered in the study of the mixtures of triangular distributions. The proofs of the following lemmas can be found in [START_REF] Mcvinish | Bayesian mixtures of triangular distributions with application to goodness of fit testing[END_REF] or are small modifications of these as indicated.

Lemma 1. Let p(•; ψ(k)) and p(•; η(k)) be two type II mixtures of triangular densities where ψ(k) = (t 0 , t 1 , . . . , t k-1 , t k ) and η(k) = t 0 , t1 , . . . , tk-1 , t k . Let C denote a constant that is independent of the partitions and k. For 0 < < 1/4, if

max i t i -ti ≤ M k , M = sup

Assumption A3 :

 A3 For each θ ∈ Θ, p θ has a bounded third derivative and its second derivative is non-zero on some interval [a, b], 0 < a, b < 1. The set A n (θ) comprises of all densities which are within n of p θ as measured by Hellinger or L 1 distance. In the proof of lemma 4.2 of McVinish et al. (2005) it was shown that for any density p(x) satisfying A3 and any mixture of triangular densities p(x; ξ(k)) (type I or II), then there exists constants α, c such that 1 0 |p(x) -p(x; ξ(k))| dx ≥ ck -α .

  another partition and p(•; η(k)) the resulting density. From lemma 1 we have|p * (x) -p(x; η(k))| ≤ C(k -β + ), where |ψ(k) -η(k)| < c k -1 . Taking k to satisfy d 1 -1 < k β < d 2 -1 for constants d 1 , d 2and applying lemma 8.2 of[START_REF] Ghosal | Convergence rates of posterior distributions[END_REF] it is seen thatN (C , p * ) ⊃ η(k) : |η(k) -ψ(k)| < c k -1 ,which leads to the correct lower bound for the probability of the set N (C , p * ).Now define the setsG n = {ψ(k) : k ≤ k 0 n 1/(2β+1) , |t j -t j+1 | ≥ e -αn γ , j ≤ k -1}. Anupper bound on the entropy of G n now needs to be determined. We follow[START_REF] Ghosal | Convergence rates for density estimation with Bernstein polynomials[END_REF] with the remark that||p(•; ψ(k)) -p(•; η(k))|| 1 ≤ C 0 * n log n,as soon as the partitions ψ(k) = (t j , j = 0, ..., k) and η(k) = ( tj , j = 0, ..., k) with t0 = t 0 = 0 and tk = t k = 1 satisfy|t j -tj | ≤ 0 * n log n(|t j -t j-1 | ∧ |t j -t j+1 |).

  ψ(k)) -p(x; η(k))| ≤ CM .

  ti ≤ (|t i -t i-1 | ∧ |t i -t i+1 |), then ||p(•; ψ(k)) -p(•; η(k))|| 1 ≤ C .

  It follows that p(•; ψ(k)) is the linear interpolation of the points (t i , p * (t* i )) , i = 0, . . . , k. It is noted that (M k) -1 ≤ |t i+1 -t i | ≤ (ak) -1 , where M = sup p * (x). If β ≤ 1, we obtain (x) -p(x; ψ(k))| ≤ Ck -β , if p * ≥ a > 0. If β ∈ (1, 2], we note that for i = 0, . . . , k -1, p * (x) = p * (t i ) + (x -t i ) t i+1 -t i (p * (t i+1 ) -p * (t i )) + O(k -β ).

	that
	sup x∈[0,1] |p Therefore, for x ∈ (t i , t i+1 )
	sup	|p * (x) -p(x; ψ(k))|
	x∈[0,1]
	= (p Using a Taylor expansion of p Similarly, using a Taylor expansion of t i+1 t i	t i+1 t i-1 p

* * (t i ) -p * (t * i )) (t i+1 -x) t i+1 -t i + (p * (t i+1 ) -p * (t * i+1 )) (x -t i ) t i+1 -t i + O(k -β ). * (x)dx and of t i t i-1 p * (x)dx, both equal to 1/k: p * (t i )[(t i+1 -t i ) -(t i -t i-1 )] = -p * (t i )[(t i+1 -t i ) 2 + (t i -t i-1 ) 2 ]/2 + O(k -β-1 ) = O(k -2 ). * (x)dx, p * (t * i )(t i+1 -t i-1 ) = p * (t i )(t i+1 -t i-1 ) + p * (t i ) 2 [(t i+1 -t i ) 2 -(t i -t i-1

Acknowledgements

This work was supported by the ARC Centre for Complex Dynamic Systems and Control.

We thank the Editor, Associate Editor and two referees for their careful reading and helpful suggestions.

Appendix

(i) Proof of theorem 2. The proof follows similar lines to theorem 2.3 of [START_REF] Ghosal | Convergence rates for density estimation with Bernstein polynomials[END_REF] and so we shall only provide the lower bound for the prior probability on the set

If p * is bounded away from zero then the proof is essentially the same as for theorem 2.3 of [START_REF] Ghosal | Convergence rates for density estimation with Bernstein polynomials[END_REF]. Therefore, we shall assume p * (0) = p * (1) = 0. From Proof. Let ψ j = t 0 , t1 , . . . , tj , t j+1 , . . . , t k , for j = 0, ..., k -1 then

and the difference between the two consecutive functions occurs only on the interval

, so that tj ∈ ( tj-1 , t j+1 ). Using tedious but straightforward calculations, we obtain that

Applying the triangle inequality and summing over j we have

Lemma 2 (type I mixtures). Let p 0 be the uniform density. For each k ≥ 2, if

Lemma 3 (type II mixtures). Let p 0 be the uniform density. For each k ≥ 2, if

for all H > 0 and n sufficiently large.

Proof. The proof is based on the construction of tests based on the L 1 distance as in [START_REF] Ghosal | Convergence rates of posterior distributions[END_REF].


Julien R Serres
email: julien.serres@univ-amu.fr

Antoine H P Morice

Constance Blary

Romain Miot

Gilles Montagne

Franck Ruffier

Floor and ceiling mirror configurations to study altitude control in honeybees

Introduction

Flying bees, honeybees or bumblebees, are known to be particularly sensitive to the optic flow pattern generated by the contrasting features of the ground to adjust their altitude by maintaining constant ventral optic flow during terrain following tasks [START_REF] Baird | Visual control of flight speed and height in the honeybee[END_REF]Portelli et al., 2010b;[START_REF] Srinivasan | Honeybees as a model for the study of visually guided flight, navigation, and biologically inspired robotics[END_REF][START_REF] Portelli | Altitude control in honeybees: joint vision-based learning and guidance[END_REF][START_REF] Serres | Optic flow-based collision-free strategies: From insects to robots[END_REF][START_REF] Lecoeur | The role of optic flow pooling in insect flight control in cluttered environments[END_REF]. The minimum sized section of a rectangular tunnel sets the honeybees' forward speed [START_REF] Portelli | Honeybees' speed depends on dorsal as well as lateral, ventral and frontal optic flows[END_REF][START_REF] Serres | Optic flow-based collision-free strategies: From insects to robots[END_REF], therefore the forward and upward axes of the honeybee's flight control system can be decoupled (Portelli et al., 2010b). Consequently, in a tunnel where the width is smaller than the height, the width sets the honeybees' forward speed, see also [START_REF] Franceschini | A bio-inspired flying robot sheds light on insect piloting abilities[END_REF]Portelli et al., 2010a;[START_REF] Raharijaona | Toward an insect-inspired event-based autopilot combining both visual and control events[END_REF][START_REF] Bergantin | Oscillations make a self-scaled model for honeybees' visual odometer reliable regardless of flight trajectory[END_REF] for a description of the visuomotor modelling in honeybees. Similarly, honeybees, which have be trained to follow the tunnel ceiling, when encountering a "dorsal ditch" in the middle of the tunnel configuration [START_REF] Portelli | Altitude control in honeybees: joint vision-based learning and guidance[END_REF] responded to this new configuration by rising quickly and hugging the new, higher ceiling, while maintaining a similar forward speed, distance to the ceiling, and dorsal optic flow to those observed during the training step. Conversely, honeybees trained to follow the floor kept on following the floor regardless of the change in the ceiling's height [START_REF] Portelli | Altitude control in honeybees: joint vision-based learning and guidance[END_REF].

The present study aims to pursue investigations about the role of dorsal and ventral visual inputs feeding the altitude control system in honeybees by manipulating or cancelling parts of the optic flow using mirrors. Inspired by Duchon and Warren [START_REF] Duchon | A visual equalization strategy for locomotor control: of honeybees, robots, and humans[END_REF] experiments on humans, in which the researchers designed an optical manipulation made with a pair of infinite walls in or-der to optically remove the floor, then by strongly decreasing visual information coming from the floor, we designed a novel optical configuration with floor and/or ceiling mirror(s) enabling a better understanding of the mechanism of altitude control in honeybees. Such an optical manipulation in which the floor appeared to be removed allowed us to mimic some of the conditions that honeybees experience when experimentally trained to fly over a natural water body and extend the seminal experiment of Heran and Lindauer (1963). Sixty years ago, these researchers trained honeybees to fly above a 247m-long water surface. When the water surface was rippled or when a floating bridge provided a visual contrast, honeybees were able to cross the lake. However, honeybees flying over a calm water surface during foraging trips flew lower and lower until they collided with the water surface and drowned [START_REF] Heran | Windkompensation und seitenwindkorrektur der bienen beim flug über wasser[END_REF]. Our flight tunnel, which used a pair of mirrors placed on the floor and on the ceiling, gets closer to, and extends experimentally, a behaviour which has been observed outdoor above a water surface.

Methods and Materials

Flight tunnel

The outdoor flight tunnel is a rectangular shape (220 cm long, 71 cm high and 25 cm wide, see Fig. S1 for further details), the ceiling and floor are mirrors that can be covered as in Step 0 in Fig. S2, the left hand wall is solid and the right hand wall is made of insect netting. A unique red and white striped pattern, perpendicular to the long axis of the tunnel and therefore the direction of flight, is provided on the four surfaces of the tunnel (floor, ceiling, left wall, insect netting) although it is only permanently installed on walls. The mirrors on floor and ceiling can be covered with the same pattern as can the insect netting. In this latter case the stripes are reproduced using a red gelatin filter (Lee Filters HT019). The tunnel is closed with white boards at each end. At one end there is a circular entrance (5 cm in diameter) located 11.5 cm above the floor. At the other end, a square opening (3.5 cm) placed 11.5 cm above the floor gives the bees access to the reward box. The tunnel's entrance and the door of the reward box were opened and closed manually by the experimenter. The flight tunnel received only indirect illumination (no direct sunlight). This video can be watched to better understand the organization of our experimental set-up: https: //youtu.be/KH9z8eqOBbU.

Pattern

Red stripes of two different widths (1 cm and 3 cm) form a simple 10 cm wide regularly repeated pattern. The angular subtends of the stripes ranged from 5.7°to 53°(1-10 cm-wide pattern viewed from a distance of 10 cm) and from 0.5°to 5.3°(1-10 cm-wide pattern viewed from 1 m). As honeybees do not possess red-sensitive photoreceptors [START_REF] Srinivasan | Honeybees as a model for the study of visually guided flight, navigation, and biologically inspired robotics[END_REF], they perceive red stripes as grey ones. Between the red and white stripes, the Michelson contrast is 0.47 but 0.25 on the insect netting. The contrast was measured using a photodiode equipped with a green band-pass filter (Kodak Wratten n°61), the transmission spectrum of which closely matched the spectral sensitivity of the honeybee's green receptors.

Results

Honeybees following the floor do not rely on dorsal visual information

In experiment A (Fig. 1A), we tested the effect of a visual impoverishment in the dorsal part of the honeybees' visual field. The chronology of the procedure from step 0 to step ii is described in Fig. S2. A group of 27 honeybees were trained in the control condition (CC) (Fig. 1Ai-Aii). The 1st flight "in mirror on the ceiling" condition, in which the ceiling mirror was uncovered, was recorded in an impoverished visual condition (IC) (See Supplementary material S1). The presence of the mirror on the ceiling appearing to double the tunnel's height (142cm) upwards (Fig. 1Aiii-Aiv). We observed no significant change in flight behaviour in honeybees (Exp. A in Table S1).

Without any ventral and dorsal visual information, honeybees collide with the floor mirror

In experiment B (Fig. 1B), we tested the effect of a visual impoverishment in both the dorsal and ventral parts of the honeybees' visual field. The chronology of the procedure is described in Fig. S2. A group of 15 honeybees were trained in the control condition (CC) (Fig. 1Bi-Bii). The 1st flight, "in double mirror" condition in which both mirrors were uncovered, was recorded in an impoverished visual condition (IC) (See Supplementary material S1). The presence of mirrors on the ceiling and on the floor created an optical manipulation in which a pair of infinite walls appeared. As a result, no visual information from either the floor or ceiling was available (Fig. 1Biii-Biv). We observed significant changes in flight behaviour in honeybees (Exp. B in Table S1) from x = 8cm until each of the honeybees collided with the floor mirror.

Dorsal visual information does not aid in flying further over the floor mirror

In experiment C (Fig. 1C), we tested the effect of a visual impoverishment in the ventral part of the honeybees' visual field. The chronology of the procedure is described in Fig. S2. A group of 15 honeybees were trained in the control condition (CC) (Fig. 1Ci-Cii). The 1st flight "in mirror on the floor" condition in which the floor mirror was uncovered, was recorded in impoverished visual condition (IC) (See Supplementary material S1). The presence of the mirror on the floor appearing to double the tunnel's height (142cm) downwards (Fig. 1Ciii-Civ) making a kind of "ventral ditch" of 71cm in depth. We observed significant changes in flight behaviour in honeybees (Exp. C in Table S1) from x = 40 cm until each of the honeybees collided with the floor mirror. Honeybees may be visually attracted to the virtual floor 71 cm below, but then they collided with the mirror.

Covering the first half of the floor mirror does not help honeybees to fly further

In experiment D (Fig. 1D), we tested the effect of a visual reinforcement in the ventral part of the honeybees' visual field by covering the first half of the floor mirror with the same pattern of red and white stripes as previously used. The chronology of the procedure is described in Fig. S2. A group of 14 honeybees were trained in the control condition (CC) (Fig. 1Di-Dii). The 1st flight "in half mirror on the floor" condition in which the second half of the floor mirror was left uncovered, virtually doubling the tunnel height (142 cm) downwards (Fig. 1Diii-Div) making a kind of "ventral ditch" of 71 cm in depth as in experiment C (Fig. 1C). We observed significant changes in flight behaviour in honeybees (Exp. D in Table S1) from x = 139 cm until each of honeybees collided with the mirror. This additional texture on the floor does not help honeybees to fly further above the mirror. The travelled distance above the mirror (39 cm) was similar to the one observed in experiment C (see Exp. C in Table S1).

Discussion and Conclusion

The aim of the present study was to extend Heran and Lindauer (1963) work by precisely manipulating parts of the optic flow. The use of a mirror on the floor (or ceiling) allowed us to manipulate the ventral (or dorsal) optic flow, thus generating a "ventral (or dorsal) ditch", without having to change In each panel, a comparison can be made between the trajectories produced prior to (Aii, Bii, Cii and Dii) and after (Aiv, Biv, Civ and Div) the experimental manipulations. These manipulations consisted of uncovering either a mirror on the ceiling (Aiii), mirrors on both the floor and the ceiling (Biii), a mirror on the floor (Ciii) or on half the floor (Diii). High resolution pictures in the tunnel can be seen in Serres et al. (2019a). Results show that while manipulating dorsal optic flow does not affect the honeybees' trajectories, manipulating ventral optic flow, whether it is a simple manipulation or a suppression, has significant consequences on the trajectories, leading to systematic collisions with the floor mirror. The abscissa marked by a * symbol in (Biv), (Civ), and (Div) represents the location at which we observed a significant change in height of flight before collisions (see Table S1 for comparisons of altitude distributions).

the orientation of the pattern stripes [START_REF] Baird | Visual control of flight speed and height in the honeybee[END_REF], the pattern relative velocity (Portelli et al., 2010b) or the tunnel geometry [START_REF] Portelli | Altitude control in honeybees: joint vision-based learning and guidance[END_REF]. On the other hand, a double mirror condition allowed us to simultaneously suppress visual information coming from both the floor and ceiling, generating two infinite parallel walls.

In experiment A (Fig. 1Aiv), honeybees appear to follow the floor despite this virtual "dorsal ditch" because they may have learnt to follow the floor and to rely on the ventral visual information in order to regulate their flight, in harmony with Portelli et al. (2017) results. The lack of a difference between last training flight and test trial data in experiment A suggests that the upward change in tunnel height might simply not have been perceived by the honeybees.

Conversely, each experimental manipulation that affects the ventral part of the optic flow, whether it is a total deprivation of the ventral optic flow in experiment B (Fig. 1Biv) or a reduction in the ventral part of the optic flow (Figs. 1Civ,Div), gave rise to a loss of altitude until the honeybee collided with the floor mirror. Interestingly our double mirror condition allowed us to get closer to the flight conditions of an open sky flight above a calm water surface as used by Heran and Lindauer (1963). Our results agree with theirs insofar as the honeybees lose altitude in the absence of ventral optic flow.

In experiments C and D, the use of a mirror on the floor does not cause the suppression of the ventral part of optic flow, as the ceiling textures mirrored in the floor create a virtual "ventral gap" reducing the resulting ventral optic flow. The honeybees' reduction in altitude until they collide with the mirror could result from a change in altitude intended to restore the ventral optic flow as experienced in the 15 control trials, which is in harmony with both Results in experiments C and D (Figs. 1Civ-Div) reveal that a significant proportion of honeybees (half of the sample, see Table S1) can fly as far as 39 cm above the floor mirror without losing altitude showing that they perceive the ventral optic flow over a wide visual field. By picking up information over a wide visual field [START_REF] Lecoeur | The role of optic flow pooling in insect flight control in cluttered environments[END_REF], honeybees detect and respond to changes in the environment even when lacking texture on the ground.

To conclude this study, there are different strategies of altitude control in insects. Straw et al. (2010) demonstrated that flies do not use ventral optic flow in their altitude control. Our findings could be expanded or be useful in other insect species to test whether they are sensitive to ventral optic flow, or if other optical information controls their altitude (Berger Dauxère et al., 2021). Our set-up could also be re-scaled to study the effect of optic flow on altitude control in birds [START_REF] Altshuler | Comparison of visually guided flight in insects and birds[END_REF]Serres et al., 2019b).

Supplementary material

Floor and ceiling mirror configurations to study altitude control in honeybees Julien R. Serres, Antoine H.P. Morice, Constance Blary, Romain Miot, Gilles Montagne, Franck Ruffier

S1 Experimental procedure

During the experimental period, a small set of four groups comprising from 14 to 27 freely flying honeybees (Apis mellifera) were colour-marked and trained daily to enter and fly alone along a tunnel to collect a sugar solution reward (25% sucrose w/w) at the opposite end. Their flight path toward the reward was recorded with a digital camera from the insect-netting side, strictly in keeping with the chronology of the procedure depicted in Fig. S2 using a distinct group of honeybees for each of the four experimental conditions (Exp. A, Exp. B, Exp. C, and Exp. D). In the first session (called "Constant floor-roof condition" -Control Condition CC), honeybees were trained over 16 trials to follow the ground (Fig. S2 A(0+i)-D(0+i)). In a second session (called "Conditions with mirror(s)" -Impoverished visual Conditions IC), one mirror, both mirrors, or the half of the floor mirror were uncovered (Fig. S2 A(ii)-D(ii)), appearing to double the tunnel's height when there was one (or half) mirror uncovered (above in Exp. A; below in Exp. B & D), or giving the appearance of an infinite tunnel height when there were two mirrors uncovered in Exp. C.

S2 Video recordings and flight path analysis

The honeybees' trajectories were filmed at a rate of 100 frames per second with a high-resolution black-and-white CMOS camera (Teledyne Dalsa Genie HM640). The video recording was manually triggered after the experimenter opened the tunnel entrance to the honeybees, who were sent through one by one. A red filter (Lee Filters HT019) was positioned in front of the camera monitoring the honeybee's traces. This process removes the red stripes from the trajectory records and optimizes the contrast between the honeybee and the background. The camera was placed at a distance of 2.3 m from the insect netting. The field of view (130 cm in width, 71 cm in height) covered the whole height of the tunnel, from abscissa x = 0 cm to abscissa x = 130 cm in experiments A-C, and from abscissa x = 35 cm to abscissa x = 165 cm in experiment D. Image sequences were calibrated, corrected, processed and analysed using a custom-made Matlab program available online (see: https://github.com/rm1720/bees-applications/wiki). This program automatically determined the honeybees' flight height z in each frame as a function of the abscissa x along the tunnel axis so that the honeybee's trajectory in the vertical plane could be plotted. Only trajectories until the first collision were plotted and analysed.

S3 Statistical analysis

All the data recorded were included in the statistical analysis without removing any outliers. Statistical data analyses were performed with the Matlab R2018a software program. Not all datasets exhibit the same number of measurements as a function of the abscissa because the bees collide with the floor mirror at different points along their trajectories. As a consequence, median and Median Absolute Deviation (Median ± MAD) values were computed for all datasets by binning each bee's trajectory with an 8 cm window in abscissa (see Table S1). Mann-Whitney U tests were used to compare altitude binning distribution by pairs: control conditions (CC) versus impoverished visual conditions (IC) in each experiment (Exp. A, Exp. B, Exp. C, and Exp. D, see Table S1).

Figure S1. The flight tunnel is a rectangular shape (220 cm long,71 cm high and 25 cm wide. In the control condition (CC), the four surfaces of the tunnel were textured with red and white stripes oriented perpendicularly to the bees' flight paths. One side of the tunnel consists of insect netting lined with stripes. The camera was placed sideways, 2.3 m from the insect netting. The field of view (130 cm in width, 71 cm in height) covered the whole height of the tunnel, from abscissa x = 0 cm to abscissa x = 130 cm in experiments (A) , (B), and (C), and from abscissa x = 35 cm to abscissa x = 165 cm in experiment (D). In experiment (A), only the ceiling mirror was uncovered. In experiment (B), both mirrors were uncovered. In experiment (C), only the floor mirror was uncovered. In experiment (D), only the floor mirror was half uncovered. Step 0 (the training step -15 direct flights): the honeybees were first trained by completing 15 flights travelling along the tunnel with a uniform height of 71 cm (called "Constant floor-roof condition") to collect nectar in a reward box. Honeybees were rewarded at the end of each flight; the entrance to the reward box was closed during the flights so that no visual cues were available about the position of the reward, but the door was opened on arrival.

Step i (Control Condition CC, video-recording -1 flight): immediately after the training step, individual bees' trajectories were recorded in this same tunnel with a uniform height of 71 cm (called "Constant floor-roof condition"); the entrance to the reward box was closed during the flights so that no visual cues were available about the position of the reward.

Step ii (Impoverished visual Conditions IC, video-recording -1 flight): immediately after recording the bees' trajectories under "Constant floor-roof condition", one mirror (Exp. A and Exp. C), two mirrors (Exp. B), or the half floor mirror (Exp. D) were uncovered, and the bees' trajectories were recorded in the presence of this optical manipulation (either virtually doubling the tunnel height when there is one mirror uncovered, or giving virtually an infinite tunnel height when there are two mirrors); the entrance to the reward box was again closed during these flights so that no visual cues were available about the position of the reward.

Figure 1 .

 1 Figure 1. This figure depicts the trajectories (Median ± MAD) followed by honeybees in the vertical plane (x,z) in the four experimental conditions (Exp. A, Exp. B, Exp. C, and Exp. D).In each panel, a comparison can be made between the trajectories produced prior to (Aii, Bii, Cii and Dii) and after (Aiv, Biv, Civ and Div) the experimental manipulations. These manipulations consisted of uncovering either a mirror on the ceiling (Aiii), mirrors on both the floor and the ceiling (Biii), a mirror on the floor (Ciii) or on half the floor (Diii). High resolution pictures in the tunnel can be seen in Serres et al.(2019a). Results show that while manipulating dorsal optic flow does not affect the honeybees' trajectories, manipulating ventral optic flow, whether it is a simple manipulation or a suppression, has significant consequences on the trajectories, leading to systematic collisions with the floor mirror. The abscissa marked by a * symbol in (Biv), (Civ), and (Div) represents the location at which we observed a significant change in height of flight before collisions (see TableS1for comparisons of altitude distributions).

  Portelli et al. (2010b) and Portelli et al. (2017) results. Taken together, all our results indicate unequivocally that the drowning observed in the study of Heran and Lindauer(1963) reflect the propensity of honeybees to reduce their altitude, in order to restore the ventral optic flow experienced.

Figure S2 .

 S2 Figure S2. Chronology of the procedure used in the four experimental conditions (Exp. A, Exp. B, Exp. C, and Exp. D). The same individual bees were trained and tested and their trajectories were recorded in line with the strict chronology of the steps (0, i, and ii). The arrow represents the entrance position near the floor, and the letter 'R' represents the reward box location behind a door near the floor. The entrance and the door to the reward box 'R' are both located 11.5 cm above the floor.Step 0 (the training step -15 direct flights): the honeybees were first trained by completing 15 flights travelling along the tunnel with a uniform height of 71 cm (called "Constant floor-roof condition") to collect nectar in a reward box. Honeybees were rewarded at the end of each flight; the entrance to the reward box was closed during the flights so that no visual cues were available about the position of the reward, but the door was opened on arrival.Step i (Control Condition CC, video-recording -1 flight): immediately after the training step, individual bees' trajectories were recorded in this same tunnel with a uniform height of 71 cm (called "Constant floor-roof condition"); the entrance to the reward box was closed during the flights so that no visual cues were available about the position of the reward.Step ii (Impoverished visual Conditions IC, video-recording -1 flight): immediately after recording the bees' trajectories under "Constant floor-roof condition", one mirror (Exp. A and Exp. C), two mirrors (Exp. B), or the half floor mirror (Exp. D) were uncovered, and the bees' trajectories were recorded in the presence of this optical manipulation (either virtually doubling the tunnel height when there is one mirror uncovered, or giving virtually an infinite tunnel height when there are two mirrors); the entrance to the reward box was again closed during these flights so that no visual cues were available about the position of the reward.

-

  TableS1. Comparison of the altitude distributions in each experiment (Exp. A, Exp. B, Exp. C, and Exp. D) with a binning of 8 cm along the abscissa. For each experiment and both conditions (control condition CC and impoverished condition IC), the size of the sample in the binning (N), the median, and Median Absolute Deviation (MAD) are given. Mann-Whitney U tests are used to compare altitude binning distribution by pairs : control conditions (CC) versus impoverished visual conditions (IC) in each experiment (Exp. A, Exp. B, Exp. C, and Exp. D). Significant probabilities (CC vs. IC) are in bold. All data in figure1are in this table.

Acknowledgments

The authors would like to thank Marc Boyron and Julien Diperi for their technical assistance with designing the flight tunnel, Patrick Sainton for his video montage showing the experimental set-up, and they wish to thank David Wood (English at your Service, http://www.eays.eu/) for revising the English of the manuscript. We are grateful to the two anonymous reviewers, whose suggestions helped us improve the manuscript.

Funding

This work was supported by Aix Marseille University and the CNRS.

Data accessibility

The data that support the findings of this study are openly available in Supplementary Material section at https://www.biorxiv.org/content/biorxiv/early/2021/10/07/2021.09.23.461476/DC1/embed/ media-1.zip?download=true.

Experimental procedure

See Supplementary material S1.

Video recordings and flight path analysis

See Supplementary material S2.

Statistical analysis

See Supplementary material S3.

Additionnal information

Author contributions JRS, AHPM, GM, and FR designed the experiments. CB performed the experiments. RM developed the tracking app with Matlab software. JRS, AHPM, CB, GM, and FR analysed the data. JRS wrote the first draft of the paper; all authors prepared and revised the manuscript. JRS coordinated and supervised this research work.

Ethics

Animal experimentation: study involved experiments on honeybees and were conducted according to ethical guidelines.