---
library: "brainference"
slug: "EntropyDensityCollapse"
name: "EntropyDensityCollapse"
ref: "EntropyDensityCollapse#0874"
hash: "sema:EntropyDensityCollapse#mh:SHA-256:0874645031ec2852f52b3a5a1c3980055703036ef7278df3aee69c6359559bb3"
type: "Dynamics"
layer: "Physics"
version: "1.0.0"
root: "8d7193fc97804cdc3aa9080728d8094732206c114f34d36b8ca2b89b943b3990"
license: null
url: "https://semahash.org/vocabularies/brainference/patterns/EntropyDensityCollapse"
---

# EntropyDensityCollapse

Rescale entropy and density by system size until all samples fall on one curve, then read regimes from the residue

Physics · Dynamics

## Mechanism

Samples differ in how many agents or interactions fill the same observation area, so raw entropies mix size with structure. Make both quantities intensive: entropy density eta = H / A_o and control parameter rho = N_V / A_o (agent density for an agent network, interaction-event density for an event network). Take the characteristic system size S = <rho> per sample and fit the finite-size scaling ansatz eta(rho, S) = S^alpha f(rho S^-beta): choose alpha and beta (e.g. by Nelder-Mead) to minimise sum_ij (eta_ij S^-alpha - f(rho_ij S^-beta))^2 over samples i and windows j, and bootstrap windows to get exponent uncertainties. A good collapse means a shared scaling law; systematic, regime-labelled departures from the collapsed curve are the signal. Compare the collapse with the same procedure on [NullModelBaseline](https://semahash.org/vocabularies/brainference/patterns/NullModelBaseline.md) data, and test departures with [ClusteredObservationTesting](https://semahash.org/vocabularies/brainference/patterns/ClusteredObservationTesting.md). Interpret exponents too: near-zero exponents with a near-perfect fit mean the measure is simply tracking density.

## Invariants

- Entropy and control parameter are both made intensive before fitting
- The same ansatz and optimiser are applied to empirical and null data
- Exponent uncertainties come from resampling, not from a single fit

## Preconditions

- Observations span a range of densities wide enough to constrain alpha and beta

## Postconditions

- Each observation has rescaled coordinates (rho S^-beta, eta S^-alpha) in which regimes can be compared at matched density

## Failure modes

- Trivial collapse: R^2 near 1 with exponents near 0 because the measure is dominated by density, not structure
- Broad exponent confidence intervals spanning zero signal that no scaling relation is present
- Narrow density range from short laboratory windows leaves the scaling function poorly constrained
- Taking a good collapse as proof of universality when between-sample variance (ICC) is high

## Where this came from

- Thesis: do_2026_ant_collective_behavior (Ch. 3.3, Eqs. 3.27-3.28, Fig. 3.6; Ch. 4.2.1; Ch. 5.4)

## Builds on

- [NullModelBaseline](https://semahash.org/vocabularies/brainference/patterns/NullModelBaseline.md) (composes_with)
- [ClusteredObservationTesting](https://semahash.org/vocabularies/brainference/patterns/ClusteredObservationTesting.md) (composes_with)

## Used by

- [AdaptiveSplineSeparator](https://semahash.org/vocabularies/brainference/patterns/AdaptiveSplineSeparator.md) (references)
- [InteractionSequenceEntropySignature](https://semahash.org/vocabularies/brainference/patterns/InteractionSequenceEntropySignature.md) (composes_with)

## Identity

- Library: brainference 1.0.0 (root 8d7193fc9780)
- Ref: EntropyDensityCollapse#0874
- Hash: sema:EntropyDensityCollapse#mh:SHA-256:0874645031ec2852f52b3a5a1c3980055703036ef7278df3aee69c6359559bb3

## Links

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