← Latest papers
🧬 biology

Statistical mechanics of spontaneous behavior

This paper proposes a statistical mechanics framework demonstrating that the duration of spontaneous behaviors, rather than their frequency of initiation, determines their occupancy time according to the Boltzmann law, a theory validated by fruit fly data where dominant behaviors occupy nearly half the time despite starting infrequently.

Original author: Daniel Y. Takahashi, Ahmed El Hady

Published 2026-11-03
📖 6 min read🧠 Deep dive

Original author: Daniel Y. Takahashi, Ahmed El Hady

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). ⚕️ This is an AI-generated explanation of a preprint that has not been peer-reviewed. It is not medical advice. Do not make health decisions based on this content. Read full disclaimer

In the study of animal behavior, scientists have long sought to understand why creatures spend so much time doing the same few things. Why does a fly circle a corner for minutes while only briefly crossing the room? Traditional explanations rely on the idea of learning and reward. The prevailing view suggests that animals repeat actions because they have learned that those actions are useful or rewarding, much like a student studying harder for a subject they enjoy. In this framework, the frequency of an action—how often an animal chooses to start it—is the primary driver of dominance, while the length of time the action lasts is treated as a secondary detail. This perspective assumes that behavior is a series of choices, where the animal actively selects the most valuable option from a menu of possibilities.

However, a new approach challenges this assumption by asking a simpler question: what happens if we remove the idea of choice and reward entirely? Imagine a system where an animal does not prefer one action over another, but simply moves until it hits a boundary, like a wall, and then starts over. In this scenario, the only variable that changes is how long each movement lasts before the animal hits that boundary. Researchers Daniel Yasumasa Takahashi and Ahmed El Hady propose that this simple mechanic of duration alone can explain the complex patterns of time an animal spends on different behaviors. They suggest that the time an animal spends on a behavior is not necessarily a sign of preference, but a statistical consequence of how long that behavior naturally lasts before being interrupted. This idea draws a parallel to the laws of thermodynamics, the rules that govern heat and energy in physics, proposing that behavior follows similar mathematical laws where the "temperature" is the animal's internal noise and the "energy" is the difficulty of escaping a particular state.

The researchers tested this theory by observing fruit flies in a closed box. They recorded the movements of forty-seven individual flies over several days, breaking the continuous stream of activity into distinct episodes, or "bouts," of nine different behaviors. They measured two key numbers for each behavior: how often the fly started that behavior (the frequency) and how long the behavior lasted once it began (the duration). The results were striking. In almost every fly, the behavior that took up the most time was not the one the fly started most often. Instead, the dominant behavior was the one that lasted the longest. For example, the "idle" state, where the fly stood still, was started in only about thirteen percent of the bouts, yet it filled nearly half of the total recording time. The fly did not choose to be idle more often; it simply stayed idle longer once it started. This pattern held true across all the flies, suggesting that the dominance of a behavior is manufactured by its duration, not by how frequently it is chosen.

This finding overturns the standard assumption that the most common behavior is the most preferred. The study shows that even when every behavior is started with equal frequency, the one that lasts the longest will inevitably dominate the record. This is a statistical effect known as length-biased sampling, where longer events are more likely to be observed simply because they occupy more time. The researchers demonstrated that this principle is robust enough to generate the "matching law," a well-known rule in psychology stating that the time an animal spends on an option matches the rate at which it receives rewards. In their model, this matching happens automatically without any learning or reward system, driven solely by the duration of the actions. The theory also explains why individual flies can be identified by their behavior. While the frequency of starting behaviors varied wildly between flies and was not a stable trait, the duration of their idle periods was highly consistent. A fly's identity was carried by how long it stayed in a state, not how often it entered one.

The paper further connects these behavioral patterns to the concept of critical points, moments where a system is on the verge of changing its state. In physics, systems near a critical point often show specific patterns, such as events lasting for a wide range of times. The researchers found that the fruit flies' behavior naturally clustered around these critical points, not because the flies were tuned to them, but because the critical point is simply the state that lasts the longest. When a system is near a critical transition, it takes a very long time to escape, and because the flies' time is measured by how long they stay, they naturally spend the most time in these critical states. This suggests that what scientists often interpret as complex, self-organizing behavior or adaptive tuning might actually be a null expectation—a default outcome of the physics of movement and time.

To prove that this was not just a quirk of fruit flies, the team tested their theory on three other systems: a simulated particle moving in a box, a computer model of a decision-making process, and a simple robot that rewired its sensors when it hit a wall. In every case, the time the system spent in different states matched the predictions of their theory perfectly. The duration of the states, combined with how often they were started, predicted the total time share without needing to invoke any reward or learning mechanism. The study also showed that the laws of thermodynamics, usually reserved for gases and heat, emerge naturally from this model. The researchers derived four laws of behavior that mirror the laws of thermodynamics, showing that concepts like entropy and energy have direct counterparts in how animals move and rest.

The implications of this work are profound for how we understand animal behavior. It suggests that many features of behavior that look like design or optimization are actually the result of simple statistical rules. The dominance of certain behaviors, the way animals match their time to rewards, and even the appearance of criticality in their movements can all arise from the basic mechanics of how long actions last. This does not mean that learning and reward are unimportant, but rather that they must be understood on top of this foundational layer of duration. Before we can claim that an animal has learned to prefer an action, we must first account for the fact that longer actions naturally take up more time. The study provides a new baseline, a "null theory" that explains the bulk of behavioral time without assuming any internal preference. By showing that the laws of physics can describe the rhythm of life, the researchers have laid the groundwork for a statistical mechanics of behavior, offering a clearer, more fundamental way to read the story of what animals do.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →