Controlling Noisy Herds

a centuries-old farming practice informs our understanding of control theory


Sheepdogs control small, unpredictable flocks by first aligning decisions and then triggering motion, and that same idea inspires a low-effort way to steer robot swarms and artificial agents in noisy conditions.

 

Three dogs herding sheep in the field. Source.

Animals form noisy, stochastic (random) collectives

Birds, bugs, fish, sheep, and many other organisms move in groups because it benefits individuals (for example, protection from predators). The puzzle is that the “group” is not a single organism. It is built from many individuals, each making local, imperfect decisions.

When a predator threatens a herd, individuals near the edge often move toward the center to reduce their own risk. This is “selfish herd” behavior. Shepherds exploit that instinct using trained dogs.

In this study, we use sheepdog trials as a natural control experiment: one “controller” (dog) steers a noisy collective (sheep), and we ask what individual-level decision rules scale up to herd-level motion.

Dogs have been used for hunting and agriculture for thousands of years, creating a deep human-animal working relationship that spans generations.

A border collie herds a flock of sheep. Controlling temporal networks, that have connections that change over time, poses a significant challenge, especially in unpredictable real-world situations. Chakrabortty and Bhamla studied sheepdog trials, where skilled dog-handler teams control small flocks of sheep, and showed that trained dogs exploit indecisiveness to herd and divide the flock. Based on these insights, the authors developed an Indecisive Swarm Algorithm that can more efficiently control time-varying networks, such as swarm robotics, vehicular traffic, and social opinion.

The historical timeline of animal herding with the help of dogs.

How can a dog control chaos?

Sheepdogs have been bred and trained to control large, noisy groups in open fields. To study how they do it, we focus on sheepdog trials, a competition tradition that dates back to the 1870s where dog-handler teams are judged on their ability to both herd a group and split it (“shed”) on demand.

A photo of Old Hemp, a stud dog known to be the father of modern Border Collie, and a photo of the first international sheepdog trials at Alexandra Palace in London in 1876.

A dog herding sheep in a sheepdog trial. Link to source

We talked to professional dog trainers and studied 25+ hours of sheepdog trial footage on YouTube with expert commentary. Depending on age, breed, and prior handling, sheep respond differently to a dog’s threat.

A practical challenge we encountered is that drones can distract working dogs during trials, so we relied on competition footage and simplified each sheep’s state into four options relative to the dog (toward, away, left, right). That “4-direction” view is enough to capture the key decision switches without needing full 3D tracking.

Handlers summarize sheep and dog behavior with two words: pressure (how threatening the dog or handler feels) and lightness (how responsive the sheep are).

Light sheep respond to subtle cues but can panic under too much pressure; heavy sheep ignore mild pressure and often require stronger, more direct positioning.

We turn this folk vocabulary into a simple quantitative model that predicts when herding is easy and when splitting is possible.

“Light” sheep. Credit: Luke Freeman on Flickr

“Heavy” sheep. Credit: Larry James on Flickr

Our goal is not to model every nuance of shepherding. Instead, we aim to extract a clean control principle: how a controller can steer a noisy collective when individuals keep switching between competing instincts.

Sheepdog in waiting mode to ensure sheep are in the right orientation before applying pressure for movement. Image source.

Small groups are hard because sheep constantly switch between two instincts: “follow the group” and “flee the dog”. That behavior switching makes the group unpredictable.

Dogs use a reliable two-step controller: first orient the flock, then move it. The “two-step” strategy is measurable. In our video analysis, sheep moved only after the flock was oriented correctly 82% of the time, and moving flocks halted when any sheep turned off-course 83% of the time.


Essentially, dogs don’t push movement until the group is ‘facing the right way,’ and they pause (crouching mode) the moment alignment breaks.


 
 

Major questions

  1. Why are small groups of sheep often harder to control than large herds?

  2. How do dogs and handlers read sheep behavior to control a noisy collective?

  3. Can a dog’s strategy inform how we control stochastic systems?

  4. Can “indecisiveness” be used as a feature (not just a bug) in swarm control?

 

What we’ve discovered

Flee or follow: Why small flocks are unpredictable

When a solitary sheep encounters a dog, it runs. In a large herd, sheep often move toward the center (selfish herd) and the group becomes more coherent. Small groups sit in between: the “run” instinct and the “stay with the group” instinct compete, so the flock flips between the two. That switching is exactly what makes 4–5 sheep feel chaotic and hard to steer. Our simplified model quantifies this noise-driven switching and lets us map how behavior changes with group size and threat level.

Herding vs splitting depends on “lightness'“

Our model predicts a tradeoff that handlers know intuitively: light sheep are easier to herd into a cohesive unit, but they are harder to split cleanly because they panic and reorient individually when pressured from multiple sides. Heavier (less responsive) sheep resist herding, but their more structured reorientations can create brief, repeatable windows that make splitting possible.

A key nuance from the model is that splitting is not “the heavier the better.” Extremely heavy sheep can ignore too much; extremely light sheep can scatter. The easiest splitting often happens at an intermediate lightness, where the group still couples strongly enough to move together but does not instantly dissolve into panic.

Why 3–5 sheep can be harder than 50

Our phase diagram explains why sheepdog trials use tiny flocks (often 3-5 sheep). For small groups, increasing pressure can push the system from grazing (ignoring) to uncontrolled fleeing, with only a narrow window where true flocking is stable. The dog-handler team is working near a tipping point: too little pressure and nothing happens; too much and the group scatters.

Sheepdogs use a two-step control strategy

Herding and splitting both rely on a two-step strategy. First, the dog shapes orientation while the flock is mostly stationary (align the “decision”). Only after the group is oriented correctly does the dog increase pressure to trigger motion.

One control insight behind that two-step strategy: pressure mostly controls how fast the flock lines up, but randomness controls how long that alignment lasts. In our simulations, increasing pressure (or having “lighter” sheep) makes the flock reach the desired orientation faster, but the time the flock stays aligned is set mainly by noise. In essence: dogs can steer the direction, but they can’t freeze the decision, so timing matters.

Using indecisiveness as a control strategy in artificial agents

To test whether these ideas generalize beyond animals, we built a minimal swarm-control rule inspired by sheep: the Indecisive Swarm Algorithm (ISA).

In ISA, agents randomly switch who they pay attention to, sometimes following the controller and sometimes copying a neighbor. (Technically: the interaction network rewires over time, a “temporal network”.)

When benchmarked against two common alternatives - averaging-based swarms (ASA) and fixed leader-follower swarms (LFSA) - ISA tracks a path with much lower controller effort under noisy conditions. In short: for some tasks, it can be better to sample one input at a time and keep switching, rather than averaging everything at once.

When noise is high, “averaging” can fail

Averaging works well when inputs are clean. But when noise is strong, averaging can dilute the one useful signal you have. In our simulations, averaging agents can be faster at low noise, but they can fail completely at high noise. Indecisive agents are often slower, but they remain controllable because they preserve clear “epochs” of alignment instead of mixing everything.

For splitting (shedding), the contrast is even sharper: averaging-style rules struggle to create a clean split, while indecisive switching makes splitting possible.

Temporality framework for indecisive agents (ISA)

We can summarize “network temporality” in one sentence: it’s the timing mismatch between how fast agents update their state and how fast the “who-listens-to-whom” connections change.

• If connections reshuffle much faster than decisions, agents effectively pool lots of information (averaging-like).

• If connections barely reshuffle, agents get stuck in fixed chains (leader-follower-like).

• The sweet spot is when reshuffling happens at the same cadence as state updates.

(Technical: temporality T = τd/τn, and control energy is minimized at T = 1 across group sizes in our trajectory-following task.)

The smoky-room analogy for ISA

Imagine a smoky room where only one person can see the exit.

·       If everyone averages everyone’s guesses, the correct direction gets diluted.

·       If everyone follows one person forever, you can get stuck in loops.

·       If you pick one person to listen to each step, and reshuffle who you listen to often, the correct signal spreads through the crowd.

(Technical: this is input-source switching in a temporal network.)

 

Read the papers

 

Controlling noisy herds: Temporal network restructuring improves control of indecisive collectives. Science Advances (2026)

 

See the comic

Saad Bhamla