Skip to main content

A Fast Topological Heuristic for Connectome Pacemakers

Project description

Phi-C ($\Phi_C$): Topological Connectome Pacemaker

Version License: AGPL v3 Python

Phi-C is a high-performance Python library designed to rapidly identify Central Pattern Generators (CPGs) and rhythmic pacemakers in massive biological connectomes using algebraic topology.

Developed by the Syntropy Project (Alex Lopes da Silva).


🧠 The Problem

Finding autonomous oscillating regions in a brain (like the ones controlling breathing or locomotion) usually requires simulating the entire dynamic chemistry of the network, which becomes computationally intractable $O(2^N)$ in large mammalian brains.

Furthermore, naive structural density metrics often fall into the "Cerebellar Trap": flagging massive, dense, but purely feed-forward structures (like the cerebellum) as pacemakers.

⚡ The Solution

phi-c acts as a structural $O(E)$ pre-filter (linear in the number of edges for sparse connectomes). We combine two mathematical concepts:

  1. Simplicial Nerve Scaling: A fast approximation of topological integration space using Min-Max normalized local clustering and eigenvector centrality.
  2. Motif Discriminator: A strict graph-theoretic filter that penalizes unidirectional cliques and actively seeks reciprocal feedback loops ($A \rightleftharpoons B$).

By crossing these two metrics, the library instantly filters out false-positives and returns the absolute topological anatomical hotspots driving the network rhythm.


📦 Installation

pip install syntropy-phi-c

🚀 Quick Start

The library takes any standard directed graph (like a connectome exported from Electron Microscopy data) and returns the top pacemaker nodes.

import networkx as nx
from phi_c.pacemaker import find_pacemaker

# 1. Load a brain connectome (e.g., C. elegans)
connectome = nx.read_graphml("worm_brain.graphml")

# 2. Extract the top 5 Central Pattern Generators in milliseconds
cpg_hotspots = find_pacemaker(connectome, top_k=5)

# 3. View the results
for rank, (neuron, score) in enumerate(cpg_hotspots, 1):
    print(f"#{rank} - Neuron: {neuron} | Phi-C Score: {score:.2f}")

Advanced: Weighted Connectomes (fMRI, DTI)

If your graph edges carry synaptic strength or tract density, activate the weighted mode:

# Leverage synaptic weights for density calculation
cpg_hotspots = find_pacemaker(connectome, top_k=5, weight='weight')

📜 License

This project is dual-licensed:

  1. Open Source: GNU AGPLv3 (Free for academic research and non-commercial public use).
  2. Commercial License: For enterprise usage in proprietary medical software or SaaS APIs without AGPL obligations, please contact the author.

Copyright (C) 2026 Syntropy Project (Alex Lopes da Silva) and Contributors.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

syntropy_phi_c-0.4.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

syntropy_phi_c-0.4.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file syntropy_phi_c-0.4.0.tar.gz.

File metadata

  • Download URL: syntropy_phi_c-0.4.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for syntropy_phi_c-0.4.0.tar.gz
Algorithm Hash digest
SHA256 fd68ac62c8340de4e3c5542177356d07bab9c729a5afab85e7575c894f174015
MD5 3d0d5b19aa7ab9fc0d247effc2f8de7e
BLAKE2b-256 eebe481a7593a9e859e5c6deb8df1297b64de17d2c15a5bb2a173d0752b221bc

See more details on using hashes here.

File details

Details for the file syntropy_phi_c-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: syntropy_phi_c-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for syntropy_phi_c-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ded724ffff34070b2146608e32a03d3de4710b781525d2d613e18aa1c8a300e1
MD5 a0bc48e37249ebe0c3f13b871aa3cfa7
BLAKE2b-256 b1e64569a1411fab8fc2ad102c541fe5f136b9fd2cc490add909ec95f3e00863

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page