Module 10: Network Science and Graph Representation

Represent connectomes as graphs and interpret network metrics with biological and statistical caution.

Stylized vector art: a network graph with one triangle motif highlighted.

Lesson Flow

Learn

Goals and Concepts

Start with the capability target and concept set for this module.

Practice

Studio Activity

Apply the ideas in a guided activity tied to realistic outputs.

Check

Assessment Rubric

Use the rubric to verify competency and identify improvement targets.

Interactive Lab

Practice in short loops: checkpoint quiz, microtask decision, and competency progress tracking.

Graph Representation Checkpoint

Q1. You report a hub list computed at a minimum of one synapse per edge. A reviewer asks how robust it is. What does this module require?

There is no universally correct threshold, so the defensible move is a sensitivity analysis. Raising the threshold to three synapses can drop roughly two thirds of edges and change which cells rank as hubs, so report the intersection and flag the cells that moved. A single clean threshold silently discards genuine weak connections and hides the fact that a choice was made.

Q2. Your clustering coefficient is 0.19 against a degree-preserving null mean of 0.11. Which write-up is defensible?

Neurons whose arbors overlap connect more often, so part of any clustering excess is geometry rather than wiring specificity. Naming the null you ran and the one you did not is what survives the reviewer who asks about distance. The first option reports a number with no baseline at all; the second attaches a label that two metrics without a path-length comparison do not establish.

Q3. One neuron in your 500-node graph has 214 partners; the next highest has 91. What do you do first?

A merge fuses two cells' partner lists and manufactures exactly this signature: one degree more than double the runner-up. Pulling the mesh to check for two somata costs minutes and decides whether this is biology or a reconstruction error. Dropping the node without looking discards a real hub as easily as an artifact, and records neither decision.

Graph Schema Microtask

Your PI asks whether one cell type concentrates its input on the proximal dendrites of another. Which representation can answer that?

Progress Tracker

State is saved locally in your browser for this module.

0% complete

Capability target

Build one connectome graph representation and justify two metric choices for a defined hypothesis.

Concept set

1) From EM to graph: a lossy transformation

A connectome graph is an abstraction. The path from EM images to a graph involves: raw images → segmentation → synapse detection → neuron-to-neuron edge list → graph. Each step loses information: the graph retains connectivity topology but discards spatial relationships, organelle details, and membrane geometry. This is a feature (graphs are computationally efficient and analytically tractable) and a limitation (the graph cannot answer questions that require spatial context).

Key decision: What are your nodes? What are your edges? Neurons as nodes and synapses as directed edges is the default, but alternatives exist — compartment-level nodes (axon vs dendrite of the same neuron), type-level nodes (aggregating neurons by class), and different edge weightings (binary, synapse count, cleft area).

2) The threshold problem

In real connectomes, many neuron pairs share only 1-2 synapses. Are these “real” connections or detection noise? The choice of minimum synapse threshold for defining an edge dramatically changes the graph:

There is no universally correct threshold. Report results across multiple thresholds (sensitivity analysis) and justify your choice based on the analysis question.

3) Graph metrics and what they mean biologically

4) Null models and the interpretation trap

A graph metric is meaningless without a baseline. “Clustering coefficient = 0.15” tells you nothing until you compare to a random graph with the same degree distribution (where clustering might be 0.02 — making 0.15 highly significant). Every metric computation should include the corresponding null-model comparison.

Misconception guardrails

Each of these is a belief a learner plausibly holds on arriving. Name it, then check your own work against it.

Worked example: the hub that was a merge error

The numbers below are illustrative — they show the shape of the reasoning, not results from a specific published dataset.

Your PI hands you a 500-neuron subgraph from a cortical column and asks whether the circuit has hub neurons. You build the graph at threshold ≥1 synapse: 500 nodes, 11,400 directed edges, density 0.046. Here is the expert’s pass through it.

Step 1 — Look at the degree distribution before computing anything else. Sorted out-degrees: the top node has 214 partners; the next highest has 91. A degree outlier at more than twice the runner-up is a data-quality question before it is a biology question, because a merge error fuses two neurons’ partner lists and manufactures exactly this signature. Pull the mesh for the top node: two somata. It is a merge. Flag it upstream, exclude it from this analysis, and record the exclusion. The new top degree is 91, inside a smooth heavy tail — no single dramatic hub, but a top-5% tier of well-connected cells worth naming as candidates.

Step 2 — Compute clustering, then immediately ask “compared to what.” Clustering coefficient = 0.19. Alone, this number means nothing. Against 1,000 degree-preserving rewirings: null mean 0.11, sd 0.008 — the observed value is 1.7x the null, z about 10. Before writing “significant local structure,” say the next sentence out loud: nearby neurons connect more often because their arbors overlap, and a spatially constrained null would absorb some of this. You cannot run that null without soma positions in hand this week, so the claim is scoped: “clustering exceeds the degree-preserving expectation; a spatial null has not been applied.” That one sentence is the difference between a defensible report and a retraction-in-waiting; the spatial machinery itself is Technical Unit 09.

Step 3 — Re-run the headline numbers at a second threshold. At ≥3 synapses the graph keeps 4,100 edges — the 1-2 synapse pairs were 64% of all edges. Clustering rises to 0.24 against a null of 0.10, so the direction of the conclusion holds. But the hub candidate list changes: 3 of the top 10 cells by degree drop out, because their rank depended on many weak connections that may be detection noise. Report both thresholds and present the hub list as the intersection, with the cells that moved flagged.

Step 4 — Say what the abstraction lost. The graph cannot distinguish a synapse on the soma from one on a distal dendrite, and it has discarded every spatial relationship, so “hub” here means “many partners,” not “many strong or strategically placed inputs.” If the biological question is about influence rather than partner count, the compartment-level information this graph discarded is the missing evidence, and the module that handles synapse placement is Module 11.

What gets reported. A metrics table at two thresholds with null comparisons, the merged object’s exclusion with its evidence, the scoped clustering claim, and a hub candidate list stable across thresholds. What this does not establish: that the hubs are functionally important, that clustering survives a spatial null, or that the 1-synapse edges were noise — each of those is a further, separately designed test.

Core workflow

  1. Define node/edge schema: what are your nodes, what are your edges, what weighting scheme?
  2. Construct graph from synapse table (e.g., using CAVEclient + NetworkX). Inspect: number of nodes, edges, density, connected components.
  3. Compute candidate metrics: degree distribution, clustering, path length, reciprocity, modularity.
  4. Compare each metric to null-model expectation (degree-preserving random graph as minimum).
  5. Interpret metrics against hypothesis. Report which metrics are significant and which are not.
  6. Document abstraction limits: what information was lost in the graph construction?

60-minute tutorial run-of-show

Pre-class preparation (10 min async)

Minute-by-minute plan

  1. **00:00-08:00 Graph abstraction choices**
    • Show the same circuit as: (a) 3D EM rendering, (b) adjacency matrix, (c) node-link diagram. “These are three views of the same biology. Today we work with (b) and (c).”
    • Discussion: “What did we gain and lose in each transformation?”
  2. **08:00-20:00 Graph build demo**
    • Live coding: load a synapse table, construct a NetworkX DiGraph, apply threshold, print basic stats.
    • Visualize the graph with spring layout. Color nodes by cell type.
    • “Notice: the spatial layout in this diagram is arbitrary. The graph doesn’t know where neurons are in the brain.”
  3. **20:00-34:00 Metric computation**
    • Hands-on: learners compute degree distribution, clustering coefficient, and average path length.
    • Plot degree distribution (log-log). Is it heavy-tailed?
    • Compute clustering and compare to a random graph (NetworkX: nx.watts_strogatz_graph for comparison).
  4. **34:00-46:00 Interpretation and null concerns**
    • “Your clustering coefficient is 3× higher than the random graph. What does that mean biologically?”
    • Discuss: spatial proximity as a confound. Would a spatially constrained null model change the conclusion?
    • Walk through one example: reciprocal connections. Count in real data vs degree-preserving null.
  5. **46:00-60:00 Competency check**
    • Each learner writes a 1-paragraph graph analysis summary:
      • Schema (nodes, edges, threshold)
      • Two metrics with values and null-model comparisons
      • One biological interpretation and one limitation
    • Exit ticket: “Name one reason a graph metric might be misleading in your dataset.”

Studio activity: graph analysis report (60-75 minutes)

Scenario: You have the connectivity graph of 500 neurons in a cortical column from the MICrONS dataset. Your PI asks: “Is this circuit small-world? Are there hub neurons? Are there communities?”

Task sequence:

  1. Load the graph and compute basic statistics (nodes, edges, density, components).
  2. Compute: degree distribution, clustering coefficient, average path length.
  3. Compare to degree-preserving random graph and Watts-Strogatz small-world reference.
  4. Identify candidate hub neurons (top 5% by degree or betweenness centrality).
  5. Run community detection (Louvain or Leiden). Do detected communities align with cell types?
  6. Write a 1-page graph analysis report with figures, metrics, null comparisons, and biological interpretation.

Expected outputs:

Assessment rubric

Common errors and how to recover

What this module does not cover

Content library references

Teaching resources

References

Quick practice prompt

State one reason a graph metric might be misleading in your current dataset.

Teaching Materials

Activity Worksheet

Learner worksheet aligned to the studio activity and rubric.

Open worksheet

Slide Source

Marp source file for editing and rendering.

course/decks/marp/modules/module10.marp.md

Related Content