Avenstride ResearchPaper 004July 2026

Two-axis validation for generated schematics

Electrical equivalence and geometric acceptance answer different questions. A generated design must pass both.

Abstract

A generated schematic can preserve every electrical connection and still contain unusable geometry. It can also look orderly while introducing a short, open, or missing junction. We define two independent validation axes. The electrical axis compares canonical connectivity graphs. The geometric axis checks grid alignment, symbol clearance, bounds, junction marks, and source round-trip behavior.

Three full-sheet reconstruction tests removed and regenerated 40, 102, and 214 original wires. All three generated sheets reproduced the expected graph hash. Separate multi-point capability checks passed 18 of 22 cases. The four remaining cases contained three symbol collisions and one off-grid route on the largest sheet. The result shows that graph equality is necessary, but it cannot serve as the only acceptance condition.

Keywords

schematic validation, graph equivalence, geometric verification, full-sheet reconstruction, KiCad

1 Introduction

Verification for generated engineering artifacts must match the structure of the artifact. A schematic is both an electrical graph and a spatial document. These views contain different failure modes.

Electrical verification asks whether pins remain in the correct nets. Geometric verification asks whether wires follow legal and readable paths. One answer cannot replace the other.

We define a two-axis validation method for generated KiCad schematics. The first axis proves graph equivalence. The second axis checks geometric and serialization requirements.

The method supports both candidate-level validation and full-sheet reconstruction. It produces explicit error types and graph differences. These outputs separate electrical defects from geometric defects.

2 Electrical equivalence

The electrical validator builds a canonical graph from the parsed schematic. Nodes represent pins, wire points, junctions, and attached labels. Resolved nets define graph partitions.

Candidate insertion creates a new scene. The graph builder resolves the new scene without using the candidate score. The validator then checks required anchor reachability.

Electrical conditionE = anchorsConnected(Gnew) AND hash(Gnew) = hash(Gexpected)The hash represents canonical pin-to-net membership, not wire shape.

Anchor reachability detects an incomplete connection. Graph equality detects unintended shorts, net splits, and changes outside the edited route. The two checks provide local and global evidence.

Mid-wire anchors require an explicit junction dot. A line crossing is not automatically an electrical connection. The validator therefore checks junction semantics as part of electrical acceptance.

3 Geometric and source acceptance

Geometric checks operate on candidate points and segments. Interior route points must align with the active schematic grid. Every point must stay inside an expanded working boundary.

Segment clearance checks detect contact with symbol bodies. Pin endpoints are handled separately so that legal connections do not appear as collisions. Text overlap remains a preference penalty rather than an electrical failure.

Source acceptance tests the actual CAD representation. The writer inserts the candidate into schematic source. The parser reads that generated source again and rebuilds the graph.

A parse failure produces a serialization error. A graph mismatch after the round trip also produces a serialization error. This check prevents an in-memory success from hiding a broken output file.

Figure 1Independent validation axes
Axis AElectrical equivalence

anchor reachability, net partition, junction semantics, graph hash

AND
Axis BGeometric acceptance

grid alignment, symbol clearance, bounds, serialization

DecisionAccept only when both axes pass
Graph equivalence is necessary but not sufficient. A route can preserve every net and still be unsuitable for use.

4 Acceptance semantics

The system treats electrical and geometric results as independent evidence. A candidate is accepted only when both axes pass. Preference scoring occurs after this decision.

Final decisionaccept = E AND G AND RE is electrical equivalence. G is geometric acceptance. R is source round-trip acceptance.

Error ordering does not erase later evidence. The report retains every detected failure and the changed-net details. A primary status supports sorting, while the full list supports diagnosis.

This structure also protects model evaluation. A learned preference score cannot convert a failed candidate into a valid one. Invalid candidates remain useful as hard-negative examples.

5 Full-sheet protocol

Full-sheet evaluation begins with a parsed source schematic. The experiment records the expected graph hash and all original wires. It then removes the route geometry that belongs to extracted wiring tasks.

The router reconstructs point-to-point and multi-anchor nets. Multi-anchor routes can contain deliberate trunks and required junctions. The writer produces a complete generated schematic.

The generated file is parsed again. Its graph hash is compared with the original graph hash. Coverage records the number of original, removed, routed, and generated wires.

A separate capability audit examines representative multi-point tasks. It records anchor count, required junctions, segment count, and geometric validation state. This audit can expose local defects inside a graph-equivalent sheet.

Figure 2Full-sheet reconstruction results
CaseOriginal wiresTasksGenerated wiresGraphCapability checks
Sheet A402949Match2 / 2
Sheet B10224104Match9 / 9
Sheet C214109212Match7 / 11
Residual errors

Sheet C preserved its graph, but four multi-point capability checks found three symbol collisions and one off-grid route.

All generated sheets matched the expected connectivity hash. Separate geometric checks still found actionable defects.

6 Results

The first sheet contained 40 original wires and 29 reconstruction tasks. The generated sheet contained 49 wires. Its connectivity hash matched the expected hash.

The second sheet contained 102 original wires and 24 reconstruction tasks. The generated sheet contained 104 wires. Its connectivity hash also matched.

The largest sheet contained 214 original wires and 109 reconstruction tasks. The generated sheet contained 212 wires. It reproduced the expected connectivity hash.

Different wire counts do not imply different connectivity. One route can use more or fewer segments than the human route. The graph comparison correctly ignores this geometric representation difference.

The capability audit passed all two cases on the first sheet and all nine cases on the second sheet. It passed seven of eleven cases on the largest sheet. Three failures were symbol collisions, and one failure was off-grid geometry.

7 Failure analysis

The residual failures demonstrate the value of the second axis. A segment can cross a symbol body without changing which pins share a net. The graph hash remains correct in this case.

An off-grid route has the same property. Its points can connect the correct anchors while violating the document grid. Electrical equivalence does not describe editability or visual quality.

The largest sheet also has greater local density and more multi-anchor structures. These conditions increase the number of geometric interactions. Candidate generation must improve in these regions.

The validator turns these observations into typed evidence. A collision points to clearance or search-space changes. An off-grid error points to coordinate normalization or grid-aware generation.

8 Limitations

A graph hash depends on the correctness of the parser and connectivity builder. Unsupported label or hierarchy semantics can weaken the proof. Parser coverage must grow with the benchmark.

Symbol bounding boxes approximate detailed drawing geometry. Conservative boxes can reject a visually acceptable route. Loose boxes can miss a real collision.

The full-sheet sample contains three schematics. It demonstrates distinct failure classes but cannot estimate a population rate. More sheets and repeated configurations are required.

Geometric acceptance is not the same as engineer preference. A passing route can still be difficult to read. Preference evaluation remains a third layer after hard validation.

9 Conclusion

Generated schematics require proof in both graph and document space. Connectivity hashes provide strong electrical evidence. Geometric and source checks provide a separate acceptance boundary.

The full-sheet tests reproduced all three expected graphs. Independent capability checks still found four local defects. A reliable system must report and resolve both kinds of result.