Research Preview: This is an early research preview of Albert. While the code is openly available, it has only been shared with a select group of researchers and early testers.

Introducing Albert A Differential PyTorch Physics Research Engine

Albert is 100% open source and you can audit everything you're installing!
curl -fsSL https://albert.so/install | bash
Copied to clipboard!
PyTorch Based
Optional GPU Acceleration
No root required
Latest version: v1.2.0

A Simple CLI Entrypoint for Humans and Agents

albert demo

Bridging Fundamental Physics and Machine Learning

Albert enables a new paradigm: learning from verifiable physics simulations to create high-quality training data. By implementing theories as computational models—metric tensors and field equations—our solvers generate trajectories that are guaranteed to follow the laws of physics. This creates a unique opportunity to train AI systems on data that is both physically correct and computationally verified, bridging the gap between theoretical physics and machine learning through differentiable simulations in PyTorch.

The framework's differentiable nature means every simulation becomes a potential training example, where gradient-based optimization can learn from the physics itself. This approach transforms how we create datasets for physics AI—instead of relying on limited experimental data, we can generate unlimited training examples from theories that have been validated against observations. Albert provides the infrastructure to turn validated physical models into the foundation for next-generation physics learning systems.

Understanding the Validation Framework

When a newly introduced theory is implemented computationally, it must pass through sophisticated tests that verify its adherence to known physics. Think of validators as automated experts, each specialized in checking specific aspects of physical law compliance.

The validation process follows a systematic progression: First, constraint validators ensure basic mathematical consistency—conservation of energy, angular momentum, and proper metric signatures. Next, classical validators verify agreement with well-established phenomena like Mercury's perihelion precession and light deflection by the Sun. Finally, quantum validators test predictions against modern experiments involving quantum corrections and high-energy physics. Finally it goes through a set of predictions, which are open research questions like the Muon G-2 anomaly, to see if the theory can make predictions on unsolved problems. Observations are expected to pass. As well as constraints. Predictions are not.

Each validator not only checks for correctness but also measures precision. A theory might correctly predict Mercury's orbit but with insufficient accuracy, or it might conserve energy only approximately. The framework tracks these nuances, building a comprehensive profile of each theory's strengths and limitations. This multi-stage validation ensures that any theory emerging from the gauntlet has been thoroughly vetted against both theoretical requirements and experimental observations.

Example: How Energy Conservation Validation Works

Here's a concrete example of how validators analyze solver output to verify physical conservation laws:

graph LR subgraph Input["Input Data"] Traj["Trajectory
(t, r, φ)"] Theory["Theory
(Metric g_μν)"] end subgraph EnergyCalc["Energy Calculation at Each Point"] Vel["Velocity Components
u_t = dt/dτ
u_φ = dφ/dτ"] Metric["Metric Components
g_tt, g_tp, g_pp"] Energy["Energy
E = -(g_tt·u_t + g_tp·u_φ)"] Vel --> Energy Metric --> Energy end subgraph Analysis["Statistical Analysis"] Mean["Mean Energy
μ(E)"] StdDev["Std Deviation
σ(E)"] Error["Relative Error
ε = σ(E)/|μ(E)|"] Mean --> Error StdDev --> Error end subgraph Comparison["Theory Comparison"] T1["Theory A
ε = 1e-7
✓ PASS"] T2["Theory B
ε = 1e-4
✓ PASS"] T3["Theory C
ε = 0.1
✗ FAIL"] Rank["Ranking:
A > B > C"] T1 --> Rank T2 --> Rank T3 --> Rank end Traj --> Vel Theory --> Metric Energy --> Mean Energy --> StdDev Error --> T1 Error --> T2 Error --> T3 classDef inputBox fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px classDef calcBox fill:#e3f2fd,stroke:#1976d2,stroke-width:2px classDef analysisBox fill:#fff3e0,stroke:#f57c00,stroke-width:2px classDef passBox fill:#c8e6c9,stroke:#388e3c,stroke-width:2px classDef failBox fill:#ffcdd2,stroke:#d32f2f,stroke-width:2px class Traj,Theory inputBox class Vel,Metric,Energy calcBox class Mean,StdDev,Error analysisBox class T1,T2 passBox class T3 failBox

The validator continuously monitors conserved quantities throughout the trajectory, ensuring numerical integration preserves the physics

Technical Implementation

Albert embeds the complete Standard Model physics through QED Lagrangians, enabling precision tests at the quantum-gravitational interface. Every theory must couple correctly to fermions and gauge bosons.

Real Implementation: Kerr Black Holes
from physics_agent.theories.kerr import KerrMetric

class KerrMetric(GravitationalTheory):
    """Rotating black hole solution with angular momentum"""
    
    def get_metric(self, r, theta, M, a):
        # Kerr metric in Boyer-Lindquist coordinates
        rs = 2 * G * M / c**2
        rho2 = r**2 + a**2 * cos(theta)**2
        delta = r**2 - rs * r + a**2
        sigma2 = (r**2 + a**2)**2 - a**2 * delta * sin(theta)**2
        
        # Metric components (diagonal + frame-dragging)
        g_tt = -(1 - rs * r / rho2)
        g_rr = rho2 / delta  
        g_θθ = rho2
        g_φφ = sigma2 * sin(theta)**2 / rho2
        g_tφ = -rs * r * a * sin(theta)**2 / rho2  # Frame-dragging!
        
        return g_tt, g_rr, g_θθ, g_φφ, g_tφ

# Test extreme Kerr (a = 0.998M) against observations
kerr = KerrMetric()
results = kerr.validate_black_hole_shadow(M87_data)
assert results['shadow_radius'] == 42.0 ± 3.0  ✓ μas
assert results['asymmetry'] < 0.1             
assert results['ISCO_radius'] == 1.235 * rs   
                                                
⚠️ Experimental: Quantum Corrections

The following features are experimental and may change. They represent ongoing research into quantum gravity effects near black holes.

# EXPERIMENTAL: Quantum corrections to Kerr metric
from physics_agent.quantum.corrections import HawkingRadiation, QuantumHorizon

class QuantumKerr(KerrMetric):
    """Kerr metric with quantum gravity corrections (EXPERIMENTAL)"""
    
    def __init__(self, enable_hawking=True, quantum_hair=False):
        super().__init__()
        self.ℏ = 1.054571817e-34  # Planck's constant
        self.l_p = torch.sqrt(self.ℏ * G / c**3)  # Planck length
        
    def get_quantum_corrections(self, r, M, a):
        # Quantum corrections near horizon (r → r+)
        r_plus = M + torch.sqrt(M**2 - a**2)
        
        # Leading order quantum correction
        δg_tt = self.ℏ / (M * r**3) * torch.exp(-(r - r_plus) / self.l_p)
        
        # Hawking temperature
        κ = (r_plus - M) / (2 * M * r_plus)  # Surface gravity
        T_H = self.ℏ * κ / (2 * π * k_B)     # ~ 10^-8 K for stellar BH
        
        return δg_tt, T_H

# WARNING: These corrections are ~ 10^-70 for astrophysical black holes!
# Only potentially observable for primordial black holes with M ~ 10^15 g
                                                

Standard Model integration allows testing unified theories against QED precision measurements with up to 13 significant figures of accuracy. Quantum gravity effects remain orders of magnitude below current observational thresholds.

Quantum Precision: The Atomic Clock Test

Optical atomic clocks are humanity's most precise instruments. In 2018, scientists measured time's flow between two clocks just 33 cm apart.

Experimental Parameters
Hover for details
1.121
PHz frequency
0.33
meters apart
✓ Measured: (3.61 ± 1.60) × 10⁻¹⁷

This measurement tests gravitational time dilation with extraordinary precision—demonstrating the framework's ability to validate theories against cutting-edge experiments.

Why This Matters

Every theory must predict this shift to 17 decimal places, testing where Einstein meets quantum mechanics.

View Documentation

Full Set of Tests & Benchmarks

Albert validates theories against 14 rigorous tests spanning classical to quantum regimes. Each test compares theoretical predictions with state-of-the-art experimental measurements or theoretical benchmarks.

Analytical Validators (7 tests)

Mercury Perihelion Advance

Classical

Tests gravitational field in weak-field regime

SOTA: 42.98 ± 0.04 arcsec/century
Source: Radar ranging (Park et al. 2017)

Solar Light Deflection

Classical

Validates metric spatial curvature effects

SOTA: 1.7512 ± 0.0016 arcsec
Source: VLBI (Shapiro et al. 2004, PRL)

PPN Parameters (γ, β)

Classical

Parameterized post-Newtonian formalism tests

γ: 1.000021 ± 0.000023 (Cassini)
β: 1.0000 ± 0.00003 (Lunar Laser Ranging)

Photon Sphere

Classical

Light ring radius around black holes

SOTA: 1.5 r_s (Schwarzschild)
Shadow: 5.196 r_s diameter

COW Neutron Interferometry

Quantum

Gravitational phase shift of neutron waves

SOTA: 2.70 ± 0.21 radians
Source: Colella et al. (1975), PRL

PSR J0740+6620

Classical

Shapiro delay in massive pulsar system

Mass: 2.08 ± 0.07 M☉
Source: Fonseca et al. (2021), ApJL

Gravitational Waves

Classical

Post-Newtonian waveform analysis

SOTA: LIGO-Virgo waveforms
Source: Abbott et al. (2016-2024)

Solver-Based Tests (7 tests)

Trajectory vs. Kerr

Classical

1000-step geodesic integration comparison

SOTA: Kerr metric baseline
Metric: Loss function over trajectory

Circular Orbit Period

Classical

Tests Kepler's third law in strong field

SOTA: GR prediction
Uses: RK4 geodesic solver

Quantum Geodesic Simulation

Quantum

2-qubit quantum path simulation

Tests: Quantum corrections
Method: Quantum circuit simulation

CMB Power Spectrum

Cosmological

Low-ℓ anomaly and Sachs-Wolfe plateau

SOTA: ΛCDM χ²/dof ~ 1.02
Source: Planck 2018 + low-ℓ anomaly

Primordial Gravitational Waves

Cosmological

Tensor-to-scalar ratio constraints

SOTA: r < 0.032 (95% CL)
Source: BICEP/Keck + Planck 2023
Future: CMB-S4 target r ~ 0.001

Muon g-2 Anomaly

Quantum

Anomalous magnetic moment precision test

Experiment: 0.00116592059(22)
Theory: 0.00116591783(48)
Source: Theory Initiative 2020

e⁺e⁻ Scattering

Quantum

High-energy scattering at Z pole

σ(e⁺e⁻→μ⁺μ⁻): 1.477 ± 0.005 nb
Source: LEP @ 91.2 GeV (Z pole)