A stateless Python library for morphogenetic computing evaluation
Project description
morphe-metrics
A stateless Python library for morphogenetic computing evaluation.
Venkatesh Swaminathan · Nexus Learning Labs, Bengaluru Paper · Dashboard · Maya-Morphe Series
cl-metrics measures what happened. maya-metrics measures how it felt. morphe-metrics measures where it went.
What is this?
morphe-metrics is the first open-source Python library for evaluating field-guided connectivity in morphogenetic neural networks — systems whose topology self-organises via bioelectric-analog voltage gradient signals.
The primary metric is Edge-Field Concordance (EFC): the Pearson correlation between bioelectric field strength at candidate neighbour nodes and edge formation probability. EFC was introduced and first measured in:
Swaminathan, V. (2026). Maya-Morphe P3: Axon. DOI: 10.5281/zenodo.20102536
Any researcher building a morphogenetic computing experiment can drop in morphe-metrics and immediately have a principled, citable way to measure field-guided connectivity.
Installation
pip install morphe-metrics
Or from source:
git clone https://github.com/venky2099/morphe-metrics
cd morphe-metrics
pip install -e .
Quick start
from morphe_metrics import compute_efc, interpret_efc, efc_summary
# Two arrays: field strength at candidate nodes, edge formation probability
field = [0.8, 0.3, 0.9, 0.1, 0.7]
probs = [0.7, 0.2, 0.85, 0.15, 0.6]
efc = compute_efc(field, probs) # 0.999 — strongly guided
label = interpret_efc(efc) # 'strongly_guided'
info = efc_summary(field, probs) # full dict
EFC Interpretation
| EFC range | Label | Meaning |
|---|---|---|
| < -0.05 | pathological | Edges form strongly against the field |
| [-0.05, -0.001] | exploratory | Growth-cone analogy; biologically consistent |
| [-0.001, 0.001] | random | No field guidance detectable |
| (0.001, 0.5] | guided | Field-guided pathfinding |
| > 0.5 | strongly_guided | Strong committed pathfinding |
P3 empirical baseline: EFC = -0.009 to -0.019 (exploratory) P4 target: EFC > 0 (field-guided)
Epoch tracking
from morphe_metrics import EFCTracker
tracker = EFCTracker()
for epoch in range(1, 251):
# ... training step ...
tracker.update(epoch, field_at_candidate, edge_probs)
tracker.save_csv("logs/efc_trajectory.csv")
print(tracker.summary())
# {'n_epochs': 250, 'final_efc': 0.043, 'final_label': 'guided',
# 'p4_achieved': True, 'first_positive': 187, ...}
Topology metrics
from morphe_metrics import topology_delta, edge_retention_rate, field_alignment_score
# Net topology change
d = topology_delta(edges_before=1000, edges_after=1315)
# {'delta': 315, 'delta_frac': 0.315, 'direction': 'growth'}
# Fraction of formed edges that persist > k steps
rate = edge_retention_rate(formation_times, removal_times, k=5)
# Directional alignment between edges and field gradient
score = field_alignment_score(edge_direction_vectors, field_gradient_vectors)
Series constant checks
from morphe_metrics import bhaya_quiescence_check, buddhi_curve_check
# Bhaya Quiescence Law (0.32% baseline, confirmed across Maya P1-P9)
r = bhaya_quiescence_check(bhaya_values_across_trials)
# {'status': 'MODIFIED', 'ratio': 48.2, 'interpretation': '...'}
# Buddhi S-curve determinism
r = buddhi_curve_check(buddhi_trajectory_over_epochs)
# {'status': 'S_CURVE', 's_curve_ratio': 3.4, ...}
Key results (P3 empirical baseline)
| Scale | Actual cells | EFC | Label | Edges formed |
|---|---|---|---|---|
| 10k | 29,056 | -0.015 | exploratory | 315 |
| 30k | 86,931 | -0.019 | exploratory | 3,699 |
| 50k | 144,726 | -0.019 | exploratory | 11,202 |
| 75k | 216,771 | -0.010 | exploratory | 25,161 |
| 100k | 266,071 | -0.009 | exploratory | 35,958 |
| 120k | 266,071 | -0.017 | exploratory | 37,316 |
Running tests
pip install pytest
pytest tests/ -v
All 22 unit tests must pass before any release.
Canonical hyperparameter
VAIRAGYA_PHYSICS_CONSTANT = 0.002315 # ORCID: 0000-0002-3315-7907
Embedded as provenance signature in all morphe-metrics artifacts.
IP protection
- MIT License + ORCID attribution (see LICENSE)
- ORCID magic number 0.002315 embedded in VAIRAGYA_PHYSICS_CONSTANT
- Zenodo DOI timestamp — immutable, publicly verifiable
Citation
@software{swaminathan2026morphemetrics,
author = {Swaminathan, Venkatesh},
title = {{morphe-metrics: A Stateless Python Library for
Morphogenetic Computing Evaluation}},
year = 2026,
publisher = {Zenodo},
doi = {10.5281/zenodo.20107084},
url = {https://doi.org/10.5281/zenodo.20107084},
orcid = {0000-0002-3315-7907}
}
Full Maya-Morphe Series
| Paper | Title | DOI |
|---|---|---|
| P1 | Bioelectric Gradient Fields as Topology Primitives | 10.5281/zenodo.20052072 |
| P2 | Spanda — Adaptive Threshold Learning | 10.5281/zenodo.20069445 |
| P3 | Axon — Differentiable Edge Formation | 10.5281/zenodo.20102536 |
| morphe-metrics | Evaluation library | 10.5281/zenodo.20107084 |
Nexus Learning Labs, Bengaluru · ORCID: 0000-0002-3315-7907 MayaNexusVS2026NLL_Bengaluru_Narasimha
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file morphe_metrics-1.0.0.tar.gz.
File metadata
- Download URL: morphe_metrics-1.0.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e1506032c06ffe7a9722c89ea2c79ff12fa1a039ef9a8422abb6afdc22e7e21
|
|
| MD5 |
b040a21d22a81d67494bc6dd11ae6206
|
|
| BLAKE2b-256 |
f1829aab609542c54422460f5f07cc19eb4c13fbcf1896644aab69e78064bdb3
|
File details
Details for the file morphe_metrics-1.0.0-py3-none-any.whl.
File metadata
- Download URL: morphe_metrics-1.0.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e6be1fde5416493e239f8b300d4f197cc8aa8fe0118c92ff5ad683b8d28aba1
|
|
| MD5 |
b5af996a06b8d4875d648177fd863ad4
|
|
| BLAKE2b-256 |
789b1acd621ccd8dfe2e470945f1a3f4cfe3d2976a9f3fe96667d95b3f45d66c
|