Learning to predict target location with turbulent odor plumes

  1. Nicola Rigolli  Is a corresponding author
  2. Nicodemo Magnoli
  3. Lorenzo Rosasco
  4. Agnese Seminara  Is a corresponding author
  1. Department of Physics, University of Genova, Italy
  2. Institut de Physique de Nice, Université Côte d’Azur, Centre National de la Recherche Scientifique, France
  3. National Institute of Nuclear Physics, Italy
  4. MalGa, Department of Civil, Chemical and Environmental Engineering, University of Genoa, Italy
  5. MaLGa, Department of computer science, bioengineering, robotics and systems engineering, University of Genova, Italy
7 figures, 1 table and 1 additional file


Figure 1 with 1 supplement
Turbulent odor cues are patchy and intermittent.

Snapshot of streamwise velocity (a) in a vertical plain at mid channel; odor snapshot side view at mid channel (b) and top view at source height (c). White regions mark the cylindrical obstacle. Snapshots are obtained from direct numerical simulations of the Navier-Stokes equations and the equation for odor transport (see Materials and Methods and parameters summarized in Table 1). (d) The mean velocity profile follows the well known log law when z3+ = z3/δν > 30, where δν=ν/uτ where uτ is the friction velocity. (e) Two dimensional spectra of odor fluctuations E(k)=ddk(|kxy|<k|c^(kxy)|2d2k) normalized with the scalar variance σc2 ; c^(kx,y) is the 2D Fourier transform of the scalar concentration at source height; the integral of the spectra is the scalar variance. Wavenumbers are nondimensionalized with the inverse Kolmogorov scale η-1. Error bars show standard deviation calculated over N = 420 points. (f) Typical time courses of the odor cues at locations labeled with 1 and 2 in c, visualizing noise and sparsity, particularly at location 1.

Figure 1—video 1
Direct numerical simulations of the turbulent flow in a channel of length L, width W and height H evolving in time.
Figure 2 with 6 supplements
Individual features enable inference in two dimensions.

(a) Sketch of the geometry. (b) Test error χ for inference using individual features as input. (c) Predicted vs actual distance for inference. Prediction for representative test points (grey circles); 30–70th percentile (patch, same color code as in (b)); trivial prediction f(x)=<y>test (solid horizontal line, corresponds to χ=1); exact prediction (bisector, corresponds to χ=0); dispersion away from the bisector visualizes the prediction error. Results are obtained with a supervised learning algorithm based on regularized empirical risk minimization (Materials and methods). Each input datum xi is one individual scalar feature computed from the time course of odor concentration measured at location zi at 100 evenly spaced time points with sampling frequency ω=1/τη, where τη is Kolmogorov time. The training/test set are composed of N=5000 and Nt=13500 data points, respectively.

Figure 2—figure supplement 1
Fixed vs adaptive threshold.

Test error using an adaptive threshold (left column) vs a fixed threshold (right column) for different simulations described in the main text. Adaptive thresholds are defined as a fraction of the local average concentration, <c>local, computed over the memory M/ω. Fixed thresholds are defined as a fraction of the global maximum concentration c0. Results are robust with respect to the choice of adaptive threshold, whereas they vary considerably with the choice of fixed thresholds. Large fixed thresholds (marked with yellow squares) prevent odor detection in dilute regions that is far from the source or from the substrate.

Figure 2—figure supplement 2
Linear least square algorithm.

Prediction error for a least squares algorithm assuming the target function is a linear function of the input (no regularization). Performance is poor regardless of the input features and the dataset (dataset A to E are defined as for Figure 5).

Figure 2—figure supplement 3
Visualisation of a typical cross validation procedure.

Visualisation of a typical cross validation procedure, exemplifying the need for regularization for this problem. Left and right color plots show the error on the training set (left) and test set (right) as a function of the two hyperparameters λ (Tikhonov regularization parameter) and σ (width of the Gaussian kernel), see Materials and methods for more details. Bottom: test and training errors for λ0 as a function of 1/σ. For large values of 1/σ, the solution overfits the data and for small values of 1/σ, the solution does not overfit but is unstable. Top: test and training errors for σ0 as a function of λ. For large values of 1/σ, the solution overfits the data and for small values of 1/σ, the solution does not overfit but is unstable.

Figure 2—figure supplement 4
Test error at source height, for prediction in the crosswind direction.

Symbols as in Figure 2.

Figure 2—figure supplement 5
Results for three source locations.

Results vary little when the source is moved downstream of its original position. Left: sketch of the three source positions and conical domain used for training. Center: test error at source height for two individual features (average and intermittency) as well as their combination, as indicated on x-axis. Right: test error for two individual features (average, grey line and intermittency, black line) at five different heights marked with a to e as in Figure 5.

Figure 2—figure supplement 6
Results of training with odor emanating from one source and testing over odor fields emanating from the other two.

The algorithm is robust to source location. Left: performance of the pair average concentration and intermittency. Center: performance of the individual feature average concentration. Right: performance of individual feature intermittency. Boxes extend from the 25th to the 75th percentile; dashed line: median. Green: training and test are performed over the same dataset; blue: test is performed over the simulation with odor source closest to the obstacle; dark red: test is over the dataset obtained with the middle source; yellow: test is over the dataset with the source furthest downstream. Training dataset are indicated on the x-axis.

Figure 3 with 2 supplements
The sampling strategy affects performance but not ranking.

(a) Error χ as a function of memory in units of Kolmogorov times τη; memory is defined as the duration of the time series of odor concentration ci=(c(zi,ti),,c(zi,ti+M)) used to compute the five features xi1,,xi5, i.e. memory =ti+M-ti=M/ω. Red and pink: Performance using xi=xi1 (average concentration) and xi=xi5 (intermittency factor). The number of training points and the frequency of sampling are fixed, N=5000 and ω=1/τη. Dotted, dashed and solid grey lines are power laws with exponents -1/5, -1/10 and -1/4 respectively to guide the eye. (b) Error as a function of number of points in the training set N, with Nt=13500 points in the test set, memory =100τη and ω=1/τη. Color code as in (a). (c) Performance using the five individual features as input with N=5000, Nt=13500, memory =100τη sampling odor at frequency ω=1/τη (empty bars) and ω=10/τη (filled bars). Key shows color coding.

Figure 3—figure supplement 1
Prediction error as a function of the number of points in the training set for individual features and pairs of features.

Based on this analysis we chose N=5000.

Figure 3—figure supplement 2
Effect of memory, sampling frequency and number of points in the training set, for prediction in the crosswind direction.

Symbols as in Figure 3.

Figure 4 with 1 supplement
Pairing one timing feature and one intensity feature considerably improves performance.

(a) Error χ obtained with individual features (full bars) and pairs of features (empty bars). Grey and black indicate pairings of two intensity features and two timing features respectively; green indicates mixed pairs of one timing and one intensity feature. (b) Performance (left) and relative improvement over the best of the two paired features (right). Results for the median (bottom) and the 95th percentile (top). Within each table plot, rows from bottom to top and columns from left to right are labeled by the 5 individual features: A (average, x1), S (slope x2), B (blanks x3), W (whiffs x4), I (intermittency x5). Results with individual features are shown on the diagonal; results pairing feature i and feature j are shown at position (i,j). Mixed pairs provide both the best performance and the largest improvement over individual features.

Figure 4—figure supplement 1
Effect of pairing two individual features, for prediction in the crosswind direction.

Symbols as in Figure 4.

Figure 5 with 3 supplements
Ranking shifts with height from the ground.

(a) Datasets a to e correspond to data obtained at heights z/H=25%, 37.5%, 50%, 55% and 65% respectively. (b) Distribution of intensities (top) and intermittency factors (bottom) over the training set from a to e (left to right). Moving away from the boundary, the odor becomes less intense and more sparse. (c) Median performance as a function of average intermittency factor of the training set for individual intensity (grey) and timing (black) features, mixed pairs of one intensity and one timing feature (green) and all five features together (dark green). (d) Predicted vs actual distance, to visualize a representative subset of the results in (c), scale bar 103η. Ranking depends sensibly on height: intensity features outperform timing features near the substrate, where there is more odor and it is more continuous; timing features outperform intensity features further from the substrate where there is less odor and it is more sparse; mixed pairs perform best across all conditions; combining five features provides little to no improvement over mixed pairs.

Figure 5—figure supplement 1
Test error mapped in space.

Test error mapped in space for a kernel ridge regression algorithm that takes individual observables in input and predicts distance in the downwind (left) and crosswind (right) direction for simulation b. The test error is color coded from 0 (blue) to 2 (yellow) corresponding to the limits of perfect prediction and random prediction.

Figure 5—figure supplement 2
Predicted distance vs actual distance for simulation a (top) and (d) (bottom); symbols as in Figure 5d.

The bisector corresponds to a perfect prediction; departure from the bisector visualizes the error.

Figure 5—figure supplement 3
Estimated predicted power of individual features.

Estimated test error of individual features at different heights using the theoretical framework Equations 5–10 outlined in the text and Materials and methods, using an estimate of the likelihood obtained empirically from our data (not shown). Symbols as in Figure 5c (black / grey represent timing /intensity features; dashed lines: whiffs).

Ranking depends on distance from the source.

(a) At source height, the dataset is split in proximal (distance <2330η) and distal (distance >2330η). (b) Distributions of average odor intensity (left) and intermittency factor (right) over the training set; closer to the source, the odor is more intense and more sparse. (c) Distribution of test error for the proximal (left) and distal (right) problem showing intensity features (grey) outperform timing features (black) at close range, but not in the distal problem where differences in the error distribution are limited to the tails (see insets). Mixed pairs of features (green) outperform individual features either marginally (left) or considerably (right). (d) Percentiles of the error distribution in (c) for the proximal (left) and distal (right) problems confirming the picture emerged from (c).

Author response image 1
Estimated test error of individual features at different heights using the theoretical framework Equation (1)-(5) outlined in the text with the empirical likelihood estimated from data (not shown).

Symbols as in Figure 5c of the manuscript (black / grey represent timing /intensity features; dashed lines: whiffs).


Table 1
Parameters of the simulation.

Length L, width W, height H of the computational domain; horizontal speed along the centerline U; mean horizontal speed Ub=u; kinematic viscosity ν; diffusivity κc; Kolmogorov length scale η=(ν3/ϵ)1/4 where ϵ is the energy dissipation rate; mean size of gridcell Δx; Kolmogorov timescale τη=η2/ν; energy dissipation rate ϵ=ν/2(ui/xj+uj/xi)2; Taylor microscale λ=u2/(u/x)2; wall lengthscale y+=ν/uτ where the friction velocity is uτ=τ/ρ and the wall stress is τ=ρνdu/dz|z=0; Reynolds number Re=U(H/2)/ν based on the centerline speed U and half height; Reynolds number Reλ=Uλ/ν based on the centerline speed and the Taylor microscale λ; Schmidt number (Sc = ν/κc = Pe/Re); magnitude of velocity fluctuations u relative to the centerline speed; large eddy turnover time T=H/2u. First row reports results in non dimensional units; second and third rows correspond to dimensional parameters in air and water assuming the velocity of the centerline is 50 cm/s in air and 12 cm/s in water.

air9.50 m1.90 m0.96 m50 cm/s36 cm/s1.510-5 m2/s1.510-5 m2/s0.15 cm0.6 cm
water2.66 m0.53 m0.27 m12 cm/s8.6 cm/s10-6 m2/s10-6 m2/s0.04 cm0.2 cm
air0.15 s6.3e-4 m2/s34 cm0.09 cm
water0.18 s3e-5 m2/s31 cm0.02 cm

Additional files

Download links

A two-part list of links to download the article, or parts of the article, in various formats.

Downloads (link to download the article as PDF)

Open citations (links to open the citations from this article in various online reference manager services)

Cite this article (links to download the citations from this article in formats compatible with various reference manager tools)

  1. Nicola Rigolli
  2. Nicodemo Magnoli
  3. Lorenzo Rosasco
  4. Agnese Seminara
Learning to predict target location with turbulent odor plumes
eLife 11:e72196.