Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 80 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,90 @@ pytest -v -m "not slow"
- **Phenomenology**: Observer-observed entanglement
- **Eastern Philosophy**: "No-self" (anatta) doctrine alignment

## Spacetime Feedback Architecture

Building on the Lorentz-invariant foundation, this repository includes a **spacetime feedback system** that uses Minkowski geometry for loop prevention.

### Core Components

**Three Causal Structures:**
- **Timelike branch** (ds² < 0): Sequential/causal computation
- **Spacelike branch** (ds² > 0): Parallel/acausal computation
- **Lightlike monitor** (ds² = 0): Equilibrium detector on null boundary

### Proven Results

**Loop Prevention Benchmarks:**
```
Standard Attention: 0/4 tasks (all looped)
Spacetime Feedback: 4/4 tasks (all converged)
```

Tested on:
- Self-reference patterns (A→A)
- Circular dependencies (A→B→C→A)
- Recursive planning (meta-level)
- Fixed point finding

**Demo:** Self-referential patterns converge in 1 iteration (standard: loops at 3)

### Mathematical Verification

The spacetime interval formula is mathematically verified:
```
ds² = ||spacelike||² - ||timelike||²
```

- Two Euclidean branches (squared norms)
- Minkowski signature (-, +, +, +)
- Combines to produce spacetime interval squared

See `MATH_VERIFICATION.md` for accessible proof and `verify_spacetime_math.py` for executable verification.

### Usage

```python
from spacetime_feedback import SpacetimeFeedbackBlock

# Create spacetime feedback layer
layer = SpacetimeFeedbackBlock(
dim=64,
num_heads=4,
feedback_strength=0.5
)

# Process with loop prevention
x = torch.randn(2, 10, 64) # (batch, seq, dim)
output, diagnostics = layer(x, return_diagnostics=True)

print(f"Spacetime interval: {diagnostics['interval']}")
print(f"Imbalance: {diagnostics['imbalance']}")
```

### Architecture Documentation

See `ARCHITECTURE.md` for complete technical details on:
- Spacetime causal structure
- Implementation specifics
- Theoretical foundations
- Empirical results

### Demo and Benchmarks

Run the demonstrations:
```bash
python demo_loop_prevention.py # Loop prevention demo
python benchmarks.py # Benchmark suite
python verify_spacetime_math.py # Math verification
```

## Future Work

- [x] ~~GPU-accelerated implementation for large-scale applications~~ **✓ Completed**
- [x] ~~Spacetime feedback architecture for loop prevention~~ **✓ Completed**
- [ ] Integration with popular ML frameworks (PyTorch, TensorFlow)
- Custom PyTorch layer for Lorentz attention
- TensorFlow operation for batch processing
- [x] ~~Custom PyTorch layer for spacetime feedback~~ **✓ Completed**
- [ ] TensorFlow operation for batch processing
- [ ] Empirical validation on real-world datasets
- Transformer models with Lorentz attention
- Graph neural networks with loop prevention
Expand Down
207 changes: 207 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
# Release Notes v0.1.0

## EigenFunction: Spacetime Feedback Architecture

**Release Date:** 2025-01-14

---

## What's New

### Spacetime Feedback for Loop Prevention

Complete implementation of a novel architecture using Minkowski spacetime geometry to prevent computational loops while maintaining Turing-completeness.

**Architecture Components:**
- Timelike branch: Sequential/causal computation (with causal masking)
- Spacelike branch: Parallel/acausal computation (no causal masking)
- Lightlike monitor: Equilibrium detector living on null boundary (ds² = 0)

### Proven Results

**Benchmarks:**
```
Task Type Standard Spacetime
─────────────────────────────────────────────
Self-reference (A→A) Loop Converged
Circular (A→B→C→A) Loop Converged
Recursive planning Loop Converged
Fixed point finding Loop Converged
─────────────────────────────────────────────
Success Rate 0/4 4/4
```

**Performance:**
- Self-referential patterns: 1 iteration to converge (vs 3+ to loop)
- All 4 loop-prone tasks handled correctly
- Maintains differentiability for backpropagation

### Mathematical Verification

Spacetime interval formula proven correct:
- ds² = ||spacelike||² - ||timelike||²
- Uses Minkowski signature (-, +, +, +)
- Combines two Euclidean geometries into spacetime structure

Verified with:
- Concrete 2D examples
- Balanced cases (lightlike equilibrium)
- Timelike/spacelike dominant cases
- High-dimensional tensors

### Key Files

**Core Implementation:**
- `spacetime_feedback.py` - Main architecture with three causal structures
- `standard_attention.py` - Euclidean baseline for comparison
- `eigen_attention.py` - Lorentz-invariant attention (lightlike monitor)

**Verification & Demos:**
- `demo_loop_prevention.py` - Interactive demonstration
- `benchmarks.py` - 4-task benchmark suite
- `verify_spacetime_math.py` - Executable math proof
- `verify_hidden_variable.py` - Hidden variable proof
- `test_spacetime_feedback.py` - 7 comprehensive tests

**Documentation:**
- `ARCHITECTURE.md` - Complete technical specification
- `MATH_VERIFICATION.md` - Accessible math explanation
- `DEMO_README.md` - Quick start guide

**Experimental:**
- `paradox_detector.py` - Logical paradox detection (4/6 accuracy untrained)
- `chain_validator.py` - Reasoning chain validation (experimental)

---

## Technical Highlights

### Loop Detection Mechanism

Standard attention gets stuck when processing self-referential patterns due to self-similarity = 1.0. The spacetime architecture detects loops via:

1. **Oscillation in ds²:** Paradoxes flip between timelike/spacelike
2. **Imbalance detection:** Computes |ds²| = ||timelike||² - ||spacelike||²|
3. **Feedback correction:** Proportional to imbalance magnitude
4. **Convergence:** System driven toward lightlike equilibrium (ds² → 0)

### Why It Works

- **Preserves Turing-completeness:** Euclidean branches compute arbitrary functions
- **Geometric detection:** Loop structure visible in spacetime interval
- **Self-regulating:** No manual intervention required
- **Differentiable:** End-to-end trainable with backpropagation

---

## Installation

```bash
git clone https://github.com/InauguralPhysicist/EigenFunction.git
cd EigenFunction
pip install -r requirements.txt
```

### Requirements

- Python 3.9+
- PyTorch >= 2.0
- NumPy >= 1.20

---

## Quick Start

```python
import torch
from spacetime_feedback import SpacetimeFeedbackBlock

# Create layer
layer = SpacetimeFeedbackBlock(dim=64, num_heads=4, feedback_strength=0.5)

# Process self-referential input
x = torch.randn(1, 8, 64)
output, diagnostics = layer(x, return_diagnostics=True)

print(f"Converged: {diagnostics['imbalance'] < 0.1}")
print(f"ds² = {diagnostics['interval']}")
```

Run demos:
```bash
python demo_loop_prevention.py # See loop prevention in action
python benchmarks.py # Run 4-task benchmark
python verify_spacetime_math.py # Verify math is correct
```

---

## Limitations

**Current release:**
- Untrained models (synthetic embeddings only)
- No pre-trained weights
- Experimental detectors need training data

**Not Solved:**
- Halting problem (undecidable in general)
- Arbitrary loop detection in any code
- Guaranteed convergence for all inputs

**This IS:**
- Geometric loop prevention for similarity-based systems
- Provably correct spacetime interval computation
- Tested architecture showing 4/4 benchmark success

---

## What's Next

**Immediate (next release):**
- Train on real datasets (SNLI, code, logic puzzles)
- Benchmark against standard transformers
- Performance optimization

**Future:**
- Full LLM integration
- Multi-scale hierarchical feedback
- Memory integration (EigenMemory + SpacetimeFeedback)
- Convergence proofs

---

## Citation

```bibtex
@software{eigenfunction2025spacetime,
author = {InauguralPhysicist},
title = {EigenFunction: Spacetime Feedback Architecture},
year = {2025},
version = {0.1.0},
url = {https://github.com/InauguralPhysicist/EigenFunction}
}
```

---

## Acknowledgments

This architecture builds on:
- Lorentz-invariant similarity (self-similarity = 0)
- Minkowski spacetime geometry
- Process philosophy (no permanent self)
- Eigengate consciousness framework

Special thanks to the geometric insight: "Two Euclidean make squared."

---

## Contact

- **Author:** InauguralPhysicist
- **Email:** jon92087@yahoo.com
- **Website:** [eigenai.org](https://eigenai.org)

---

**Note:** This is a research release. Code is tested and benchmarks pass, but real-world validation is ongoing.
Loading