patrick-kidger / patrick-kidger/diffrax

Enforcing Absolute Unitarity in Differentiable Physics: The Float-to-Integer Ledger Approach

Open
#750 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.1k
Forks
189
Avg merge
3d 18h
Merged PRs (30d)
1

Description

The Problem: Numerical Entropy in ODE Solvers

Standard differentiable solvers, while excellent for gradient-based optimization, often suffer from minute informational drift due to floating-point precision limits. In long-epoch cosmological simulations—specifically those involving terminal gravitational collapse—these rounding errors accumulate, violating the Information Conservation Mandate and breaking the unitarity of the system.

The v13.0 Solution: The Unitarity Bridge

Released on April 30, 2026, the String-Star Manifold v13.0 implements a dual-ledger architecture to bridge the gap between continuous kinematics and discrete conservation.

1. Dual-Precision Coupling

We decouple the Physics Engine from the Information Ledger:

  • Kinematics (float32): Standard differentiable paths for N-body interactions, utilizing JAX-accelerated solvers.
  • Microstate Ledger (int32): A discrete accounting system that tracks the absolute number of qubits within the Bandyopadhyay-Cycle.
2. The Unitarity Index

By enforcing transitions through a "Float-to-Integer Bridge," we ensure that mass/information is never "lost" to the vacuum during a phase shift (e.g., a Holographic Shift to a Fuzzball horizon). In our latest 500-epoch stress tests, the manifold maintained a Unitarity Index of exactly 1.000000, even through violent White Hole Blowout events.

Application: The Bandyopadhyay-Cycle

The system tracks information across three mutually exclusive states:
[ I_{total} = I_{bulk} + I_{horizon} + I_{vacuum} ]

When local density $\rho$ breaches the Planck Density ($\rho_{Planck}$), the solver must handle a non-linear phase transition where gravity becomes repulsive:
[ F_{LQG} = \frac{G m_1 m_2}{r^2} \left( 1 - \frac{\rho_{local}}{\rho_{Planck}} \right) ]

A Question for the Diffrax Community

In version 13.0, I utilized a "Stretchy Spatial Hash" to handle metric expansion ($\Lambda(t)$) while keeping array shapes static for JIT efficiency.

I am interested in exploring how Diffrax might more elegantly handle these discontinuous state-dependent jumps (like the Instantaneous White Hole Blowout) without sacrificing the differentiability of the overall trajectory. Has there been consideration for "Conservation-Locked" solvers that utilize a discrete integer backbone for invariant quantities?


Resources

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no Diffrax files, tests, or entry points; start by clarifying whether a conservation-locked solver is requested and which discontinuous transitions it must support. Define the invariant and differentiability requirements before identifying an implementation location and tests that would demonstrate completion.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.