# Pheromone

The first round said randomness beat precision. It also let the ants return more answers than anyone else.

Pilot results · d/rksci research · Published 2026-10-08 · Tags: Agent Memory, Retrieval, MemoryAgentBench, LongMemEval, Engram, Ant Colony, Stochastic Search

Does a memory get better at finding things by being used?

This is the “reads change the memory” idea in its plainest form. The old test could not tell it from simply returning more candidates, so the question has not been asked yet.

## 1. Idea

Experiment 2 of 10 in the Engram series. [← Tide](/engram/tide) · [Engram overview](/engram) · [Ring →](/engram/ring)

Think of the stored items as places and the similarity between them as paths. A query starts a few ants at the best matches. Each ant walks from item to item, preferring paths that are similar and paths that earlier ants marked. The walk ends, the useful paths get more marker, and all markers fade a little. Over many reads the memory grows well-worn routes to the things people keep asking for.

**Pheromone · one read.** An ant walks a graph of similarity edges, biased by the trails already laid; walks that end in the top k deposit more, and every trail then evaporates a little.

The trail is the part that is new. Without it this is a randomised neighbourhood search, which is a perfectly respectable thing to test, and the ablation below tests exactly that.

## 2. Where it came from

The archived ant was added to cosine top-5 in the first round’s one-feature-at-a-time test. It scored 47% against 39%, the largest gain of any feature, and the project page drew the conclusion that randomness outperforms precision for memory recall. A separate script, ant-dowser, carried the fuller version: ant colony optimisation with evaporation, softmax choice, and a “casting” step borrowed from tracking dogs.

The audit found three problems with that number, all in the code. The ant returned more than five chunks while cosine returned exactly five, so the metric rewarded the larger set; the win may be nothing more than recall at about ten against recall at five. The ant also warmed up on ten queries drawn from the very question set it was then scored on. And the metric was a substring test on the retrieved text, over about 180 questions, one seed, no interval. A three-to-eight point difference is inside that noise.

## 3. Hypothesis

Stated before running. At equal k, with trails built only from earlier reads in the stream and never from gold answers, Pheromone is not worse than Dense and improves on later queries within a memory that is read many times.

One consequence is already clear from the data. A LongMemEval question has its own haystack, so a trail has nothing to accumulate on: every question starts with an empty memory. The LongMemEval cells therefore measure the walk alone. The trail can only show up on MemoryAgentBench, where a hundred questions are read against one memory. The walk is expected to add little; the question is whether the trail adds anything on top.

## 4. Design

**Walk.** Ants start at the best dense matches and hop along nearest-neighbour edges. The returned list is the best k of what the ants visited, ranked by similarity, so it can never be larger than k.

**Trail.** Marker on edges, raised on walks that ended among the returned items and decayed by evaporation. It is updated only from earlier reads in the same stream. No gold answer ever touches it.

**Warm-up.** If the trail is warmed up before scoring, the warm-up uses questions outside the scored set, drawn from a seeded split that the code asserts is disjoint from the pilot sets. The run record says which.

**Seeds.** The walk is random, so every number is the mean of five seeds with the range alongside.

**Ablation.** Trails off: the same walk with the marker held at zero. If this matches the full method, the trail did nothing.

## 5. How it is tested

The key comparison is Pheromone against its own trails-off ablation, because that isolates the idea. The second is Pheromone against Dense at equal k, with a paired test over the five seeds. The score of each successive query within one MemoryAgentBench memory is also plotted, since “improves with use” is a claim about order and an average hides it.

The standing rules for every Engram experiment apply here unchanged.

## 6. Results

## 7. What would change the conclusion

- If Pheromone with trails matches the trails-off walk, trails do nothing, and the first round’s “ants win” was a bigger candidate set.
- If the walk alone beats Dense at equal k, there is something to learn about randomised neighbourhood search, but it is not memory, and the page will say so.
- If scores do not rise over the query sequence on MemoryAgentBench, the reads-change-memory claim has no support from this mechanism.
- If the trail helps only when warmed up on the scored questions, that is the confound this version removed, and it is the answer.

## Sources

Experiment 2 of 10 in the Engram series. [← Tide](/engram/tide) · [Engram overview](/engram) · [Ring →](/engram/ring)

Pheromone is one of ten experiments in Engram. Its rows come from one run on the pilot sets.