{'fraction_non_alphanumeric': 0.03640069889341875, 'fraction_numerical': 0.0157251019219569, 'mean_word_length': 4.485851209493382, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Manifold Rewiring for Unlabeled Imaging

Geometric data analysis relies on graphs that are either given as input or inferred from data. These graphs are often treated as"correct"when solving downstream tasks such as graph signal denoising. But real-world graphs are known to contain missing and spurious links. Similarly, graphs inferred from noisy data will be perturbed. We thus define and study the problem of graph denoising, as opposed to graph signal denoising, and propose an approach based on link-prediction graph neural networks. We focus in particular on neighborhood graphs over point clouds sampled from low-dimensional manifolds, such as those arising in imaging inverse problems and exploratory data analysis. We illustrate our graph denoising framework on regular synthetic graphs and then apply it to single-particle cryo-EM where the measurements are corrupted by very high levels of noise. Due to this degradation, the initial graph is contaminated by noise, leading to missing or spurious edges. We show that our proposed graph denoising algorithm improves the state-of-the-art performance of multi-frequency vector diffusion maps.


I. INTRODUCTION
The manifold assumption refers to high dimensional datasets that can be described by a small number of parameters living on a manifold. Manifold structure arises in diverse applications, from spaces of optical blurs in microscopy [Debarnot et al., 2020], over patches of natural images [Carlsson et al., 2008], to the behavior of neuronal populations in the hippocampus [Gardner et al., 2022].
Once the manifold assumption is established, the natural question is that of manifold learning: how to characterize a manifold from a noisy set of points sampled from it [Belkin and Niyogi, 2008], [Balasubramanian and Schwartz, 2002]. Most approaches begin by constructing a neighborhood graph that links data points that are close in some well chosen metric. These observed data points are often corrupted by noise which introduces spurious or missing edges in the graph and hampers the estimation of the manifold.
In this paper, we address the problem of denoising neighborhood graphs sampled from manifolds with a focus on imaging problems where the observations suffer from a large amount of noise. The denoising takes the form of a rewiring of the noisy graph obtained from the observations. We build on the recent advances in graph neural networks for link prediction. An important example of an imaging modality where the observations lie on a manifold is single-particle cryo-electron microscopy (cryo-EM, 2017 Nobel prize in Chemistry) which obtains atomic-resolution images of biological proteins. A major challenge in cryo-EM is noise. As we show later in Section IV, our plug-in graph denoising algorithm can improve performance of state-of-the-art methods.

A. Cryo-EM reconstruction
Approaches to unknown-view tomographic reconstruction in cryo-EM can be categorized according to whether or not they estimate the orientations of the projections. Those that don't estimate the projections typically employ the method of moments [Kam, 1980], [Levin et al., 2018], [Sharon et al., 2020], [Huang et al., 2022]. Our focus is, however, on the methods that estimate orientations which achieve the current state-of-the-art performance at low signal to noise ratios (SNR) [Punjani et al., 2017], [Zhong et al., 2021]. Such methods, which typically alternate between orientation estimation and reconstruction steps, are at the heart of major software packages for cryo-EM reconstruction such as RELION [Scheres, 2012]. A major challenge faced by these approaches is that huge noise hampers orientation estimation and precludes reconstruction at very low SNRs if only pairwise information between observations is used. Nevertheless, leveraging multiple projections and sophisticated denoising schemes enables sufficiently accurate angle estimation. In this paper, we build on this line of work to increase the maximum tolerable amount of noise.

B. Graphs and tomography
The problem of 2D computed tomography with projections at unknown angles shares many similarities with single-particle cryo-EM. In the seminal paper [Coifman et al., 2008], the authors show that it is possible to retrieve these unknown orientations from the noisy observations. This is done by constructing a graph with projections as vertices and edges between those projections that are close in the 2 metric. The first two non-trivial eigenvectors of the corresponding graph Laplacian encode relative position of the projections. This feat can be explained by linking the eigenfunctions of the Laplace-Beltrami operator on the circle to the eigenvectors of the graph Laplacian. The authors of [Singer and Wu, 2013] proposed to augment projection denoising with graph denoising based on the Jaccard index. This combination allows reconstruction at very high noise levels. In this paper we look at more general graph denoising strategy based on graph neural networks and the considerably more complex full 3D case.
The current state-of-the-art methods for reconstruction at very low SNR combine signal filtering with the construction of a graph as in 2D computed tomography [Fan and Zhao, 2019], [Zehni et al., 2020], [Fan and Zhao, 2021]. Each projection is filtered by using a low-dimensional representation basis [Zhao et al., 2016], [Zhao and Singer, 2013], [Landa and Shkolnisky, 2017] and denoised by averaging with projections at similar viewing directions , [Singer et al., 2011]. Similarly to the 2D case, the success of the arXiv:2209.05168v1 [eess.SP] 12 Sep 2022 averaging step relies on the quality of the neighborhood graph, which is in turn impacted by the large amount of noise in projection images. To improve performance, the state-of-the-art methods additionally leverage vector diffusion maps (VDM) to penalize inconsistencies among sequences of estimated transformations between projections [Singer and Wu, 2012].
The VDM embedding can be further enriched by considering multiple irreducible representations of the 2D rotation group, resulting in the so-called multi-frequency vector diffusion maps (MFVDM) [Fan and Zhao, 2019], [Zehni et al., 2020], [Fan and Zhao, 2021]. VDM and MFVDM compute embeddings that are robust even in the presence of high noise.

C. Denoising
Naive cryo-EM denoising methods rely on unsupervised classification approaches such as K-means [Frank, 2006], and averaging in-class projections. However, accounting for the symmetries requires the costly alignment of all 2D projections. The authors of [Zhao and Singer, 2013] use the Fourier-Bessel basis to efficiently apply rotations and flips. The Fourier-Bessel basis was also used to improve classification and averaging  as it allows a fast computation of the VDM embedding. This improved nearest neighbor search is then used to denoise projections by averaging their Fourier-Bessel expansion coefficients . Recent work leverages the MFVDM embedding and proposes refined denoising schemes that use the eigenvalues and eigenvectors of the MFVDM matrix to filter the Fourier-Bessel coefficients [Fan and Zhao, 2019], [Fan and Zhao, 2021].

D. Contributions
In this paper, we propose a new method to denoise neighborhood graphs affected by noise. Our method is plug-and-play and can be combined with any existing graph-based scheme like VDM or MFVDM. We build on a state-of-the-art GNN-based graph link prediction algorithm [Pan et al., 2021] to remove edges that are inconsistent with the learned prior graph statistics. We show that the proposed algorithm indeed produces a better graph and thus improves denoising and reconstruction. Combined with the MFVDM-based reconstruction pipeline, it achieves the state-ofthe-art in low-SNR cryo-EM on synthetic data generated from real densities.

III. METHODS
We use bold typeface for vectors x and matrices A, and regular typeface for scalars and scalar functions. The i-th entry of a vector x is written xi or x[i]. A is the transpose of A. We let U(I) denote the uniform distribution over the set I. The 2-sphere S 2 is defined as where Id d ∈ R d×d is the identity matrix. For simplicity we write R(θ) for both the d × d rotation matrix with angles θ ∈ R d acting on vectors in R d and the rotation operator acting on the discrete d-dimensional volume R n d = R n×···×n . 1 1 Foregoing technicalities, this operator is then the left regular representation of the rotation group on 2 (Z d n ).
A. Single-particle cryo-EM Single-particle cryo-EM aims to recover volume density of a single molecule at atomic resolution. To this end, a solution with many instances of the molecule to be imaged is placed on a grid and rapidly frozen. Then an electron beam passes through the randomly oriented molecules and the resulting two-dimensional projections along the beam are captured by a camera. Finally, single-particle projections are extracted using automated tools [Frank and Wagenknecht, 1983], [Heimowitz et al., 2018]. This is equivalent to observing projections of the 3D density along random directions followed by a rotation around the projection axis; see Fig. 1. Figure 1: Illustration of single-particle cryo-EM imaging. We observe projections of the volume density along random directions. For a fixed viewing direction, any rotation of the molecule around this axis will give rise to the same projection up to a 2D rotation.
Mathematically, the cryo-EM reconstruction problem boils down to estimating an unknown volume ρ ∈ R n×n×n with n ∈ N+, from M ∈ N+ projections at unknown random angles, corrupted by noise. Let 1 ≤ m ≤ M . The pixel intensity ym ∈ R n×n of the m-th observed projection image is given by where we use R(θm) ∈ SO(3) to denote the Euler rotation angles that parameterize the rotation R(θm), P is a projection operator from R n×n×n to R n×n which sums over the third (z) coordinate, and ξm denotes independent additive white Gaussian noise with covariance σ 2 Id n 2 . In single-particle cryo-EM, it is reasonable to assume that molecules have no preferred orientation. We therefore assume that the particle rotations are sampled uniformly and independently at random over SO(3).
We observe a large number of projections, typically M ≥ 10, 000. However, because the electron dose must be kept low in order not to destroy the molecules, observations suffer from a lot of noise. The noise degradation between a clean signal y0 ∈ R n and a noisy signal y0 + ξ ∈ R n is measured by the SNR, In cryo-EM, it is not unusual to encounter SNRs as low as 0.01; We are particularly interested in this high noise regime. Even at such low SNRs, the volume ρ in Problem (1) can be accurately estimated if the orientations (θm) are known. If that is the case the problem becomes a linear tomographic inversion and can be solved by the pseudoinverse of the forward map, that is the filtered backprojection. The challenge is that since the molecules are arranged randomly, we do not a priori know the orientations.

B. Affinity graph
State-of-the-art projection denoising methods construct a graph where each vertex correspond to one noisy observation [Singer and Wu, 2012], [Fan and Zhao, 2021]. The starting point to construct the graph is an affinity matrix W ∈ R M ×M between projections W m,m = affinity(ym, y m ), where the affinity function varies from method to method. Early work uses the rotation-invariant 2 metric and then refines the affinity using the connection graph Laplacian [Singer and Wu, 2012]. In the state-of-the-art MFVDM the affinity is based on the eigenvectors and eigenvalues of connection graph Laplacian corresponding to multiple irreducible representations of the 2D rotation group. Both approaches construct the adjacency matrix of the graph by connecting a node to its K nearest neighbors. We let G = (V, E) denote this graph and A ∈ R M ×M its adjacency matrix, where V ⊂ R n×n is the set of vertices and E def.
An important feature of the two discussed affinity functions is that they are invariant to the rotation of the molecule around the projection axis. Each observation being a function of a rotation of the molecule which lives in SO(3), this invariance amounts to quotienting the space of observations SO(3) by the space of 2D rotations SO(2), SO(3)\SO(2) S 2 , [Rubakov, 2009, Chapter 3, Problem 6]. The affinity thus depends only on the difference between the projection axes (and on the density, of course) which are defined by unit vectors in R 3 , that is to say, vectors on S 2 . For sufficiently regular ρ without symmetries, this implies that in the absence of noise the affinity graph will topologically resemble a 2-sphere. This is formalized by the following proposition proved in Appendix A. (3)) with θ = [θ1, θ2, θ3] being the Euler angles. Let further y = PR(θ)ρ.
Then there exists a function fρ : S 2 → R n×n which depends on the unknown density ρ, such that for φ ∼ U (SO(2)), s ∼ U (S 2 ), has the same distribution as y.
State-of-the-art affinity metrics further leverage a reflection identity: projections corresponding to opposite viewing directions coincide up to a flip. This fact must be accounted for when we later design the graph denoising strategy.
Topologically, it means that observations should live on a projective plane rather than the sphere after quotienting out the flips. This is however only true for noiseless observation. As the noise level increases, the constructed graph is contaminated by a growing number of spurious and missing edges, as illustrated in Fig. 2. In the next section, we describe Walk Pooling [Pan et al., 2021], a link prediction graph neural network, and demonstrate how it can be used to improve the noise resilience of existing approaches.
C. Walk pooling: likelihood of the correct graph (subgraph) In this section we introduce Walk Pooling (WP) [Pan et al., 2021], a graph neural network that is trained to output the likelihood that an edge belongs to a target graph. Fig.  2 illustrates the results of applying WP denoising to synthetic regular graphs.
Following the discussion in the previous section and Proposition 1, the graph G is expected to have the same distribution as a Kneighborhood graph sampled from the sphere S 2 (or projective plane if the affinity metric identifes the flips). We letḠ = (V,Ē) denote this target graph. To constructḠ, we randomly sample M points from the unit 2-sphere and compute the K-neighbourhood graph using the geodesic distance.
Let h ∈ N+. We define the h-hop sub-graph of G corresponding to an edge e ∈ E by G h e def.
= {e ∈ E, there is at most h − 1 edges between e and e}, and V h e ⊂ V the set of vertices that have an edge in E h e . The distribution of sub-graphs depends on the manifold that the data points are sampled from. Since S 2 is isotropic with constant sectional curvature, we expect that the sub-graph distribution is invariant to the position in the graph. While the sub-graph distribution for regular random graphs (such as regular neighborhood graphs on the sphere) could at least in principle be characterized, explicitly calculating posterior probabilities of link existence is impossible. This difficulty suggests the use of machine learning algorithms such as WP to approximate the optimal estimate of the link or sub-graph likelihood.
More concretely, we want to learn a score function where WPp : (e ∈ E, G) → [0, 1] is a neural network parameterized by P trainable parameters p ∈ R P . The WP formalism computes permutation invariant features from a sub-graph from powers of its adjacency matrix [Pan et al., 2021]. It then applies a multilayer perceptron (MLP), such that where Fe ∈ R 2×(2h−1) are the mentioned input features. The matrix Fe is defined as where  . The noisy graph is constructed from 10 nearest neighbors. The second row visualizes these graphs with nodes in the original positions. As in cryo-EM, with large perturbations, faraway nodes become connected and destroy the graph geometry. The goal of graph denosing is to remove these edges based on the prior knowledge that the nodes of true graph are randomly sampled from a circle. The third row shows the denoised graphs. Right: Nodes (blue) are shown at their true positions, but the graph contains many spurious links due to noise. The graphs are sampled on (from left to right) a triangle grid on the 2D plane, a triangle grid on the Möbius strip and a square grid on the 2D plane. The second row shows the denoised graph after WP. We see that WP yields meaningful denoised graphs even in the presence of large noise.
• We assume that the vertices of the link of interest are in positions 0 and 1 in matrices The MLP is trained using the target graphḠ. For all links inḠ, the WP neural network is trained to output a score of 1. Then, we randomly sample the same number of negative links (not existing links) fromḠ and give them score 0. This can be regarded as a binary classifier with training dataset {Fe, s}. After training this MLP, we can then compute the score for the links inḠ.

D. Cryo-EM denoising with Walk Pooling
The spurious noisy edges in the neighborhood graph deteriorate the quality of projections denoised by averaging over neighbors. We use WP to detect and remove these erroneous faraway connections from the affinity graph G. We emphasize that WP can be combined with any existing graph-based method (e.g., VDM or MFVDM).
Let τ > 0 be the threshold. For every edge e ∈ E in the noisy graph G, we compute the score s(e|G). We then construct the denoised graphĜ = (V,Ê) by keeping all edges with a score above τ . If all edges of a vertex have been removed, we removed this vertex from the graph, such thatV ⊂ V andÊ ⊂ E.

IV. COMPUTER EXPERIMENTS
We now demonstrate that our approach improves the denoising performance and consequently of reconstruction of state-of-the-art methods. Concretely, we use the AS-PIRE toolbox  and MFVDM denoising [Fan and Zhao, 2021] with and without our graph denoising step. Numerical comparisons in the original MFVDM publication [Fan and Zhao, 2021] show that below a SNR of 0.05, MFVDM performs better than standard methods in single particle cryo-EM [Scheres, 2012], , [Bhamre et al., 2016], [Landa and Shkolnisky, 2017]. Therefore, we only compare our graph denoising pipeline with this approach.

A. Experimental setting
We closely follow the experimental setting described in [Fan and Zhao, 2021]. We simulate cryo-EM by using a 3D density of a 70S ribosome discretized on a grid of size 129 × 129 × 129 (n = 129). We generate M = 10, 000 projections by sampling uniformly at random M rotations angles (θm) and add white Gaussian noise with of various power, such that the average SNR of the projections is 0.03, 0.016, 0.01. (These values correspond to −15dB, −18dB and −20dB.) The MFVDM approach constructs a K-NN graph on K = 50 neighbors.

B. WP update
We train WP on the target graph for 100 epochs using the binary cross entropy loss from PyTorch combined with a Sigmoid layer to ensure a score in [0, 1]. The target graph is generated by randomly sampling 10, 000 points and adding Gaussian noise with standard deviation σ = 0.01. We found that this small perturbation makes the training more robust to overfitting. We then construct the Knearest neighborhood graph with K = 50. We train WP with h = 2. This leads to a subgraph containing about 400 projections. We found that this gives a good trade-off between accuracy and computational time. The updated graph is computed using the threshold τ = 0.5.
The WP neural network has to be trained only once. We then use it to denoise the graph produced by MFVDM for the three SNRs {0.03, 0.016, 0.01}. The graph rewiring is done by evaluating the WP score for random edges. If the score is below τ = 0.5, then the edge is removed. Since the update of one edge changes the WP score of the others, we cannot detect all bad edges at the same time. More precisely, for each node, we select randomly one of its edge and compute its score. Then we iterate until no edges are removed. We display the number of edges removed per iteration in Fig. 4. We see than after 600 iterations, almost no more edges are removed. In the right part of Fig. 4, we also display the number of edges per node (initially 50). We see that with more noise, more  edges are removed on average. We will see in the next paragraphs that this can also be seen as a prior to select a trustworthy subset of nodes.

C. Graph denoising
Each observation is characterized by its projection axis (see Fig.  1). The main idea behind constructing a neighborhood graph for denoising is to capture projections that are similar, and thus have similar projection axes. We evaluate the quality of the graph by computing the distance between the viewing directions of every neighbors. The projection axis of each observation ym can be parameterized by a unitary vector xm ∈ S 2 . We then use the geodesic distance on the sphere to evaluate the quality of the neighborhood. We define the distance between two neighbors ym and y m by dview(ym, y m ) = arccos ( xm, x m ) .
In Fig. 5, we report the kernel density estimate of the distance between all observations linked by an edge in the MFVDM graph and in the graph updated by WP. We see that the use of WP produces a neighborhood of projections with more similar viewing directions. This shows that, in the presence of high noise, WP helps to better select edges that are likely to correspond to similar viewing directions.

D. Volume reconstruction
Finally, we show that the improvement in the quality of the graph actually leads to a better reconstruction of the unknown volume. All reconstructions are performed using the ASPIRE toolbox  and 1000 denoised images. For WP, we make use of the rewiring procedure to select the most trustworthy nodes. We select the 1000 observations with the more remaining edges (at most 50).
We measure the quality of the reconstruction with the Fourier shell correlation (FSC). The FSC indicates the correlation between the frequencies of the estimated volume and the original. Results are reported in Fig. 6.
Intuitively, at very low SNR, a better neighborhood graph (see done, since we only want to compare the denoising performance.) This intuition is confirmed in the FSC plots where WP-denoised graphs yield better scores for lower-resolution volumes (Fig. 6, right column). High frequencies are difficult to recover for both approaches.
A significant improvement in quality can be observed in the reconstructed 3D volumes in Fig. 3. We see that the shape of the molecule is well retrieved, even at SNR as small as 0.01. Notice also that at SNR 0.01, WP leads to a solid improvement by better retrieving the side structures of the molecule.

V. DISCUSSION
We currently use a simple instance of WP to learn a graph prior. On the other hand, one of the strengths of WP is its ability to combine the attributes of each node and the varied connectivity of the graph. We only use the adjacency matrix to determine the quality of an edge, but we could also leverage node features, for instance by using the inplane angle estimation produced by MFVDM.
Each edge is evaluated by the score function which is trained on the target graph, with a small amount of noise. Unfortunately, when evaluating the score of an edge, the subgraph used probably contains several wrong connections. This introduces a bias in the score function. We believe that training WP on a graph closer to the noisy input used during rewiring can make the evaluation more robust.
Finally, in this paper, we are only removing edges. This makes the image denoising and the reconstruction much simpler to compare with the MFVDM pipeline. However, WP can also be used to get a score on non-existing links, therefore we could detect missing connections. This would require to estimate inplane rotation angle for each new edge. The estimation is likely to be less accurate than the one returned by MFVDM since the latter accounts for a consistency over all the measurements.