PART 04 / Intermediate

Connectomics: wiring as data

What can a wiring diagram tell us, and what information is missing?

Guided illustrated lesson

What you will learn

Construct a directed graph and report which biological assumptions its weights do not encode.

Before you begin: Foundations: matter, mathematics & computation; Biological neuroscience

START WITH A QUESTION

Picture this.

A road map tells you where roads connect. It does not tell you today's traffic, each driver's destination, or how long a journey will take. A connectome has a similar strength and limitation: it describes reconstructed wiring, while activity needs additional information.

Adjacency matrix
A table describing which nodes connect and, optionally, with what weight.
Transpose
The operation that swaps a matrix's rows and columns.
Structural prior
A wiring constraint used to guide a model before fitting its behavior.

Read for the idea first. Work through the numbers next. Try answering the questions before opening the explanations.

Nodes and arrows before matrices

Represent each neuron as a node and a directed connection as an arrow from source to target. Multiple contacts between the same pair can be kept separately or combined into one count. Choose the convention before comparing graphs. In the toy chain 0 → 1 → 2, activity can travel from 0 to 2 in two propagation steps. An arrow from 1 to 0 would mean something different. Drawing three nodes first is often the fastest way to debug a large connectivity program.

A matrix is a table with a contract

An adjacency matrix stores connection values in a rectangular table. Here A[i][j] means source i sends to target j. The row for source 0 in our chain is [0, 2, 0]. If x is a column of source activities, target input is A-transpose times x: each target collects its column of incoming connections. Transpose means swap rows and columns. Part 7 uses target rows instead, so we will name that matrix W. Shape alone cannot catch a reversed square matrix.

How a reconstruction becomes data

Electron-microscope images are segmented into candidate cellular structures, traced and proofread, then annotated. A split error can divide one cell into several pieces; a merge error can join unrelated structures. The reconstructed volume can also cut off connections. A missing edge may mean no observed contact, incomplete coverage, or filtering—not necessarily biological absence. Record the specimen, release and selection rule so another reader knows exactly what your graph represents.

What the graph leaves open

A contact count does not specify a neuron's time constant, synaptic delay, receptor effect or current activity. The equation below is therefore a chosen propagation rule. It multiplies weighted paths; it does not reconstruct physiology. For an application such as identifying candidate pathways, structure can narrow the search. To argue that a pathway causes a behavior, activity measurements or interventions add different kinds of evidence. Keep that distinction visible as the model becomes more impressive.

SEE THE RELATIONSHIPS

From structure to behavior.

Connectome: a labelled conceptual diagram
Figure 4.1 · Connectome. Original educational diagram; synthetic, not a measured result.
The reasoning pathEM reconstruction then Directed edge list then Explicit dynamics then Testable prediction1. EM reconstruction2. Directed edge list3. Explicit dynamics4. Testable prediction
A learning flow for this part. Follow the assumptions through to an observable result.
Source-row matrix A and target-row matrix W are transposes for the same directed chain.
Read the arrow direction and matrix labels together. A single active source is a stronger orientation test than a large network visualization.

CHANGE A PARAMETER. TEST YOUR INTUITION.

Follow a signal through a directed graph

A synthetic chain A → B → C. Rows are sources and columns are targets. Change the A → B weight, then follow two synchronous propagation steps. No recurrence, leak or spikes are included.

A three-node directed graphA connects to B with adjustable weight. B connects to C with fixed weight 3.ABC23Input [1, 0, 0] · x(next) = Aᵀ x

Interactive controls load with JavaScript. The worked example below is available without it.

MAKE THE IDEA PRECISE

The mathematics.

G = (V, E); y_j = sum_i A_ij x_i
Symbols and units
SymbolMeaning
GDirected graph
VSet of neuron nodes; not membrane voltage in this equation
ESet of directed edges
A_ijWeight from source i to target j
x_iSource activity
y_jAccumulated target input

Build the equation, step by step

  1. For every target j, collect contributions from all source nodes i. Multiply each source activity by its outgoing weight to that target.
  2. Sum those contributions to obtain y_j. With sources stored in rows, a column-vector implementation uses the transpose of A.
  3. Apply the operation twice to represent two propagation steps. This computes weighted paths of length two; it is not the same as moving signals through all edges instantaneously.

WORK THROUGH THE NUMBERS

Worked example

A synthetic chain has weight 2 from node 0 to 1 and weight 3 from node 1 to 2. Starting with activity only at node 0, one propagation step reaches node 1 and the next reaches node 2. This example intentionally has no decay or spike threshold.

A small Python experiment.

Python 3 · Standard library only · Synthetic educational example. Run this in your own notebook or a local file.

edges = [(0, 1, 2), (1, 2, 3)]
x = [1, 0, 0]
for _ in range(2):
    y = [0, 0, 0]
    for source, target, weight in edges:
        y[target] += weight*x[source]
    x = y
    print(x)

Read the code as a story

Every loop creates a fresh y filled with zeros. Each edge contributes old source activity times weight to its target. Only after all edges are processed does x become y. Updating x during the edge loop would let some signals traverse two edges in one step, depending on list order. That would be a different model.

Expected output

[0, 2, 0]
[0, 0, 6]

Change one quantity, predict the result, and then run the code again. Explain any difference before adding complexity.

Test your understanding.

Try it: Reverse the two edges. Predict whether node 0 can still reach node 2.

Self-check: Does a large synapse count prove an excitatory connection?

No. Anatomy describes connectivity; sign and effect require transmitter, receptor, physiology and state information. The synthetic positive weights here illustrate graph arithmetic. They should not be substituted for inferred biological conductances.

Where this model stops: A strong or central anatomical connection is not proof of causal importance in every behavior.

A research question: How sensitive is your conclusion to uncertain edges or a different aggregation threshold?

Record evidence in your mastery worksheet →

PREDICT / TRY / EXPLAIN

Catch the silent direction bug

Use paper, a calculator or the Python example. Write your prediction before checking the result.

  1. Draw the chain with weights 2 and 3. Start activity at node 0 and calculate two steps.
  2. Start instead with activity at node 2. Repeat without reversing any arrows.
  3. Reverse the edge list's order in the program. Check that outputs stay unchanged; then explain why fresh y matters.
Compare with a worked solution

Starting at node 0 gives [0, 2, 0], then [0, 0, 6]. Starting at node 2 gives all zeros immediately because there are no outgoing edges from it. Reordering records changes neither result in this synchronous rule. If it does, the program is accidentally mixing old and new state.

CLOSE YOUR NOTES

Can you explain it back?

These questions test the reasoning, not just a remembered phrase. Say your answer out loud or write a sentence first.

01What does the number 6 after two steps represent?

Reveal the reasoning for question 1

The product 2×3 along the two-edge path in our weighted propagation model. It is not a measured spike rate or a probability.

02A graph has no edge between two cells. Can we conclude they never influence one another?

Reveal the reasoning for question 2

No. They might interact through intermediate cells, and the reconstruction or selection may omit connections. First establish the scope of the data.

TAKE THE IDEA WITH YOU

Three things to remember.

  • Declare source and target orientation before multiplying.
  • Separate reconstruction uncertainty from biological interpretation.
  • Connectivity constrains a model; dynamics still need assumptions.

Next we locate these graphs in a particular animal and learn to attach biological meaning to a dataset without treating every neuron ID as universal.

Continue to Part 5 →

THE NEXT LAYER

Chapter depth map.

This introduction provides a first model. The following chapters are outlines for deeper future editions; their full treatments have not yet been published.

Representing structure

4.1 Neurons as a graph · Outline
  1. 4.1.1 G = (V, E): vertices, edges and metadata
  2. 4.1.2 Directed graphs, multigraphs and weighted graphs
  3. 4.1.3 Adjacency matrices with explicit row/column direction
  4. 4.1.4 Synapse counts versus physiological efficacy
  5. 4.1.5 Cell types, morphology, skeletons and brain regions
4.2 From microscopy to reconstruction · Outline
  1. 4.2.1 Electron microscopy and serial images
  2. 4.2.2 Segmentation and neuron tracing
  3. 4.2.3 Synapse detection and proofreading
  4. 4.2.4 Cell-type annotation and predicted neurotransmitters
  5. 4.2.5 Split/merge errors, missing boundaries and uncertainty

Asking graph questions

4.3 Paths, motifs and communities · Outline
  1. 4.3.1 Traversal and constrained pathway queries
  2. 4.3.2 In-degree, out-degree and centrality
  3. 4.3.3 Recurrent motifs and appropriate null models
  4. 4.3.4 Community detection and resolution dependence
  5. 4.3.5 Region aggregation and annotation bias
4.4 From structure to hypotheses · Outline
  1. 4.4.1 Connectivity does not specify dynamics
  2. 4.4.2 Delays, conductances and neuromodulators missing from a graph
  3. 4.4.3 Individual variation and incomplete reconstructions
  4. 4.4.4 Sensitivity analysis over uncertain edges
  5. 4.4.5 Tests relating topology to measured behavior

Read with the original sources.

These readings support the concepts and deeper investigation. The worked numbers and illustrations above are teaching examples.

Official dataset resource

MaleCNS — official release and downloads ↗

The official download page exposes versioned data, including v1.0 resources. Keep specimen, release, filtering and annotation provenance with every derived graph.

Complete source register →

Where next?