Skip to content

feat: add invariant basis extractor for atlas-embeddings#1

Closed
sylvaincormier wants to merge 1 commit intoUOR-Foundation:mainfrom
sylvaincormier:feat/invariant-extractor
Closed

feat: add invariant basis extractor for atlas-embeddings#1
sylvaincormier wants to merge 1 commit intoUOR-Foundation:mainfrom
sylvaincormier:feat/invariant-extractor

Conversation

@sylvaincormier
Copy link
Copy Markdown

Summary

Add a lightweight Python module that extracts the stable invariant basis from evolving embedding states via the covariance operator. The dominant eigenmodes define the intrinsic geometric axes of the system, separating meaningful structure from transient components.

Motivation

The atlas construction generates structure from seed graphs and embeds it into higher-order symmetry spaces. This module adds the missing step: explicitly extracting the invariant basis so downstream operations work in the correct coordinate system.

This acts as a coordinate-locking layer — instead of operating in an arbitrary embedding space, the system aligns to its own intrinsic geometry.

Features

  • InvariantExtractor(dim, memory) — rolling buffer with configurable depth
  • update(state) — feed state observations
  • invariants() — eigendecomposition of covariance operator (descending order)
  • project(state, k) — project onto top-k invariant directions
  • reconstruct(coords) — reconstruct from reduced coordinates
  • Input validation, lazy computation, cache invalidation on update

Test results

✓ Initialization, update, buffer filling
✓ Invariants extraction (non-negative eigenvalues, correct shapes)
✓ Projection and reconstruction
✓ Error handling (invalid dim, memory, wrong state dimension)
✓ Anisotropic data (eigenvalue ordering, separation ratio: 19396×)
✓ Reconstruction accuracy (error → 0 as k → dim)

Files

File Description
atlas-embeddings/python/invariant_extractor.py Core module (~140 lines)
atlas-embeddings/python/test_invariant_extractor.py Test suite

Add a lightweight Python module that extracts the stable invariant basis
from evolving embedding states via the covariance operator. The dominant
eigenmodes define the intrinsic geometric axes, separating meaningful
structure from transient components.

This acts as a coordinate-locking layer: instead of operating in an
arbitrary embedding space, the system aligns to its own intrinsic geometry.

Features:
- Rolling buffer with configurable memory depth
- Eigendecomposition of covariance operator (sorted descending)
- Project/reconstruct for dimensionality reduction along invariant axes
- Input validation and lazy computation with cache invalidation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant