← All work

PolicySwarm — AI Governance
Policy Simulator

The same enforcement policy produces opposite predictions depending on which distance metric you use to measure opinion divergence in the network. Euclidean: enforcement lag increases shock effectiveness by 63%. Cosine: it decreases it by 26%.

PythonNumPySciPy NetworkXAgent-Based ModelingarXiv (in prep)
1,000+Agents per run
0Experimental runs
0Experiments
0Python modules

Motivation

AI governance policy is designed using intuitions about how populations respond to enforcement signals. Those intuitions are rarely tested computationally. PolicySwarm builds a simulation environment where you can vary one parameter, hold everything else fixed, and observe how a synthetic social network evolves. The goal is mapping the parameter space well enough to surface interactions that verbal reasoning misses.

The core question: does enforcement lag — the delay between a policy shock and regulatory response — amplify or attenuate shock effectiveness? The answer depends entirely on which geometry you use to measure opinion distance. Euclidean says lag helps. Cosine says it hurts. Same simulation, same parameters.

Architecture Built — code on GitHub

A 9-module Python package with a full pipeline from policy ingestion through network simulation to output tables. Each module is independently testable and parameterized.

Config
Policy ingestionConfig parserExperiment manifest
Network
Graph builderAgent initialiserOpinion seeding
Simulation
Opinion dynamicsEnforcement schedulerShock propagation
Geometry
EuclideanCosineManifold retraction
Output
Results aggregatorStatistical analysisLaTeX tables

Six governance experiments Run and analysed

Each experiment isolates one policy dimension with all other parameters fixed. Experiment 5 produced the sign reversal.

EXP 01

Enforcement lag

Varies delay between policy shock and regulatory response. Setup for the sign reversal finding.

EXP 02

Hub-targeted enforcement

Targeting high-degree network hubs vs uniform enforcement. Tests speed and durability of consensus.

EXP 03

Phase transition threshold

Opinion density at which rapid consensus occurs, and how it shifts under different enforcement regimes.

EXP 04

Shock magnitude sweep

Enforcement intensity vs downstream opinion change. Tests for non-linear response curves.

EXP 05 — headline

Geometry x lag interaction

Crosses opinion distance geometry with enforcement lag. Produces the sign reversal: +63% Euclidean, -26% Cosine, identical parameters.

EXP 06

Topology sensitivity

Results across Erdos-Renyi, Barabasi-Albert, and Watts-Strogatz networks. Tests robustness of the sign reversal.

Live demo — sign reversal in motion Interactive

Both panels start from identical agent configurations and apply the same enforcement shock at the same step. The only difference is the opinion distance metric. Watch the panels diverge as the simulation runs.

Opinion dynamics — enforcement lag experiment Ready
Euclidean distance |a - b|
Shock effectiveness
Consensus
Cosine distance 1 - cos(a,b)
Shock effectiveness
Consensus
Phase: ready
Simplified 60-agent model. Full simulation: 1,000+ agents, Python/NumPy. Dots = agents, position = opinion value, colour intensity = cluster cohesion.

Finding

Enforcement lag is either beneficial or detrimental depending on the distance metric — a sign reversal, not a difference of degree. A policymaker using Euclidean distance would recommend delayed enforcement. Using Cosine distance they would recommend the opposite. Both metric choices are defensible models of opinion divergence in social networks.

Shock effectiveness with lag +63% Lag lets clusters polarise, amplifying the eventual shock. Euclidean
Shock effectiveness with lag -26% Normalisation shrinks apparent cluster distance before shock arrives. Cosine

The implication: computational policy analysis requires explicit sensitivity testing over metric choices. A finding that reverses under a change in distance geometry is a metric artefact, not a robust recommendation.

Goals