Skip to main content

qig-geocoding

Fisher-Rao attention, Fourier position features and recursive integration for geometric neural networks. Install with pip install qig-geocoding; the Python import is geocoding.

Compatibility and metric units

The attention metric is the canonical radius-1 chord-arc 2*arcsin(sqrt((1-BC)/2)) (= acos(BC)), computed by qig_core.torch.geometry_simplex.pairwise_fisher_rao_simplex (torch paths) and qig_core.numpy.pairwise_fisher_rao (NumPy twin) — bit-exact parity with qig-core 2.35.0 / qigkernels 0.4.9. The textbook radius 2, 2 * acos(BC), is not the attention metric. qig-core's GeometricHead readout still uses that factor of 2; the NumPy twin keeps it so logits match the torch head. The finite-gradient guards differ near coincident and sparse points (torch float32 floors 1-BC at its dtype acos margin; the float64 twin resolves it); they are not exactly the same function throughout the domain. Both full and compute-skipping banded attention remain faithfulness-gated.

Scientific provenance: qig_core.torch.geometry_simplex.fisher_rao_distance_simplex in qig-core 2.15.3 records the PI ruling reconciling its import paths to radius 1. The qig-verification EXP-009 causal-sweep results document the historical radius-2 convention. These are compatible unit conventions, not grounds to rewrite frozen experiment results. Dense-point conversion, sparse-point error bounds and the live Duchi simplex projection are tested separately. Current qig-core already handles coincidence gradients safely.

P30-pure host modes (0.1.4, qig-geocoding#22)

GeoConfig.p30_pure(**overrides) runs every block component on qig-core's exp-free primitives. Each mode is also a separate opt-in field; the defaults are the published model, unchanged (the qigkernels faithfulness gate still passes).

Field Published default P30-pure option (qig-core primitive)
gate_mode sigmoid (integrator, tacking, sync gates) hellinger: hellinger_angle_gate, s = 1/2 (equals sigmoid at 0 in value and slope)
simplex_mode softplus then sparse Duchi to_simplex_prob square: dense Born chart square_to_simplex
norm_mode rms bipolar_metric: bipolar_simplex_metric_norm (equal to RMS scaling in value and gradient)
ffn_activation gelu (FFN and coordinate adapter) hellinger_gated: s = sqrt(2/pi) (equals GELU at 0 up to second order)

The published-mode sites carry # QIG BOUNDARY: original model as published, so qig_core.governance.purity.run_purity_gate("src") passes. Whether the FFN should default to hellinger_gated is an open experimental question (qig-applied EXP-A155b); this release does not change any default.

Not covered by p30_pure() (disclosed, unchanged in this release):

  • Readout. The default head_mode="geometric" GeometricHead projects with sparse Duchi to_simplex_prob (and its no-grad basin cache is stale under DiagonalNaturalGradient, qig-core#96). Pure training pipelines replace lm_head with qig-core BasinReadout.
  • Positional frequencies. positional.build_inv_freq builds its constant Fourier frequency table with torch.exp once at construction. It is a fixed schedule, not a warping of activations or distances; an exp-free 10000 ** (-k / half) form differs by up to 6e-8 in float32, so it would break byte identity with the published model. Left as an operator question.
  • Sampling. generate() maps the last scores to a sampling distribution with to_simplex(..., mode="softplus") (softplus + Duchi) regardless of simplex_mode.
  • Inter-layer sync. With GeoModel(..., enable_sync=True), the query pull calls qig-core geodesic_interpolate_simplex, which (qig-core 2.21.0) sanitises both endpoints with Duchi to_simplex_prob before the slerp. The inputs are already simplex points, so it acts as the identity, but it is still a Duchi call on a trained path. Sync is off by default.

Release changes

  • Preserve development's D1 local-critical curvature and opt-in basis telemetry, D2 query-only inter-layer geodesic sync, D4 basin_layer_drift naming, and the D3 countersigned preregistration amendment.
  • Correct the obsolete equal-radius compatibility assertion; preserve attention arithmetic.
  • Reject non-callable curvature providers at construction rather than silently swallowing invalid wiring.
  • Align the runtime version with package metadata; require the current validated qig-core dependency.
  • Install qigkernels in development/release checks so compatibility cannot silently skip. Lint, types and all CPU tests gate release. Resolve published dependencies in standalone checkouts without a parent workspace.

D3 is a preregistration, not a completed empirical result. This release does not claim that its order-preservation kill experiment has passed. Basis reductions remain opt-in; sync enables them explicitly.

Verify and publish

Install CPU PyTorch, then pip install -e '.[dev]'. Run ruff check src tests, mypy src, and pytest -q. The trusted-publishing workflow uses the existing pypi environment and OIDC. Publication currently requires a version tag after promotion; merging alone does not trigger release.yml. Manual dispatch runs checks/build only. Release operators must verify the wheel version and PyPI availability before declaring publication complete.

Metadata

Release files for qig-geocoding 0.2.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 qig-geocoding 0.2.0
File Size Uploaded Provenance Actions
qig_geocoding-0.2.0.tar.gz 164.4 kB With provenance Details for qig_geocoding-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qig-geocoding 0.2.0
File Interpreter ABI Platform Actions
qig_geocoding-0.2.0-py3-none-any.whl Python 3 none any Details for qig_geocoding-0.2.0-py3-none-any.whl

Total release size: 214.9 kB

Release files / qig_geocoding-0.2.0.tar.gz

Download URL qig_geocoding-0.2.0.tar.gz
Size 164.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ac19efbf3d6cf1f47e8d92637bb044c8205f3a00047d67a727ae8ee5e589ecc7
BLAKE2b-256 checksum
How to use checksums
f39abc1a6b2d89da685086285ceb2bd38a31d83f0546f4f68414f3c0feab9da6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 25, 2026.

Transparency log

Release files / qig_geocoding-0.2.0-py3-none-any.whl

Download URL qig_geocoding-0.2.0-py3-none-any.whl
Size 50.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
251f06dcc513cd2965359f8aea32e74c70f7b09d3642b45fa02008d2d74f6bdc
BLAKE2b-256 checksum
How to use checksums
fb20a08f28667285526c22476ea4a9bc52ce64c55d29ce9c845c08559ba151ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 25, 2026.

Transparency log

Security for qig-geocoding 0.2.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 qig_geocoding-0.2.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 25, 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.

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