This release is a pre-release and may not be stable for production use.
ConAtt
ConAtt is an open-source PyTorch library for attention on continuous, irregularly sampled, and constrained domains. It keeps ordinary attention as a first-class case while adding explicit integration measures, geometric masks, continuous-depth dynamics, neural-operator blocks, approximation certificates, and evidence gates for fair model comparison.
The package is designed for reusable scientific and engineering work rather than a single benchmark. Initial application targets include PDE surrogate models, irregular time series, physical simulation, scientific sensing, and spatiotemporal learning.
Release status:
0.1.0a3is a public alpha API, available from PyPI. Production stability is not yet guaranteed; scientific claims remain governed by the evidence gate below.
Install
pip install conatt[torch]
From the pinned public release in Colab:
pip install "conatt[torch]==0.1.0a3"
Continuous attention in three steps
import torch
from conatt.torch_continuous import ContinuousAttentionOperator1D
coordinates = torch.tensor([[0.0], [0.03], [0.20], [0.74], [1.0]])
forcing = torch.randn(8, coordinates.shape[0], 1)
model = ContinuousAttentionOperator1D(
input_channels=1, output_channels=1, width=64, heads=4, layers=4,
use_measure=True,
)
prediction, attention_maps = model(forcing, coordinates)
The parameter-identical ablation is obtained with use_measure=False. This
makes the effect of continuous-domain normalization directly testable without
changing model capacity.
Included capabilities
- NumPy and PyTorch scaled dot-product attention with positive measure weights;
- continuous 1-D operator model for irregular grids and variable resolutions;
- hybrid
ConAttOperator1Dcoupling measure-aware attention with irregular Fourier/sine integral mixers and optional exact Dirichlet envelopes; LatentConAttOperator1Dfor measure-aware encode/process/decode between arbitrary observation points and a reusable continuous latent grid;QuadratureSineOperator1DandGalerkinConAttOperator1Dfor a stable irregular-grid Galerkin path plus an auditable native-attention correction;KernelIntegralConAttOperator1Dwith coordinate-only query/key geometry, nonlinear field values, and explicit key-domain quadrature;- fixed-step Euler, midpoint, and RK4 integration for attention vector fields;
- causal and metric-radius structure masks;
- affine physical-constraint projection with residual certificate;
- retained-mass, spectral-tail, and finite-horizon propagation certificates;
- exact propagation-aware approximation-budget allocation;
- paired-seed statistics, fairness records, and immutable experiment storage;
- deterministic Poisson data generator and controlled killer tests.
- auditable FNO and DeepONet references for local baseline checks.
Verify an installation
conatt verify
conatt benchmark-continuous --output continuous-killer-test.json
The controlled test isolates a known irregular-sampling failure. Its output is deliberately blocked from becoming a publication claim. Learned-model claims require real benchmarks, reproduced closest baselines, paired seeds, matched budgets, negative controls, and immutable artifacts.
See the five-track research program, baseline policy, and Colab quickstart. The results index separates controlled evidence, multi-seed smoke tests, and non-claim diagnostic probes; the public release record records artifact hashes.
License
MIT. See LICENSE.
Metadata
Release files for conatt 0.1.0a3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| conatt-0.1.0a3.tar.gz | 52.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| conatt-0.1.0a3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 96.0 kB
Release files / conatt-0.1.0a3.tar.gz
| Download URL | conatt-0.1.0a3.tar.gz |
|---|---|
| Size | 52.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c5092b4b777ec116217c7caf197fad91d862a08e3c9d288bc02c19d948b5530
|
|
BLAKE2b-256 checksum How to use checksums |
56d6e60014a5cc8b19ec40ef50ff657626118039099b987489a960be52ca54a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / conatt-0.1.0a3-py3-none-any.whl
| Download URL | conatt-0.1.0a3-py3-none-any.whl |
|---|---|
| Size | 43.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b5f9a228589af53ec55a90f0e904db02a9aa9b8107e3a07137286d5870e2121
|
|
BLAKE2b-256 checksum How to use checksums |
0156f92ccfe5c3477f8a29c44b6711925f28de0e3c4a92ca7fd9a16a28f0fb2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|