Skip to content
Paula Livingstone writing · projects · tools

Writing

Could ants power Web3.0 to new heights? OSPF v’s ANTS

An ant colony solves a transport problem without any individual understanding the whole terrain. Studying natural and artificial intelligence made me wonder what that could teach us about network routing. From OSPF’s map of the network to AntNet’s learning through journeys, I follow the idea of intelligence emerging from local interactions, and explore what it would take to make that intelligence useful, stable and trustworthy in a decentralised web.

The Colony

While studying natural and artificial intelligence, I came across an idea that changed the way I thought about networks. A collection of simple participants, each working with incomplete information, could produce behaviour that appeared to require a much more comprehensive understanding.

As a network engineer, I found that difficult to leave alone.

An ant colony has a transport problem. Resources exist somewhere beyond the nest. Routes must be discovered, used and revised. Obstacles appear. Conditions change. Individual workers disappear. The colony continues.

No ant carries a complete operational picture. Yet the collective activity produces something useful enough to sustain the colony.

I wanted to understand how far that principle could travel into the systems we build.

The Flock

Craig Reynolds offered a particularly clear demonstration with Boids, his simulation of collective motion, developed in 1986 and published in 1987. Each simulated creature followed local steering rules: avoid crowding nearby neighbours, align with their movement and move towards their local centre. The combined result resembled a flock.1

The flock was not specified as a sequence of positions for every bird. It emerged from interactions between participants.

That distinction matters. If we prescribe every movement, we must anticipate the circumstances in which those movements will occur. If we define useful interactions, we may be able to accommodate circumstances we did not explicitly enumerate.

We still have to choose those interactions carefully. Emergence is a description of where behaviour comes from, not a guarantee that the behaviour will be desirable.

The Map

OSPF gives us a useful engineering reference point. Routers exchange link-state information, build a common picture of the topology within an area and independently calculate shortest paths using advertised costs. OSPF also supports equal-cost multipath and recalculates routes when the topology changes.2

This is already distributed intelligence. There is no central OSPF controller telling every router what to do.

The interesting distinction concerns the evidence used to make a decision. A path can remain available, retain the same configured cost and become unpleasantly congested. The topology has not necessarily changed. The experience of crossing it has.

A road map can tell me how to reach Glasgow. It cannot, by itself, tell me what the journey will feel like at five o’clock.

The Journey

That gap between the map and the journey is where ant-inspired routing becomes interesting.

Suppose there are two paths to a destination. One has a lower routing cost. The other takes a less direct route but has more spare capacity. As demand changes, the better operational choice may change with it.

I would like the network to notice. More precisely, I would like it to gather evidence about delivery and use that evidence without requiring a complete, continuously synchronised account of everything happening everywhere.

The question becomes: how much can a participant learn from a journey, and how can that experience improve the decisions of participants that follow?

The Trace

The biological principle is called stigmergy: participants coordinate through changes they leave in their environment. In ant-inspired computation, those traces become information that influences later decisions.

AntNet, described by Gianni Di Caro and Marco Dorigo in 1998, applies this principle to communications networks. Forward ants sample routes and record travel times. Backward ants retrace those journeys and update local routing information. The resulting tables express probabilistic preferences for next hops towards destinations.3

These preferences allow useful routes to receive greater weight while retaining opportunities to explore alternatives. The shared tables provide a form of distributed memory: an agent’s experience can influence another agent without direct communication between them.

The authors reported strong simulation results against their selected comparison algorithms. That supports the approach under the tested conditions; it does not establish that it will outperform every alternative in every network.

The Alternative

The part I find particularly valuable is the continued existence of alternatives.

Once a system has found something that works, there is an understandable temptation to keep doing it. Exploration costs time and resources. Most experiments will not improve on the current choice.

But a system that never revisits its alternatives can confuse yesterday’s success with a permanent property of the world.

In a changing environment, some expenditure on exploration buys information. The difficult decision is how much to spend. Too little, and the system becomes slow to discover a better route. Too much, and it wastes capacity demonstrating that poor routes remain poor.

I see this as an engineering budget. Exploration must earn its place through the improvements it makes possible.

The Feedback

There is another complication. Routing decisions alter the thing being measured.

If a path looks attractive and the network sends more traffic through it, that additional traffic may make it less attractive. Shift enough traffic towards the alternative and the same problem can appear there.

The system is participating in its own experiment.

This means that responsiveness alone is an inadequate objective. An algorithm that responds enthusiastically to every fluctuation may create a network that oscillates between choices. We need to understand how quickly observations become decisions, how much influence each observation receives and how long useful knowledge should survive.

A successful demonstration would therefore have to show both adaptation and stability. I would want to see what happens after the first improvement, once the consequences of that improvement work their way back through the system.

The Layers

It is tempting to present this as a contest between conventional networking and biological intelligence. That framing conceals some useful design possibilities.

MPLS, for example, is a label-switching architecture rather than a direct counterpart to OSPF. It can support explicitly selected paths. An adaptive mechanism could help select among permitted paths while an established forwarding mechanism carries the traffic.4

That suggests a practical direction: separate the mechanism that learns from the mechanism that enforces the decision.

I would give the learner a defined set of choices and a measurable objective. The surrounding system would determine which choices were permitted, how much traffic could move and what happened if the learning process became unreliable.

This would make the experiment easier to assess and the resulting behaviour easier to govern.

The Web

This is the connection I would make to Web 3.0: the coordination problem faced by services spread across many participating machines.

Consider a service with several available copies of the same content. Choosing where to retrieve it involves more than establishing that a copy exists. Response time, availability and load may vary. A node that served one request well may be a poor choice for the next.

I would investigate whether local experience could improve those selections. Participants could retain evidence about successful retrievals, explore alternatives and revise their preferences as conditions changed.

This would be an application inspired by the routing principle. It would require its own design and evaluation. Moving packets through routers and choosing a service provider are different problems, even where their feedback structures resemble one another.

The attraction is the possibility of useful coordination without requiring every participant to maintain a complete picture of the whole service.

The Lie

Once a system learns from experience, the integrity of that experience becomes part of its security.

Imagine a participant that behaves exceptionally well while others are deciding whether to use it. Having attracted enough traffic, it begins selectively delaying requests or returning poor results. Alternatively, imagine a participant that reports false measurements about its neighbours.

These are scenarios I would include in the design review. A learning mechanism may amplify the influence of evidence, including evidence supplied by an adversary.

Authentication would establish who supplied an observation. It would not establish that the observation was true.

I would therefore want corroboration, limits on individual influence and a way to withdraw confidence when behaviour changed. I would also want the decision history to remain inspectable. An operator needs to understand why the system developed a preference, particularly when that preference has caused harm.

The Boundary

My interest becomes more cautious when I carry the idea into industrial networks.

Improving average delivery time is useful, but some exchanges have deadlines. A system that performs brilliantly most of the time may still be unsuitable if its occasional excursions breach an operational requirement.

For an initial experiment, I would choose traffic that can tolerate variation and keep the adaptive choices inside established security boundaries. A learned preference should never create permission to cross a boundary that the architecture forbids.

The objective would be explicit: improve delivery within a defined set of constraints. The constraints would remain enforceable even when the learner made a poor decision.

The Test

I would begin with a small network, several available paths and repeatable traffic patterns. The comparison would include a conventional routing baseline, with the same underlying capacity and workloads.

Then I would introduce disturbances: sustained congestion, short bursts, link failures, recovery and deliberately misleading observations.

I would measure delivered throughput, delay distributions, loss, reordering, control overhead and recovery time. Average delay alone would leave too much hidden. I would also measure how much operational effort was required to explain an unexpected result.

The decisive question would be whether adaptation produced a worthwhile improvement after accounting for the resources and complexity needed to obtain it.

If the benefit appeared only under carefully selected conditions, those conditions would define the scope of the result.

The Intelligence

What drew me to this subject was the possibility that intelligence could reside in the relationships between participants.

A node does not need to understand the whole network to contribute useful evidence. A successful journey can improve a later decision. Many such decisions can produce organised behaviour at a scale beyond the knowledge of any individual participant.

That gives us a concrete design opportunity: build systems whose local interactions improve their collective performance, and establish the conditions under which we can rely on that improvement.

The ant colony is an invitation to examine those interactions more closely. The engineering begins when we decide what they must achieve, what they must never do and how we will know the difference.

Notes

  1. Craig W. Reynolds, Flocks, Herds, and Schools: A Distributed Behavioral Model, SIGGRAPH, 1987. Paper. See also Reynolds’s Boids background and explanation. ↩
  2. John Moy, OSPF Version 2, RFC 2328, 1998. Protocol specification. ↩
  3. Gianni Di Caro and Marco Dorigo, AntNet: Distributed Stigmergetic Control for Communications Networks, Journal of Artificial Intelligence Research, volume 9, pages 317–365, 1998. Paper and full-text access. ↩
  4. Eric Rosen, Arun Viswanathan and Ross Callon, Multiprotocol Label Switching Architecture, RFC 3031, 2001. Architecture specification. ↩