Add spacetime feedback architecture with Minkowski causal structure#9
Merged
InauguralPhysicist merged 2 commits intomainfrom Nov 14, 2025
Conversation
Implement hybrid transformer architecture that combines: - Euclidean attention (Turing-complete, can oscillate) - Lorentz monitor (equilibrium detector, prevents loops) New components: - standard_attention.py: Euclidean dot-product attention - feedback_transformer.py: FeedbackTransformerBlock with dual Euclidean branches monitored by Lorentz top layer - test_feedback_transformer.py: Comprehensive test suite - ARCHITECTURE.md: Full technical documentation Key innovation: XOR architecture where: - XOR_left & XOR_right (Euclidean) can oppose → oscillate - XOR_top (Lorentz) detects imbalance → provides feedback - System self-regulates to prevent infinite loops The Lorentz layer uses Minkowski geometry to detect when Euclidean branches are out of equilibrium, preventing oscillation while preserving Turing-completeness. All tests passing (6/6).
Implement physics-grounded architecture using three fundamental spacetime separations from special relativity: 1. Timelike branch (ds² < 0): Causal/sequential computation - StandardAttention with causal masking - Risk: Over-sequential → causal loops 2. Spacelike branch (ds² > 0): Acausal/parallel computation - StandardAttention without causal masking - Risk: Over-parallel → disconnected 3. Lightlike monitor (ds² = 0): Equilibrium detector - EigenAttention on null boundary - Detects imbalance and provides feedback New components: - spacetime_feedback.py: SpacetimeFeedbackBlock implementation with explicit timelike/spacelike/lightlike structure - test_spacetime_feedback.py: 7 comprehensive tests validating spacetime interval computation and equilibrium detection - ARCHITECTURE.md: Updated with full spacetime interpretation Key innovation: System operates on lightlike boundary (ds² = 0) where timelike and spacelike processing are balanced. Deviations trigger feedback to restore equilibrium. Test results (7/7 passing): ✓ Causal sequences → Timelike dominant (ds² < 0) detected ✓ Parallel sequences → Spacelike dominant (ds² > 0) detected ✓ Balanced sequences → Lightlike equilibrium (ds² ≈ 0) achieved ✓ Feedback reduces imbalance (optimal at strength 0.5) ✓ Timelike has causal masking, spacelike does not ✓ All gradients flow correctly This provides a rigorous physical foundation for loop prevention: the system self-regulates toward the lightlike boundary where neither causal loops nor disconnection can occur.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.