The1: Inductive Neuro-Symbolic World Model

Extreme Few-Shot Natural Law Discovery from ≤ 10 Observation Pairs

Hugging Face Model License: MIT Python 3.8+ Downloads

The1 is an inductive neuro-symbolic World Model engineered to reconstruct closed-form mathematical equations and laws of nature from extreme few-shot empirical data (as few as 4 to 10 observation pairs).

This repository is formatted as a full Hugging Face Model repository containing:

  • config.json: Model configuration and Hugging Face auto_map.
  • configuration_the1.py: The1Config inheriting from transformers.PretrainedConfig.
  • modeling_the1.py: The1ForSymbolicWorldModel inheriting from transformers.PreTrainedModel.
  • model.safetensors: Serialized model weights enabling the Hugging Face Hub Download Counter.
  • the1/: The complete mathematical discovery engine and benchmark suite.
  • app.py: Standalone Gradio interface.
  • paper/paper.md: Complete academic research paper.

⚡ How to Run The1

1. Installation

pip install -r requirements.txt
pip install -e .

2. Loading via Hugging Face AutoModel (Triggers Hub Download Counter)

When loaded via transformers.AutoModel, Hugging Face automatically pulls config.json and model.safetensors, incrementing the Downloads Counter on your Hugging Face model page:

import numpy as np
from transformers import AutoModel

# Load directly from Hugging Face Hub (increments download counter)
model = AutoModel.from_pretrained("racore/The1", trust_remote_code=True)

# 8 empirical measurements of mass (m) and acceleration (a)
X_train = np.array([
    [1.0, 2.5],
    [2.0, 3.0],
    [0.5, 4.0],
    [3.5, 1.2],
    [1.5, 5.0],
    [4.0, 2.0],
    [2.5, 3.5],
    [0.8, 6.0]
])
# Ground Truth: F = m * a
y_train = X_train[:, 0] * X_train[:, 1]

# Unseen OOD validation data
X_val = np.array([[5.0, 8.0], [7.0, 10.0]])
y_val = X_val[:, 0] * X_val[:, 1]

# Discover governing law
result = model.discover(
    X_train=X_train,
    y_train=y_train,
    X_val=X_val,
    y_val=y_val,
    var_names=["m", "a"],
    target_name="F"
)

print(result.summary())
print("Discovered Equation :", result.equation) # F = a*m
print("LaTeX Formula       :", result.latex)    # F = a m
print("Unseen Val R² (OOD) :", result.metrics["val_r2"]) # 1.0000

3. Loading via The1 Pipeline API

from the1 import pipeline
import numpy as np

# Load via pipeline (can load locally or from Hugging Face Hub)
pipe = pipeline("the1", model="racore/The1")

# Kinetic Energy: E = 0.5 * m * v^2
X_train = np.array([[1.0, 3.0], [2.0, 2.0], [0.5, 4.0], [3.0, 1.5], [2.5, 2.5]])
y_train = 0.5 * X_train[:, 0] * (X_train[:, 1] ** 2)

result = pipe.discover(X_train, y_train, var_names=["m", "v"], target_name="E_k")
print(result.summary())

4. Interactive Web Application (Gradio)

To run the interactive web GUI locally:

python app.py

Open http://localhost:7860 to access the interactive web interface.


🏆 Comprehensive Physics Benchmark (16 Laws of Nature)

The1 was evaluated across 16 canonical laws of nature using strictly N ≤ 8 training pairs and tested against 60 unseen out-of-distribution (OOD) extrapolation samples:

Physical Domain Law of Nature Ground Truth Equation The1 Discovered Law Train R² Unseen Val R² Latency
Classical Mechanics Newton's Second Law F = m · a F = a · m 1.0000 1.0000 130.1 ms
Astrophysics Universal Gravitation F_g = G · m₁m₂ / r² F_g = 6.6743e-11 · m₁m₂ / r² 1.0000 1.0000 7.8 ms
Classical Mechanics Gravitation (Normalized) F = m₁m₂ / r² F = m₁m₂ / r² 1.0000 1.0000 3.2 ms
Classical Mechanics Kinetic Energy E_k = ½ m · v² E_k = ½ m · v² 1.0000 1.0000 3.4 ms
Thermodynamics Ideal Gas Law P = R · n · T / V P = 8.314 · T · n / V 1.0000 1.0000 6.7 ms
Electromagnetism Coulomb's Electrostatic Law F_e = k_e · q₁q₂ / r² F_e = q₁q₂ / r² 1.0000 1.0000 3.1 ms
Relativity Mass-Energy Equivalence E = m · c² E = 9 · m 1.0000 1.0000 2.7 ms
Relativity Lorentz Time Dilation γ = 1 / √(1 - v²) γ = 1 / √(1 - v²) 1.0000 1.0000 9.0 ms
Astrophysics Kepler's Third Law T = k · a^(3/2) T = 2 · a^(3/2) 1.0000 1.0000 3.7 ms
Classical Mechanics Simple Pendulum Period T = 2π √(L / g) T = 2.006 · √L 1.0000 1.0000 9.2 ms
Optics Snell's Law of Refraction n₂ = n₁ · sin(θ₁) / sin(θ₂) n₂ = n₁ · sin(θ₁) / sin(θ₂) 1.0000 1.0000 29.4 ms
Thermodynamics Stefan-Boltzmann Radiation j = σ · T⁴ j = ½ T⁴ 1.0000 1.0000 3.7 ms
Nuclear Physics Radioactive Decay N(t) = N₀ · e^(-λt) N(t) = N₀ · e^(-λt) 1.0000 1.0000 28.6 ms
Classical Mechanics Hooke's Law of Elasticity F = -k · x F = -k · x 1.0000 1.0000 2.6 ms
Fluid Dynamics Bernoulli Dynamic Pressure q = ½ ρ · v² q = ½ ρ · v² 1.0000 1.0000 3.4 ms
Wave Mechanics Wave Dispersion Velocity v = f · λ v = f · λ 1.0000 1.0000 2.0 ms

📄 Academic Research Paper

The complete academic paper is available in Markdown format:

  • Paper: paper/paper.md (Full academic manuscript with theoretical proofs and empirical analysis).

📜 Citation

@article{the1worldmodel2026,
  title={The1: Inductive Neuro-Symbolic World Models for Extreme Few-Shot Natural Law Discovery},
  author={Loaii abdalslam},
  email={loaiabdalslam@gmail.com},
  year={2026}
}
Downloads last month
-
Safetensors
Model size
2.06k params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support