Skip to main content

engin-graph

Graph embedding + calibrated ranking over structured objects. The shared graph engine of the engin suite — extracted from engin-pathway so that any domain whose objects are graphs can rank candidates with an honest interval, not just metabolic routes.

The problem it solves

Several domains have the same shape: you have many candidate structures, you can only test a few, and the thing that decides quality is often a single bad part rather than an average. Metabolic routes are tanked by one thermodynamically-uphill step. Polymers are tanked by one weak bond. A mean-pooled representation smooths exactly the signal that matters.

engin-graph gives you a message-passing embedding with min/max pooling (so the worst node survives into the representation), a ridge head, and a split-conformal interval reusing engin_core — so every domain in the suite speaks the same calibrated-uncertainty vocabulary.

Use it

from engin_graph import GraphRanker, best_of_k_regret, spearman

ranker = GraphRanker(d_in=5, lam=1.0, embed_seed=0)
ranker.fit(train_objects, train_labels)
ranker.calibrate(cal_objects, cal_labels, level=0.90)

scores = ranker.predict(test_objects)
lo, hi = ranker.predict_interval(test_objects)

Any object works as long as it exposes node_features() -> (n_nodes, d_in) and graph() -> nx.Graph. That's the GraphLike protocol; pass a custom GraphFeaturizer if your objects expose something else.

What's in it

Piece What it does
GraphFeaturizer / GraphLike The protocol: domain object → node features + graph
GCNEmbedder 2-layer message-passing GCN, mean/max/min pooling
ConformalRankingHead Ridge on the embedding + split-conformal interval
GraphRanker The two composed — the usual entry point
spearman, best_of_k_regret Ranking metrics, for reporting against a baseline

Milestone status

M0. The GCN weights are random and untrained — a random-weight GCN plus a ridge head captures graph structure with zero backprop, which is enough to prove a ranking loop beats its domain baseline. This is a deliberate stand-in, not an oversight: pulling PyTorch for an untrained model would violate the suite's light-default-path rule (ADR 0002).

M1 swaps in a trained GNN on PyTorch Geometric behind an optional extra. The object-as-graph interface stays the same, so domain layers won't change.

Do not read M0 ranking numbers as a claim about real-world accuracy.

Consumers

  • engin-pathway — metabolic route manufacturability (stage [3])
  • engin-materials — structure → property (planned)

License

Apache-2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

engin_graph-0.1.1.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

engin_graph-0.1.1-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file engin_graph-0.1.1.tar.gz.

File metadata

  • Download URL: engin_graph-0.1.1.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for engin_graph-0.1.1.tar.gz
Algorithm Hash digest
SHA256 122abbd341533212f9e7036f10fc2c3fb9a12e752bf8bcc31cfd480badcd6f99
MD5 e93d8a646ded3140fc49eb78e5c89fe5
BLAKE2b-256 c91a4f11596cb13cbbc9aab5aae5f5873a98e066b6353e32e3afbee376007b7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for engin_graph-0.1.1.tar.gz:

Publisher: release.yml on enginbio/engin-suite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file engin_graph-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: engin_graph-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for engin_graph-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a40d2ddf54c04460dac943188b752332e3586eeadb6a4f367b7e7dff2d6c2259
MD5 5510df5ae1bfdf6fa55c39452947bcd8
BLAKE2b-256 0c289f8b339dc4de251ab0d1024f35aa1c65d6fab96128b50dbc2e8360f57a3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for engin_graph-0.1.1-py3-none-any.whl:

Publisher: release.yml on enginbio/engin-suite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page