Self-supervised graph encoder for 3D microglial morphology that fuses persistent homology with direction-aware attention over SWC reconstructions.
No providers recorded yet. Browse all providers
Microglia, the resident immune cells of the brain, reshape their branched processes within minutes of an injury, which makes their shape one of the most sensitive single-cell readouts of their state. Standard practice still reduces that shape to a few hand-picked numbers such as Sholl intersections, branch counts and process length, often measured in 2D. Two cells with the same branch count can differ in how their processes orient relative to the soma and how the branching hierarchy nests, which is exactly what those statistics discard.
RamiGlyph is a self-supervised graph encoder that learns a representation of 3D microglial morphology directly from reconstructions, without predefined morphometric features or labels. It reads each cell as a soma-rooted tree and encodes it through two complementary branches: one summarizes the global branching organization with persistent homology, the other models local geometry and soma-referenced direction with graph neural network layers. It was developed by Yuan Qu, Ying Chi, Junru Liu and colleagues at Zhejiang University, its Second Affiliated Hospital and its joint institute with the University of Edinburgh, with Wenzhou Medical University and Jiaxing University, and posted to bioRxiv in September 2026.
The authors also use the embedding space to argue that microglial morphology is a continuum rather than discrete subtypes, and derive a continuous morphology score from it.
Each SWC reconstruction becomes a soma-rooted graph whose nodes carry coordinates, radius, node type, graph distance from the soma, branch level, branch identity and a random-walk positional encoding. The structural and topological branches each output a 256-dimensional vector, concatenated into a 512-dimensional cell embedding. The model has 7.46 million trainable parameters and was trained for 3,000 AdamW steps (batch size 100, about 16 effective epochs) on a single RTX 4090. The corpus is 23,637 microglia reconstructions from the Siegert laboratory archive on NeuroMorpho.Org, covering adult homeostasis, repeated ketamine-xylazine-acepromazine (KXA) anesthesia and recovery, ovariectomy and CK-p25 neurodegeneration, split 80:20 into 18,913 training and 4,724 held-out cells.
With baselines (SGTMorph, MorphoGNN, TreeMoCo, MorphVAE, MorphOMICs and morphometric features) retrained on the same split, RamiGlyph reached a mean macro-F1 of 0.52 and accuracy of 0.59 in 5-nearest-neighbour classification of condition and brain region across six evaluation sets, and 0.65 and 0.70 when combined with morphometric features. Ablation credits the topological branch most. On Neuron7, a 1,393-cell set of seven neuronal types, the encoder pretrained on microglia and applied frozen reached 0.70–0.72 KNN accuracy and 0.63–0.65 macro-F1, below the 0.78–0.82 accuracy and 0.73–0.78 macro-F1 of a model trained on Neuron7 itself; the authors frame the pretrained weights as a starting point for new cell types, not a substitute for retraining.
RamiGlyph serves neuroscientists who reconstruct microglia from confocal or two-photon stacks and want an unbiased readout of how a drug, injury or disease stage changes their shape. On a new ischemia-reperfusion dataset of 5,690 cells and 15,593 microglia from 5×FAD amyloid mice, morphology scores traced a complex-simple-complex trajectory after ischemia and a progressive loss of branching with amyloid pathology. Functional readout is a separate analysis layered on the embeddings: Gromov-Wasserstein optimal transport aligns unpaired embeddings with AUCell scores for eight transcriptomic programs, and a multi-task MLP trained on those transported labels predicts state at 40.0% single-cell accuracy (chance 12.5%), rising to 72.8% when pooled over 200 cells.
RamiGlyph brings learned morphology representations, so far centred on neurons, to microglia, whose processes remodel continuously. Its main contribution is a label-free encoding plus a fixed reference axis on which laboratories can place new microglia datasets. Source code, training scripts, reference-trajectory artifacts and example data are public on GitHub, but the pretrained encoder checkpoint that the morphology-score script requires is not in the repository, which now carries no license file: the MIT license posted with the code was deleted a week later, leaving no grant of reuse rights. Evaluations treat cells, not animals, as independent units, and the function link rests on probabilistic transport, not paired measurements. It is a preprint that has not yet been peer reviewed.
Much of this page is generated or calculated automatically. Flag anything that looks off and we will re-run it.