Molecular Computational Anatomy: Unifying the Particle to Tissue Continuum via Measure Representations of the Brain

Objective. The objective of this research is to unify the molecular representations of spatial transcriptomics and cellular scale histology with the tissue scales of computational anatomy for brain mapping. Impact Statement. We present a unified representation theory for brain mapping based on geometric varifold measures of the microscale deterministic structure and function with the statistical ensembles of the spatially aggregated tissue scales. Introduction. Mapping across coordinate systems in computational anatomy allows us to understand structural and functional properties of the brain at the millimeter scale. New measurement technologies in digital pathology and spatial transcriptomics allow us to measure the brain molecule by molecule and cell by cell based on protein and transcriptomic functional identity. We currently have no mathematical representations for integrating consistently the tissue limits with the molecular particle descriptions. The formalism derived here demonstrates the methodology for transitioning consistently from the molecular scale of quantized particles—using mathematical structures as first introduced by Dirac as the class of generalized functions—to the tissue scales with methods originally introduced by Euler for fluids. Methods. We introduce two mathematical methods based on notions of generalized functions and statistical mechanics. We use geometric varifolds, a product measure on space and function, to represent functional states at the micro-scales—electrophysiology, molecular histology—integrated with a Boltzmann-like program to pass from deterministic particle descriptions to empirical probabilities on the functional states at the tissue scales. Results. Our space-function varifold representation provides a recipe for traversing from molecular to tissue scales in terms of a cascade of linear space scaling composed with nonlinear functional feature mapping. Following the cascade implies every scale is a geometric measure so that a universal family of measure norms can be introduced which quantifies the geodesic connection between brains in the orbit independent of the probing technology, whether it be RNA identities, Tau or amyloid histology, spike trains, or dense MR imagery. Conclusions. We demonstrate a unified brain mapping theory for molecular and tissue scales based on geometric measure representations. We call the consistent aggregation of tissue scales from particle and cellular scales, molecular computational anatomy.


Introduction
One of the striking aspects of the study of the brain in modern neurobiology is the fact that the distributions of discrete structures that make up physical tissue, from neural cells to synapses to genes and molecules, exist across nearly ten orders of magnitude in spatial scale.This paper focuses on the challenge of building multiscale representations that simultaneously connect the quantized nanoscales of modern molecular biology and digital pathology for characterizing neural circuit architec-ture in the brain with the classical continuum representations at the anatomical gross and mesoscales.
We have been highly motivated by the Cell Census Network project (BICCN [1]) which highlights the interplay between the nano-and micron scales of single-cell measures of RNA via spatial transcriptomics [2][3][4] coupled to the tissue scales of mouse atlases.The recent review on bridging scales from cells to physiology [5] motivates the mathematical framework presented herein.The recent emergence of spatial transcriptomics as 2020 Nature Method of the Year highlights the importance of such approaches for understanding the dense metric structure of the brain built up from dense imaging measurements at the cellular scales.Specifically, in our own work on digital pathology for the study of Alzheimer's disease called the BIOCARD study [6], we are examining pathological Tau in the medial temporal lobe (MTL) at both the microhistological and macroscopic atlas scales, from 10 to 100 μm [7,8], extended to the magnetic resonance millimeter scales for examining entire circuits in the MTL.In the mouse cell census project, we are examining single-cell spatial transcriptomics using modern RNA sequencing in dense tissue at the micron scale and its representations in the Allen atlas coordinates [9].
Most noteworthy for any representation is that at the finest microscales, nothing is smooth; the distributions of cells and molecules are more well described as random quantum counting processes in space [10].In contrast, information associated to atlasing methods at the gross anatomical tissue and organ scales of computational anatomy extend smoothly [11][12][13][14][15][16].Cross-sectionally and even cross-species, gross anatomical labelling is largely repeatable, implying information transfers and changes from one coordinate system to another smoothly.This is built into the representation theory of diffeomorphisms and soft matter tissue models for which advection and transport hold [17][18][19][20][21][22][23], principles upon which continuum mechanics and computational anatomy are based.Also of note is the fact that the brain organizes information on geometric objects, submanifolds of the brains such as the foliation of the cortex and associated coordinates of the cortical columns.Our representations must both represent the quantum to ensemble scales and encode the global macroscopic organizations of the brain.
The focus of this paper is to build a coherent representation theory across scales.For this, we view the micron to millimeter scales via the same representation theory called mathematical geometric measures, building the finest micron scales from discrete units termed varifold measures which represent space and the function of molecules, synapses, and cells.The measure representation from fineto coarsescale aggregates forming tissue.This measure representation allows us to understand subsets of tissues that contain discretely positioned and placed functional objects at the finest quantized scales and simultaneously pass smoothly with aggregation to the classical continuum scales at which stable functional and anatomical representations exist.Since the study of the function of the brain on its geometric submanifolds-the gyri, sulci, subnuclei, and laminae of the cortex-is so important, we extend our general framework to exploit varifold measures [24] arising in the modern discipline of geometric measure theory.Varifolds are defined as a cross-product measure on space with a measure on molecular function.Geometric measures are a class of generalized functions which have the basic measure property of additivity on disjoint unions of the experimental probe space and encode the complex physiological functions with the geometric properties of the submanifolds to which they are associated.To be able to compare the brains, we use diffeomorphisms as the comparator tool, with their action representing 3D varifold action which we formulate as "copy and paste" so that basic particle quantities that are conserved biologically are combined with greater multiplicity and not geometrically distorted as would be the case for measure transport.
The functional features are represented via generalized Dirac delta functions at the finest microstructure scales.The functional feature is abstracted into a function space rich enough to accommodate the molecular machinery as represented by RNA or Tau particles, as well as electrophysiology associated to spiking neurons, or at the tissue scales of medical imaging dense contrasts of magnetic resonance images (MRIs).We pass to the classical function continuum via introduction of a scale space that extends the descriptions of cortical microcircuits to the meso-and anatomical scales.This passage from the quantized features to the stochastic laws is in fact akin to the Boltzmann program transferring the view from the Newtonian particles to the stable distributions describing them.For this, we introduce a scale space of kernel density transformations which allows us to retrieve the empirical averages represented by the determinism of the stochastic law consistent with our views of the macroscopic tissue scales.
The representation provides a recipe for scale traversal in terms of a cascade of linear space scaling composed with nonlinear functional feature mapping.Following the cascade implies every scale is a varifold measure so that a universal family of varifold norms can be introduced which simultaneously measure the disparity between brains in the orbit independent of the probing technology, yielding one of the many types of data: RNA identities, Tau or amyloid histology, spike trains, or dense MR imagery.
Our multiscale brain measure model implies the existence of a sequence.We call this scale space of pairs, the measure representation of the brain, and the associated probing measurement technologies Brainspace.To formulate a consistent measurement and comparison technology on Brainspace, we construct a natural metric upon it allowing us to study its geometry and connectedness.The metric between brains is constructed via a Hamiltonian which defines the geodesic connections throughout scale space, providing for the first time a hierarchical representation that unifies microscopic to millimeter representation in the brain and makes Brainspace into a metric space.Examples of representation and comparison are given for Alzheimer's histology integrated to magnetic resonance imaging scales and spatial transcriptomics.We call the consistent formalism presented here for aggregation of tissue scales from particle and cellular scales Molecular Computational Anatomy.

Measure Model of Brain Structures.
To build a coherent theory, we view the micron to anatomical scales via the same representation theory building upon discrete units termed particles or atoms.As they aggregate, they form tissues.This is depicted in Figure 1 in which (a) shows mouse imaging of CUX1 labelling of the inner layers of mouse cortex (white) and CTP2 imaging of the outer layers (green) at 2.5 micron in plane resolution.Notice the discrete nature of the cells clearly resolved which form the layers of tissue which are the global macro scale features of layers 2, 3, and 4 which stain more prolifically in white and the outer layers 5 and 6 which stain more prolifically in green.

BME Frontiers
Our representation exists simultaneously at both the microscopic and tissue millimeter scales.A key aspect of anatomy is that at the microscale, information is encoded as a massive collection of pairs ðx i , f i Þ where x i ∈ ℝ d ðd = 2, 3Þ describes the position of a "particle" and f i is a functional state in a given set F attached to it.In our applications, F are proteins representing RNA signatures or Tau tangles and for single-cell neurophysiology represent the dynamics of neural spiking.At the microscale, basically, everything is deterministic, with every particle attached to its own functional state among possible functional states in F. But zooming out, the tissue level, say millimeter scale, appears through the statistical distribution of its constituents with two key quantities, the local density of particles and the conditional probability distribution of the functional features μ x ðdf Þ at any location x.At position x, we no longer have a deterministic functional state but a distribution μ x on functional states, which we represent analogous to the Boltzman probability.
The integration of both descriptions into a common mathematical framework can be done quite naturally in the setting of mathematical measures which are mathematical constructs that are able to represent both the discrete and continuous worlds as well as the natural levels of approximation between both.
At the finest scale we associate to particles the elementary "Dirac" δ x i ⊗ δ f i which applies to infinitesimal volumes in space dx and function df so that it evaluates as δ x i ðdxÞδ f i ðdf Þ, which is equal to 1 if x i ∈ dx and f i ∈ df , and 0 otherwise.Indeed, the set Mðℝ d × FÞ of finite positive measures on ℝ d × F contains discrete measures written as where w i is a positive weight, that can encode the collection ðx i , f i Þ i∈I at microscale.As in Boltzmann modeling, we describe the features statistically at a fixed spatial scale transferring our attention to their stochastic laws modeled as conditional probabilities in M P ðFÞ with integral 1.For this, we factor the measures into the marginal space measure ρ μ on ℝ d with ρ μ ðdxÞ = Ð F μðdx, df Þ, and the field of probability distributions on F conditioned on x.For the convention dx and df taken as events gives the factorization with field of conditional probabilities: Dense tissue is modeled as μ having marginal ρ μ ðdxÞ = ρðxÞdx continuous with Lebesgue measure on ℝ d : A fundamental link between the molecular and continuum tissues can be addressed through the law of large numbers since if ðx i , f i Þ i≥0 is an independent and identically distributed sample drawn from law μ/M of ℝ d × F where M = Ð ℝ d ×F μðdx, df Þ is the total mass of such μ, then we have almost surely the weak convergence Passing from the tissue scales to the molecular-cellular scales of Figure 1(a) behooves us to introduce a scale space so that empirical averages which govern it are repeatable.Figure 1(b) depicts our multiscale model of a brain as a sequence of measures: Our idealization of Brainspace as a sequence of measures is depicted in Figure 1 descending from the coarse tissue scale (top b) to the finest particle representation (bottom b), with color representing function f ∈ F and radii space scale.Throughout, the range of scales is denoted shorthand ℓ ≥ 0 to mean 0 ≤ ℓ < ℓ max .

Nonlinear Transformation Model for Crossing Scales.
The brain being a multiscale collection of measures requires us to be able to transform from one scale to another.We do this by associating to each scale transformation a transition kernel acting on the measure at that scale.The transition kernels carry resolution scales σ or reciprocally bandwidths, analogous to Planck's scale.
We introduce the abstract representation of our system as a collection of descriptive elements z ∈ Z made from spatial and functional features.We transform our 3 BME Frontiers mathematical measure μð•Þ on Z generating new measures μ′ð•Þ on Z′ by defining correspondences via transition kernels z ↦ kðz, dz ′ Þ, with the kernel acting on the measures transforming as This implies the particles transform as K½δ z i ðdz′Þ = kðz i , dz′Þ.
and the second transforming nonlinearly ν ↦ μ ℓ on ℝ d × F ℓ smoothing at scale ℓ the conditional distribution on features: Smooth space resampling projects particles to the continuum using a smooth resampling process defined by x ↦ πðx, yÞ, the fraction particle x transfers to y, giving Notice ρ ν ðdxÞ = w ℓ ðxÞdx.Feature reduction uses maps from machine learning, α ↦ ϕðαÞ ∈ F ℓ , For computing we resample to the computational lattices ðY ℓ j ⊂ ℝ d , y j Þ j∈I ℓ ,ℓ≥0 interpolating from the continuum to the lattice centers y j ∈ Y ℓ j ; defining πðx, YÞ ≔ Ð Y πðx, yÞ dy gives the transition kernel and transformed measure: The tissue has classical density μ = Ð ℝ d ρðxÞδ x ⊗ δ f ðxÞ dx with feature f ðxÞ indexed over space, with action Space scales are represented with the group product, φ ≔ ðφ ℓ Þ ℓ≥0 , acting component-wise with action We call the jdφðxÞj term in the action the "copy and paste" varifold action.It enables the crucial property that when a tissue is extended to a larger area, the total number of its basic constituents increases accordingly with total integral not conserved, in contrast to classic measure or probability transport.
Dynamics occurs by generating the diffeomorphism as flows t ↦ φ t ≔ ðφ ℓ t Þ ℓ≥0 , with dynamics controlled by vector fields t ↦ u t ≔ ðu ℓ t Þ ℓ≥0 via the ordinary differential equation at each scale satisfying The controls are coupled by successive refinements v ℓ , ℓ ≥ 0, with u −1 = 0:

BME Frontiers
To control smoothness of the maps, we force the vector fields to be elements of reproducing kernel Hilbert spaces Each RKHS is taken to have a diagonal kernel with g ℓ the Green's function, where id is the d × d identity matrix; see [25] for nondiagonal kernels.Geodesic mapping flows under a control process along paths of minimum energy respecting boundary conditions.Figure 2 shows the multiscale control hierarchy.
The multiscale dynamical controls are written , with observer and dynamics equation: Dynamics translates into a navigation in the orbit of brains and provides a metric distance between brains.Paths of minimum energy connecting the identity φ 0 = Id to any fixed boundary condition (BC) φ 1 where φ 1 is accessible defines the distance extending LDDMM [26] to a hierarchy of diffeomorphisms and is a geodesic for an associated Riemannian metric [25].
The metric from μ 0 to μ 1 in the orbit accessible from μ 0 via diffeomorphisms is the shortest length geodesic paths with BCs φ 0 ⋅ μ 0 = μ 0 and φ 1 ⋅ μ 0 = μ 1 .This extension to multiscale LDDMM equation (34) is given in Section 4.3 where we discuss the smoothness required for the geodesics to define a metric and specify the optimal control problem in the state equation (36).

Geodesic Brain Mapping via the Varifold Measure Norm.
The BC matching brains is defined using measure norms with equality meaning brains are equal, with small normed difference meaning brains are similar; for particle brains, Geodesic mapping controls the flow to minimize energy simultaneously minimizing the norm distance to the target.Every brain has a variable number of particles with no correspondence between particles.Varifold measure norms accommodate these variabilities.The varifold norm is constructed modeling the particles as elements δ x ⊗ δ f ∈ W * of the dual space of an RKHS W associated with the isometry K W : W * → W and kernel function k W defining the inner product.We introduce the dual bracket notation for h ∈ W, μ ∈ W * , and for μ a measure, ðμjhÞ ≔ Ð ℝ d ×F hðx, f Þμðdx, df Þ.Then, we have The norm-square for particle and tissue measures reduces to The hierarchical norms across the scales become The optimal control ðu t Þ 0≤t≤1 is square-integrable for the V-norms for particles and tissue, satisfying for α > 0: The control flows the measures μðq t Þ ≔ φ t ⋅ μ with state processes t ↦ q t and endpoint The endpoint q 1 ↦ Uðq 1 Þ is modeled as continuously differentiable in the states.

BME Frontiers
Control of tissue reparameterizes (16) The endpoint momentum for particles ðp x i,1 , p w i,1 Þ i∈I and dense tissue ðp φ 1 ðxÞ, p w 1 ðxÞÞ x∈ℝ d is given by the variation of the norm-square match determined by h q 1 , the kernel smoothing of the difference of the measures: with endpoint momentum The RKHS kernel defined in the Section 4.2, Eqn. ( 29) is a separable Gaussian in space and function.The optimal control at any scale "averages" all the particle/tissue data across scales.Section 4.4 establishes the smoothness for the Hamiltonian equations.Section 4.5 establishes the variation and smoothness for the norm gradients.
We emphasize that the varifold action gives the continuum problem unifying with image-based LDDMM [26] such as studied by the MRI community.Taking IðyÞ ∈ ℝ + with μ y = δ IðyÞ , μ ≔ Ð ℝ d δ y ⊗ δ IðyÞ dy, the action becomes 2.5.MRI and Digital Pathology for Tau Histology in Alzheimer's 2.5.1.Bayes Segmentation of MRI. Figure 3 shows the multiscale data from the clinical BIOCARD study [6] of Alzheimer's disease within the medial temporal lobe [7,8,27].Figure 3(a) shows the clinical magnetic resonance imaging (MRI) with the high-field 200 μm MRI scale (b) shown depicting the medial temporal lobe including the collateral sulcus and lateral bank of the entorhinal cortex.Bayes classifiers for brain parcellation performs feature reduction as a key step for segmentation at tissue scales [28].Feature reduction maps the distribution on gray levels F = ½0, 255 to probabilities on N tissue types, defined by the integration over the decision regions θ n ⊂ ½0, 255: 2.5.2.Gaussian Scale-Space Resampling of Tau Histology.For histology at the molecular scales, the measure encodes the detected tau and amyloid particles μ = ∑ i∈I w i δ x i ⊗ δ f i for fine-scale particles with function the size F = ℝ + .Figure 3(c) shows the detected tau particles as red dots at 4 μm.We use computational lattices to interpolate between scales reapportioning to the lattice centers Feature reduction to the tissue scales maps to the first two moments (Figure 3(d)) of mean and variance of particle size The millimeter tissue scale depicts the global folding property of the tissue.The color codes the mean tau particle area as a function of position at the tissue scales with deep red denoting 80 μm 2 maximum tau area for the detected particles.

Cellular Neurophysiology: Neural Network Temporal
Models.Single-unit neurophysiology uses temporal models of spiking neurons with a "neural network" μ = ∑ i δ x i ⊗ δ f i , x i ∈ ℝ d , f i ∈ F taking each neuron x i modeled as a counting measure in time N i ðtÞ, t ≥ 0 with the spike times the feature The Poisson model with intensity λðtÞ, t ≥ t 0 [10] has

BME Frontiers
Post-stimulus time (PST) [29] and interval histograms are used to examine the instantaneous discharge rates and interspike interval statistics [30].The interval histogram abandons the requirement of maintaining the absolute phase of the signal for measuring temporal periodicity and phase locking.Synchrony in the PST is measured using binning The n = 0 frequency computes integrated rate; each phase-locked feature is complex ϕ n ∈ ℂ.
2.7.Scale-Space Resampling of RNA to Cell and Tissue Scales.Methods in spatial transcriptomics which have emerged for localizing and identifying cell types via marker genes and across different cellular resolutions [4,[31][32][33][34][35] present the opportunity of localizing in spatial coordinates the transcriptionally distinct cell types.Depicted in Figure 4 are the molecular measurements at the micron scales with MER-FISH [34] at three different scales.
The molecular measures represent RNA locations partitioning into the closest subsets as defined by the distance dðx i , Y j Þ of particle x i to cell Y j , accumulating the mixtures of RNA within the closest cell.The cell scale feature is the conditional probability of the 17 cell type in F C ⊂ ½0, 1 17 : For this example, the conditional probabilities on the RNA feature vector were found using principle components followed by Gaussian mixture modeling on ν C y j , onto c = 1, ⋯, 17 following [34].
Resampling to the tissue lattice ðz k ∈ Z k ⊂ ℝ 2 Þ k∈I T uses Gaussian rescaling with the new feature vector the probability of the cell at any position being one of 10 tissue types F T ⊂ ½0, 1 10 .The probability of tissue type is calculated using 10-means clustering on the cell type probabilities.The distance for 10-means clustering is computed using the Fisher-Rao metric [36] between the feature laws ν T z k , partitioning the cell type feature space into 10 regions ∪ 1⩽t⩽10 F t = F C giving probability features:

BME Frontiers
as colored markers corresponding to the different gene species (bar scale 1, 10 microns).Figure 4(g) shows the feature space of 17 cell types making up μ C associated to the maximal probability in the PCA projection from a classifier based on the mixtures of RNA at each cell location.Figure 4(h) shows the 10 tissue features of the 10means procedure.In both scales, probabilities are concentrated on single classes via indicator functions computed on the conditional probabilities.[4] depicting neuronal cell types via colors including excitatory cells eL2/3 (yellow), eL4 (orange), red eL5 (red), inhibitory cells ST (green), and VIP (light blue), each classified via high-dimensional gene expression feature vectors via spatial transcriptomics.
The measure on cell types μ C = ∑ i w i δ x i ⊗ δ f i , F C = fcell typesg crosses to atlas tissue scales using π σ in ℝ 2 of equation (27a) with feature reduction expectations of moments, F T = fsize, mean À square, entropyg: Panel (e) shows the vector field encoding of the geodesic transformation between the sections depicted by the bottom row transformation of grids.The narrowing of the banks of the perirhinal cortex is exhibited at the tissue scale for motion order 1000 μm (brightness on scale bar).Figure 6(i) shows the collateral sulcus fold at the boundary of the transentorhinal cortex region transforming based on the normed distances between sections with deformation motions 1000 μm in size.Shown is the micron scale depicting the transformation of the gyrus with the color representing the entropy of the particle identity distribution.

Mapping Digital Pathology from Histology to MRI Scales.
All of the examples thus far have created the multiscale data generated using the resampling kernels from the finest scales.As illustrated in our early figures, much of the data is inherently multiscale, with the measurement technologies generating the coarse scale representations.Shown in Figure 7 is data illustrating our Alzheimer's study of postmortem MR images that are simultaneously collected with amyloid and tau pathology sections.MR images have a resolution of approximately 100 μm, while pathology images have a resolution of approximately 1 μm.For computational purposes, the MRI template and target images were downsampled to 759 and 693 particles, respectively, with the tau tangles

Discussion
Computational anatomy was originally formulated as a mathematical orbit model for representing medical images at the tissue scales.The orbit model generalizes linear algebra to the group action on images by the diffeomorphism group.The orbit inherits a metric structure from the group of diffeomorphisms.The formulation relies on principles of continuity of medical images as classical functions, generalizing optical flow and advection of material to diffeomorphic flow of material, the material represented by the contrast seen in the medical imaging modality such as bold MRI contrast for gray matter or fiber orientation for diffusion tensor imaging.Unifying this representation to images built at the particle and molecular , α ℓ giving FWHM = 1500 μm and 6400 μm, for ℓ = 1, 2, respectively.9 BME Frontiers biological scale has required us to move away from classical functions, to the more modern 20th century theory of nonclassical generalized functions.Mathematical measures are the proper representation as they generally reflect the property that probes from molecular biology associated to disjoint sets are additive, the basic starting point of measure theory.Changing the model from a focus on groups acting on functions to groups acting on measures allows for a unified representation that has both a metric structure at the finest scales and a unification with the tissue imaging scales.
The brain measure formulation carries with it implicitly the notion of scale space, i.e., the existence of a sequence of pairs across scales, the measure representation of the brain, and the associated scale space reproducing kernel Hilbert space of functions which correspond to the probing measurement technologies.As such, part of the prescription of the theory is a method for crossing scales and carrying information from one scale to the other.Important to this approach is that at every scale we generate a new measure; therefore, the recipe of introducing "measure norms" built from RKHS's for measuring brain disparity is universal across the hierarchy allowing us to work simultaneously with common data structures and a common formalism.Interestingly, the measure norms do not require identical particle numbers across brains in brain space at the molecular scales.
The key modeling element of brain function is that the conditional feature probability is manipulated from the quantized features to the stochastic laws.These are the analogues of the Boltzmann distributions generalized to the complex feature spaces representing function.As they correspond to arbitrary feature spaces not necessarily Newtonian particles, we represent them simply as empirical distributions on the feature space, with the empirical measure constructed from the collapse of the fine scale to the resampled coarse scale.To model rescaling through scale space explicitly, the two kernel transformations are used allowing us to retrieve the empirical averages represented by the determinism of the stochastic law consistent with our views of the macro tissue scales.This solves the dilemma that for the quantized atomic and microscales, cell occurrence will never repeat; i.e., there is zero probability of finding a particular cell at a particular location and conditioned on finding it once it will never be found again in the exact same location in another preparation.The properties that are stable are the probability laws with associated statistics that may transfer across organisms and species.
Importantly, our introduction of the jdφðxÞj term in the action enables the crucial property that when a tissue is extended to a larger area, the total number of its basic constituents should increase accordingly and not be conserved.This is not a traditional measure transport which is mass preserving which is not a desirable feature for biological samples.Rather, we have defined a new action on measures that is reminiscent of the action on d-dimensonal varifolds [37,38].We call this property "copy and paste," the notion being that the brain is built on basic structuring elements in their design that are conserved.
We believe that many different diffeomorphism methods can be used at multiscale.The proper coupling of the vector fields would have to be derived to determine how the different scales mix as we have done for the multiscale LDDMM formulation here based on the total kinetic energy.Also, successive refinement for the small deformation setting has been introduced in many areas associated to multigrid and basis expansions.The notion of building multiscale representation in the large deformation LDDMM setting was originally explored by Risser et al. [39] in which the kernels are represented as a sum of kernels and Sommer et al. [40] in which the kernel is represented as vector bundles.In their multiscale setting, there is a postoptimization decomposition in which the contribution of the velocity field into its different components can then each be integrated.In that multiscale setting, the basic Euler-Lagrange equation termed EPDIFF remains that of LDDMM [41].In the setting proposed here, we separate the scales before optimization via the hierarchy of layered diffeomorphisms and use a multiscale representation of the brain hierarchy itself which is directly associated to the diffeomorphism at that scale.This gives the fundamental setting of the product group of diffeomorphisms with the Euler-Lagrange equation corresponding to the sequence of layered diffeomorphisms for multiscale LDDMM [25].
In terms of the efficiency of the multiscale representation, Figure 6 shows clearly the power of the multiscale diffeomorphism transferring microscopic and macroscopic scale properties of the brain as well as the power of crossing of scales transferring information consistently from particles to the continuum.What is striking in Figure 6 is that the deformations of the particles at the micron scale result in consistent motions of the cortical surface as a smooth global manifold.Also, the functional feature being transferred consistently from the particles via the composition of transformations T 1 and T 2 of equation (8) shows the clear pattern of the functional tau particle size being layered, a property that is hardly noticed at the molecular scale, but is clearly associated to the tissue scale.
The aggregation across scales from particle to tissue scales on lattices provides the essential link to inference on graphs.It is natural for the aggregated features on lattices with associated conditional probability laws to become the nodes in Markov random field modeling for spatial inference (see examples in spatial transcriptomics and tissue segmentation [42]).Building neighborhood relations as conditional probabilities between lattice sites from which global probability laws are constructed with the Hammersley-Clifford theorem links us to Grenander's metric pattern theory formalisms with the atoms and conditional laws ðx i , μ x i Þ i∈I at any scale playing the roles of the generators.

4.1.
Experimental and Technical Design.The objective of this research is to unify the molecular representations of spatial transcriptomics and cellular scale histology with the tissue scales of computational anatomy for brain mapping.To accomplish this, we designed a mathematical framework for representing data at multiple scales using geometric measures as generalized functions and mapping data using geodesic flows of multiscale diffeomorphisms.We illustrate the 10 BME Frontiers method using several examples from human MRI and digital pathology, as well as mouse spatial transcriptomics.
4.2.Gaussian Kernel Varifold Norm.Our varifold norm construction models the brain measures as elements of a Hilbert space W * which is dual to an RKHS W with a kernel K W .Using the dual bracket notation for h ∈ W, μ ∈ W * for μ a measure, then ðμjhÞ ≔ Ð ℝ d ×F μðdx, df Þhðx, f Þ, and the norm becomes the integration against the kernel equation (15b) written as kμk 2 W * ≔ ðμjK W ½μÞ; the multiscale norm is given by kμk To ensure the brain measures are elements of W * dual to the RKHS, the kernel K W is chosen to densely and continuously embed W in bounded continuous functions C b ðℝ d × F, ℝÞ so that the signed measure spaces M s ðℝ d × FÞ are continuously embedded in W * .An example kernel is the Gaussian kernel which satisfies this condition, the kernel taken as non-normalized, separable Gaussians with j⋅j Euclidean distance: For data with position information but no features (tau tangle locations), each f i , f j is constant with exponential terms all 1.

The Riemannian Distance Metric on the Multiscale
Group.The diffeomorphism group acts on the hierarchy φ ⋅ μ component-wise equation (11c) with the multiscale group product a space of k-times continuously differentiable vector fields vanishing at infinity and its partial derivatives of order p ≤ k intersecting with diffeomorphisms with 1derivative: Dynamics occurs via group action generated as a dynamical system in which the multiscale control t ↦ u t ≔ ðu ℓ t Þ ℓ≥0 flows the hierarchy t ↦ φ t satisfying _ φ t = u t ∘ φ t of (12a).The control is in the product V = Q ℓ≥0 V ℓ , each space an RKHS with normsquare k⋅k 2 V = ∑ ℓ≥0 k⋅k 2 V ℓ selected to control the smoothness of the vector fields.The hierarchy of spaces is organized as a sequence of continuous embeddings, V 0 ↪⋯↪V ℓ max , where V ℓ max is an additional layer containing the others with defined as a space of m-times continuously differentiable vector fields vanishing at infinity as well all its partial derivatives of order p ≤ m.
The hierarchy is connected via successive refinements u ℓ = u ℓ−1 + v ℓ , u 0 = v 0 expressed via the continuous linear operator A : V ⟶ V with v = Au.The control process ðu t Þ 0≤t≤1 ∈ L 2 ð½0, 1, VÞ has finite square integral with total energy Optimal curves which minimize the integrated energy E A between any two fixed boundary conditions (BC) φ 0 = Id and φ 1 which is accessible with a path of finite energy extend the LDDMM setting [26] to a hierarchy of diffeomorphisms and describe a geodesic for an associated Riemannian metric and multiscale LDDMM [25] on G k : Existence of solutions for minimizers over ðu t Þ 0≤t≤1 of ( 34)

Geodesic Multiscale LDDMM via Hamiltonian Control.
The shape of Brainspace is given by its geodesics.We use Hamiltonian control to generate the geodesics.
The Hamiltonian method reduces the parameterization of the vector field to the dynamics of the particles that encode the flow of states (17a).We write the dynamics explicitly as a linear function of the control, and define the flow of the measures indexed by the dynamical state: The control problem satisfying (16) reparameterized in the states becomes, for α > 0, Hamiltonian control for particles and tissues introduces the costates t ↦ p t via the Hamiltonian Under the assumption V ℓmax ↪C k+2 0 ðℝ d , ℝ d Þ, the Pontryagin maximum [22] with k ≥ 1 gives the optimal control for all scales ℓ satisfying Statement 1. Geodesics of particles.Assume that is a solution of the optimal control problem (36), then there exists a time-dependent costate t ↦ p t = ðp ℓ i,t Þ i∈I ℓ ,ℓ≥0 for all ℓ satisfying The optimal control satisfying ∂ u ℓ H ðq, p, uÞ = 0 for any ℓ ≥ 0 and v = Au ðv ℓ max = 0Þ is given by (18a).
See Appendix A for proof of differential equations.
Statement 2. (Integral equations for Hamiltonian Momentum of particles).Assuming q ↦ UðqÞ ≔ ðα/2ÞkμðqÞ − μ obs k 2 W * is C 1 in q, the geodesic costate for particles flowing from t = 0, 1 satisfies As proven in Appendix B, the particle integral equations of ( 40) and (18b) satisfy (39a).The second set of dense tissue integral equations (19b) satisfies (39b) by a similar argument.4.5.Gradients of the Endpoint Varifold Matching Norm.The gradients of the matching endpoints require us to compute the variation ðd/dϵÞUðφ 1 ðϵÞ, The gradients (20b) are rewritten using the state q t = ðx i,t , w i,t Þ iϵI to define the norm-square in terms of h q continuously differentiable in x and bounded C 1,0 b determining the smooth gradients: We take the variation ðd/dϵÞUðqðεÞÞj ε=0 varying each term q 1 ðεÞ = ðx i,1 + ϵψ x i , w i,1 + ϵψ w i Þ i∈I with dependence on ℓ-scale implied: The gradients (20c) for tissue have μ = Ð ℝ d wðxÞρðxÞδ x ⊗ μ x dx and μðq t Þ = Ð ℝ d w t ðxÞρðxÞδ φ t ðxÞ ⊗ μ x dx with q t ≔ ðφ t , w t = wjdφ t jÞ.The average of h q 1 over the feature space determines the boundary term variation.

Appendix A. Hamiltonian Control Statement
We take for our RKHS V ℓ , ℓ ≥ 0 with the operators L ℓ : V ℓ ⟶ V * ℓ defining the isometries such that the inner products h•, • i V ℓ satisfy for any u′ ℓ , v′ ℓ ∈ V ℓ : If ðu t Þ 0≤t≤1 is a solution of the optimal control problem (36), then for particles there exists time-dependent costate t ↦ p t = ðp ℓ i,t Þ i∈I ℓ ,ℓ≥0 such that all ℓ satisfies ðA:2aÞ The optimal control for particles satisfies for every scale ∂ u ℓ H ðq, p, uÞ = 0 with v = Auðv ℓ max = 0Þ: ðA:2bÞ with g ℓ ≔ ∑ ℓ j=0 g j and ∇ 1 g ℓ ða, bÞ denoting the gradient of g ℓ with respect to the first variable a and with shorthand notation ≥ℓ to mean upper bounded by ℓ max .

Statement 2. We assume that
If ðu t Þ 0≤t≤1 is a solution of the optimal control problem (36), then for tissue there exists time-dependent costate ðt ↦ p t = ðp ℓ t ðxÞÞ x∈ℝ d ,ℓ≥0 Þ such that all ℓ satisfies ðA:3aÞ The optimal control for tissue satisfies for every scale ∂ u ℓ H ðq, p, uÞ = 0 with ðA:3bÞ Proof.Under the assumption V ℓmax ↪C k+2 0 ðℝ d , ℝ d Þ, then we have ðu, qÞ ↦ ξ q ðuÞ is C 2 and standard results of optimal control theory applying the Pontryagin maximum principle 13 BME Frontiers [22] gives ðA:4Þ Showing Statement 1, the state and Hamiltonian momentum variations are at the same scale for all ℓ ≥ 0; therefore, we omit superscripts ℓ.For particles, the variations at any scale ℓ, ∂ p ℓ H, and ∂ q ℓ H vary p x i ðϵÞ = p x i + ϵψ p x i , p w i ðϵÞ = p w i + ϵψ p w i , and x i ðϵÞ = x i + ϵψ x i , w i ðϵÞ = w i + ϵψ w i , respectively, giving the state velocities and momentum differential equations of (A.2a):The tissue proof (A.3a) is a similar argument.We prove the continuum tissue case of (A.3b) for the optimal control since it is the multiscale version of the original LDDMM conservation of momentum equations derived in [25,41].The particle proof for (A.2b) is similar.Calculating ∂ u ℓ H = 0, define u ℓ ðϵÞ = u ℓ + ϵψ u for ψ u ∈V ℓ max , implying v ℓ+1 ðϵÞ = v ℓ+1 − ϵψ u , v ℓ ðϵÞ = v ℓ + ϵψ u : ðA:6Þ The Eulerian momentum for the system at each scale is L ℓ v ℓ and is conserved as proven in [25].Summing the momentum difference L j v j − L j+1 v j+1 from j ≥ ℓ gives p φ,j , ψ u ∘ φ j R d + p w,j w j div ψ u ∘ φ j À Á dx: ðA:7Þ We have for α ∈ ℝ d then ðα ⊗ δ x jψÞ = hα, ψðxÞi ℝ d and ðδ div x jψÞ = div ψðxÞ.This gives Using the definition of the Green's kernel gives K ℓ ½δ div φ j ðxÞ = ∇ 1 g ℓ ðφ j ðxÞ, ⋅Þ and K ℓ ½p φ,j ⊗ δ φ j ðxÞ = g ℓ ðφ j ðxÞ, ⋅Þp φ,j implies the result for v ℓ of (A.3b).Since u ℓ = ∑ ℓ j=0 v j we deduce the second line of (A.3b) for the optimal control.

B. Hamiltonian Costate Momentum Integrable Dynamics
We omit the superscripts ℓ below since costates and states and flows are at the same scale.
Statement 3. Assume q ↦ UðqÞ ≔ ðα/2ÞkμðqÞ − μ obs k 2 W * is C 1 in q; then, the costate integral equation (18b) for particles flowing from t = 1 solves the Hamiltonian differential equations ð _ p x , _ p w Þ of (A.2a) at every scale ℓ ≥ 0; the integral equations flowing from t = 0 satisfy p x i,t = dφ t,0 ðB:1Þ Proof.We show the proof for particles, with the tissue proof a similar argument.First for t = 0, take p w i,t = p w i,0 jdφ t,0 jðx i,t Þ of (B.1) and show that it satisfies (A.2a).For w i,t = w i jdφ t jðx i Þ, where the last equality uses (B.2), w i,0 p w i,0 = w i,t p w i,t .The remaining identity follows ðd/dtÞððdφ t Þ −1 dφ t Þ = 0 implying ðB:5Þ The optimal control (18) is written in the endpoint ðp x 1 , p w 1 Þ with the boundary conditions (20b).A similar argument as above gives the t = 1 boundary corresponding to the first part of (18b) for t = 1.For p w i,t then constancy p w i,t w i,t = p w i,1 w i,1 with jdφ t,1 jðx i,t Þ = jdðφ 1 °φ−1 t Þjðx i,t Þ = jdφ 1 jðx i Þjdφ −1 t jðx i,t Þ gives the second half of (18b) for t = 1:

1 𝜇Figure 1 :
Figure 1: (a) Tissue from a NexCre+/-; Bm2fi/+ adult mouse mimicking a wild-type mouse with CUXl labelling of layers ii/iii and iv and CTIP2 in layers v and vi in green.It shows sections at 2:5 2 × 50 μm 3 6 tile images, 1433 × 1973 pixels; taken from Uli Mueller.(b) Shows the abstraction of a coarse-to-fine hierarchy μ ℓ−1 , μ ℓ , μ ℓ+1 with fine molecular scales shown at the bottom with colors depicting F function ascending scales.(c) Space and function transformation shown as a composition μ ⟶ T 1 v ⟶ T 2 μ ℓ .

Figure 1 (
c) shows the cascade of operations, the first transforming linearly μ

Figure 3 (
Figure 3(b) depicts a Bayes classifier for gray, white, and cerebrospinal fluid compartments generated from the temporal lobe high-field MRI section corresponding to the Mai-Paxinos section (panel 3, top row).

Figure 3 :
Figure 3: (a, b) Medial temporal lobe at 1 mm and high-field 200 μm MRI; Mai-Paxinos atlas section of the MRI with the hippocampus and entorhinal cortex; (b) shows the Mai Paxinos section and Bayes compartments.(c, d) Alzheimer 4 μm tau histology (red) from section depicted via high-field MRI (a, b); (c) shows detected tau particles in two sections.The box depicts transentorhinal region from (a, b).(d) Shows the mean particle size and standard deviation at micrometer tissue scales; deep red color denotes 80 μm 2 tau area.

Figures 5 ( 2 2 . 2 . 8 . 2 .
b) and5(d)  show the tissue scale features associated to the cell type and the entropy.They shows the results of transforming the neuronal cells depicting the cell type (b) and entropy feature (d).The entropy is a measure of dispersion across the cell types given by the expectation of the log probability function with zero entropy meaning the space location feature distribution ν has all its mass on 1 cell type.Geodesic mapping enforces vector field smoothness via differential operators specifying the norms in the RKHS kvk 2V ℓ ≔ ðL ℓ vjvÞ with L ℓ ≔ ðð1 − ðα ℓ Þ 2 ∇ÞidÞ Navigation between Sections of Histology.Figures 6(a)-6(h) show navigation between the cortical folds of the 4 μm histology.Shown in (a) is a section showing the machine learning detection of the Tau particles.Figures 6(b)-6(d) and 6(f)-6(h) depict the template, mapped template, and target showing the mathematical measure representation of the perirhinal cortex constructed from the positions and sizes at the 4 μm scale (b-d) and reconstruction using Gaussian resampling onto the tissue scale (f-h).The color codes the mean of μ x representing tau area as a function of position at the tissue scales with deep red maximum denoting 80 μm 2 of tau tangle area.The gradients in tau tangle area between superficial and deep layers are apparent with the deep red as high as 80 μm 2 for the innermost tissue fold.

Figure 4 :
Figure 4: (a-e) Show the cartoon of multiscale renormalization of particles to cells and cell centers to regular lattice representing the tissue.(f) Shows RNA marks from [35] of the 167 RNA gene species (bar scales 1, 10 μm); (g, h) shows data from [34] showing 17 cell types clustered on cell centers (g); (h) shows K = 10 means clustering to tissue with Gaussian resampling with σ = 25 pix on the 450 × 200 pix 2 grid.

.
to 1038 and 1028 particles, respectively.We treated every pixel in the MR image as a coarse scale particle with image intensity as its feature value equation(21) and every detected tau tangle as a fine-scale particle with a constant feature value and performed varifold matching to align to neighboring sections.The endpoint representing the two scales is U = ð1/2Þ∑ ℓ=1,2 kμ ℓ temp − μ ℓ obs k For each scale norm, we use a varifold kernel given by the products of Gaussian distributions with the varifold measure norm equation (29),(30) at each scale.For the MRI scale, the weights are identical w = 1 with the function component given by the MRI image value; for the tau particles, there is no function component making the kernel of equation (15) for all function values f in the varifold norm identically 1.Figures7(a)-7(f) show the imaging data for both sections.Figures7(g)-7(i) show the transformed template image at the fine scale.The high-resolution mapping carries the kernels across all the scales as indicated by the geodesic equation for the control (18a).Notice the global motions of the high resolution of the fine particles.

Figure 6 : 2 2 ,
Figure 6: (a-h) Second section 4 μm histology (similar to Figure 3) with the box depicting perirhinal cortex.(b-d) and (f-h) show template, mapped template, and target at the molecular (b-d) and tissue scales (f-h) showing the first moments of tau size on the perirhinal cortex; saturated red color denotes 80 μm 2 tau area.Mapped template shows narrowing 1000 μm of perirhinal sulcus.(e) Depicts vector field encoding of the geodesic mapping with associated scale bar.(i) Geodesic navigation φ t ⋅ μ of collateral sulcus (Figure 3, box) showing 1000 μm widening of folds for molecular and tissue scales depicting the mean transformation.The vector field mappings have RKHS norm induced by the differential operators with L ℓ ≔ ðð1 − ðα ℓ Þ 2 ∇ 2 ÞidÞ 2 , with α ℓ giving FWHM = 580 μm and 3300 μm, for ℓ = 1, 2, respectively; the varifold norm has σ ℓ x = 800 μm and 160 μm.

Figure 7 :
Figure 7: Whole brain section showing mapping MRI and histology at the multiple scales.(a-f) Show the MRI and tau histology for two sections with the detected tau particle superimposed over the MRI (c, f); (g-i) show the finest scales for the tau particles in the template and (h) the template tau particles mapped, with (i) showing the target tau particles; the varifold norm has σ ℓ x = 4000 μm and 100 μm.The vector field mappings have RKHS norm induced by the differential operator L ℓ ≔ ðð1 − ðα ℓ Þ 2 ∇ 2 ÞidÞ in t ↦ p t = ðp of (B.1) satisfies (A.2a); rewrite the integral solution using φ t,s ≔ φ s °φ−1 t and the identity t = −ðp w i,t _ w i,t /w i,t Þ = −p w i,t div u t ðx i,t Þ.