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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file conatt-0.1.0a3.tar.gz.
File metadata
- Download URL: conatt-0.1.0a3.tar.gz
- Upload date:
- Size: 52.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c5092b4b777ec116217c7caf197fad91d862a08e3c9d288bc02c19d948b5530
|
|
| MD5 |
74e5e7fdcf35433f8b6a4eb2f41d0e65
|
|
| BLAKE2b-256 |
56d6e60014a5cc8b19ec40ef50ff657626118039099b987489a960be52ca54a4
|
File details
Details for the file conatt-0.1.0a3-py3-none-any.whl.
File metadata
- Download URL: conatt-0.1.0a3-py3-none-any.whl
- Upload date:
- Size: 43.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b5f9a228589af53ec55a90f0e904db02a9aa9b8107e3a07137286d5870e2121
|
|
| MD5 |
b841977a0a65a4e7854f3b42dbd6d8f3
|
|
| BLAKE2b-256 |
0156f92ccfe5c3477f8a29c44b6711925f28de0e3c4a92ca7fd9a16a28f0fb2f
|