Skip to content

Issue 716 regression testing for growth and stdp simulation - #950

Open
crobin5 wants to merge 2 commits into
crobin5Devfrom
issue-716-regression-testing-for-growth-and-stdp-simulation
Open

Issue 716 regression testing for growth and stdp simulation#950
crobin5 wants to merge 2 commits into
crobin5Devfrom
issue-716-regression-testing-for-growth-and-stdp-simulation

Conversation

@crobin5

@crobin5 crobin5 commented Aug 1, 2026

Copy link
Copy Markdown

Closes #716

Description

Regression testing the growth -> STDP path turned up a gap in the feature itself. Deserialization restored whatever classes the checkpoint contained, so loading a growth checkpoint (ConnGrowth with AllDSSynapses) into an STDP configuration overwrote the configured ConnStatic/AllSTDPSynapses and silently continued the run as a growth simulation. A grown network could be saved and reloaded, but it could not actually serve as the input for an STDP simulation, so there was nothing meaningful to regression test yet.

Topology import.
Serializer::deserialize() now detects when a growth checkpoint is loaded into a non-growth configuration. In that case, it builds the Connections/AllEdges objects named in the current configuration file, calls setupEdges() and loadParameters() so per-edge parameters such as the STDP constants come from that file, and copies each active edge's source, destination, weight, and type across via addEdge(). The new subgraph is installed through Model::setConnections() and its edge index map rebuilt. Only topology is carried over. The restored vertices, layout, and global state (RNG, simulation step) are left as loaded from the checkpoint. When the configuration does name ConnGrowth, deserialization behaves exactly as before.

Regression test.
test-growth-stdp-source.xml runs a short growth simulation on the test-small grid, with a start radius large enough to grow a network of 360 edges, serialized with -s. test-growth-stdp.xml then runs an STDP simulation with -d against that checkpoint. Its graph file has no edges, so every edge in the run comes from the imported network. The output is compared against a new known-good file. Because the second run consumes the first run's checkpoint, this is a sequential pipeline, and it runs after the parallel single-simulation tests in both RunTests.sh and tests.yml.

Unit tests.
The regression test tells you that simulation output changed. These tell you whether the import mechanism itself is still correct. Both stages serialize their final state, and the tests assert on the checkpoints. growthStdpSourceTest checks that the growth checkpoint holds a ConnGrowth network with at least one edge, so the second stage cannot quietly become vacuous. growthStdpImportTest checks that the STDP run's own checkpoint reports ConnStatic and AllSTDPSynapses with exactly the edge count the growth run produced. As with the existing serialization tests, each stage is a separate executable because running two simulations against the same singleton instances segfaults; build/run_growth_stdp_test.sh sequences them, and CI runs it before the regression pipeline.
The unit tests were confirmed to fail when the feature is broken: with the import disabled, growthStdpImportTest reports the network as ConnGrowth/AllDSSynapses instead of the configured STDP classes.

Checklist (Mandatory for new features)

  • Added Documentation
  • Added Unit Tests

Testing (Mandatory for all changes)

  • GPU Test: test-medium-connected.xml Passed
  • GPU Test: test-large-long.xml Passed

The full CPU regression suite matches its known-good output, and the new unit tests pass.
On the GPU, test-medium-connected.xml matches the known-good output on 92 of its 93 matrices. Neuron_717 differs by a single spike timestamp, shifted by 144 steps. This does not seem to be caused by these changes. Reverting Serializer.cpp, Model.h, and Model.cpp to the parent commit and rerunning reproduces the identical mismatch.

Christopher Pace Robinson added 2 commits July 17, 2026 01:04
…ion improvements

- Introduced a new regression test for the growth-to-STDP integration, which serializes a grown network and deserializes it for STDP simulation.
- Added configuration files for both the growth simulation () and the STDP simulation ().
- Implemented a new method  in the  class to replace the connections subgraph during deserialization.
- Updated the  class to handle the import of the grown topology into a new connections object.
- Enhanced the testing workflow to include the new regression test and its verification process.
- Added expected output files for the STDP simulation results.
- Updated documentation to reflect the new testing capabilities and usage instructions.
The regression test compares simulation output, which tells you that something
changed but not whether the import mechanism itself is still correct. These
tests serialize both stages of the pipeline and assert on the checkpoints: the
STDP run must keep the classes named in its own configuration file rather than
the ones restored from the growth checkpoint, and must receive every edge the
growth run produced.

Each stage is a separate executable because running two simulations against the
same singleton instances segfaults, following the existing serialization tests.
run_growth_stdp_test.sh sequences them, and CI runs it before the growth-to-STDP
regression pipeline.
@crobin5 crobin5 self-assigned this Aug 1, 2026
@crobin5
crobin5 requested a review from stiber August 1, 2026 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant