Repository navigation
v1.0.0-rc2
Pre-releaseHypergraphRewriteEngine v1.0.0-rc2
Changes since v1.0.0-rc1 (2026-09-01).
The second release candidate for v1.0.0. Results are independent of the schedule in more places, malformed input is refused with a message on both devices, the GPU's replies and warnings follow the CPU's, and the defects found by the oracle fuzz and the rc2 audit are fixed.
Install
rc1 and rc2 both carry paclet version 1.0.0. If rc1 is installed, uninstall it first:
PacletUninstall["WolframInstitute/HypergraphRewriteEngine"]Then install the paclet from the GitHub release and load it:
PacletInstall["https://github.com/WolframInstitute/HypergraphRewritingEngine/releases/download/v1.0.0-rc2/WolframInstitute__HypergraphRewriteEngine-1.0.0.paclet"]
Needs["HypergraphRewriting`"]The paclet is not in the Wolfram Paclet Repository, so PacletInstall["WolframInstitute/HypergraphRewriteEngine"] does not install it.
System requirements
- Wolfram Language 13.0 or later.
- CPU engine: Linux, Windows and macOS, each on x86-64 and ARM64.
- GPU engine: Linux x86-64 and Windows x86-64, with an NVIDIA GPU. The Linux binary needs driver 580 or later (CUDA 13); the Windows binary needs driver 528 or later (CUDA 12.6). On a platform with no GPU engine, a GPU request runs on the CPU and says so.
- GPU architectures in the Linux binary: compute capability 7.5, 8.0, 8.6, 8.9 and 9.0 (Turing, Ampere, Ada, Hopper). It does not run on Blackwell cards.
- GPU architectures in the Windows binary: compute capability 7.5, 8.0, 8.6, 8.9 and 9.0. It does not run on Blackwell cards.
- The GPU engine is tested on an RTX 4090 (compute capability 8.9).
- Building from source: a C++20 compiler (GCC 10+, Clang 12+), CMake 3.14+, and for the GPU engine a CUDA Toolkit of 12.8 or later, which Blackwell needs (Linux builds use 13).
Changes since rc1
The full list is in CHANGELOG.md.
Results
"MaxStatesPerStep","MaxSuccessorStatesPerParent","MatchesPerStateRule", and"MatchesPerStep"with"UniformRandom", keep the lowest-ranked transitions. The rank is computed from each transition's identity and"RandomSeed". Transitions tied with the last one kept are kept too, so a cap can keep more than its value. The kept set is the same at any worker count and on both devices."RandomSeed" -> Automaticdraws the seed from the kernel's random generator, soSeedRandommakes an unseeded call repeatable; the same"RandomSeed"gives the same sample on both devices and at any thread count.- Under
"CanonicalizeStates" -> Full,"ExplorationProbability"draws one coin per isomorphism class. Full capture and quotient exploration sample the same classes. - The
"Step"of an event identity is the step of the state the event produces.Automaticevent identity counts an event that repeats at a later step as a new event. - In a
"CanonicalizeEvents"key list,"ConsumedEdges"and"ProducedEdges"are the input and output states with those edges marked, up to isomorphism. - Under
"CanonicalizeStates" -> Full, a state's"Step"is the least step of its class. - An empty rule set gives the initial states and no events.
- Under
"ShowGenesisEvents" -> True, quotient exploration and full capture count and pair the genesis events the same way, on both devices. - The branchial graph keeps every branchial pair. Its edge count equals
"NumBranchialEdges".
Input checking
- Malformed rules and initial states give one message and
$Failed:HGEvolve::badrule,HGEvolve::badinitandHGEvolve::steps. - An empty hyperedge
{}in a rule or an initial state, a hyperedge of more than 16 vertices and an empty left-hand side are refused on both devices. - A generated initial condition with no edges issues
HGEvolve::emptyic. - A negative cap is ignored with a warning. So is a NaN or infinite probability, rate or weight. The run uses the default.
"ExploreFromCanonicalStatesOnly"is applied only under"CanonicalizeStates" -> Full. The warning names the option the call set.- Seven options that changed nothing are removed.
New outputs and options
"StepStatistics": for each step, the number of states, the isomorphism classes, the entropy of the states over the classes and summaries of per-state invariants, computed in parallel on both devices with the same reply. The invariants include degree, component and distance measures,"WolframHausdorffDimension","WolframRicciCurvatureScalar","OllivierRicciCurvature","LargestComponentDimension"(defined for disconnected states),"OllivierMoranI"and"OllivierDegreeCorrelation"."VertexInvariants"gives the distribution of each vertex's local dimension and curvature over a step's states, with quartiles, skewness and kurtosis."StepStatisticsWeighting":"States"counts each class by its number of states,"Classes"counts each class once."StepStatisticsBranchial":"Graph"adds branchial-graph metrics per step, and"Overlap"adds vertex and edge overlap between the step's states, including cosine similarity, mutual information between states and with the initial state, and overlap by branchial distance."EventClasses": for each event under"CanonicalizeEvents", the rule applications it stands for.- Every option of
Graphis an option ofHGEvolveandHGSessionOpen. "MultiedgeStyle" -> "Merged"draws the events between two states as one edge.- Packed arrays are accepted as initial states and as
"RuleWeights".
Sessions
HGSessionOpentakes the input forms and"TargetDevice"handling ofHGEvolve.- A refused session verb reports the engine's reason in
HGSessionOpen::refused. - A steered
HGSessionStepexpands every frontier state its id stands for. - After a failed session verb, the next
"Delta"request is sent as"Full". - An aborted call (for example under
TimeConstrained) ends its engine worker, and the next call gets its own reply. A session held by that worker issuesHGSessionStep::expired.
GPU
- The GPU reports the same warnings as the CPU. It lists states, events and relation endpoints as the CPU does.
- A run sized past the device returns partial work with
HGEvolve::overflow. Full relation maps and full indices are reported. - A session opened on a reused engine fits that engine. A continuation matches through every edge.
- Left-hand edges of up to 16 distinct vertices are accepted.
Robustness
- A reply larger than the available memory gives an error instead of ending the worker process.
- A warning that quotes bytes from the request which are not valid UTF-8 shows each such byte as
\xNN.
Known limitations
- Under quotient exploration (
"CanonicalizeStates" -> Fullwith"ExploreFromCanonicalStatesOnly" -> True), caps and"TransitionRate"treat transitions related by an automorphism of the state as one, so on states with symmetry they can keep more transitions than full capture keeps. The result is the same at any thread count and on both devices. - The per-state
"StepStatistics"invariants are computed during the evolution, in parallel, on both devices. The per-step summaries and the"StepStatisticsBranchial"metrics are computed after the evolution on host threads, also under"TargetDevice" -> "GPU". - Under
"Delivery" -> "Delta", the GPU engine and the CPU's quotient reconstruction send the whole graph, with anOptionSkippedwarning.
Performance
Measured on one machine: Intel i9-14900K, NVIDIA RTX 4090, WSL2 (Linux 6.18), Release builds of v1.0.0-rc1 and v1.0.0-rc2 with statistics off. Each time is the median of five runs, rc1 and rc2 alternating; the spread in brackets is (max − min) / median over the five. State, event, causal and branchial counts are the same in rc1 and rc2 for every row.
| Workload | Threads | rc1 ms | rc2 ms | rc1 / rc2 |
|---|---|---|---|---|
| wpp, depth 7, full | 1 | 1233 (1%) | 506 (4%) | 2.4 |
| wpp, depth 7, full | 32 | 283 (9%) | 50 (12%) | 5.6 |
| wpp, depth 8, quotient | 1 | 8027 (2%) | 2265 (4%) | 3.5 |
| wpp, depth 8, quotient | 32 | 2211 (5%) | 242 (20%) | 9.1 |
| multirule, depth 7, quotient | 1 | 314 (10%) | 107 (5%) | 2.9 |
| multirule, depth 7, quotient | 32 | 206 (17%) | 30 (42%) | 6.8 |
| allfour, depth 6, quotient | 1 | 4857 (3%) | 1632 (2%) | 3.0 |
| allfour, depth 6, quotient | 32 | 1152 (2%) | 195 (24%) | 5.9 |
| bigpath n128, depth 3, quotient | 1 | 2175 (6%) | 78 (4%) | 28.0 |
| bigpath n128, depth 3, quotient | 32 | 257 (7%) | 21 (53%) | 12.2 |
| cycle4, depth 6, full | 1 | 264 (3%) | 117 (7%) | 2.3 |
| cycle4, depth 6, full | 32 | 48 (15%) | 15 (49%) | 3.2 |
| wolftri, depth 6, full | 1 | 396 (2%) | 190 (3%) | 2.1 |
| wolftri, depth 6, full | 32 | 81 (9%) | 21 (32%) | 3.9 |
On the GPU, the resident kernel takes 12 ms on cycle4 depth 6 full (rc1 47 ms) and 16 ms on wolftri depth 6 full (rc1 76 ms). rc1's GPU engine stops at its state capacity on wpp and allfour, and does not finish multirule depth 7 or bigpath depth 3 within 60 s; rc2 runs all of them (wpp depth 8 quotient in 267 ms, allfour depth 6 quotient in 196 ms).
Through the hg_evolve worker, a counts-only reply for wpp depth 8 quotient takes 284 ms (rc1 2821 ms). The same run with "StepStatistics" takes 1845 ms. A graph reply (states, events, causal and branchial edges) for wpp depth 6 quotient takes 41 ms (rc1 45 ms).
v1.0.0 follows this release candidate. The release is tagged v1.0.0-rc2; the paclet and libraries carry version 1.0.0.