Abstract
Agent-based models of collective behaviour can reproduce the macroscopic patterns observed in biological systems, yet reproducing observed behaviour does not guarantee the model captures the true underlying mechanisms. In ant colonies, for example, clustering may arise from local imitation, chemical marking of the environment, or internal physiological states. Distinguishing between these requires predictive tests at the individual level. Here, we apply regularised hazard models to trajectory data from three colonies and systematically compare candidate mechanisms. We find that neighbour-based cues alone are weak predictors of when an ant will transition between moving and resting states. A reconstructed arrestant pheromone field is similarly weak as a predictor, and combining pheromone with neighbour cues yields inconsistent results across colonies. In contrast, a simple measure of internal state, i.e., how long an ant has occupied its current state, emerges as the dominant predictor. These results suggest that the timing of behavioural transitions is primarily governed by internal dynamics, while environmental and social cues act as modulators that shape where transitions occur rather than when.
1. Introduction
Agent-based models have been largely successful at reproducing the collective patterns observed in biological systems. In social insects, for example, simple local rules can generate complex collective behaviours such as clustering, decision-making, and coordinated foraging, which have been reproduced in simulation [1,2,3,4]. But many different microscopic rules can produce the same macroscopic outcome, so matching a simulation to data is not sufficient to prove that a model accurately captures a particular mechanism [5,6]. To this end, we instead seek to identify which subset of features are most predictive of individual behaviour.
Clustering in ant colonies provides a useful test case. When ants aggregate into dense, static groups, at least three distinct mechanisms could be responsible. First, local imitation: an ant may be more likely to stop moving when surrounded by resting neighbours, and more likely to resume movement when nearby ants depart [4,7]. Second, environmental memory: social insects deposit chemical signals that persist in the substrate, and such pheromone fields could bias subsequent visitors towards stopping in marked areas. Arrestant pheromones that induce aggregation have been chemically identified in termites [8], and analogous signals likely operate in ants. Third, internal state: an ant’s decision to transition may depend primarily on how long it has already been moving or resting, reflecting fatigue, satiation, or some other physiological variable rather than external cues. Individual ants exhibit intrinsic activity-rest cycles [9], response thresholds that vary independently of the environment [10], and hormonal states that regulate behavioural transitions on longer timescales [11].
These hypotheses are not mutually exclusive, but they differ in where information is stored. Local imitation treats the environment as static and decisions as instantaneous reactions to neighbours. Environmental memory introduces persistence in the medium: the pheromone field encodes the shared history of ant activity. Internal state places memory inside the agent, so that past behaviour influences future transitions even when the external context is unchanged. Distinguishing between these requires predictive tests at the level of individual ants rather than aggregate statistics.
The standard approach in the collective behaviour literature has been to assume that state durations follow an exponential distribution, implying a memoryless Markov process in which the probability of transitioning is constant over time [7]. This assumption is convenient but rarely tested. If ants instead exhibit behavioural inertia (i.e., a tendency to remain in their current state the longer they have occupied it), then statistical models that ignore dwell time will misattribute this regularity to social cues, producing false positives for local imitation.
In this paper, we apply regularised hazard models to trajectory data from three colonies of Pristomyrmex punctatus and systematically compare the predictive power of competing mechanisms. We begin with a neighbour-only model that includes local density and the fraction of resting neighbours. We then reconstruct an arrestant pheromone field under an accumulation hypothesis and test whether it provides additional predictive power. Finally, we incorporate dwell time as a proxy for internal state. By evaluating each model using out-of-fold AUC on held-out ants, we show that neighbourhood features alone are weak predictors (AUC 0.53–0.60 for stops, 0.65–0.72 for starts), that the pheromone field provides no consistent additional discrimination when combined with social context, and that dwell time dominates all other features (AUC 0.64–0.72 for stops, 0.73–0.83 for starts). These results suggest that the timing of behavioural transitions is governed primarily by internal dynamics, with environmental and social cues acting as modulators rather than primary drivers.
The remainder of the paper is structured as follows. In Section 2, we review related work on collective behaviour, stigmergy, and survival analysis. In Section 3, we describe the experimental setup and dataset. In Section 4, we introduce the hazard model framework and candidate covariates. In Section 5, we present model comparisons, negative controls, and cross-colony generalisation results. We conclude with a discussion of implications for agent-based modelling.
2. Background
Clustering is a canonical example of self-organisation in social insects. Deneubourg et al. [12] showed that simple probabilistic rules, in which ants pick up and deposit items with probabilities that depend on local density, are sufficient to generate stable clusters through positive feedback. Similar density-dependent rules produce brood sorting [13,14]. In both cases, the macroscopic pattern arises from local rules that depend only on the immediate neighbourhood of each ant.
The dominant modelling paradigm treats individuals as self-propelled particles responding to their local neighbourhood [15]. These models reproduce collective patterns, but as Sumpter et al. [16] have noted, most are sufficient rather than necessary: alternative models based on different assumptions often perform equally well. Katz et al. [17] make the point concisely: even if a model matches data across a set of observables, there is no guarantee that it will share the same response to perturbation unless the underlying rules are also correct. Mann et al. [18] showed that Markovian self-propelled particle models can capture fine-scale interaction rules but fail to reproduce global dynamics; non-Markovian models with memory of previous interactions proved necessary to match data at multiple scales. This finding directly motivates our inclusion of dwell time as a covariate.
An alternative to purely local interaction is stigmergy: coordination mediated by modifications to the environment [19]. Theraulaz and Bonabeau [20] distinguished quantitative stigmergy (based on concentration gradients, as in pheromone trails) from qualitative stigmergy (based on spatial configurations, as in nest architecture). Trail pheromones provide the canonical example: ants deposit pheromone as they walk, and subsequent ants preferentially follow paths with higher concentrations [21]. For clustering, the relevant signal is likely an arrestant pheromone that accumulates where individuals rest. Mitaka et al. [8] identified such an arrestant in termites, where non-volatile lipids induce long-term aggregation. Analogous signals likely operate in ants, though chemical identification remains incomplete. If such a pheromone influences stopping probability, it introduces spatial memory: the chemical field encodes where individuals have been, not just where they are now.
A common assumption in models of collective behaviour is that state durations follow an exponential distribution, implying a memoryless process in which transition probability is constant over time. Minasandra et al. [22] demonstrated that behavioural bouts instead exhibit decreasing hazard functions across multiple mammal species: the longer a bout progresses, the less likely it is to end. If ants exhibit similar behavioural inertia, models that ignore dwell time will misattribute this regularity to external cues, producing false positives for local imitation or stigmergy. A related issue is unobserved individual heterogeneity; Vaupel et al. [23] introduced frailty models that accommodate variation in individual propensities through multiplicative random effects on hazards.
Survival analysis provides a natural framework for modelling behavioural state transitions. The Cox proportional hazards model [24] remains foundational; Andersen and Gill [25] extended it to time-varying covariates and recurrent events. For data recorded at discrete intervals, Prentice and Gloeckler [26] showed that grouped survival data with proportional hazards yields a complementary log–log model, while Allison [27] provided the logistic alternative. Singer and Willett’s textbook [28] remains the definitive practical guide for discrete-time hazard models.
Applications to animal behaviour include Asher et al. [29], who demonstrated survival analysis and multistate model applications to behavioural transitions in veterinary contexts. Patterson et al. [30] used Hidden Markov Models to classify movement behaviour in marine animals. However, the application of hazard models to collective behaviour questions (i.e., asking which covariates predict state transitions in social insects) remains underutilised. Our approach fills this gap by fitting logistic hazard models to ant trajectory data and comparing the predictive power of competing mechanisms.
3. Experiment
We analyse trajectory data from three colonies of Pristomyrmex punctatus, a queenless ant native to Japan in which all workers reproduce clonally by thelytokous parthenogenesis [31,32]. This species nests in pre-existing cavities such as fallen twigs and leaf litter rather than constructing nests, and colonies relocate frequently [33]; aggregation is their primary mode of establishing a nest site. The clonal workforce eliminates genetic variation among nestmates, simplifying individual-level analysis. Each colony was placed in a circular arena (10 cm diameter) constructed from two transparent perspex sheets separated by a gap slightly larger than ant body height, restricting movement to a single layer. No food or brood were present, isolating clustering behaviour from foraging-related aggregation. Colonies were filmed from above for 4 h, with recording beginning immediately after placement. Videos were recorded at 60 frames per second and downsampled to 10 fps for analysis. Individual ants were identified in each frame using a U-Net segmentation model [34] and tracked by positional correspondence between consecutive frames, yielding coordinates for each ant at each frame. At our imaging resolution, the scale factor is 0.083 mm/pixel and ant body length is approximately 2.5 mm (30 pixels). Throughout this paper, we express spatial quantities in body lengths (BL), where 1 BL ≈ 2.5 mm.
We classify each ant at each frame as either moving or resting based on instantaneous speed. The speed distribution is bimodal, with a clear separation between resting ants (mean speed 0.26 mm/s) and moving ants (mean speed 5.2 mm/s). We use a threshold of 0.25 mm/s (3 pixels/frame at 10 fps) to assign states, with minimum state durations of 1.0 s for resting and 0.5 s for moving to filter transient fluctuations.
The three colonies contain 50 (KA050), 50 (KB050), and 48 (KC048) ants, with data validity (proportion of frames with successful tracking) ranging from 79% to 93%. Activity levels vary across colonies: KC048 is most active (35% of time moving), KB050 least active (15%), and KA050 intermediate (25%). The number of state transitions per ant ranges from 324 (KB050) to 673 (KC048), providing sufficient data for hazard model estimation. Figure 1 shows the fraction of ants moving over time; all colonies exhibit fluctuations between periods of high and low collective activity.
Figure 1.
Fraction of ants in the moving state over time for all three colonies. Activity levels and temporal dynamics vary across colonies, with KC048 showing the highest mean activity (35%) and KB050 the lowest (15%).
These activity fluctuations produce dynamic clustering patterns. Figure 2 shows the number of spatial clusters and the fraction of ants belonging to clusters over time. Clusters are defined using DBSCAN (density-based spatial clustering of applications with noise) [35] with BL and a minimum cluster size of 3 ants. The number of clusters varies between 2 and 10 across colonies, while the fraction of ants in clusters ranges from 0.4 to 0.9. Understanding what drives individual ants to stop (joining clusters) and start (leaving clusters) is the central question of this paper.
Figure 2.
Clustering dynamics over time for all three colonies. Top row: number of spatial clusters. Bottom row: fraction of ants belonging to clusters. Clustering is computed using DBSCAN with BL and a minimum cluster size of 3. Time series are smoothed with a 5 s centred rolling average.
4. Model
To distinguish between these mechanisms, we require a statistical framework that can predict individual transitions and attribute predictive power to different covariates. We adopt a discrete-time hazard model: at each video frame, we ask whether an ant will transition in the next frame given its current state and observable context. This framing has two advantages. First, it respects the causal nature of the problem by conditioning only on information available before the transition. Second, it allows us to compare candidate mechanisms by evaluating which covariates improve predictive performance.
4.1. Hazard Formulation
Consider an ant i observed at discrete time steps corresponding to video frames recorded at 10 frames per second. At each frame, the ant is in one of two behavioural states: moving or resting. We denote the state by , where indicates that the ant is moving and indicates that it is resting. A transition occurs when the state changes between consecutive frames, i.e., when . We refer to a transition from moving to resting as a ‘stop’ and a transition from resting to moving as a ‘start’.
Our goal is to model the probability that an ant will transition in the next frame given its current state and some set of observable covariates. This probability is known as the hazard rate. For stops, we define
where is a vector of covariates describing the local context of ant i at time t. An analogous definition holds for starts:
We model these hazards using logistic regression, so that
where is the logistic function and is a vector of coefficients to be estimated from data.
Covariates measured at the moment of transition may already reflect the transition itself rather than cause it. For example, an ant that is about to stop may already be decelerating, which would inflate the apparent predictive power of speed-based features. To avoid this leakage, we evaluate all covariates at a fixed lag k before the transition frame. In all analyses, we use frames (0.3 s at 10 fps), which separates the predictor window from the transition event while remaining within the timescale of local interactions.
4.2. Candidate Covariates
We consider three families of covariates corresponding to the three candidate mechanisms introduced above.
The simplest hypothesis is that an ant’s transition probability depends only on its immediate neighbours. We compute four features within a fixed radius BL (45 pixels, approximately 3.75 mm): (i) local density, the count of neighbours divided by the neighbourhood area ; (ii) fraction resting, the proportion of neighbours currently in the resting state; (iii) speed difference, the focal ant’s speed minus the mean speed of its neighbours; and (iv) heading dispersion, the circular standard deviation of heading differences between the focal ant and its neighbours. These features capture both the spatial configuration and kinematic state of the local neighbourhood. Under the local imitation hypothesis, we expect ants to be more likely to stop when surrounded by resting neighbours and more likely to start when surrounded by moving neighbours. Note that we deliberately exclude cluster membership as a covariate: clusters are an emergent population-level property defined by DBSCAN, and including them would conflate the outcome we seek to explain (why ants stop and form clusters) with a predictor derived from that outcome.
The second hypothesis is that ants deposit a chemical signal (an arrestant pheromone) that accumulates in the substrate and influences subsequent visitors. We reconstruct a pheromone field : each ant continuously deposits pheromone at its current position, which diffuses spatially and decays exponentially. Deposition occurs via a Gaussian kernel with radius 0.25 BL, diffusion follows (coupling spatial and temporal scales), and decay is exponential with time constant . The deposition and decay rates are set equal to (), so that each ant contributes unit integrated mass at steady state.
We tested s and BL. The upper bound of 3600 s (1 h) is conservative: in termites, arrestant pheromones remain active for at least 4 h [8]. To isolate spatial memory from instantaneous crowding, we residualised the pheromone signal against local density. For each ant i at time t, we read off the local pheromone concentration and include it as a covariate. Figure 3 shows the reconstructed field at four timepoints for colony KA050, and Figure 4 shows the corresponding field for KC048, whose aggregate–split–reaggregate dynamics are visible in Figure 2.
Figure 3.
Reconstructed pheromone field at four timepoints (colony KA050). Each panel shows the spatial distribution of accumulated pheromone concentration, with warmer colours indicating higher concentrations. (Top left): min 40 s (early, before aggregation); (top right): min (before aggregation, fraction in clusters ; cf. Figure 2); (bottom left): min (mid-aggregation, fraction in clusters ); (bottom right): h 1 min (late steady state). Red crosses mark resting ants; white circles mark moving ants. The field accumulates preferentially in areas where ants have spent time resting.
Figure 4.
Reconstructed pheromone field at four timepoints (colony KC048), chosen to capture the aggregate–split–reaggregate dynamics visible in Figure 2. (Top left): min 40 s (early, before aggregation); (top right): min (peak of first aggregation); (bottom left): min (during cluster dissolution, fraction in clusters drops to 0.32); (bottom right): min (after reaggregation). The pheromone field retains a spatial memory of the first cluster location even after the colony disperses.
The third hypothesis is that an ant’s transition probability depends on how long it has already occupied its current state. We call this the dwell time and denote it by . For example, if ant i started resting at frame 100 and is still resting at frame 150, then frames (5 s). Dwell time enters the model on a log scale: we use as the covariate, which captures the empirical observation that hazard decreases approximately log-linearly with time in state (Figure 5). Including dwell time allows the model to capture behavioural inertia: the tendency for ants to become less likely to transition the longer they have remained in a given state.
Figure 5.
Empirical hazard curves for stop (left) and start (right) transitions as a function of dwell time. All three colonies show a brief rise after state entry followed by a sustained decline, indicating behavioural inertia. KB050 (green) shows lower hazards overall; KC048 (orange) shows the highest start hazards.
4.3. Evaluation
To compare these mechanisms, we fit separate logistic hazard models using different subsets of covariates: (i) neighbour features only (local density, fraction resting, speed difference, and heading dispersion), (ii) stigmergy only (pheromone field ), (iii) dwell time only, (iv) neighbour + stigmergy, (v) neighbour + dwell time, and (vi) the full model including all features. We evaluate each model using out-of-fold AUC (area under the receiver operating characteristic curve) under grouped cross-validation, where folds are stratified by ant identity to ensure that the same ant never appears in both training and test sets. AUC measures discrimination: 0.5 indicates chance-level prediction, while 1.0 indicates perfect discrimination. This design respects the within-ant dependence structure and provides an honest estimate of how well each model generalises to held-out individuals.
We use Elastic Net regularisation to stabilise coefficient estimates; the mixing parameter and regularisation strength are tuned by inner cross-validation. Because transitions are rare (occurring in fewer than 1% of at-risk frames), we use incidence-density sampling to construct balanced training sets: for each observed transition, we sample a fixed number of control frames from ants in the same state at the same time who did not transition. This case-control design inflates the apparent event rate but does not affect AUC.
To verify that the observed predictive power is not an artefact of spatial or temporal structure in the data, we implement three negative controls. In the identity shuffle control, we permute ant identities within each frame while keeping positions fixed, then recompute features and refit the model. This removes the link between an ant’s identity and its behavioural history while preserving the overall spatial configuration. In the feature jitter control, we add Gaussian noise ( equal to each feature’s standard deviation) to the four neighbourhood covariates before refitting the model. If the model relies on genuine covariate values rather than structural correlations, its AUC should degrade under this perturbation. In the dwell-time shuffle control, we permute dwell times across ants within each frame while keeping positions and neighbourhood features fixed, then refit the dwell-only model. This preserves the marginal distribution of dwell times but destroys the correspondence between each ant and its time-in-state. We report permutation p-values comparing baseline AUC to the distribution of AUCs under the null. Table 1 summarises the modelling parameters used throughout.
Table 1.
Key modelling parameters.
5. Results
5.1. Empirical Hazard Structure
Figure 5 shows the empirical hazard curves for stop and start transitions across all three colonies. For both transition types, the hazard rises briefly after state entry, peaks around 0.5–1 s, then declines over the following seconds. This pattern holds across all three colonies despite differences in overall activity levels. KB050 (green) shows the lowest hazards overall, matching its low activity level (15% moving), while KC048 (orange) shows the highest start hazards, matching its higher activity level (35% moving).
5.2. Model Comparison
Table 2 reports the out-of-fold AUC for each model variant across all three colonies. Figure 6 shows the comparison visually.
Table 2.
Out-of-fold AUC for hazard models predicting state transitions. Neighbours includes local density, fraction of resting neighbours, speed difference, and heading dispersion. Stigmergy () uses the reconstructed pheromone field residualised against density. Dwell uses time since the last transition. Values in parentheses indicate standard error from cross-validation.
Figure 6.
Model comparison across colonies and transition types. Top row: stop transitions; bottom row: start transitions. Columns from left to right: KA050, KB050, KC048. Bars show mean out-of-fold AUC; error bars indicate standard error.
The neighbour-only model achieves an AUC of 0.53–0.60 for stops and 0.65–0.72 for starts across colonies (Table 2). KB050 shows the weakest neighbour effects (stop AUC 0.532), while KC048 shows the strongest (stop AUC 0.602).
The reconstructed pheromone field performs near chance level across all colonies (stop AUC 0.49–0.53, start AUC 0.47–0.53). No parameter combination in the grid search yielded deviance improvements above 0.3%. Adding stigmergy to other models does not improve performance: Neighbours + achieves lower AUC than Neighbours alone in two of three colonies, and Dwell + matches or underperforms Dwell alone.
Dwell time alone achieves AUC of 0.64–0.72 for stops and 0.73–0.83 for starts. KB050 shows the strongest duration-dependence (stop AUC 0.716, start AUC 0.834); this colony also has the lowest activity level (15% of time moving). Combining dwell time with neighbourhood features yields an AUC of 0.69–0.76 for stops and 0.75–0.87 for starts. The Neighbours + Dwell model outperforms both single-feature models in all colonies, so duration and neighbour effects provide complementary information. The Full Model (Neighbours + Dwell + ) shows no improvement over Neighbours + Dwell; stigmergy adds no predictive power beyond the other covariates.
5.3. Negative Controls
We first applied two negative controls to validate the neighbourhood features specifically, since neither affects dwell time (which is computed from each ant’s own trajectory). We then applied a third control targeting dwell time directly. In the identity shuffle control, we permuted ant identities within each frame while keeping positions fixed, destroying the correspondence between a focal ant and its neighbours. In the feature jitter control, we added Gaussian noise ( equal to each feature’s standard deviation) to the four neighbourhood covariates before refitting. Using the neighbourhood-only model, identity shuffle reduced AUC to near chance across all three colonies (median 0.49–0.52), while the observed AUC (0.53–0.65) exceeded the shuffle distribution ( in all cases). Feature jitter degraded AUC for start transitions (medians 0.61–0.69 vs. baselines 0.65–0.71, ), confirming that the model depends on specific feature values. For stop transitions, feature jitter did not degrade AUC; in two of three colonies, the jittered median exceeded the observed value. This is consistent with the weak baseline neighbourhood signal for stops (AUC 0.53–0.60), where the added noise may act more as a regulariser. Figure 7 and Figure 8 show results for all three colonies.
Figure 7.
Negative controls for stop transitions (neighbourhood-only model) across all three colonies. Columns: KA050, KB050, KC048. Top row: identity shuffle reduces AUC to chance. Bottom row: feature jitter ( SD) shows modest degradation. Purple shaded regions show kernel density estimates of the null AUC distribution. Dashed vertical lines mark the observed baseline AUC; solid vertical lines mark the null median.
Figure 8.
Negative controls for start transitions (neighbourhood-only model) across all three colonies. Columns: KA050, KB050, KC048. Top row: identity shuffle reduces AUC to chance. Bottom row: feature jitter ( SD) degrades AUC, confirming dependence on covariate values. Orange shaded regions show kernel density estimates of the null AUC distribution. Dashed vertical lines mark the observed baseline AUC; solid vertical lines mark the null median.
To validate the dwell-time signal itself, we applied an analogous permutation: shuffling dwell times across ants within each frame while keeping positions and neighbourhood features fixed. This preserves the marginal distribution of dwell times in the population but destroys the correspondence between each ant and its time-in-state. Using the dwell-only model, the shuffled AUC dropped to near chance in all colonies and for both transition types (Table 3). In no case did any of the 300 shuffled iterations match or exceed the observed AUC ( in all cases, the minimum attainable with 300 permutations and plus-one smoothing). The predictive power of dwell time arises from the specific ant-to-dwell-time mapping, not from structural properties of the dwell-time distribution.
Table 3.
Dwell-time shuffle control. Dwell times were permuted across ants within each frame (300 iterations), then a dwell-only model was refit. The observed AUC exceeds the entire null distribution in all cases.
5.4. Cross-Colony Generalisation
To assess whether the identified mechanisms generalise across colonies, we trained models on each colony and evaluated predictions on all three (Table 4). For dwell-time-only models, the AUC on each test colony was invariant to the training colony: any colony’s data suffices to learn the negative dwell-time hazard relationship. The combined model (dwell + neighbours) showed minimal cross-colony degradation, with a within-colony AUC of 0.726 and cross-colony AUC of 0.722 for stops. Start transitions showed slightly larger but still modest gaps (within: 0.828, cross: 0.811). The small cross-colony gaps suggest that the learned relationships are not colony-specific.
Table 4.
Cross-colony generalisation. Models trained on each colony were evaluated on all three; within-colony AUC is the mean diagonal, cross-colony AUC is the mean off-diagonal. The near-zero gap for dwell-only models indicates that the dwell-time hazard relationship generalises across these colonies.
6. Discussion
Dwell time is the strongest single predictor of behavioural state transitions across all three colonies (Table 2). The reconstructed pheromone field performs at chance level, and neighbourhood features, while above chance, are weaker than dwell time alone. The best-performing model combines dwell time with neighbourhood features; social context modulates transition timing but does not drive it. Models that omit internal state will confound duration-dependent dynamics with social effects.
Neighbourhood features predict start transitions (AUC 0.65–0.72) more accurately than stop transitions (AUC 0.53–0.60). A resting ant surrounded by departing neighbours receives a relatively unambiguous cue, whereas a moving ant approaching a resting cluster encounters simultaneous changes in density, heading, and speed that may partially cancel. The cross-colony generalisation data show a parallel pattern: neighbour-only models have a larger cross-colony gap for starts (0.013) than for stops (0.001), while dwell-time models transfer with zero degradation for both transition types (Table 4).
The null result for the pheromone field does not rule out chemical signalling. We tested decay constants from 60 s to 3600 s and diffusion lengths from 0.5 to 2.5 body lengths; no combination improved predictions beyond chance. Our reconstruction assumed accumulation and exponential decay without empirical calibration of deposition rates or chemical identity. Arrestant pheromones have been identified in termites [8], and analogous signals may operate in ants through mechanisms our model does not capture, such as contact-mediated transfer or non-volatile cuticular compounds. Substrate washing or the transfer of conditioned substrate between arenas would provide a more direct test.
Agent-based models of ant clustering typically use reactive rules (e.g., “stop if local density exceeds a threshold”). Our results indicate that such models require at minimum: (i) duration-dependent transition rates, where the probability of switching state decreases with time spent in that state, and (ii) modest social modulation, where neighbour states shift transition probabilities without dominating them. Our models fit population-level coefficients and do not decompose individual variation; incorporating frailty terms [23] or hierarchical structure would allow agents to differ in their baseline transition propensities.
Our hazard model does not include explicit collision mechanics: an ant forced to stop by physical contact with another ant would appear as a density-mediated stop, captured implicitly by the local density and speed difference covariates rather than by an excluded-volume term. The 2D arena constrains movement to a single layer, which may amplify crowding effects relative to natural 3D nest cavities where ants can climb over one another. However, ants in the interior of a 3D cluster are similarly movement-restricted, so the 2D geometry is unlikely to alter the relative importance of dwell time versus neighbourhood features.
7. Conclusions
We applied regularised hazard models to trajectory data from three colonies of Pristomyrmex punctatus and compared three candidate mechanisms for behavioural transitions: local imitation, stigmergy, and internal state. Our main contributions are: (1) showing that dwell time (AUC 0.64–0.83) outperforms both neighbourhood features (0.53–0.72) and a reconstructed pheromone field (0.47–0.53) as a predictor of state transitions; (2) demonstrating that combining dwell time with neighbourhood features yields the best discrimination (AUC 0.69–0.87), with the learned relationships transferring across colonies; and (3) providing negative controls that validate both the neighbourhood signal and the dwell-time signal, while confirming the pheromone field contributes no additional predictive power.
Several limitations apply. We did not test a pure accumulation model without decay: given that termite arrestant pheromones remain active for at least 4 h with no observed decay [8], such a model may be more appropriate for our 4 h recordings. The three colonies represent a single species in a controlled laboratory environment without food or brood. The hazard models treat each transition independently, ignoring potential coupling between ants beyond the features we measured.
Future work will focus on pheromone perturbation experiments to test whether chemical signals play a role not captured by our reconstruction. We also plan to use simulation-based inference to estimate posterior distributions over model parameters and to test whether the fitted models reproduce macroscopic dynamics such as cluster formation and activity waves. A complementary direction is to evolve neural network controllers for simulated ants using neuroevolution methods such as NEAT [36] and weight-agnostic neural networks [37]. By selectively providing or withholding subsets of the input features identified in this study (neighbourhood cues, dwell time, pheromone), we can test which combinations of information are sufficient to reproduce collective clustering in a simulation.
Author Contributions
M.C. conceived the study, developed the hazard model framework, implemented all analyses, and wrote the manuscript. I.H. performed ant tracking from video recordings, contributed to research discussions throughout, and provided suggestions for data visualisation and additional analyses. S.D. designed and conducted the ant experiments and provided video recordings. T.I. supervised the research and provided guidance and feedback throughout. All authors have read and agreed to the published version of the manuscript.
Funding
This work was supported by JSPS KAKENHI Grant-in-Aid for Scientific Research (A) 24H00707. Michael Crosscombe was a JSPS International Research Fellow supported by a Grant-in-Aid for JSPS Fellows (23KF0108).
Data Availability Statement
Processed trajectory data, extracted features, and analysis code are available at https://github.com/toohuman/ant-dwell-time, accessed on 14 February 2026. Raw video recordings are available from the corresponding author upon reasonable request.
Acknowledgments
We thank Norihiro Maruyama for developing the ant tracking software used in this study. M.C. thanks Takashi Ikegami and Wataru Toyokawa for their continued support, which enabled the completion of this work. M.C. also thanks the Japan Society for the Promotion of Science for the opportunity to conduct research in Japan as an International Research Fellow. During the preparation of this manuscript, the authors used Claude (Anthropic) for the purposes of text editing. The authors have reviewed and edited the output and take full responsibility for the content of this publication.
Conflicts of Interest
Author Takashi Ikegami was employed by the company Alternative Machine Inc. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.
Abbreviations
The following abbreviations are used in this manuscript:
| AUC | Area under the receiver operating characteristic curve |
| BL | Body length |
| CV | Cross-validation |
| DBSCAN | Density-based spatial clustering of applications with noise |
| fps | Frames per second |
References
- Hoegh, A.; van Manen, F.T.; Haroldson, M. Agent-based models for collective animal movement: Proximity-induced state switching. J. Agric. Biol. Environ. Stat. 2021, 26, 560–579. [Google Scholar] [CrossRef] [Scilit]
- Franks, N.R.; Pratt, S.C.; Mallon, E.B.; Britton, N.F.; Sumpter, D.J.T. Information flow, opinion polling and collective intelligence in house-hunting social insects. Philos. Trans. R. Soc. London. Ser. B Biol. Sci. 2002, 357, 1567–1583. [Google Scholar] [CrossRef] [Scilit]
- Seeley, T.D.; Visscher, P.K.; Schlegel, T.; Hogan, P.M.; Franks, N.R.; Marshall, J.A.R. Stop signals provide cross inhibition in collective decision-making by honeybee swarms. Science 2012, 335, 108–111. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Bastien, R.; Romanczuk, P. A model of collective behavior based purely on vision. Sci. Adv. 2020, 6, eaay0792. [Google Scholar] [CrossRef] [Scilit]
- Bod’Ová, K.; Mitchell, G.J.; Harpaz, R.; Schneidman, E.; Tkačik, G. Probabilistic models of individual and collective animal behavior. PLoS ONE 2018, 13, e0193049. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Rosas, F.E.; Geiger, B.C.; Luppi, A.I.; Seth, A.K.; Polani, D.; Gastpar, M.; Mediano, P.A.M. Software in the natural world: A computational approach to emergence in complex multi-level systems. arXiv 2024, arXiv:2402.09090. [Google Scholar] [CrossRef] [Scilit]
- Hayashi, Y.; Yuki, M.; Kikuchi, T.; Tsuji, K.; Sugawara, K. Effect of pair interactions on transition probabilities between inactive and active states: Achieving collective behaviour via pair interactions in social insects. J. Phys. Soc. Jpn. 2015, 84, 104801. [Google Scholar] [CrossRef] [Scilit]
- Mitaka, Y.; Matsuyama, S.; Mizumoto, N.; Matsuura, K.; Akino, T. Chemical identification of an aggregation pheromone in the termite Reticulitermes speratus. Sci. Rep. 2020, 10, 7424. [Google Scholar] [CrossRef] [Scilit]
- Cole, B.J. Short-term activity cycles in ants: Generation of periodicity by worker interaction. Am. Nat. 1991, 137, 244–259. [Google Scholar] [CrossRef] [Scilit]
- Bonabeau, E.; Theraulaz, G.; Deneubourg, J.L. Quantitative study of the fixed threshold model for the regulation of division of labour in insect societies. Proc. R. Soc. London. Ser. B Biol. Sci. 1996, 263, 1565–1569. [Google Scholar] [CrossRef] [Scilit]
- Robinson, G.E. Regulation of division of labor in insect societies. Annu. Rev. Entomol. 1992, 37, 637–665. [Google Scholar] [CrossRef] [PubMed]
- Deneubourg, J.L.; Goss, S.; Franks, N.; Sendova-Franks, A.; Detrain, C.; Chrétien, L. The dynamics of collective sorting robot-like ants and ant-like robots. In Proceedings of the First International Conference on Simulation of Adaptive Behavior: From Animals to Animats; MIT Press: Cambridge, MA, USA, 1991; pp. 356–363. [Google Scholar]
- Franks, N.R.; Sendova-Franks, A.B. Brood sorting by ants: Distributing the workload over the work-surface. Behav. Ecol. Sociobiol. 1992, 30, 109–123. [Google Scholar] [CrossRef] [Scilit]
- Sendova-Franks, A.B.; Scholes, S.R.; Franks, N.R.; Melhuish, C. Brood sorting by ants: Two phases and differential diffusion. Anim. Behav. 2004, 68, 1095–1106. [Google Scholar] [CrossRef] [Scilit]
- Vicsek, T.; Czirók, A.; Ben-Jacob, E.; Cohen, I.; Shochet, O. Novel type of phase transition in a system of self-driven particles. Phys. Rev. Lett. 1995, 75, 1226–1229. [Google Scholar] [CrossRef] [Scilit]
- Sumpter, D.J.; Mann, R.P.; Perna, A. The modelling cycle for collective animal behaviour. Interface Focus 2012, 2, 764–773. [Google Scholar] [CrossRef] [Scilit]
- Katz, Y.; Tunstrøm, K.; Ioannou, C.C.; Huepe, C.; Couzin, I.D. Inferring the structure and dynamics of interactions in schooling fish. Proc. Natl. Acad. Sci. USA 2011, 108, 18720–18725. [Google Scholar] [CrossRef] [Scilit]
- Mann, R.P.; Perna, A.; Strömbom, D.; Garnett, R.; Herbert-Read, J.E.; Sumpter, D.J.; Ward, A.J. Multi-scale inference of interaction rules in animal groups using Bayesian model selection. PLoS Comput. Biol. 2013, 9, e1002961. [Google Scholar] [CrossRef] [Scilit]
- Grassé, P.P. La reconstruction du nid et les coordinations interindividuelles chez Bellicositermes natalensis et Cubitermes sp. La théorie de la stigmergie: Essai d’interprétation du comportement des termites constructeurs. Insectes Sociaux 1959, 6, 41–80. [Google Scholar] [CrossRef] [Scilit]
- Theraulaz, G.; Bonabeau, E. A brief history of stigmergy. Artif. Life 1999, 5, 97–116. [Google Scholar] [CrossRef] [Scilit]
- Deneubourg, J.L.; Aron, S.; Goss, S.; Pasteels, J.M. The self-organizing exploratory pattern of the argentine ant. J. Insect Behav. 1990, 3, 159–168. [Google Scholar] [CrossRef] [Scilit]
- Minasandra, P.; Grout, E.M.; Brock, K.; Crofoot, M.C.; Demartsev, V.; Gersick, A.S.; Hirsch, B.T.; Holekamp, K.E.; Johnson-Ulrich, L.; Nayak, A.; et al. Behavioral sequences across multiple animal species in the wild share common structural features. Proc. Natl. Acad. Sci. USA 2025, 122, e2503962122. [Google Scholar] [CrossRef] [Scilit]
- Vaupel, J.W.; Manton, K.G.; Stallard, E. The impact of heterogeneity in individual frailty on the dynamics of mortality. Demography 1979, 16, 439–454. [Google Scholar] [CrossRef] [Scilit]
- Cox, D.R. Regression models and life-tables. J. R. Stat. Soc. Ser. B (Methodol.) 1972, 34, 187–202. [Google Scholar] [CrossRef] [Scilit]
- Andersen, P.K.; Gill, R.D. Cox’s regression model for counting processes: A large sample study. Ann. Stat. 1982, 10, 1100–1120. [Google Scholar] [CrossRef] [Scilit]
- Prentice, R.L.; Gloeckler, L.A. Regression analysis of grouped survival data with application to breast cancer data. Biometrics 1978, 34, 57–67. [Google Scholar] [CrossRef] [Scilit]
- Allison, P.D. Discrete-time methods for the analysis of event histories. Sociol. Methodol. 1982, 13, 61–98. [Google Scholar] [CrossRef] [Scilit]
- Singer, J.D.; Willett, J.B. Applied Longitudinal Data Analysis: Modeling Change and Event Occurrence; Oxford University Press: New York, NY, USA, 2003. [Google Scholar]
- Asher, L.; Harvey, N.D.; Green, M.; England, G.C. Application of survival analysis and multistate modeling to understand animal behavior: Examples from guide dogs. Front. Vet. Sci. 2017, 4, 116. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Patterson, T.A.; Basson, M.; Bravington, M.V.; Gunn, J.S. Classifying movement behaviour in relation to environmental conditions using hidden Markov models. J. Anim. Ecol. 2009, 78, 1113–1123. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Tsuji, K.; Dobata, S. Social cancer and the biology of the clonal ant Pristomyrmex punctatus (Hymenoptera: Formicidae). Myrmecol. News 2011, 15, 91–99. [Google Scholar]
- Dobata, S.; Sasaki, T.; Mori, H.; Hasegawa, E.; Shimada, M.; Tsuji, K. Cheater genotypes in the parthenogenetic ant Pristomyrmex punctatus. Proc. R. Soc. B Biol. Sci. 2009, 276, 567–574. [Google Scholar] [CrossRef] [Scilit]
- Tsuji, K. Nest relocations in the Japanese queenless ant Pristomyrmex pungens Mayr (Hymenoptera: Formicidae). Insectes Sociaux 1988, 35, 321–340. [Google Scholar] [CrossRef] [Scilit]
- Ronneberger, O.; Fischer, P.; Brox, T. U-Net: Convolutional Networks for Biomedical Image Segmentation. In Proceedings of the Medical Image Computing and Computer-Assisted Intervention (MICCAI); Springer: Berlin/Heidelberg, Germany, 2015; pp. 234–241. [Google Scholar] [CrossRef] [Scilit]
- Ester, M.; Kriegel, H.P.; Sander, J.; Xu, X. A density-based algorithm for discovering clusters in large spatial databases with noise. In Proceedings of the Second International Conference on Knowledge Discovery and Data Mining; AAAI Press: Menlo Park, CA, USA, 1996; pp. 226–231. [Google Scholar]
- Stanley, K.O.; Miikkulainen, R. Evolving Neural Networks through Augmenting Topologies. Evol. Comput. 2002, 10, 99–127. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Gaier, A.; Ha, D. Weight Agnostic Neural Networks. In Proceedings of the Advances in Neural Information Processing Systems, Vancouver, BC, Canada, 8–14 December 2019; Volume 32. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.









