{"id":49537899,"url":"https://github.com/sapsan14/early-universe","last_synced_at":"2026-05-02T12:31:40.352Z","repository":{"id":352821694,"uuid":"1185521233","full_name":"sapsan14/early-universe","owner":"sapsan14","description":"ARCHEON — early-universe simulation with JAX, Boltzmann hierarchy, CMB analysis, AI-driven inference.","archived":false,"fork":false,"pushed_at":"2026-04-21T09:19:08.000Z","size":20028,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-21T10:32:00.898Z","etag":null,"topics":["cmb","cosmology","jax","python","scientific-computing","simulation"],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sapsan14.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-18T17:08:17.000Z","updated_at":"2026-04-21T08:20:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sapsan14/early-universe","commit_stats":null,"previous_names":["sapsan14/early-universe"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sapsan14/early-universe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapsan14%2Fearly-universe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapsan14%2Fearly-universe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapsan14%2Fearly-universe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapsan14%2Fearly-universe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sapsan14","download_url":"https://codeload.github.com/sapsan14/early-universe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapsan14%2Fearly-universe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32534964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T12:25:33.646Z","status":"ssl_error","status_checked_at":"2026-05-02T12:24:51.733Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmb","cosmology","jax","python","scientific-computing","simulation"],"created_at":"2026-05-02T12:31:39.730Z","updated_at":"2026-05-02T12:31:40.339Z","avatar_url":"https://github.com/sapsan14.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ARCHEON\n\n**A**rchaeology of the **R**adiation-dominated **C**osmos via **H**ybrid **E**mulation and **O**bservational **N**eural Inference\n\n*from Greek ἀρχή — origin, first cause*\n\n[![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-3776AB?logo=python\u0026logoColor=white)](https://www.python.org/downloads/)\n[![JAX](https://img.shields.io/badge/JAX-accelerated-A855F7?logo=google\u0026logoColor=white)](https://github.com/google/jax)\n[![PyTorch](https://img.shields.io/badge/PyTorch-inference-EE4C2C?logo=pytorch\u0026logoColor=white)](https://pytorch.org/)\n[![FastAPI](https://img.shields.io/badge/FastAPI-server-009688?logo=fastapi\u0026logoColor=white)](https://fastapi.tiangolo.com/)\n[![React 19](https://img.shields.io/badge/React_19-frontend-61DAFB?logo=react\u0026logoColor=black)](https://react.dev/)\n[![MIT License](https://img.shields.io/badge/license-MIT-green)](https://github.com/sapsan14/early-universe/blob/main/LICENSE)\n\n[Overview](#overview) · [Architecture](#architecture) · [Modules](#modules) · [Quickstart](#quickstart) · [Data Sources](#data-sources) · [Testing](#testing) · [Docs](#project-documentation) · [Roadmap](#roadmap) · [License](#license)\n\n---\n\n## Overview\n\nARCHEON is an open computational platform that bridges rigorous early-universe physics, neural network-based cosmological inference, CMB anomaly detection, and an interactive browser observatory — all in a single, reproducible framework.\n\n**What it does:**\n\n- Solves Friedmann equations, Boltzmann hierarchy, and perturbation theory with **JIT-compiled, differentiable JAX** solvers\n- Recovers cosmological parameters from CMB maps in **milliseconds** via a Bayesian CNN (vs hours for traditional MCMC)\n- Detects anomalies in CMB data — Cold Spot, non-Gaussianity, hemispherical asymmetry\n- Compresses the Universe into interpretable **latent spaces** with a disentangled VAE\n- Serves everything through a **FastAPI** backend and **React/TypeScript** interactive observatory\n\n**Goal:** Become a new standard at the intersection of cosmology, machine learning, and interactive scientific tools — with a direct path to an arXiv publication, a PyPI package, and a live demo.\n\n---\n\n## Architecture\n\n```\n                        ┌──────────────────────────────────────────────┐\n                        │           Interactive Observatory            │\n                        │       React 19 · TypeScript · WebGPU         │\n                        │  TimeTraveler · AnomalyMap · ParamExplorer   │\n                        └──────────────────┬───────────────────────────┘\n                                           │ REST API\n                        ┌──────────────────┴───────────────────────────┐\n                        │            API Layer — FastAPI                │\n                        │     Simulation runner · Inference endpoint    │\n                        └──┬──────────┬──────────┬──────────┬──────────┘\n                           │          │          │          │\n              ┌────────────┴┐  ┌──────┴───────┐ ┌┴────────┐ ┌┴───────────┐\n              │ Physics Core│  │ Inverse Cosmo│ │   ML    │ │  Anomaly   │\n              │    (JAX)    │  │              │ │  Layer  │ │ Detection  │\n              │             │  │ Bayesian CNN │ │         │ │            │\n              │ Friedmann   │  │ MCMC Baseline│ │ PINN    │ │ Autoencoder│\n              │ Boltzmann   │  │ Uncertainty  │ │ FNO     │ │ Cold Spot  │\n              │ Perturbation│  │ Calibration  │ │ Emulator│ │ Statistics │\n              │ Recombine   │  │ Evaluation   │ │Training │ │ Latent     │\n              │ Inflation   │  │ Validation   │ │         │ │ Analysis   │\n              │ Sph. Harm.  │  │              │ │         │ │            │\n              └──────┬──────┘  └──────┬───────┘ └────┬────┘ └─────┬─────┘\n                     │               │              │             │\n              ┌──────┴───────────────┴──────────────┴─────────────┴─────┐\n              │                    Data Pipeline                         │\n              │  Planck CMB · SDSS · DESI · Gaia DR3 · IllustrisTNG     │\n              │  Synthetic map generator · DVC versioning · HDF5/Zarr    │\n              └─────────────────────────────────────────────────────────┘\n```\n\n---\n\n## Modules\n\n### `archeon/physics/` — Physics Core (JAX)\n\n| Module | Description |\n|--------|-------------|\n| [`friedmann.py`](archeon/physics/friedmann.py) | Friedmann equation solver — evolution of the scale factor a(t) |\n| [`boltzmann.py`](archeon/physics/boltzmann.py) | Boltzmann hierarchy for photon, neutrino, and baryon multipoles |\n| [`perturbations.py`](archeon/physics/perturbations.py) | Cosmological perturbation theory in synchronous gauge |\n| [`recombination.py`](archeon/physics/recombination.py) | Hydrogen recombination — ionization fraction Xe(z) |\n| [`inflation.py`](archeon/physics/inflation.py) | Inflation models — slow-roll, Starobinsky, natural inflation |\n| [`spherical_harmonics.py`](archeon/physics/spherical_harmonics.py) | Spherical harmonic transforms for CMB sky maps |\n| [`alternative.py`](archeon/physics/alternative.py) | Alternative/modified gravity and dark energy models |\n\nAll solvers are **JIT-compiled**, **auto-differentiable**, and **GPU-compatible**.\n\n### `archeon/inverse/` — Inverse Cosmology\n\n| Module | Description |\n|--------|-------------|\n| [`bayesian_cnn.py`](archeon/inverse/bayesian_cnn.py) | Bayesian CNN for parameter inference from CMB maps |\n| [`mcmc_baseline.py`](archeon/inverse/mcmc_baseline.py) | MCMC baseline (emcee) for comparison |\n| [`uncertainty.py`](archeon/inverse/uncertainty.py) | Uncertainty quantification and calibration |\n| [`evaluation.py`](archeon/inverse/evaluation.py) | Model evaluation metrics and diagnostic plots |\n| [`training.py`](archeon/inverse/training.py) | Training pipeline with checkpointing |\n| [`validation.py`](archeon/inverse/validation.py) | Cross-validation against CLASS/CAMB references |\n\n### `archeon/ml/` — Neural Emulators\n\n| Module | Description |\n|--------|-------------|\n| [`pinn_friedmann.py`](archeon/ml/pinn_friedmann.py) | Physics-Informed Neural Network for Friedmann equations |\n| [`fno_structure.py`](archeon/ml/fno_structure.py) | Fourier Neural Operator for structure formation |\n| [`emulator.py`](archeon/ml/emulator.py) | Fast neural emulator for CMB power spectra |\n| [`training.py`](archeon/ml/training.py) | Unified training loop with early stopping and scheduling |\n\n### `archeon/anomaly/` — CMB Anomaly Detection\n\n| Module | Description |\n|--------|-------------|\n| [`autoencoder.py`](archeon/anomaly/autoencoder.py) | Autoencoder for anomaly detection via reconstruction error |\n| [`cold_spot.py`](archeon/anomaly/cold_spot.py) | Cold Spot detection and characterization |\n| [`statistical_tests.py`](archeon/anomaly/statistical_tests.py) | Non-Gaussianity tests, hemispherical asymmetry |\n| [`latent_analysis.py`](archeon/anomaly/latent_analysis.py) | Latent-space anomaly clustering and visualization |\n\n### `archeon/compression/` — Universe Compression\n\n| Module | Description |\n|--------|-------------|\n| [`vae.py`](archeon/compression/vae.py) | Variational Autoencoder for CMB map compression |\n| [`disentanglement.py`](archeon/compression/disentanglement.py) | Disentanglement metrics (DCI, MIG, SAP) |\n| [`interpretability.py`](archeon/compression/interpretability.py) | Latent dimension interpretability analysis |\n\n### `archeon/data/` — Data Ingest \u0026 Synthesis\n\n| Module | Description |\n|--------|-------------|\n| [`planck.py`](archeon/data/planck.py) | Planck CMB data loader |\n| [`sdss.py`](archeon/data/sdss.py) | SDSS spectroscopic catalog loader |\n| [`desi.py`](archeon/data/desi.py) | DESI BAO data loader |\n| [`gaia.py`](archeon/data/gaia.py) | Gaia DR3 stellar catalog loader |\n| [`illustris.py`](archeon/data/illustris.py) | IllustrisTNG simulation data loader |\n| [`synthetic.py`](archeon/data/synthetic.py) | Synthetic CMB map generator with Latin Hypercube Sampling |\n| [`priors.py`](archeon/data/priors.py) | Cosmological parameter priors |\n\n### `archeon/api/` — Simulation API\n\n| Module | Description |\n|--------|-------------|\n| [`service.py`](archeon/api/service.py) | FastAPI application with CORS, lifecycle hooks |\n| [`models.py`](archeon/api/models.py) | Pydantic request/response models |\n| [`simulations.py`](archeon/api/simulations.py) | Simulation runner endpoints |\n\n### `archeon/academic/` — Publication Toolkit\n\n| Module | Description |\n|--------|-------------|\n| [`citation.py`](archeon/academic/citation.py) | Citation manager (BibTeX generation) |\n| [`latex_export.py`](archeon/academic/latex_export.py) | LaTeX figure and table export |\n| [`notebook_generator.py`](archeon/academic/notebook_generator.py) | Reproducible Jupyter notebook generation |\n| [`reproducibility.py`](archeon/academic/reproducibility.py) | Environment snapshots and reproducibility reports |\n\n### `web/` — Interactive Observatory\n\nReact 19 + TypeScript + Vite frontend with:\n\n| Component | Description |\n|-----------|-------------|\n| [`TimeTraveler.tsx`](web/src/components/TimeTraveler.tsx) | Navigate through cosmic epochs from inflation to today |\n| [`AnomalyMap.tsx`](web/src/components/AnomalyMap.tsx) | Interactive CMB anomaly sky map |\n| [`ParameterExplorer.tsx`](web/src/components/ParameterExplorer.tsx) | Real-time cosmological parameter adjustment |\n| [`PlayableUniverse.tsx`](web/src/components/PlayableUniverse.tsx) | Particle-based universe simulation |\n| [`particles.ts`](web/src/engine/particles.ts) | WebGPU particle physics engine |\n\n---\n\n## Quickstart\n\n### Prerequisites\n\n- Python 3.11+\n- Node.js 18+ (for the web observatory)\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/sapsan14/early-universe.git\ncd early-universe\n\n# Create virtual environment\npython -m venv .venv\nsource .venv/bin/activate\n\n# Install the package with all optional dependencies\npip install -e \".[all]\"\n```\n\n### Run the physics core\n\n```python\nfrom archeon.physics.friedmann import FriedmannSolver\n\nsolver = FriedmannSolver()\nsolution = solver.solve()\n# solution contains scale factor a(t), Hubble parameter H(t), age of the universe\n```\n\n### Run the API server\n\n```bash\npip install -e \".[api]\"\nuvicorn archeon.api.service:app --reload\n# API docs at http://localhost:8000/docs\n```\n\n### Launch the web observatory\n\n```bash\ncd web\nnpm install\nnpm run dev\n# Open http://localhost:5173\n```\n\n### Reproduce the data pipeline\n\n```bash\npip install dvc\ndvc repro      # generates synthetic training \u0026 validation datasets\n```\n\n---\n\n## Data Sources\n\n| Source | What | Link |\n|--------|------|------|\n| **Planck** | CMB temperature \u0026 polarization maps | [pla.esac.esa.int](https://pla.esac.esa.int) |\n| **SDSS** | Galaxy spectroscopic catalog | [sdss.org](https://www.sdss.org) |\n| **DESI** | BAO measurements | [desi.lbl.gov](https://www.desi.lbl.gov) |\n| **Gaia DR3** | Stellar positions and parallaxes | [gea.esac.esa.int](https://gea.esac.esa.int/archive/) |\n| **IllustrisTNG** | Cosmological hydrodynamic simulations | [tng-project.org](https://www.tng-project.org/data/) |\n\n---\n\n## Testing\n\n```bash\n# Run the full test suite\npytest\n\n# Run with coverage\npytest --cov=archeon\n\n# Run a specific module's tests\npytest tests/test_friedmann.py -v\n```\n\nTest suite covers: physics solvers, ML training smoke tests, inverse problem pipeline, anomaly detection, API endpoints, data loaders, and compression metrics.\n\n---\n\n## Project Documentation\n\n| Document | Purpose |\n|----------|---------|\n| [`PLAN.md`](PLAN.md) | Master plan — architecture, phases, task tracking |\n| [`KNOWLEDGE.md`](KNOWLEDGE.md) | Knowledge base — all terms, formulas, concepts |\n| [`INSTRUCTIONS.md`](INSTRUCTIONS.md) | Standards and conventions for contributors |\n| [`STEP1.md`](STEP1.md) | Phase 1 report: Physics Core |\n| [`STEP2.md`](STEP2.md) | Phase 2 report: Data Pipeline \u0026 Inverse Cosmology |\n| [`STEP3.md`](STEP3.md) | Phase 3 report: Anomaly Detection |\n| [`STEP4.md`](STEP4.md) | Phase 4 report: ML Emulators |\n| [`STEP5.md`](STEP5.md) | Phase 5 report: Universe Compression |\n| [`STEP6.md`](STEP6.md) | Phase 6 report: API \u0026 Web Observatory |\n| [`STEP7.md`](STEP7.md) | Phase 7 report: Alternative Physics |\n| [`STEP8.md`](STEP8.md) | Phase 8 report: Academic Toolkit |\n| [`dvc.yaml`](dvc.yaml) | DVC pipeline definition |\n| [`params.yaml`](params.yaml) | Pipeline parameters |\n\n---\n\n## Roadmap\n\n- [x] **Phase 1** — Physics Core: Friedmann, Boltzmann, recombination, perturbations, inflation\n- [x] **Phase 2** — Data Pipeline: Planck/SDSS/DESI/Gaia loaders, synthetic generation, DVC\n- [x] **Phase 3** — Inverse Cosmology: Bayesian CNN, MCMC baseline, uncertainty calibration\n- [x] **Phase 4** — Anomaly Detection: autoencoder, Cold Spot, non-Gaussianity tests\n- [x] **Phase 5** — ML Emulators: PINN, FNO, neural emulator\n- [x] **Phase 6** — Compression: VAE latent space, disentanglement, interpretability\n- [x] **Phase 7** — API \u0026 Web: FastAPI server, React observatory\n- [x] **Phase 8** — Academic: citation manager, LaTeX export, reproducibility\n- [ ] **Phase 9** — Validation against CLASS/CAMB, arXiv preprint, PyPI release\n\n---\n\n## Tech Stack\n\n| Layer | Technologies |\n|-------|-------------|\n| **Physics** | JAX, NumPy, SciPy, HEALPy, Astropy |\n| **ML** | PyTorch, emcee, corner |\n| **API** | FastAPI, Uvicorn, Pydantic |\n| **Frontend** | React 19, TypeScript, Vite, WebGPU |\n| **Data** | HDF5, Zarr, DVC |\n| **Testing** | pytest, ruff |\n\n---\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n---\n\n**Author:** Anton Sokolov\n\n*Built with JAX, curiosity, and a desire to understand the first moments of the Universe.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapsan14%2Fearly-universe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsapsan14%2Fearly-universe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapsan14%2Fearly-universe/lists"}