Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

omnibias-struct

Let paths compete before selecting one. Dynamic programs expose smooth values and structured marginals.

Let paths compete before selecting one.

Static poster · Narrow-screen animation · How this visual is computed

Scores on a sequence, graph or grammar enter; soft dynamic-program values, marginals and decoded structures leave. The recurrence exploits structure rather than enumerating all paths as independent neural experts.

The animation uses computed outputs to explain this package. Frame transitions are illustrative unless a training step is explicitly identified; it is not a performance comparison.

API reference · Source · Tests · Talk to Derivon

The mathematical connection

Temperature collapse replaces a hard max or min with smooth log-sum-exp competition. At high β, values approach the hard recurrence; tied alternatives retain shared soft mass. Bias-collapse jets differentiate supported log-sum-exp compositions at higher order. The resulting derivatives concern the soft program, not a discontinuous argmax path.

Run this README

The examples use omnibias-struct[torch] on Python >=3.10. Their installed-wheel profile selects runtime features, not an editable workspace. Install the prepared prerelease from PyPI:

python -m pip install --pre "omnibias-struct[torch]==0.1.0a2"

For local development before publication, build and test the coordinated wheelhouse using the release guide. The package's wheel profile executes the examples below outside the source checkout.

Existing published consumers may need historical primitive versions; see the compatibility policy.

Why this package exists

A max-score path selects one discrete explanation. Replacing max with a temperature-scaled log-sum-exp retains information about alternatives, making the structured value differentiable with respect to scores. Struct combines these recurrences with shared semiring representations and derivative machinery.

What you can build

  • Soft Viterbi, alignment, DTW, planning and related structured operators.
  • Semiring/hypergraph representations and selected parsing families.
  • Marginals, higher derivatives, decoding and soft-versus-hard gap bounds.

Use struct when a neural model produces scores for a sequence or structured decision and the final loss should train those scores. The recurrence is the reusable primitive; task-specific tokenization, datasets, supervision and application objectives belong in the consuming project.

A working example

import torch
from omnibias.struct.torch import soft_viterbi

emissions = torch.tensor([[0.3, -0.2], [0.1, 0.5], [0.4, 0.2]], requires_grad=True)
transitions = torch.zeros((2, 2), requires_grad=True)
value = soft_viterbi(emissions, transitions, beta=3.0)
value.backward()
assert emissions.grad is not None
assert torch.allclose(emissions.grad.sum(dim=1), torch.ones(3))

Choose the right contract

Temperature bounds depend on the finite alternatives being counted. A bound on the smoothed optimal value is not a proof that every learned decoder is correct. Tensor shapes and semiring conventions matter, and different structured families have different computational costs.

Explore and validate

The API guide contains the generated module/export inventory. Use it to find the focused implementation rather than guessing a symbol from another package. The capability map connects the primitives to larger scientific workflows.

From the main repository, run the package’s regression suite:

uv run pytest packages/omnibias-struct/tests -q

License

AGPL-3.0-or-later or commercial. See LICENSE and the licensing policy. Comply with the AGPL terms or obtain a signed commercial grant; commercial use alone does not require payment. Commercial terms describe the alternative. Previously distributed Apache editions, where applicable, retain their original grants.

Metadata

Release files for omnibias-struct 0.1.0a2

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

Source distribution (sdist)

Source distribution for omnibias-struct 0.1.0a2
File Size Uploaded Provenance Actions
omnibias_struct-0.1.0a2.tar.gz 156.3 kB With provenance Details for omnibias_struct-0.1.0a2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for omnibias-struct 0.1.0a2
File Interpreter ABI Platform Actions
omnibias_struct-0.1.0a2-py3-none-any.whl Python 3 none any Details for omnibias_struct-0.1.0a2-py3-none-any.whl

Total release size: 310.8 kB

Release files / omnibias_struct-0.1.0a2.tar.gz

Download URL omnibias_struct-0.1.0a2.tar.gz
Size 156.3 kB
Tags Source
SHA-256 checksum
How to use checksums
27fa54ab258e72358ec748fec39e0b932a4a89d52f4f293e52be36596739ae16
BLAKE2b-256 checksum
How to use checksums
df5b0a2ba8df123465efe71286f637f7e9a64e7008637a3c8735746a31cf8725
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Oct 4, 2026.

Transparency log

Release files / omnibias_struct-0.1.0a2-py3-none-any.whl

Download URL omnibias_struct-0.1.0a2-py3-none-any.whl
Size 154.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4079890df785c1e584c79f838a88d4ba91493bc9a7183cfafb646281519ad2e3
BLAKE2b-256 checksum
How to use checksums
c99770965a4fbb99f9b45be69eb0f4f70e7af028f921128546c4c0c8f44a906a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Oct 4, 2026.

Transparency log

Security for omnibias-struct 0.1.0a2

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 omnibias_struct-0.1.0a2.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 Oct 4, 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
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