att.cone

Cone detection: directed cross-layer projection geometry via topology.

Extends ATT from pairwise symmetric binding to directed multi-node projection geometry in layered attractor networks.

class att.cone.ConeDetector(n_depth_bins=5, max_dim=1, n_quantiles=20, cca_components=3)[source]

Bases: object

Detect conical projection geometry in directed attractor networks.

Parameters:
  • n_depth_bins (int) – Number of bins along the projection axis for depth slicing. Start with 5 for statistical power (~3200+ pts/bin at 80k steps).

  • max_dim (int) – Maximum homology dimension for persistence computation.

  • n_quantiles (int) – Number of source-state quantiles for axis estimation.

  • cca_components (int) – Number of CCA dimensions for coupling-influence subspace.

fit(source_ts, receiver_channels, source_embedder=None, receiver_embedder=None)[source]

Fit the cone detector on source + receiver time series.

Parameters:
  • source_ts (1D array) – Source node time series (e.g., C’s x-component).

  • receiver_channels (list of 1D arrays) – Receiver node time series (e.g., [A3_x, B3_x, A5_x, B5_x]).

  • source_embedder (optional pre-configured embedder for source)

  • receiver_embedder (optional pre-configured embedder for receivers)

  • API. (Returns self for fluent)

Return type:

ConeDetector

estimate_projection_axis()[source]

Estimate the cone’s projection axis via conditional-mean PCA.

For each quantile of the source’s state, compute the conditional mean of the receiver joint cloud. The first PC of those conditional means is the projection axis — the direction along which the source’s variation maximally structures the receiver cloud.

Returns: unit vector in receiver embedding space.

Return type:

ndarray

slice_at_depth(depth_bin)[source]

Extract the cross-section point cloud at a given depth bin.

Parameters:
  • depth_bin (int in [0, n_depth_bins))

  • Returns ((n_points_in_bin, embedding_dim) array)

Return type:

ndarray

availability_profile(subspace='full', subsample=2000)[source]

Compute the availability profile: Betti numbers vs depth.

This is the core output — the shape of the cone expressed as topology-vs-depth.

Parameters:
  • subspace ("full" for full Takens embedding, "cca" for) – coupling-influence subspace

  • subsample (max points per depth bin for persistence computation)

Returns:

‘depths’: array of bin centers ‘betti_0’: array of Betti_0 per bin ‘betti_1’: array of Betti_1 per bin ‘persistence_entropy’: list of entropies per bin ‘diagrams’: list of persistence diagrams per bin ‘is_monotonic’: bool — does Betti_1 increase with depth? ‘trend_slope’: float — linear regression slope of Betti_1 vs depth

Return type:

dict with

coupling_influence_subspace()[source]

Estimate the low-dim subspace where source maximally predicts receivers.

Uses Canonical Correlation Analysis (CCA) between the embedded source state and the receiver joint cloud.

Returns: (n_points, cca_components) projected receiver cloud

Return type:

ndarray

depth_asymmetry(source_ts, shallow_ts, deep_ts, subsample=None, seed=None)[source]

Compute binding asymmetry between shallow and deep pairings.

Compares [source; shallow] binding vs [source; deep] binding. A positive asymmetry (deep > shallow) indicates the cone opens with depth.

This is a simpler measure than the full availability profile, using ATT’s existing BindingDetector directly.

Parameters:
  • source_ts (1D source time series (C's x))

  • shallow_ts (1D shallow receiver time series (A3's x))

  • deep_ts (1D deep receiver time series (A5's x))

  • subsample (max points for persistence computation (saves memory))

  • seed (random seed for subsampling)

Returns:

‘shallow_binding’: float ‘deep_binding’: float ‘asymmetry’: float (deep - shallow) ‘ratio’: float (deep / shallow, if shallow > 0)

Return type:

dict with

full_chain_emergence(source_ts, shallow_ts, deep_ts, subsample=None, seed=None)[source]

Test whether the full chain [C; A3; A5] has emergent topology.

Compares the 3-way joint binding against the max of all pairwise bindings. Emergent topology = 3-way > max(pairwise).

Parameters:
  • subsample (max points for persistence computation (saves memory))

  • seed (random seed for subsampling)

  • source_ts (ndarray)

  • shallow_ts (ndarray)

  • deep_ts (ndarray)

Returns:

‘pairwise_bindings’: dict of pair -> score ‘full_chain_binding’: float ‘max_pairwise’: float ‘emergence’: float (full_chain - max_pairwise) ‘has_emergence’: bool

Return type:

dict with

class att.cone.ConeDetector(n_depth_bins=5, max_dim=1, n_quantiles=20, cca_components=3)[source]

Bases: object

Detect conical projection geometry in directed attractor networks.

Parameters:
  • n_depth_bins (int) – Number of bins along the projection axis for depth slicing. Start with 5 for statistical power (~3200+ pts/bin at 80k steps).

  • max_dim (int) – Maximum homology dimension for persistence computation.

  • n_quantiles (int) – Number of source-state quantiles for axis estimation.

  • cca_components (int) – Number of CCA dimensions for coupling-influence subspace.

__init__(n_depth_bins=5, max_dim=1, n_quantiles=20, cca_components=3)[source]
Parameters:
  • n_depth_bins (int)

  • max_dim (int)

  • n_quantiles (int)

  • cca_components (int)

Return type:

None

fit(source_ts, receiver_channels, source_embedder=None, receiver_embedder=None)[source]

Fit the cone detector on source + receiver time series.

Parameters:
  • source_ts (1D array) – Source node time series (e.g., C’s x-component).

  • receiver_channels (list of 1D arrays) – Receiver node time series (e.g., [A3_x, B3_x, A5_x, B5_x]).

  • source_embedder (optional pre-configured embedder for source)

  • receiver_embedder (optional pre-configured embedder for receivers)

  • API. (Returns self for fluent)

Return type:

ConeDetector

estimate_projection_axis()[source]

Estimate the cone’s projection axis via conditional-mean PCA.

For each quantile of the source’s state, compute the conditional mean of the receiver joint cloud. The first PC of those conditional means is the projection axis — the direction along which the source’s variation maximally structures the receiver cloud.

Returns: unit vector in receiver embedding space.

Return type:

ndarray

slice_at_depth(depth_bin)[source]

Extract the cross-section point cloud at a given depth bin.

Parameters:
  • depth_bin (int in [0, n_depth_bins))

  • Returns ((n_points_in_bin, embedding_dim) array)

Return type:

ndarray

availability_profile(subspace='full', subsample=2000)[source]

Compute the availability profile: Betti numbers vs depth.

This is the core output — the shape of the cone expressed as topology-vs-depth.

Parameters:
  • subspace ("full" for full Takens embedding, "cca" for) – coupling-influence subspace

  • subsample (max points per depth bin for persistence computation)

Returns:

‘depths’: array of bin centers ‘betti_0’: array of Betti_0 per bin ‘betti_1’: array of Betti_1 per bin ‘persistence_entropy’: list of entropies per bin ‘diagrams’: list of persistence diagrams per bin ‘is_monotonic’: bool — does Betti_1 increase with depth? ‘trend_slope’: float — linear regression slope of Betti_1 vs depth

Return type:

dict with

coupling_influence_subspace()[source]

Estimate the low-dim subspace where source maximally predicts receivers.

Uses Canonical Correlation Analysis (CCA) between the embedded source state and the receiver joint cloud.

Returns: (n_points, cca_components) projected receiver cloud

Return type:

ndarray

depth_asymmetry(source_ts, shallow_ts, deep_ts, subsample=None, seed=None)[source]

Compute binding asymmetry between shallow and deep pairings.

Compares [source; shallow] binding vs [source; deep] binding. A positive asymmetry (deep > shallow) indicates the cone opens with depth.

This is a simpler measure than the full availability profile, using ATT’s existing BindingDetector directly.

Parameters:
  • source_ts (1D source time series (C's x))

  • shallow_ts (1D shallow receiver time series (A3's x))

  • deep_ts (1D deep receiver time series (A5's x))

  • subsample (max points for persistence computation (saves memory))

  • seed (random seed for subsampling)

Returns:

‘shallow_binding’: float ‘deep_binding’: float ‘asymmetry’: float (deep - shallow) ‘ratio’: float (deep / shallow, if shallow > 0)

Return type:

dict with

full_chain_emergence(source_ts, shallow_ts, deep_ts, subsample=None, seed=None)[source]

Test whether the full chain [C; A3; A5] has emergent topology.

Compares the 3-way joint binding against the max of all pairwise bindings. Emergent topology = 3-way > max(pairwise).

Parameters:
  • subsample (max points for persistence computation (saves memory))

  • seed (random seed for subsampling)

  • source_ts (ndarray)

  • shallow_ts (ndarray)

  • deep_ts (ndarray)

Returns:

‘pairwise_bindings’: dict of pair -> score ‘full_chain_binding’: float ‘max_pairwise’: float ‘emergence’: float (full_chain - max_pairwise) ‘has_emergence’: bool

Return type:

dict with