Skip to main content


Bark beetle larval dynamics carved in the egg gallery: a study of mathematically reconstructing bark beetle tunnel maps

  • 502 Accesses


Scolytinae (bark beetle) is one of the most detrimental pests on the Chongming Island. It is desirable to understand the behaviour of the Scolytinae throughout its life cycle. Behaviour studies regarding mass attacks, mating behaviour and chemical control have been frequently reported in literature. However, little research could be found regarding the life of Scolytinae in the larval stage, especially for beetles in the field. In this paper, we analyse the tunnel map beneath the tree bark, since it is a potential source of information on the population size, egg gallery and larval development. We propose four hypotheses including synchronous larval growth (SLG), outward normal direction (OND), communication and repulsion (CR) and individual differences(ID), then employ the methods of curve fitting and differential equation modelling to mathematically reconstruct the tunnel map. Furthermore, we introduce the Frechet distance to measure the similarity of curves. Numerical simulation shows that the reconstructed tunnel map closely matches the collected sample.


Bark beetles are the major pests in the Chongming Island forests (in China). Every year, lots of newly dead pine trees invaded by these beetles can be found on construction sites. Statistical analyses have revealed the relations between bark beetle populations, forest fuels, fire hazards, climate changes, etc. [13]. Bark beetle outbreaks affect the quantity and quality of forest fuels, and thus causing potential fire hazard [7]. If the post-outbreak forest fire happens, CO2 and other greenhouse gases emitted will lead to climate warming. Moreover, the bark beetle vectored fungi may cause diseases, and thus contributing to tree mortality [21]. Country folks on the island worry that the invasive species may lead to serious loss.

Attack activity usually occurs in the spring [13]. Once bark beetles settle on a potential host, they attempt to burrow through the outward bark into the phloem tissue [30]. Healthy trees can resist attacks by producing resin to slow down or stop beetles from constructing galleries to live and lay eggs. If sufficient beetles attack a host, tree defenses may be exhausted. Then beetles successfully deposit groups of eggs in the phloem tissue [12].

Eggs are laid in the egg gallery which is partitioned off from the adult gallery by a wall of pitchy borings. This means that adults just reproduce. They leave the egg galleries promptly [13]. The eggs hatch after about two weeks. Small larvae about 1 mm long always feed upon the phloem tissue. As they grow, they feed more extensively and make a radial shaped tunnel. The larvae feed side by side in the tunnel, moving forward into the fresh tissue [5].

As the larvae complete their feeding, they make separate cells. The cells are located at the tunnel terminals, where the larvae change to the pupae, which in turn eclose to the adults. The new adults bore outward through the bark and fly away to a new host. Pupation usually occurs in the spring and full grown adults emerge in the summer [28]. Figure 1 illustrates the four life stages of a bark beetle.

Figure 1

The life cycle of a bark beetle

Research on bark beetle behaviour in different stages is currently in motion. More and more mechanisms then are revealed. In the mass attack stage, beetles use aggregation pheromones to coordinate mass attacks on the host. The beetle aggregation pheromones are released from the frass, which includes ipsdienol, ipsenol and frontalin, being produced in midgut tissue [4]. Once the tree has been under mass attack, beetles produce antiaggregation pheromones to terminate attacks preventing overcrowding and to reduce competition for phloem resources from which larvae feed [29].

In the mating stage, sexual selection is a complex process influenced by several factors. Pheromone signals are probably the first cue to bring males and females together. Additionally, chirping sounds may help male bark beetles to locate the females or discriminate their body sizes [22]. Body size plays an important role in the sexual selection of bark beetles, as larger females are more fecund and more attractive [16]. In the ovipositional stage, male with preferred female pairs have longer copulation times, construct galleries faster and have cleaner galleries. Larger females have faster oviposition rates and larval development [22].

There is some literature in which the aforementioned stages are described [28]. However, it is desired to know more larval behaviour underneath the bark in the field, rather than in the laboratory, which is the focus of this paper. We use the non-invasive method to geographically analyse the tunnel map, which is a potential source of information on population size, egg gallery and tunnel shape of the bark beetle. In the non-invasive method, we did not capture any bark beetles or bring any negative impact upon the beetles and plants [9].

We propose four hypotheses about larval development of the bark beetle larvae. First, a brood of bark beetle larvae grow up synchronously. Second, the larvae initially move in the directions of the outward normal vectors of the egg gallery curve. Third, when heading outward, larvae communicate and move repulsively. Last, there exist individual differences in a larva family on how much they feed on the phloem tissue and how fast they move forward.

We model the developing dynamics of beetle larvae in the form of differential equations:

$$\begin{aligned} \overrightarrow{V}=\frac{d\overrightarrow{P}}{dt} &=f( \overrightarrow{P}), \end{aligned}$$

where \(\overrightarrow{P}\) and \(\overrightarrow{V}\) are the 2-D position vector and 2-D velocity vector of the larva swarm, respectively. Further, based on the aforementioned hypotheses, we formulate the function f as follows:

$$ f(\overrightarrow{P})=g\bigl(\operatorname{dd}(\overrightarrow{P})\bigr) (1,1, \ldots,1)^{T}, $$

where dd is the directed distance matrix of \(\overrightarrow{P}\), and g is an entry-wise function [23] over the matrix which will be defined later in Eq. 6 and Eq. 7.

From the initial configuration of the egg gallery, we imitate the collective movement and mathematically reconstruct the tunnel map. Additionally, we introduce the discrete Fréchet distance [2] to measure similarity between the reconstructed tunnel map and the real tunnel sample. Numerical simulation shows that the reconstructed tunnel map closely matches the real sample, which supports our hypotheses to a large extent. The main contribution of this paper is that this is the first non-invasive study on the tunnel map of bark beetle larvae, to the best of our knowledge.

The rest of the paper is organised as follows. Section 2 presents the methods of image processing and curve fitting. Section 3 describes the reconstruction methods and processes in detail, in an order of larva development. Section 4 provides some discussion finally.

Image processing

We collect more than twenty pieces of fallen bark from infested pine trees in the Chongming island the summer season. Most bark samples which fell naturally are narrow and decaying. We choose the best-preserved bark sample (as shown in Fig. 2) from them and take a photo of the tunnel map. The photo is transformed into another photo with resolution of 1200 × 800. 1200 × 800 is high enough to present details of the tunnel map, and low enough to avoid unnecessary complex computation.

Figure 2

A tunnel map sample for a brood of bark beetle larvae. The diameter of the coin is 19.5 mm (millimetre)

We ascertain that a brood of bark beetles (Coleoptera: curculionidae: scolytinae) have lived underneath the bark in their larval stage. The inference is partly drawn from interviews with some native forest rangers. Moreover, we have found many bark beetles alive around the trees where we picked the samples.

To make sure that the bark sample reflects the wild life of a brood of bark beetle larvae, we measure and compare the tunnel widths from the starting points (entrances) to the end points (exit holes).

Figure 3 statistically compares the tunnel widths in different positions which is defined as the diameters of the cross-sectional circles. The tunnel widths increase gradually with respect to the position \(P_{0}\), \(P_{1}\), \(P_{2}\) and \(P_{3}\), where \(P_{0}\), \(P_{1}\), \(P_{2}\) and \(P_{3}\) are the starting point, the first trisection point, the second trisection point and the end point of each tunnel respectively, as shown in Fig. 2(b). The comparison result indicates that the tunnels are the growth tunnels of a brood of bark beetle larvae. As a result, the starting points are the positions where eggs were laid.

Figure 3

Tunnel widths in different positions

Without loss of generality, we suppose that the x axis is aligned with the initial curve of the egg gallery. Next, we mark each starting position for each tunnel as shown in Fig. 4. Each position is assigned a corresponding xy coordinate. All positions together constitute the initial configuration of \(\overrightarrow{P _{i}}\) in Fig. 5(a).

Figure 4

Starting points in the larval gallery

Figure 5

The points (eggs) are separated into the upper group and the lower group by curve fitting. (a) The original point; (b) the upper group and the lower group

A bipartition process is required to separate the beetle larvae into two rows or groups. We propose a novel strategy to complete the task. As shown in Fig. 4, the upper row and the lower row have almost the same number of starting points (or population size). If we perform a curve fitting for all these starting points, the two rows of points can be separated automatically, as shown in Fig. 5(b).

Let the bottom-left corner of the photo in a 1200 × 800 resolution be the origin, we assigned each pixel a xy coordinate in the range of \((0,0)\) to \((1199,799)\). For convenience sake, we use the pixels of image as the units of x and y coordinate. The transformation rule is: \(1 \text{ pixel} \approx 8.86\times 10^{-2}\text{ mm}\). For the sake of succinct, we do not label the xy and the unit any more in all coming figures which contain the tunnel map.

We perform polynomial curve fittings using least squares approach. The obtained fitted curve based on the marked starting point in Fig. 4 is

$$ f(x)= 4.956\times 10^{-8} x^{4}- 1.101\times 10^{-4}x^{3} + 9.054 \times 10^{-2}x^{2} - 32.53 x + 4.848\times 10^{3}, $$

which separates the upper group from the lower group naturally, as shown in Fig. 5.

Further, we perform curve fitting for each row using least squares approach, thus obtaining two fitted curves as follows:

$$\begin{aligned}& \begin{aligned}[b] f_{u}(x)&= 5.048\times 10^{-8} x^{4}- 1.107\times 10^{-4}x^{3}+ 8.955 \times 10^{-2}x^{2}- 31.63 x \\ &\quad{} +4.646\times 10^{3}, \end{aligned} \end{aligned}$$
$$\begin{aligned}& \begin{aligned}[b] f_{l}(x)&= 2.901\times 10^{-8} x^{4}- 6.467\times 10^{-5}x^{3}+ 5.295 \times 10^{-2}x^{2}- 18.85 x \\ &\quad{} +3.005\times 10^{3}, \end{aligned} \end{aligned}$$

where \(f_{u}(x)\) fits the upper curve and \(f_{l}(x)\) fits the lower curve. The fitted upper curve and lower curve are shown in Fig. 6(a). The fitted curves should be in accord with the smooth body shape and moving trajectory of the female bark beetle. We use the fitted curves to slightly adjust the starting points as shown in Fig. 6(b). The starting points in Fig. 6(a) are marked before, and the starting points in Fig. 6(b) are adjusted slightly to be on the fitted curve.

Figure 6

Further polynomial curve fitting. (a) Starting points manually marked; (b) starting points slightly adjusted to be on the fitted curves

Also, we test curve fitting for different polynomial degrees, and find that 3rd or 4th degree polynomial fitting can provide enough high precision. That is to say, the egg gallery curve is very smooth.

Dynamical system and map reconstruction

Dynamical system

Before analysing the larval movement, we propose the following three hypotheses:

  1. (1)

    Synchronous Larval Growth (SLG) hypothesis: A brood of bark beetle larvae grow up synchronously.

  2. (2)

    Outward Normal Direction (OND) hypothesis: The larvae initially move in the directions of the outward normal vectors of the egg gallery curve.

  3. (3)

    Communication and Repulsion (CR) hypothesis: When heading outward, larvae communicate and move repulsively.

Pupation usually occurs in early spring and adults emerge in late summer on the Chongming island. For group-living individuals to remain spatially coherent, coordinated behaviour across group members is essential [18]. We propose the SLG hypothesis since it is unlikely that the brood reduction hypothesis [17], which applies to birds, would apply to the bark beetles. The inapplicability has been explicitly confirmed by the fact that offspring survival was lower in highly asynchronous broods than in synchronous broods for burying beetles [27]. King [15] has investigated what factors can promote or constrain the achievement of such behavioural synchronisation. Literatures about some other animals, such as [19] and [24], could provide reliable support as well for the SLG hypothesis.

Based on the hypothesis, a brood of bark beetle larvae move outward synchronously. Sometimes they go faster synchronously. Sometimes they slow down synchronously. Thus we can let each larva move outward with a constant speed instead of time-variable speed, without worrying about any change of the curve shape.

The collected sample supports the OND hypothesis to a certain extent. From Fig. 4, we can observe that the beetle larvae move initially in the outward normal direction from the gallery. Larval competition for phloem has been regarded as an important fitness factor in bark beetles [16]. Moving outward is better than random moving to obtain greater opportunity for survival.

High densities of larvae result in low quality beetles that have lower reproductive capacity, lesser dispersal ability and lower survival [1]. Therefore, the larvae hope to move out as separately as possible. As a result, there should be a repulsive effect between siblings in the brood (the CR hypothesis).

Repulsion requires some communication mechanisms. The most likely communication information may be chemical cues. The first bark beetle pheromone was identified in I. paraconfusus as a mixture of ipsdienol, ipsenol and cis-verbenol [26]. In addition, sounds may also be used as communication signals [25].

We model the developing dynamics of beetle larvae in the form of differential equations:

$$\begin{aligned} &\frac{d\overrightarrow{P}}{dt}=\overrightarrow{V} , \end{aligned}$$
$$\begin{aligned} &{\overrightarrow{V}}=f(\overrightarrow{P}), \end{aligned}$$

where \(\overrightarrow{P}\) and \(\overrightarrow{V}\) are the position vector and the velocity vector of the larva swarm, respectively. Without loss of generality, \(\overrightarrow{P}\) and \(\overrightarrow{V}\) are represented as column vectors.

Further, based on the aforementioned hypotheses, we formulate the function f in Eq. 4b as follows:

$$ f(\overrightarrow{P})=g\bigl(\operatorname{dd}(\overrightarrow{P}) \bigr) (1,1,\ldots,1)^{T}. $$

We define \(\operatorname{dd}(\overrightarrow{P})\), the directed distance matrix of \(\overrightarrow{P}=\{\overrightarrow{P_{1}},\overrightarrow{P_{2}},\ldots,\overrightarrow{P_{n}}\}\) as

$$ \operatorname{dd}(\overrightarrow{P})= \begin{bmatrix} \overrightarrow{d_{11}}&\overrightarrow{d_{12}}&\cdots &\overrightarrow{d _{1n}} \\ \overrightarrow{d_{21}}&\overrightarrow{d_{22}}&\cdots &\overrightarrow{d _{2n}} \\ \vdots &\vdots &\ddots &\vdots \\ \overrightarrow{d_{n1}}&\overrightarrow{d_{n2}}&\cdots &\overrightarrow{d _{nn}} \end{bmatrix} = \begin{bmatrix} \overrightarrow{0}&(\overrightarrow{{P}_{2}}-\overrightarrow{{P}_{1}})& \cdots &(\overrightarrow{{P}_{n}}-\overrightarrow{{P}_{1}}) \\ (\overrightarrow{{P}_{1}}-\overrightarrow{{P}_{2}})& \overrightarrow{0}&\cdots &(\overrightarrow{{P}_{n}}-\overrightarrow{ {P}_{2}}) \\ \vdots &\vdots &\ddots &\vdots \\ (\overrightarrow{{P}_{1}}-\overrightarrow{{P}_{n}})&(\overrightarrow{ {P}_{2}}-\overrightarrow{{P}_{n}})&\cdots &\overrightarrow{0} \end{bmatrix} . $$

In Eq. 5, g is an entry-wise function over the matrix \(\operatorname{dd}(\overrightarrow{P})\), which represents the relation between the repulsive effect and the distance of two larval individuals. It should be explained that the entry-wise operation produces a matrix where each element i, j is a function of element i, j of the original matrix. To obtain the resultant repulsion for each individual, row additions of the \(\operatorname{dd}(\overrightarrow{P})\) can be calculated by multiplying the column vector \((1,1,\ldots,1)^{T}\).

According to the OND hypothesis, we obtain the initial movement direction for each beetle larva by computing the outward normal vectors, as shown in Fig. 7.

Figure 7

Outward norm vectors of egg gallery

If they move continuously along their initial directions, the movements are not good enough for them to avoid likely sibling competition. For this reason, we add mutual repulsions on them, based on the CR hypothesis. The mutual repulsions continually impact on their movement direction until they finally arrive at their terminals.

We assume that the corresponding relation between the repulsion and the distance can be modelled as follows:

$$ \bigl\vert g(\overrightarrow{d_{ij}}) \bigr\vert = \alpha e^{-\beta \cdot \vert \overrightarrow{d_{ij}} \vert }, $$

where \(\overrightarrow{d_{ij}}\) is equal to \(\overrightarrow{{P}_{2}}-\overrightarrow{{P}_{1}}\) as defined in Eq. 6, α is the intensity coefficient and β is the attenuation coefficient. \(g(\overrightarrow{d_{ij}})\) is defined as a vector with magnitude \(\vert g(\overrightarrow{d_{ij}}) \vert \), which has the same direction as \(\overrightarrow{d_{ij}}\). The model is similar to the atmospheric dispersion model used in [20].

Repulsions are illustrated in Fig. 8(a). If we add up the former movement inertia (such as the velocity vector in Fig. 7) and the repulsive vector (Fig. 8(a)), then we can obtain the composite velocity vector, as shown in Fig. 8(b).

Figure 8

Repulsive impact on the outward movements. (a) The repulsive vector calculated using Eq. 7, where \(\alpha =0.001\) and \(\beta =0.0001\); (b) the composite velocity vector obtained by adding the repulsive vector to the inertia vector

As a numeric solution of Eq. 4a4b, the moving process can be reconstructed iteratively:

$$ \overrightarrow{P_{k+1}} = \overrightarrow{P_{k}} + \gamma \cdot \overrightarrow{V _{k}}, $$

where \(\overrightarrow{P_{k}}\) is the position vector for the larva swarm at stage k, \(\overrightarrow{V_{k}}\) is the normalised velocity vector for the larva swarm at stage k. The parameter γ is a scaling coefficient which represents the basic speed of the larvae.

Figure 9(a) shows two snapshots of the outward movement in the larval stage. And Fig. 9(b) displays the whole tunnel map of the brood.

Figure 9

Reconstruction of the tunnel map (\(\gamma =5\)). (a) The snapshots of the larva swarm at the 5th step (in blue) and the 10th step (in purple); (b) the reconstructed tunnel map

From the comparison between Fig. 9(b) and Fig. 2(b), we can observe that there exist obvious shape differences at two sides between the reconstructed map and the sample. Therefore, we propose an Individual Differences hypothesis for the bark beetle larvae, abbreviated as ID hypothesis. Regarding individual differences, we care more about the differences how fast they move.

Although we model the larval movements as constant speeds when we reconstruct the tunnel map, their constant speeds are not the same. It is not difficult to tell the track length differences from Fig. 2(b). The larval durations for a brood of bark beetles are almost equal, because they almost simultaneously hatch and pupate (the SLG hypothesis). For this reason, we infer that their average speeds are different.

For the specific brood, we find that the tunnels radiating from the centre are much longer than the tunnels radiating from two sides. Moreover, it has been reported that “core” nestlings enjoy substantial growth and survival advantages over “marginal” nest-mates for some bird species [10]. The “core” offspring show higher growth and lower mortality than the marginal offspring [11]. Therefore, we infer that the larvae in the middle are stronger and have higher speeds than those on two sides.

We conjecture that the female beetle attaches more importance to the central part eggs, thus the larvae hatched from these eggs become stronger in the larval stage. Another conjecture is that if a female beetle finds a place to lay eggs, she would prefer to lay the central eggs at the best position.

We use a bell-shaped function

$$ b(x)={e^{-{\frac{(x-\mu )^{2}}{2\sigma ^{2}}}}} $$

to generate the speed difference, which is the right part of the probability density of the normal distribution \(\mathcal{N}(\mu , \sigma ^{2})={\frac{1}{\sqrt{2\pi \sigma ^{2}}} e^{-{\frac{(x-\mu )^{2}}{2 \sigma ^{2}}}}}\). μ is the centre of the egg gallery.

Function (9) with \(\sigma =80\) is shown in Fig. 10. A basic speed distribution array B for all larvae in the family can be obtained as follows:

$$\begin{aligned} B = \{&0.487,0.553,0.633,0.713,0.783,0.841,0.887,0.923,0.959,0.998,0.996,0.978, \\& 0.959, 0.931,0.902,0.819,0.474,0.330,0.259,0.448,0.526,0.593,0.660,0.733, \\& 0.801,0.852, 0.935,0.985,1.000,0.997,0.987,0.965,0.935,0.888,0.830,0.795, \\& 0.417,0.353,0.236 \}. \end{aligned}$$

We replace \(\overrightarrow{V_{k}}\) in Eq. 8 with \(B\circ \overrightarrow{V_{k}}\) to embody the speed difference, where is a Hadamard product. The amended reconstruction algorithm becomes

$$ \overrightarrow{P_{k+1}} = \overrightarrow{P_{k}} + \gamma \cdot B\circ \overrightarrow{V_{k}}. $$
Figure 10

The bell-shaped function

With the proposed four hypotheses, now we solve the differential equation Eq. 4a4b by Eq. 10 to reconstruct the tunnel map. The initial position vector is obtained from the starting points in Fig. 6(b). The initial movement direction is the outward normal direction of the fitted curves. The initial velocity is determined by γ in Eq. 8 and σ in Eq. 9. The parameters used for the reconstruction are given in Table 1. We reconstruct the tunnel map using Wolfram Mathematica, as shown in Fig. 11.

Figure 11

Reconstructed tunnel map with default configurations

Table 1 Default configurations for tunnel map reconstruction

Similarity measurement

Next, we introduce the discrete Fréchet distance to measure similarity between the reconstructed tunnel map and the real sample.

Let S be a metric space. A and B are two given curves in S. The Fréchet distance between A and B is defined as the infimum over all reparametrisations ζ and η of \([0,1]\) of the maximum over all \(\in [0,1]\) of the distance in S between \(A(\zeta (t))\) and \(B(\eta (t))\). In mathematical notation, the Fréchet distance \(F(A,B)\) [8] is

$$ \delta _{F}(A,B)=\inf_{\zeta ,\eta } \max _{t\in [0,1]} \bigl\{ d \bigl( A\bigl(\zeta (t)\bigr), B\bigl(\eta (t) \bigr) \bigr) \bigr\} , $$

where d is the distance function of S.

A simpler variant of the Fréchet distance for two polygonal curves \(A =(a_{1} ,a_{2} ,\ldots,a_{n})\) and \(B =(b_{1} ,b_{2} ,\ldots,b _{m})\) is the discrete Fréchet distance, denoted by \(\delta _{D}(A,B)\) [2]. A discrete monotone reparametrisation ζ (or η) from \((1,2,\ldots,k)\) to \((1,2,\ldots,l)\) is a non-decreasing function:

$$ (1,2,\ldots,k)\rightarrow (1,2,\ldots,l), $$

for integers \(k \ge l \ge 1\), with \(\zeta (1) = 1\), \(\zeta (k) = l\) and \(\zeta (i+1) \le \zeta (i)+1\), for all \(i = 1,\ldots,k-1\). An order-preserving complete correspondence between A and B is a pair \((\zeta ,\eta )\) of discrete monotone reparametrisations from \((1,2,\ldots,k)\) to \((1,2,\ldots,m)\) and \((1,2,\ldots,n)\).

\(\delta _{D}(A,B)\) can be defined as:

$$ \delta _{D}(A,B)=\min_{\zeta ,\eta } \max _{t\in [1,k]} \bigl\{ d \bigl( A\bigl(\zeta (t)\bigr), B\bigl(\eta (t) \bigr) \bigr) \bigr\} , $$

where \((\zeta ,\eta )\) range over all order-preserving complete correspondences between A and B.

For the sake of simplicity, we label seven points along each larval tunnel. Seven points are also selected from the reconstructed tunnel accordingly.

Figure 12 demonstrates the real tunnel and the corresponding reconstructed one. The solid and dashed lines are the reconstructed and the real tunnel respectively. Let \(k=m=n=7\), the distance between the two curves can be calculated in the degenerated form:

$$ \delta _{D}(A,B)= \max_{i\in [1,7]} \bigl\{ d \bigl( A(i), B(i) \bigr) \bigr\} . $$
Figure 12

Similarity between the reconstructed tunnel (solid line) and the real tunnel (dashed line). (The red points at the top right are starting points)

Although the bark sample is the best piece we have, it is not completely intact. Some tunnels break in the edge of the bark sample, thus cannot provide a full curve. So, we choose 18 intact tunnels from all and compute the Fréchet distances.

Figure 13 demonstrates the real and reconstructed curves of chosen tunnels. The mean and standard deviation of the 18 Fréchet distances are \(\{142.492,103.073\}\) in Fig. 13(a). The ID hypothesis is confirmed, since the mean and standard deviation for Fig. 13(b) are \(\{244.639,112.129\}\) which are considerably larger than those of Fig. 13(a).

Figure 13

Similarity between the whole reconstructed tunnel (solid line) with default configurations in Fig. 11 and the whole real tunnel (dashed line). (a) With consideration of the ID hypothesis; (b) without consideration of the ID hypothesis

Model parameters

The model parameters have a considerable influence on the tunnel reconstruction. We examine in detail how the parameters α, β, γ and σ impact on the simulation results.

We do a pairwise comparison among tunnel maps generated for different values of α. As shown in Fig. 14(a–c), the parameter α exerts a stronger effect on the repulsion among the bark beetle larvae. If α is small, the inertia weight performs larger than the expulsion. As α gets larger, the repulsive effect gets more intense and the tunnels bend outward more.

Figure 14

Reconstructed tunnel maps for different parameters. The default configurations of α, β, γ, σ are from Fig. 11. When one parameter is changed, the other parameters are keep unchanged

We do a pairwise comparison among tunnel maps generated for different values of β. The parameter β exerts a considerable effect on the repulsion among the beetle larvae. When β is large, the expulsion attenuates dramatically. The expulsion can be ignored when compared with the inertia, so the tunnels are almost straight as shown in Fig. 14(d–f). As β gets smaller, the tunnels bend outward more as expected.

The parameter γ reflects the collective speed of the family. We do a pairwise comparison among tunnel maps generated for different values of γ. The different tunnel maps can be looked upon as the process of moving. As shown in Fig. 14(g–i), the tunnel maps keep the same shape, though the development is different. More or less, provided that they grow up (or move) simultaneously, the shape of γ will remain unchanged. Therefore, this result could have a useful interpretation as the SLG hypothesis.

The parameter σ impacts on the shape of the bell-shaped function (Eq. 9). The smaller the parameter σ, the larger the difference between the centre and two sides of the function. We do a pairwise comparison among tunnel maps generated for different values of σ. As shown in Fig. 14(j–l), when σ is small, the left or right side of the tunnels extends along the x axis. As σ becomes large enough, the bell-shaped function \(b(x)\) almost becomes a horizontal line, and the tunnel map converges to the tunnel map in Fig. 9(b).

We measure the curve similarity using the discrete Fréchet distance for diverse parameters in Fig. 14(a–l). The results are exhibited in Fig. 15. The reconstruction tunnel map with parameters in Fig. 14(c) has the best curve similarity with the real one. Better parameters can be obtained by means of parameter optimization.

Figure 15

Similarity comparison among different parameter configurations of Fig. 14


There is a close similarity between the tunnel map we reconstructed (see Fig. 11(b)) and the sample we picked (Fig. 2(b)). Even though we can obtain closer similarity by tuning the model parameters, the differences are still perceptible. We believe that the reconstruction could be improved by considering the following factors:

  • Intra-specific competition

    In the life cycle, there are two periods during which intra-specific competition may occur. Intra-specific competition may occur between the adults for space in which to construct the parental galleries. Also there may be competition between the larvae for food in order to maintain growth and development [3]. To simplify the model, we purposely conduct research on a gallery separated from other galleries as far as possible. Even though, it is hard to find a larval gallery completely isolated. In fact, there is another gallery not far from this gallery in Fig. 2.

  • Non-planar gallery

    Rigorously speaking, the 2-D plane of the photo is the tangent plane of the bark which is a part of the trunk in the shape of cylinder. Therefore, it is a bit imprecise for successive computations. For our picked sample, the width of the whole egg gallery is about 70 mm, while the diameter of the trunk is about 400 mm. In that case, the relative error between the chord length and the arc length is about 0.5%.

  • Environmental impact

    The larval stage lasts several weeks. Temperature, humidity, air pressure and precipitation may impact every larva. We do not model any environmental impact in our study. Instead, the SLG hypothesis is used to suppress all environmental factors.

SLG, OND, CR and ID are four fundamental hypotheses in this paper. These hypotheses more or less are supported by literature.

We have observed many other samples to check whether the initial movement direction is the outward normal vector of the gallery curve. In almost all cases, it is true though we still do not know how they know the outward normal direction. We speculate that it is the female bark beetle who left some information before she left.

Bark beetle larvae use chemical cues to communicate with each other in a great probability. Nevertheless, we are not sure whether it is the only form of communication. Fortunately, it is not very important for reconstructing the tunnel map. A reconstruction could be conducted as long as we correctly establish the relation between the repulsion and the distance for each larval pair. The model for repulsion (Eq. 7) is not entirely accurate. Despite this, a decreasing function for distance is necessary.

There are 37 larvae in the sample, which is a large gallery for the bark beetle. It is reasonable and simple enough to use the bell-shaped function for characterizing the individual differences. Nevertheless, the bell-shaped function is not applicable for the small gallery. Even for the large gallery, the bell-shaped function cannot model all individual differences in a specific brood. Whether we use the bell-shaped function or not, a smooth function is preferred. It was reported that siblicide in spiderlings may occur most often when one sibling has a size advantage [14].

We reduce the hypotheses to as few as possible. The reconstruction would be difficult without any of the four hypotheses. More hypotheses may be helpful but unnecessary.

It is natural to establish a connection between the body size of the bark beetle larva and the width of the larval tunnel [6]. We believe some other information of the larval life could be explored likewise. That is one reason why we insist on conducting non-invasive research. Another reason for conducting non-invasive research is that even when using invasive methods, it cannot effectively help long-term field study inside a tree. It is impossible to verify our hypotheses rigorously. However, the similarity between the reconstructed tunnel map and the real sample, together with some pioneer work, gives strong support to our hypothesis.


  1. 1.

    Anderbrant, O., Schlyter, F.: Causes and effects of individual quality in bark beetles. Holarct. Ecol. 12, 488–493 (1989)

  2. 2.

    Aronov, B., Har-Peled, S., Knauer, C., Wang, Y., Wenk, C.: Fréchet distance for curves, revisited. In: Azar, Y., Erlebach, T. (eds.) Algorithms—ESA 2006, pp. 52–63. Springer, Berlin (2006)

  3. 3.

    Beaver, R.A.: Intraspecific competition among bark beetle larvae. J. Anim. Ecol. 43(2), 455–467 (1974)

  4. 4.

    Blomquist, G.J., Figueroa-Teran, R., Aw, M., Song, M., Gorzalski, A., Abbott, N.L., Chang, E., Tittiger, C.: Pheromone production in bark beetles. Insect Biochem. Mol. Biol. 40(10), 699–712 (2010)

  5. 5.

    Chen, H.F., Salcedo, C., Sun, J.H.: Male mate choice by chemical cues leads to higher reproductive success in a bark beetle. Anim. Behav. 83(2), 421–427 (2012)

  6. 6.

    Ciach, M., Michalcewicz, J.: Correlation between selected biometric traits of adult Rosalia alpina (Coleoptera: Cerambycidae) and size of their exit holes: new perspectives on insect studies? Pol. J. Ecol. 133(61), 349–355 (2013)

  7. 7.

    Collins, B., Rhoades, C., Battaglia, M., Hubbard, R.: The effects of bark beetle outbreaks on forest development, fuel loads and potential fire behavior in salvage logged and untreated lodgepole pine forests. For. Ecol. Manag. 284, 260–268 (2012)

  8. 8.

    Cook, A.F., Driemel, A., Har-Peled, S., Sherette, J., Wenk, C.: Computing the Fréchet distance between folded polygons. In: Dehne, F., Iacono, J., Sack, J.-R. (eds.) Algorithms and Data Structures, pp. 267–278. Springer, Berlin (2011)

  9. 9.

    Flache, L., Becker, N.I., Kierdorf, U., Czarnecki, S., Düring, R.-A., Encarnação, J.A.: Hair samples as monitoring units for assessing metal exposure of bats: a new tool for risk assessment. Mamm. Biol. 80(3), 178–181 (2015) Special Issue: Bats as Bioindicators

  10. 10.

    Forbes, S., Glassey, B., Thornton, S., Earle, L.: The secondary adjustment of clutch size in red-winged blackbirds (Agelaius phoeniceus). Behav. Ecol. Sociobiol. 50(1), 37–44 (2001)

  11. 11.

    Forbes, S., Wiebe, M.: Egg size and asymmetric sibling rivalry in red-winged blackbirds. Oecologia 163(2), 361–372 (2010)

  12. 12.

    Hood, S., Sala, A.: Ponderosa pine resin defenses and growth: metrics matter. Tree Physiol. 35(11), 1223–1235 (2015)

  13. 13.

    Jenkins, M.J., Hebertson, E., Page, W., Jorgensen, C.A.: Bark beetles, fuels, fires and implications for forest management in the Intermountain West. For. Ecol. Manag. 254(1), 16–34 (2008)

  14. 14.

    Johnson, J.C., Halpin, R., Ii, D.R.S.: Extreme developmental synchrony reduces sibling cannibalism in the black widow spider, latrodectus hesperus. Anim. Behav. 120, 61–66 (2016)

  15. 15.

    King, A.J.: All together now: behavioural synchrony in baboons. Anim. Behav. 78(6), 1381–1387 (2009)

  16. 16.

    Kirkendall, L.R.: The evolution of mating systems in bark and ambrosia beetles (Coleoptera: Scolytidae and Platypodidae). Zool. J. Linn. Soc. 77, 293–352 (1983)

  17. 17.

    Lack, D.: The significance of clutch-size in the partridge. J. Anim. Ecol. 16(1), 19–25 (1947)

  18. 18.

    Lewis, M.A., Nelson, W., Xu, C.L.: A structured threshold model for mountain pine beetle outbreak. Bull. Math. Biol. 72(3), 565–589 (2010)

  19. 19.

    Lewis, N.J., Hurnik, J.F.: The development of nursing behaviour in swine. Appl. Anim. Behav. Sci. 14(3), 225–232 (1985)

  20. 20.

    Li, H., Zhang, J.: Fast source term estimation using the PGA-NM hybrid method. Eng. Appl. Artif. Intell. 62, 68–79 (2017)

  21. 21.

    Lieutier, F., Yart, A., Salle, A.: Stimulation of tree defenses by Ophiostomatoid fungi can explain attack success of bark beetles on conifers. Ann. For. Sci. 66(8), 801 (2009)

  22. 22.

    Liu, Z., Xu, B., Guo, Y., Raffa, K.F., Sun, J.: Gallery and acoustic traits related to female body size mediate male mate choice in a bark beetle. Anim. Behav. 125, 41–50 (2017)

  23. 23.

    Reams, R.: Hadamard inverses, square roots and products of almost semidefinite matrices. Linear Algebra Appl. 288, 35–43 (1999)

  24. 24.

    Robinson, S.R., Smotherman, W.P.: Environmental determinants of behaviour in the rat fetus. II. The emergence of synchronous movement. Anim. Behav. 35(6), 1652–1662 (1987)

  25. 25.

    Rudinsky, J.A., Ryker, L.C., Michael, R.R., Libbey, L.M., Morgan, M.E.: Sound production in Scolytidae: female sonic stimulus of male pheromone release in two Dendroctonus beetles. J. Insect Physiol. 22(12), 1675–1681 (1976)

  26. 26.

    Silverstein, R.M., Rodin, J.O., Wood, D.L.: Sex attractants in frass produced by male Ips confusus in ponderosa pine. Science 154(3748), 509–510 (1966)

  27. 27.

    Smiseth, P.T., Morgan, K.: Asynchronous hatching in burying beetles: a test of the peak load reduction hypothesis. Anim. Behav. 77(2), 519–524 (2009)

  28. 28.

    Smith, R.H.: Red turpentine beetle. (1971)

  29. 29.

    Wood, D.L., Mittler, T.E., Radovsky, F.J., Resh, V.H.: The role of pheromones, kairomones, and allomones in the host selection and colonization behavior of bark beetles. Annu. Rev. Entomol. 27(1), 411–446 (1982)

  30. 30.

    Yang, Z.-Q., Wang, X.-Y., Zhang, Y.-N.: Recent advances in biological control of important native and invasive forest pests in China. Biol. Control 68, 117–128 (2014)

Download references


We sincerely thank Ruiwei Huang, Nan Tian and Leilei Ai who assisted with sample collections. We also thank Zhengyuan Yao for discussions on this topic. We would like to express our sincere thanks to the editor and the anonymous reviewers for their helpful comments and suggestions.


This work was supported by the National Natural Science Foundation of China under grants of the general technical foundation research joint fund (Project No. U1636208).

Author information

Conceptualization and methodology, HL and TL; writing, review and editing, HL. All authors read and approved the final manuscript.

Correspondence to Hui Li.

Ethics declarations

Ethics approval and consent to participate

All data was collected in accordance with the ASAB/ABS guidelines for use of animals in research. As a matter of fact, we did not capture any bark beetles or bring any negative impact upon the beetles, other animals, plants, or the environment.

Competing interests

We wish to confirm that there are no known conflicts of interest associated with this publication.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Li, H., Li, T. Bark beetle larval dynamics carved in the egg gallery: a study of mathematically reconstructing bark beetle tunnel maps. Adv Differ Equ 2019, 513 (2019).

Download citation


  • Bark beetle
  • Scolytinae
  • Egg gallery
  • Dynamics
  • Curve fitting