Skip to main content
A synapse is a persistent, stateful, weighted connection between two NTL nodes. Synapses are the edges in the neural graph — they determine how signals flow through the network.

How Synapses Differ from Connections

The key difference: synapses learn. A synapse that frequently carries successful signals becomes stronger, meaning it gets priority for future signal propagation. A synapse that goes unused weakens and eventually prunes. This mirrors Hebbian learning in neuroscience — connections that fire together wire together.

Synapse Structure

Synapse Lifecycle

1. Discovery

Nodes discover potential synapse partners through:
  • Bootstrap nodes — Well-known entry points that introduce new nodes to the network
  • Signal traces — Signals carry their path; receiving nodes can form synapses with upstream nodes
  • Discovery signals — Nodes broadcast capability announcements

2. Handshake

When two nodes decide to form a synapse, they perform a handshake:
  1. Exchange node identities and capabilities
  2. Negotiate transport binding (TCP only today — see Transport Bindings)
  3. Exchange cryptographic material via the pluggable crypto module
  4. Establish initial weight (typically 0.1)

3. Active State

An active synapse transmits signals bidirectionally. With each successful signal transmission:
  • Weight increases by a configurable delta
  • Latency statistics update
  • The synapse is marked as recently active

4. Strengthening

Weight increases when:
  • Signals are successfully transmitted and acknowledged
  • High-weight signals traverse the synapse
  • The remote node provides valuable responses (as determined by the application layer)

5. Weakening

Weight decreases when:
  • Time passes without signal activity (decay)
  • Signals fail or time out
  • The remote node becomes unreliable

6. Dormancy

When a synapse’s weight drops below the dormancy threshold (configurable, default 0.01), it enters a dormant state. Dormant synapses:
  • Stop actively transmitting signals
  • Retain their state in the storage backend
  • Can be reactivated if the remote node sends a signal

7. Pruning

After a configurable dormancy period (default: 7 days), dormant synapses are pruned — their state is archived and the connection resources are released.

Transport Bindings

Synapses are transport-agnostic. The actual bytes move over a configurable transport layer:
The reference implementation is TCP-only, and performs no transport negotiation. ntl-net opens a TCP connection and runs a three-message authenticated handshake over it; there is no step at which transports are advertised or selected.QUIC is the intended default, for good reasons — multiplexing many signal streams over one connection, built-in encryption, and connection migration across network changes, all of which matter for mobile and intermittent links. None of it is written yet.[synapse.transport] is commented out of config.example.toml for this reason: preferred and fallback were read by nothing, and preferred = "quic" named a transport that does not exist. Tracking: openNTL/ntl#15.

Synapse Topology

The collection of all synapses in the network forms the synapse topology — a weighted, directed graph. This topology is:
  • Self-organizing — No central authority defines it
  • Adaptive — It reshapes based on actual signal patterns
  • Resilient — Node failures cause local topology adjustment, not global disruption
  • Observable — Nodes can inspect their local topology for monitoring and debugging

Local vs Global Topology

No single node knows the full network topology. Each node maintains knowledge of:
  • Its direct synapses (immediate connections)
  • Nearby topology (2-3 hops, learned through signal traces)
  • Bootstrap references (known stable nodes for re-entry)
This local-knowledge design is critical for scalability and privacy.

Configuration

Synapse behavior is configurable per-node:
Last modified on September 11, 2026