Skip to main content

Deceptron

Open in Colab Documentation Python 3.9 or later PyTorch 2.0 or later MIT License

Deceptron is a PyTorch package for solving repeated nonlinear inverse problems with a learned reverse map.

A. L. Kachhadiya. Local Inverse Geometry Can Be Amortized. arXiv:2605.13068, 2026.

System requirements

  • Python 3.9 or later, PyTorch 2.0 or later, and NumPy 1.24 or later.
  • Git for installation from GitHub. The install command resolves the Python dependencies.
  • A CPU is sufficient for the quick start and checkpoint replays. Use a CUDA-enabled PyTorch environment for GPU benchmark training.

Installation

python -m pip install git+https://github.com/AadityaKachhadiya/deceptron.git

Quick start

This example calls D-IPG with an exact reverse map for the measurement equation y = 2x.

import torch
from deceptron import DIPG, DeceptronModule, SolverConfig
model = DeceptronModule(lambda x: 2 * x, lambda y: y / 2)
result = DIPG(model, torch.tensor([0.8]), torch.zeros(1), SolverConfig(tolerance_eps=1e-5))
print(result["x_hat"])  # approximately tensor([0.4000])

Reproduce the paper

The experiment guide lists the scripts, data generation, and expected outputs for the seven PDE benchmarks. See Data for the held-out arrays and frozen checkpoints. To run the complete Heat-3D benchmark from source:

git clone https://github.com/AadityaKachhadiya/deceptron.git
cd deceptron
python -m pip install -e ".[demo]" pandas scipy
python reproduce/experiments/heat3d.py

The script generates the data, trains the models, and writes runs/heat3d/heat3d_cnn_main_results.csv for comparison with the archived result.

Benchmark figures

Navier–Stokes recovery from one noisy snapshot and absolute error at the withheld time

Navier–Stokes. Recover the initial vorticity from one noisy snapshot and compare the resulting flow with the withheld snapshot. Run and data

Training cost and break-even

The table gives the approximate number of inverse solves needed to offset the full Deceptron training cost using the original benchmark timings. The estimate depends on the benchmark and the baseline solver.

Benchmark Gauss–Newton Levenberg–Marquardt L-BFGS
Heat-3D 1,266 1,597 —
Advection–diffusion 2D 546 550 1,692
Allen–Cahn 2D 586 139 6,049

The separate Allen–Cahn comparison below uses a shared measurement tolerance for D-IPG and Levenberg–Marquardt. Under that protocol, the projected break-even point is 628 solves.

Cumulative wall-clock time for Allen–Cahn, with a break-even point at 628 solves

Run and timing protocol.

Cite this work

For work that uses this repository, cite the 2026 preprint.

@misc{kachhadiya2026localinversegeometryamortized,
      title={Local Inverse Geometry Can Be Amortized},
      author={Aaditya L. Kachhadiya},
      year={2026},
      eprint={2605.13068},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2605.13068},
}

Earlier workshop paper. A. L. Kachhadiya. Deceptron: Learned Local Inverses for Fast and Stable Physics Inversion. Machine Learning and the Physical Sciences Workshop, NeurIPS, 2025. See the workshop BibTeX when citing that version.

Questions

For help using the package, data, or benchmark scripts, open a GitHub issue. Include the command you ran and any error output.

License

Deceptron is released under the MIT License.

Metadata

Release files for deceptron 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deceptron 1.0.0
File Size Uploaded Provenance Actions
deceptron-1.0.0.tar.gz 17.3 kB With provenance Details for deceptron-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for deceptron 1.0.0
File Interpreter ABI Platform Actions
deceptron-1.0.0-py3-none-any.whl Python 3 none any Details for deceptron-1.0.0-py3-none-any.whl

Total release size: 33.0 kB

Release files / deceptron-1.0.0.tar.gz

Download URL deceptron-1.0.0.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a72aa37ce4514c493fa8a2d45942af801602fd90e9b37dbdd563cb1dd67bc8e7
BLAKE2b-256 checksum
How to use checksums
4e8589f5ff8e5696315412ea23c3ac55f9350b0228a63092ac22b3dedb869cd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / deceptron-1.0.0-py3-none-any.whl

Download URL deceptron-1.0.0-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d04e32e2f1034aa07697f33e75b0627556420b8b63a6fbd9d12cd6f33a19be6
BLAKE2b-256 checksum
How to use checksums
83dd839004e907014886f2e3dd3ba3d012374b8bc218a383478db1006e37a2bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Security for deceptron 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for deceptron-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page