Spaces:
Running
From Prediction to Evidence: A Queryable Evidence Graph for GENCO
Participant: Sarnavi Mahesh
Contact: sarnavi_mahesh@hotmail.com , sarnavi.mahesh@vito.be
Code: https://github.com/sarnavi-mahesh/genco-evidence-graph.git
Summary
A GENCO prediction is usually distributed across prediction tables, physical metrics, embedding artifacts, and run metadata. A grid planner or operator examining an individual result must reconstruct these sources manually to determine how the prediction was produced, whether it satisfies recorded physical checks, and whether it resembles scenarios represented in the training data. I introduce GENCO Evidence Graph, a queryable evidence layer that links a GENCO prediction to power-balance and operating-limit checks, final-embedding comparisons with training scenarios, reproduction evidence, and machine-readable provenance. It preserves the distinction between physical consistency, representational similarity, reproducibility, and provenance rather than combining them into a single confidence score.
The demonstration workflow uses the published GENCO case-14 seed-42 checkpoint and gridfm-graphkit , reproduces inference over the complete 15,000-scenario test split, and constructs a validated RDF/PROV-O graph for an individual predictions. However the evidence graph package can be used for other benchmark networks and seeds that are in GENCO portfolio.
The package can be operated through a command-line interface or typed Python API. The resulting evidence can be inspected through named SPARQL queries and source-bound visual reports. Because the evidence is machine-queryable, the same interface could also support a future LLM-based grid co-planner. An agent could retrieve the evidence associated with a GENCO prediction and cite its identifiers, measurements, and limitations. This is a potential application of the evidence layer. The present work does not depend on an LLM and is directly usable by a human grid planner or operator.
Figure 1. Implemented GENCO Evidence Graph workflow. Identified model, data, configuration, and source inputs produce a GENCO prediction. The prediction is linked to physical evidence, final-embedding reference comparisons, reproduction results, and provenance. A grid planner or operator can inspect the resulting evidence through named SPARQL queries, visual reports, the command-line interface, or the typed Python API. The dashed path shows a prospective MCP and LLM co-planner interface that is not implemented in the present work.
Motivation
A GENCO evaluation produces several useful artifacts, but no single artifact provides the evidential context of an individual prediction. Prediction and residual values reside in tables, embeddings in separate high-dimensional artifacts, execution details in run metadata, and model and data identities in files and manifests. A grid planner or operator must determine whether these records belong to the same run before interpreting them together.
Parquet and SQL are well suited to retrieving values once the relevant tables, schemas, and joins are known. Row retrieval alone, however, does not establish that a residual, embedding, checkpoint, configuration, and prediction came from one coherent execution. It also does not identify the policy used to compare reproduced outputs, distinguish an unreported check from a zero violation count, or show when historical metadata is insufficient to prove a claimed lineage.
The central challenge is therefore not access to individual values. It is assembling heterogeneous records into a bounded evidence object while preserving their identities, relationships, interpretation rules, and limitations. Before emitting a graph, GENCO Evidence Graph verifies artifact hashes, run compatibility, dataset splits, mandatory comparison fields, and the declared tolerance policy for reproduction of results. It then represents the supported relationships explicitly and refuses to infer provenance links that the available records do not establish.
This allows a grid planner or operator to investigate a prediction through connected questions:
- Which checkpoint, dataset, configuration, and software produced it?
- Was the prediction reproduced under an identified comparison policy?
- What power-balance residuals were observed, and where was the maximum located?
- Which operating-limit categories were checked, and which were unavailable?
- Which scenarios are closest in GENCO's learned representation?
- Which provenance relationships are verified?
- Which parts of the historical model lineage remain unknown?
A relational implementation could encode many of the same controls if it were designed for that purpose. The contribution is a reproducible evidence-construction procedure, a common semantic model for the resulting relationships, validation rules for that model, and reusable queries and visual reports bound to identified source artifacts.
GENCO Evidence Graph addresses the following research question:
Can physical, representational, and provenance evidence for a GENCO prediction be linked and queried without altering the underlying GENCO inference workflow?
The objective is not to assign a universal trust score. Instead, the graph records several evidence types that answer different questions and allows the user to inspect each one independently.
A future tool-using grid co-planner is one potential consumer of this evidence. For example, an agent could call GENCO to obtain a prediction and then query GENCO Evidence Graph using the returned prediction identifier. However, the evidence graph is independently useful to human users and software applications without an LLM.
Method
Evaluation setting
| Item | Setting |
|---|---|
| Power system | IEEE 14-bus OPF |
| GENCO model | Published seed-42 checkpoint |
| OpenGridFM execution | gridfm-graphkit at pinned commit f104900... |
| Training partition | 270,000 scenarios |
| Validation partition | 15,000 scenarios |
| Test partition | 15,000 scenarios |
| Representation | Final 384-dimensional bus and generator embeddings |
| Reference comparison | Euclidean distance after deterministic scenario-level pooling |
| Physical evidence | Power-balance residuals and reported voltage, active-power, and reactive-power limit checks |
| Evidence representation | RDF/PROV-O |
| Structural validation | SHACL |
| Retrieval | Named SPARQL queries exposed through CLI and Python APIs |
The published training, validation, and test scenario identities are kept separate. Held-out test predictions are compared only with the 270,000-scenario training-reference corpus.
1. Reproduce GENCO inference
We use the published case-14 seed-42 checkpoint, normalizer, dataset partitions, and Graphkit configuration. The Graphkit checkout is pinned to commit f104900245cba26d1380037eea562cf633a97484.
An embedding-enabled run evaluates all 15,000 test scenarios and exports:
- bus predictions;
- generator predictions;
- physical residuals and violation metrics;
- final bus embeddings;
- final generator embeddings;
- run and environment metadata.
A second run processes the same test population without embedding extraction. This run provides an independently recorded reproduction of the predictions used to construct the evidence.
Each run produces a manifest containing model, data, configuration, source, environment, and output identities. Files are identified by SHA-256 digests rather than by path alone.
2. Verify prediction equivalence
Before constructing an evidence graph, the workflow compares the reproduced predictions with the embedding-enabled target run.
The comparison is keyed by scenario, entity type, and entity identifier. It verifies:
- run and manifest compatibility;
- checkpoint identity;
- normalizer identity;
- configuration identity;
- dataset and split identity;
- Graphkit source identity;
- prediction schemas;
- mandatory bus and generator fields;
- approved numerical tolerances.
The comparison policy is recorded as genco-case14-baseline-equivalence-v1. The policy itself has an identifier and hash so that a changed tolerance cannot silently be presented as the same verification.
3. Construct the training-reference embedding index
GENCO is run over the complete 270,000-scenario training partition to produce final bus and generator embeddings. These embeddings are normalized into keyed records containing:
- scenario identifier;
- entity type;
- entity identifier;
- embedding stage;
- dataset split;
- fixed 384-dimensional embedding vector.
Bus and generator embeddings are pooled deterministically by scenario. For a held-out prediction, GENCO Evidence Graph computes Euclidean distance to each training-reference representation and records the five nearest scenarios.
This distance measures proximity in the selected learned representation. It is not treated as a calibrated uncertainty estimate or as proof that two scenarios are physically equivalent.
4. Record physical evidence
For each selected prediction, the workflow records:
- mean power-balance error;
- maximum power-balance error;
- bus index associated with the maximum error;
- mean active-power residual;
- mean reactive-power residual;
- voltage-limit violation count;
- active-power violation count;
- reactive-power violation count;
- the categories of evidence that were actually reported.
Reporting coverage is represented separately from violation counts. An unavailable check is therefore not interpreted as a zero by the evidence graph.
5. Construct the evidence graph
The graph links the prediction to:
- its inference run;
- the model checkpoint;
- the test scenario and dataset split;
- bus and generator prediction artifacts;
- final-embedding artifacts;
- physical evidence;
- nearest training-reference scenarios;
- the reproduction run;
- the comparison policy;
- available training metadata;
- artifact paths and SHA-256 digests.
The graph uses RDF and PROV-O to represent entities, activities, and supported provenance relationships. Project-specific terms describe prediction evidence, physical measurements, embedding comparisons, and provenance limitations.
GENCO Evidence Graph does not infer missing historical relationships. Associated training metadata is represented as associated evidence unless the available records establish that the training run produced the checkpoint.
6. Validate and query the graph
SHACL shapes check that required evidence structures, datatypes, units, artifact identities, and provenance relationships are present.
Named queries expose the principal questions without requiring the user to write SPARQL:
checkpointassociated-training-evidencereference-casesembedding-distanceresidualsviolationsavailable-residual-typesavailable-violation-typesreproductionhigh-residual-distance
The same implementation is available through the genco-evidence CLI and typed Python functions. Visual reports are generated from validated graphs and source artifacts whose hashes match those recorded in the graph.
Results
GENCO predictions were reproduced across the complete test split
The reproduction comparison covered 210,000 bus rows and 68,484 generator rows from all 15,000 held-out scenarios.
The largest observed voltage-field difference was 1.788 × 10⁻⁶, below the approved 2.000 × 10⁻⁶ limit. The largest power or residual difference was 1.667 × 10⁻³, below the approved 2.500 × 10⁻³ limit.
Figure 2. Maximum observed differences between the reproduced and evidence-producing GENCO runs as fractions of their approved absolute tolerances. Both field groups passed the declared policy. This establishes numerical reproduction under that policy. It is not a claim of byte-for-byte equality between floating-point outputs.
The reproduction check is completed before the evidence graph is assembled. A graph therefore cannot report successful reproduction merely because a status value was written into an input file. The underlying artifacts, manifests, field coverage, and observed differences are checked during evidence construction.
A prediction becomes an inspectable evidence object
Scenario 215429 illustrates the evidence attached to one held-out GENCO prediction.
Figure 3. Evidence overview for held-out scenario 215429. "Validated" refers to artifact verification and SHACL conformance of the evidence graph. It does not certify the prediction as operationally safe. The training-link warning records that the available historical metadata does not prove which training run produced the published checkpoint.
For this scenario:
- the nearest training reference is scenario
13423; - the pooled final-embedding distance is
0.15744; - mean power-balance error is
0.000766MVA; - maximum power-balance error is
0.001923MVA at zero-based bus index0; - one reactive-power limit violation is recorded;
- no voltage or active-power violation is recorded;
- reproduction passed under the declared comparison policy;
- the checkpoint hash was verified;
- the evidence graph passed SHACL validation.
These observations answer different questions. The embedding distance describes similarity in GENCO's learned final representation. The residual and violation measurements describe recorded physical properties of the prediction. The reproduction result concerns numerical agreement between identified runs. SHACL concerns the structure of the evidence graph.
None of these results is presented as a general probability that the prediction is correct.
Physical evidence localizes the recorded discrepancy
Figure 4. Power-balance error across the 14 buses in scenario 215429. The dashed line marks the scenario mean. Bus 0 has the largest recorded error. Bus indices follow the zero-based identifiers in the prediction artifact.
The mean PBE for scenario 215429 is 0.000766 MVA. The maximum is 0.001923 MVA at bus 0. Recording both values preserves the distinction between the average scenario-level discrepancy and its largest bus-level concentration.
Figure 5. Available operating-limit checks for scenario 215429. One reactive-power violation is recorded, while the reported voltage and active-power categories contain no detected violation. A zero applies only to categories explicitly reported by the evidence graph.
The evidence graph records both the reported categories and their counts. This prevents an absent category from being presented as a successful check.
Embedding evidence retrieves analogous training representations
Figure 6. Five nearest training scenarios to held-out scenario 215429 in pooled final-embedding space. Lower Euclidean distance indicates greater similarity under this representation and pooling policy. It does not establish physical equivalence or calibrated predictive confidence.
The closest training scenario is 13423 at distance 0.15744. The next four distances range from 0.17563 to 0.17892.
Returning reference identifiers rather than only a scalar distance makes the comparison inspectable. A grid planner or operator can identify which training scenarios support the statement that a prediction is relatively close to previously represented cases.
The interpretation remains limited. A close final embedding does not prove that the physical state, operating conditions, or model error are equivalent.
The graph preserves both evidence and uncertainty about provenance
Figure 7. Curated view of the validated 336-triple evidence graph for scenario 215429. The graph links the prediction to its inference artifacts, physical evidence, embedding evidence, nearest references, and reproduction check. The checkpoint's associated training metadata is represented separately from verified checkpoint-production lineage.
The available public training metadata is authenticated, co-published with the checkpoint, and configuration-compatible. However, it does not record the checkpoint hash, and the historical training commit is unavailable.
GENCO Evidence Graph therefore records the training run as associated evidence while setting checkpoint-production identity as unverified. It does not claim that the available run produced the checkpoint.
This negative provenance result is intentional. Traceability requires recording what remains unknown rather than completing a causal chain from circumstantial metadata.
Contrasting cases show why evidence types should remain separate
Scenario 101402 provides a second illustrative case.
*Figure 8. Evidence overview for held-out scenario 101402. Compared with scenario 215429, this example has a smaller nearest-reference distance and no recorded operating-limit violation, while retaining a bus-level power-balance error at bus 8. *
Scenario 101402 has:
- nearest training reference
28086; - embedding distance
0.12257; - mean PBE
0.000652MVA; - maximum PBE
0.001721MVA at bus8; - no recorded voltage, active-power, or reactive-power violation.
This scenario is closer to its nearest training reference than scenario 215429 and has no recorded operating-limit violation. Its maximum power-balance error is nevertheless of a similar order.
The comparison involves only two illustrative scenarios and is not a population-level statistical analysis. It demonstrates why embedding distance, residual magnitude, and constraint violations should remain separate evidence types rather than being collapsed into one confidence score.
Defined queries make the evidence directly inspectable
A grid planner or operator can use the generated figures for a concise overview. Technical users can retrieve the same evidence through the CLI or Python API.
| Question | GENCO Evidence Graph response |
|---|---|
| Which checkpoint produced this prediction? | Checkpoint identifier and SHA-256 through the recorded inference lineage |
| Has the prediction been reproduced under an identified comparison policy? | Run identities, environment identity, comparison policy, tolerances, and observed maxima |
| Which training cases are nearest? | Ranked training scenario identifiers and embedding distances |
| Where is the largest physical residual? | Mean and maximum PBE with the associated bus index |
| Which constraint categories were checked? | Available categories represented separately from violation counts |
| Which artifacts support the result? | Paths, artifact types, and SHA-256 identities |
| Is checkpoint-production lineage established? | Association status, evidence basis, and explicit provenance limitations |
Named queries retrieve evidence already stored in the graph. They do not rerun GENCO or recompute the physical metrics. This distinction allows a user to inspect a recorded result without silently initiating a different analysis.
The graph can also support software applications. A dashboard, planning workflow, or future agent can call the same typed interfaces and receive structured evidence rather than parsing figures or free-form text.
Visual reports remain bound to their sources
The showcase figures are presentation artifacts rather than independent provenance claims. Before rendering them, the visualization command:
- validates the RDF graph with SHACL;
- verifies the checkpoint hash recorded in the graph;
- verifies the prediction-table hashes;
- checks the comparison policy identity;
- records the generated figure identities in a figure manifest.
Each figure footer includes abbreviated source hashes. This makes it possible to identify which validated graph and prediction artifacts support the view.
Scope of the evidence
GENCO Evidence Graph supports inspection of recorded evidence rather than certification of a prediction. Power-balance residuals and reported constraint checks cover specific physical properties, not every operating condition or contingency.
Final-embedding distance measures similarity under the selected representation and pooling policy. It is not a calibrated confidence score, an out-of-distribution probability, or proof of physical equivalence.
SHACL validates the structure of the evidence graph, while provenance records supported artifact relationships. Neither establishes the correctness of every upstream value or recovers historical lineage that was not published.
The current demonstration uses the IEEE 14-bus system and the published seed-42 checkpoint.
Conclusion
GENCO Evidence Graph turns an individual GENCO prediction into a queryable evidence object. It connects the prediction to physical checks, final-embedding reference comparisons, artifact identities, reproduction evidence, and explicit provenance limitations. On the published case-14 evaluation, the underlying GENCO behavior was reproduced across all 15,000 held-out scenarios before the evidence graph was constructed. The comparison covered 210,000 bus rows and 68,484 generator rows under a hash-identified tolerance policy.
The principal contribution is a structured separation of evidence types that answers different aspects of operator trust on predictions. A grid planner or operator can inspect this evidence directly through generated figures and named queries. Researchers , engineers, and software applications can access the same records through the CLI and typed Python API. The result is a human-usable and machine-queryable evidence layer for GENCO predictions. It supports informed inspection while preserving the boundary between recorded evidence and conclusions that the evidence does not establish.
Next Steps
We are also extending the workflow from final embeddings to layer-by-layer latent representations for a selected scenario cohort. This work captures internal bus and generator trajectories, derives movement and directional metrics, and records the resulting artifacts and provenance. The evidence graph for latent representations and internal trajectories is not battle tested and remains separate from the claims and results reported here. However you can detailed report on the metrics of internal trajectories in the internal-trajectory-embeddings branch of the repo :https://github.com/sarnavi-mahesh/genco-evidence-graph/tree/internal-trajectory-embeddings







