---
library: "brainference"
slug: "PredictiveBehaviorEmbedding"
name: "PredictiveBehaviorEmbedding"
ref: "PredictiveBehaviorEmbedding#c46b"
hash: "sema:PredictiveBehaviorEmbedding#mh:SHA-256:c46b7187c440856b539933c739aa8631852808e27fc784330102a57239d97a3e"
type: "Inference"
layer: "Mind"
version: "1.0.0"
root: "8d7193fc97804cdc3aa9080728d8094732206c114f34d36b8ca2b89b943b3990"
license: null
url: "https://semahash.org/vocabularies/brainference/patterns/PredictiveBehaviorEmbedding"
---

# PredictiveBehaviorEmbedding

Train a network to predict future motion; its internal features separate behaviours it was never told about

Mind · Inference

## Mechanism

To find individual behavioural states without labels, train a model on a self-supervised prediction task and read its hidden layers. For ants: represent each pose as joint angles in exponential-map form (63 dimensions), take 25 observed frames at 15 fps, compress the 35-frame window (observed plus predicted) with a discrete cosine transform, and train a graph convolutional network (37 nodes, 256 hidden features, 12 residual blocks with batch norm, tanh and dropout 0.5, learnable node-to-node attention, about 2.1 M parameters) to predict the future joint angles with an L1 loss. Hook the output of the final residual block, standardise, and project with PCA: the first three components (47% of variance) already separate walking, running and antennation. A model that must forecast motion has to compress it, as in [ModelAsCompression](https://semahash.org/vocabularies/brainference/patterns/ModelAsCompression.md), and the compression aligns with behavioural state. The aim is per-agent state labels that, with network structure, let one study [AdaptiveNetworkCoevolution](https://semahash.org/vocabularies/brainference/patterns/AdaptiveNetworkCoevolution.md) between individual states and collective topology.

## Invariants

- No behavioural labels are used in training; labels are only used afterwards to inspect the embedding
- Embeddings are taken from a fixed layer after training, then standardised before projection

## Failure modes

- Visual separation in a 3-D projection is not a classifier; the split must be validated on held-out individuals
- Trained on very few individuals, the features may encode identity rather than behaviour
- Missing joint angles from tracking failures, if imputed naively, create spurious clusters

## Where this came from

- Thesis: do_2026_ant_collective_behavior (Ch. 2.3, Fig. 2.5; Ch. 5.7.3)

## Builds on

- [AdaptiveNetworkCoevolution](https://semahash.org/vocabularies/brainference/patterns/AdaptiveNetworkCoevolution.md) (yields)
- [ModelAsCompression](https://semahash.org/vocabularies/brainference/patterns/ModelAsCompression.md) (references)

## Identity

- Library: brainference 1.0.0 (root 8d7193fc9780)
- Ref: PredictiveBehaviorEmbedding#c46b
- Hash: sema:PredictiveBehaviorEmbedding#mh:SHA-256:c46b7187c440856b539933c739aa8631852808e27fc784330102a57239d97a3e

## Links

- Page: https://semahash.org/vocabularies/brainference/patterns/PredictiveBehaviorEmbedding
- JSON: https://semahash.org/vocabularies/brainference/patterns/PredictiveBehaviorEmbedding.json
- Library: https://semahash.org/vocabularies/brainference
- Library index: https://semahash.org/vocabularies/brainference/index.json
