Emergentia is a Neural-Symbolic discovery engine designed to extract parsimonious physical laws from meso-scale particle trajectories. By combining the flexible representation power of Neural Networks with the mathematical clarity of Symbolic Regression, Emergentia can "rediscover" the underlying equations of motion from raw simulation data, even in the presence of noise.
-
Modular Physics Engine: A plug-and-play architecture for physical potentials. Easily define new laws (e.g., Harmonic, Lennard-Jones, Morse) by extending the base
Potentialclass. -
Neural-Symbolic Pipeline:
-
Neural Mapping: A
DiscoveryNet(PyTorch) approximates force laws using an expanded basis set$[r, 1/r, \exp(-r)]$ . -
Symbolic Distillation: A
SymbolicRegressor(gplearn) extracts clean, human-readable mathematical formulas from the neural weights.
-
Neural Mapping: A
-
Noise Resilience: Built-in support for discovery from noisy trajectories using robust
HuberLosstraining and automated Gaussian smoothing considerations. -
Robust Statistical Validation: Automated verification of discovered laws using curve-fitting,
$R^2$ scores, and Bayesian Information Criterion (BIC) to ensure parsimony and accuracy. -
Hardware Acceleration: Full support for
CUDA(NVIDIA) andMPS(Apple Silicon) backends. -
Symmetric Log Transform: Advanced training techniques to handle high-dynamic-range forces (e.g.,
$1/r^{13}$ walls) without numerical instability.
Ensure you have Python 3.9+ and the following dependencies:
pip install torch numpy sympy gplearn pandas scipy pytestEmergentia achieves high-fidelity results across multiple physical regimes and noise levels:
| Mode | Basis | Target Law | Discovery MSE | Noise Resilience |
|---|---|---|---|---|
| Spring | ~10⁻⁵ | High | ||
| LJ | ~10⁻³ | Medium | ||
| Morse | ~10⁻⁴ | High |
To evaluate the engine across all supported potentials and noise levels:
python run_benchmarks.pyTo verify the internal scaling and normalization logic:
pytest tests/test_scaling.pyemergentia/: Core package.simulator.py: Modular physics simulation engine and potential definitions.models.py:DiscoveryNetarchitecture andTrajectoryScaler.engine.py: TheDiscoveryPipelinelinking neural training to symbolic regression.utils.py: Statistical verification and symbolic utility functions.
run_benchmarks.py: Main entry point for cross-regime validation.tests/: Unit test suite.LICENSE: Project licensing information.
Distributed under the MIT License. See LICENSE for more information.