Methods
Schemes for applying edits to a neuron
Below, we detail the different schemes used for replaying edits onto a neuron.
Historical
The simplest scheme is to simply apply the edits on the neuron in the same order in which those edits happened in reality. We denote this the historical ordering of edits.
Algorithm:
Input: a state of a neuron/segmentation
- From all edits in the history of a given neuron, select the earliest which has not been applied
- Apply the edit
- Compute the new connected component for this neuron from the nucleus
- Compute metrics
- Record the number of operations applied (always 1 for this scheme)
- Recurse (go back to 1.)
Clean-and-merge
Often, proofreaders will follow what we’ll refer to as a “clean-and-merge” strategy. The idea is that one finds a segment which appears to be part of the current neuron, cleans up that segment by splitting off false-mergers, and then finally connects this (clean) segment back to the neuron.
Below, we describe how we implement our idealized version of this strategy when applying edits on a neuron. There are two subtle variants of this idea which differ in the order in which merges are applied to the neuron; see 2a. and 2b. in the algorithm below. We denote these strategies clean-and-merge (historical) and clean-and-merge (random).
Algorithm:
Input: a clean state of a neuron/segmentation
- Find all merge edits which are available
- Choose one of these available merges to apply
- Choose the merge which is earliest in history (historical strategy)
- Choose at among these at random (random strategy)
- Find the segment which would be added if this merge is applied
- For that segment, apply all available split edits
- Apply the merge to connect this new segment to the current connected component
- Compute the new connected component for this neuron from the nucleus
- Compute metrics
- Record the number of operations, equal to count of all operations needed for the clean (4.) and the merge (5.)
- Recurse (go back to 1.)
I actually implement this as a merge-and-clean process since the recursion is a bit easier to implement; but I reorder the metrics/counts of edits appropriately to match the above process.
Metrics to evaluate
Here, we describe the metrics that we evaluate for each neuron-state .
Proportion of inputs/outputs onto classes
Assume we have \(K\)-classes of neuron (e.g. morphological types). This metric associates each neuron-state with a \(K\)-length vector, \(x\), where \(x_k\) is the proportion of that neuron-state’s output synapses which target a neuron in class \(k\).
This metric could also be flipped in the definition above to consider the inputs to a cell.
For the categorization of target neurons, I am using aibs_metamodel_mtypes_v661_v2
.
Connectivity probability by distance
Imagine space is discretized into bins of an arbitrary size/shape, for instace, concentric cylinders centered on the soma of a neuron. This metric captures the probability that cell \(i\) targets a downstream neuron whose soma lives within a given bin, \(l\).
Tables used
allen_column_mtypes_v2
: used to indicate the morphological types for the neurons of interest that I am examining in this work.aibs_metamodel_mtypes_v661_v2
: used to indicate the morphological types for the rest of the neurons in the dataset.nucleus_detection_v0
: used to indicate the location of the nucleus for all neurons in the dataset. This also anchors each neuron to a target ID indicating the identity of the neuron by its soma, since the segmentation is dynamic.