WorksComputer Science
Linear-Size Spectral Sparsification by Sign Descent
Abstract
Given an undirected graph with vertices, edges, and arbitrary positive weights, we construct a -spectral sparsifier with edges. For every , the algorithm succeeds with high probability and runs in time In each phase we seek a reweighting that brings many edge weights to zero or twice their current value while keeping the relative change in every graph energy small. Reversing the weight changes preserves the error and exchanges deletion with doubling, so one choice deletes at least half the edges that reach an endpoint. We balance a smooth penalty for spectral error against a linear reward for alignment with independent random signs. Each step changes the free weights by a fixed fraction of their values at the start of the phase, with directions chosen from the estimated signs of the negative gradient. A weight stays fixed once it reaches an endpoint. We show that while few weights are fixed, the remaining edges admit a direction whose gain in reward exceeds its first-order spectral cost by a constant. The objective is bounded below, so this decrease forces a constant fraction of the weights to an endpoint. We repeat the partial coloring on the surviving edges, choosing the tolerances to keep the total relative error within .
Introduction
Let be a weighted undirected graph with Laplacian . The energy of an assignment of real values to the vertices is
A spectral sparsifier preserves this energy to small relative error for every using a reweighted subset of the edges.
Theorem 1. Let be an undirected graph with vertices, edges, and positive real weights. For every , a randomized algorithm returns, with high probability, a reweighted subgraph with edges and . Its worst-case running time is
Removing edges in phases. A phase computes and applies one partial coloring of the current graph. Its goal is to delete a constant fraction of the edges while keeping the relative change in every graph energy small. If the phase starts with edges of weights , write the new weight of as with . The energy change on an assignment is . It is linear in , so and have the same worst relative error. It therefore suffices to bring a constant fraction of the coordinates to either endpoint of . One of and sets at least half of the corresponding weights to zero. We call such an a partial coloring.
The next phase starts from the new weights on the surviving edges. Let be the Laplacian before the first coloring phase. We measure the errors of all phases relative to , and their sum bounds the final relative error. Give the current phase a tolerance , meaning that its relative error may be . The partial coloring below achieves this with for an absolute constant . Since decreases geometrically, the sum of these tolerances is within a constant factor of the last one. Stopping at edges therefore gives total error . In § 4 we give some phases a larger share of the budget so that they can take larger steps.
Choosing the weight changes. Let be the change in the current Laplacian. On , define the normalized error matrix
By the Rayleigh quotient, is the largest absolute energy change relative to . Thus it suffices to keep bounded by a constant.
To compare possible moves, we need a smooth measure of spectral error. The -norm of and the eigenvalues of is . For an even with , their -norm approximates this maximum within a constant factor. We use as the penalty, so the cost of a move depends on the ratio of the new norm to the old one. The original weights minimize this penalty, so we encourage movement toward the boundary by rewarding alignment with a random sign vector . This gives
To bound the change in the penalty, let and be the eigenvalues of and , respectively, in increasing order. For every unit vector we have , so the min–max principle gives for each . By the triangle inequality for the -norm,
Both norms are at least one, and the derivative of is at most one on . Thus adding to changes the penalty by at most .
Why many weights reach an endpoint. Start at . At each step we move the free coordinates a common distance and freeze any coordinate that reaches or . The signs of the negative gradient minimize the directional derivative of over all directions supported on the free edges with entries in . It therefore suffices to exhibit one such direction whose gain in reward exceeds its marginal spectral cost.
Following every target sign could incur large spectral error. For example, either sign on a bridge gives relative error one on its cut, regardless of the signs on the other edges. We show that a constant fraction of the target correlation is attainable at small spectral cost. With high probability over , for every sufficiently small frozen set there is a direction supported on the free coordinates with and relative spectral error (Lemma 3). We need the guarantee simultaneously for all small frozen sets because the frozen sets depend on and determine which coordinates freeze.
Moving from to for small gains at least in reward. The error matrix changes by , so the penalty increases by at most when for a sufficiently large . Thus the directional derivative of along is at most , and the negative gradient signs give at least as much decrease. A sufficiently small step of length retains a constant fraction of this decrease. The objective starts at zero and is bounded below by , since the penalty is nonnegative and the reward is at most one. With exact signs the walk must therefore freeze a constant fraction of the coordinates within steps. At that point also bounds the penalty by one, giving relative spectral error at most .
Estimating the edge derivatives. Let . The update on edge compares the reward derivative with the marginal spectral cost . All the numerators pair an edge matrix with the same power of . For an outer product , this is just . To choose the pair, draw a vector of independent uniform signs. For any matrix , , since the off-diagonal terms have mean zero. Write , so that . Compute and take one more product by to obtain . For every edge,
To evaluate these bilinear forms on the graph, write . Taking gives the exact normalization. In § 5 we approximate this normalization with a Laplacian solver. Let and be the corresponding vertex functions. Increasing by adds to the weight of . Applying the graph energy formula to this edge gives
One scan of the edges now gives every numerator estimate from and . The same trial estimates the common denominator by , since . Consequently has mean . In § 3.1 we estimate the sign of this mean on each free edge and bound the effect of sign errors on the decrease in .
Comparison with prior work. Spielman and Srivastava [7] sample edges independently with probabilities proportional to their weights times their effective resistances. This gives a nearly linear-time construction at the cost of an extra logarithm in size, with edges. Batson, Spielman, and Srivastava [1] first obtained edges deterministically by adding one edge at a time between two spectral barriers. Lee and Sun [4] attained this size in nearly linear time by choosing batches of edges with a semidefinite packing program. In their work bound the factor for solving this program already contributes six powers of at their choice , compared with three in Theorem 1 [4 Theorem 4.5 and proof of Lemma 3.7].
Lau, Wang, and Zhou [5] gave a deterministic polynomial-time discrepancy walk for the matrix partial-coloring theorem of Reis and Rothvoss [6]. Jambulapati, Reis, and Tian [2] obtain the same edge count by partial coloring. They use a bound on the Gaussian measure of an operator-norm ball to show that projecting a Gaussian target onto its intersection with the cube brings many coordinates to endpoints. Here an elementary argument with random signs supplies the partial coloring without using theorems from convex geometry. Up to iterated logarithms, their running time is . Our algorithm thus improves both the dependence on and the logarithmic factors in the graph size.
Preliminaries
For symmetric matrices we write and when is positive semidefinite (PSD). We use for the operator norm, for the Frobenius norm, and for the matrix obtained by taking absolute values of the eigenvalues of a symmetric . For , write for its pseudoinverse and for the orthogonal projector onto .
Whitening. Suppose is a sum of PSD matrices. Every vanishes on , since for the nonnegative terms sum to zero. Multiplying each summand on both sides by gives matrices with . This change of coordinates is called whitening. It turns relative error into an operator norm bound. Indeed, for we have
Edge differences. Orient each edge arbitrarily and put , where is the unit vector at . The weighted incidence matrix has rows and satisfies . Thus for every vertex function .
Finding a partial coloring
Let be PSD matrices with , and write . A change in the coefficients has matrix error . We want this error small and a constant fraction of at endpoints of . Such a vector is called a partial coloring. We choose a tolerance for this call and require . A larger tolerance reduces the number of matrix products.
Theorem 2 (Partial coloring). Suppose are matrices with and for some . Let . Choose an even integer with . Except with probability , a randomized algorithm returns satisfying
where is an absolute constant. If a product by costs and computing all for a given pair costs , the time on every run is
The objective. Choose independent uniform signs and write . Keep these signs fixed throughout the walk. For , put
The quantity is the -norm of and the nonzero eigenvalues of , so it lies between and . The reward has absolute value at most one on the cube. Thus , , and .
Let . If , then , so each . Thus vanishes on for every . We take traces on , of dimension at most , with on this space.
To bound the derivatives of the penalty, we compare lower trace powers with . Let be the eigenvalues of a symmetric on this space. For , Hölder’s inequality gives
The factor is at most by the choice of , and bounds the remaining factor. The same bound holds for since , and for since .
To differentiate a matrix power in a symmetric direction , apply the product rule to its factors,
For , all terms have trace . Differentiating therefore gives
The first inequality uses on each unit eigenvector of , and the second uses (1).
A direction of decrease. While few coordinates have frozen, we need a direction on the remaining coordinates whose reward gain exceeds its spectral cost. The following lemma supplies such a direction for every sufficiently small frozen set.
Lemma 3. Let , with of rank at most , and suppose . With probability at least over , for every of size at most there is a vector satisfying
We prove the lemma in § 3.2. Suppose its conclusion holds and is the current frozen set, with . The sum of the absolute derivatives on the free coordinates is the greatest first-order decrease attainable in the vanishing on . The negative gradient signs attain this sum. To lower bound it, test the direction from the lemma, whose reward derivative is and whose penalty derivative is . We obtain
The algorithm only needs to estimate the signs of the derivatives.
The walk. Let be the smallest power of two at least , for a sufficiently large absolute constant . Start at and take steps of length . At each step let be the estimated sign of on free coordinates and zero on frozen ones, with either sign allowed at a tie. Move to and freeze every coordinate that reaches an endpoint. Since is an integer, this grid walk stays in the cube. When at least coordinates have frozen, return whichever of has more entries equal to . Report failure if this has not happened by step .
Progress in one step. At step , write for the current point and for the direction chosen by the walk. Let be the frozen set and let contain the free coordinates on which has the wrong sign. On each such coordinate the contribution to the directional derivative changes from to . Thus
Set after the walk stops.
To pass from the directional derivative to the change in , we use the trace bound
for symmetric , and integer exponents. In an eigenbasis of the trace is . Write . Weighted AM–GM and the symmetry give
Now , which also proves the claim for .
Along , write and . By (2) and cyclicity, , so . Differentiating this quotient at gives
The sum in comes from differentiating the factors of in using (2). Each of the trace terms is at most by (4) and (1). Thus the second derivative is at most all along the step. Every satisfies , and hence . Taylor’s theorem along the step, with , now gives
The linear term uses (3). The quadratic term is at most by the choice of and .
It suffices, therefore, to show . Under this condition, summing (5) over any steps actually taken gives . Taking all steps would give , contradicting . At stopping, gives . The choice between and preserves this bound and gives at least entries equal to .
Estimating the derivative signs
Fix the target and write . Multiplying the negative gradient by the positive scalar gives
We estimate all entries of using the same random sign vector . With , compute and . The probe is
Indeed, gives and . Thus . A probe uses matrix products and one evaluation of all the bilinear forms.
Maintaining the estimates. A wrong sign in an estimate entails . Summing over the wrong signs relates the error in directly to the loss in the walk,
Divide the walk into blocks of steps and let be the matrix just before step of a block, . The value equals plus the changes in over any partition of the first steps. Short intervals are cheap to estimate because the same random vector gives similar probes at their two endpoints. The estimation errors add along the partition, so we choose it to contain at most one interval of each dyadic length.
Let be the average of independent probes at . For let be the largest power of two dividing . The last interval of the partition is . Using fresh sign vectors, set
Use the signs of on the free coordinates. Both endpoints are fixed before the new probes are drawn, so the correction has conditional mean . Subtracting clears the lowest nonzero bit of . Iterating therefore uses exactly the lengths in the binary expansion of .
How much a probe changes. Fix the history at the start of a block and put . To use (7), first compare with . Each step moves by at most , so all its states lie in the ball on the image of . For any in this ball, integrate along the segment from to . Since ,
Thus . By (7), expected error then gives expected loss per step.
For fresh sign vectors, write for the error of the probe average at . To estimate the change , average using the same vectors at both matrices. Subtracting the true change gives the correction error
Lemma 4. Let be fixed symmetric matrices on , extended by zero on its orthogonal complement, with . For independent sign vectors,
Each coordinate is a constant plus a quadratic form:
Sharing makes the correction a trace estimate for . We prove Lemma 4 at the end of the subsection.
Accuracy and work in one block. The probes at give expected error by (10). For a correction spanning steps, put . Each of the steps changes by at most , so the factor in (11) satisfies
Thus probe pairs give expected error , conditional on the history just before the draw. This bound also holds conditional on the start of the block, since its right-hand side depends only on and the interval length.
A single estimate uses at most one correction of length . A full block computes of them, at the odd multiples , for a total of probe evaluations at this length. If , the error bound and the work carry factors and , respectively. Both powers are positive for , so both bounds sum geometrically over the dyadic lengths. Taking and rounding up, as in (8), gives
expected error in one correction ,
evaluations for all corrections of this length .
The rounding changes the work by at most a factor of two since .
For a fixed , let contain the right endpoints in its partition, and let be the sampled correction ending at minus its conditional mean. If that correction spans an interval , its conditional mean is . Adding these means over the partition telescopes to . Thus (8) expresses as the initial estimate plus this true change and the sum of the correction errors. Subtracting gives
Here depends only on , even though the states at its endpoints depend on previous draws. Taking norms and using the conditional error bound once for each length in the partition gives
For this calculation, a block that stops early can be completed at its last state with zero loss on the remaining steps. Summing the work bound over gives evaluations including the initial average. Only the coefficient vectors and estimates on the current chain need to be stored, in words beyond the space for a probe.
Total loss over the walk. By (7), (9), and (12),
for sufficiently large . The estimates within a block share probes, so we apply concentration to the average loss in each block . Given the preceding blocks, . Also on every run. Indeed, in any direction the penalty derivative has magnitude at most and the reward derivative at most one, giving .
There are blocks, counting zeros after stopping. Since , the stopping argument after (5) requires . Since on ,
Successive conditioning gives . Markov’s inequality at therefore gives
This holds for every fixed . Together with Lemma 3 and the stopping argument, it gives the partial coloring of Theorem 2 with failure probability at most . The blocks use probes, each costing .
Proof of Lemma 4. Write . At a matrix put and . Then (6) reads
At the estimation error comes from . In a paired correction the constants cancel, and the corresponding quadratic form is .
For a matrix , expand into diagonal and off-diagonal terms. Since , the diagonal terms sum to . Pairing the two terms for each therefore gives
Terms from distinct pairs are uncorrelated: their product contains an independent sign appearing only once, and so has expectation zero. Thus the variance is . Averaging independent copies divides the variance by . By Cauchy–Schwarz,
Summing (13) over , it remains to bound and . For any matrices of compatible dimensions,
For the first inequality, factor to obtain
Summing over and applying Cauchy–Schwarz gives the stated bound. For the second, , and likewise for . For the other term in , the coefficients satisfy . Thus
Together with (14), this reduces the bound on to bounds on the two powers .
For and , , the segment lies in the same ball and (1) gives because . In particular at , proving (10).
For the difference, differentiate along the segment and put . Write and . By (2), the derivative of is a sum of terms with . Each satisfies
by (4) and (1), since . Thus and both have Frobenius norm . The product rule gives
Each term has one differentiated factor and one of norm . Summing with (14) and bounds by . Integration from to gives the same bound for . Applying (13) proves (11). □
A signed direction on the free coordinates
The frozen set in Lemma 3 may depend on . Fix for now a set with . We construct by accepting or skipping each sign outside , setting on acceptance and everywhere else. Its correlation counts the accepted signs. We aim for acceptances in expectation while satisfying the norm bound on every outcome. The excess above will let us make the correlation bound simultaneous over all small .
Keeping the signed sum between two bounds. Put . Just before index , let be the signed sum and the sum of all matrices inspected so far. We keep between and , working on . This allows a final norm of at most , since . Including in increases the slack on each side by , even when we skip its sign.
Let and be the two slacks before index . Both start at . For either slack , the size of relative to is . Before exposing , accept if and
On acceptance set , and otherwise set . To count the skipped signs, suppose each expected inverse stays below its initial value . Then . Each rejection outside requires , so Markov’s inequality gives
We verify the inverse bound together with positivity of the slacks. On rejection the extra slack can only decrease either inverse. On acceptance, fix one of the slacks and write . After including the target sign, the new slack is with either sign equally likely. Since is PSD, each eigenvalue satisfies . On an eigenvector of with eigenvalue , the two possible matrices have eigenvalues and , both positive. Their inverses therefore have the reciprocal eigenvalues, and the average of the two inverses has eigenvalue
Here because . Conjugating by gives . Induction proves positivity and at every index. The count above now applies. At most indices are excluded by and at most others are skipped in expectation. The expected correlation is therefore at least .
A direction for every small frozen set. For fixed , let be the maximum of over all vanishing on with . The construction gives . The feasible set is independent of , and flipping one sign changes every candidate’s correlation by at most two. The maximum changes by at most two as well. McDiarmid’s inequality, applied to the independent signs with sensitivity for each, therefore bounds a downward deviation of by
Choose so that . The number of eligible sets is at most . A union bound shows that every such has with probability at least .
Iterating the partial coloring
One partial coloring removes a constant fraction of the summands while introducing a bounded matrix error. We repeat it on the surviving summands until only remain. To obtain a relative error of at most , we measure every phase’s change against the same initial sum and keep their total within an error budget. Each phase also needs its input sum bounded by , so the budget must preserve that condition throughout. Finally, larger phase tolerances make the coloring faster; we allocate the available error to control both the cost of scanning summands and the cost of the solver used in the graph algorithm.
Let , where , , and the nonzero eigenvalues of lie in for an absolute constant . We will reweight these same summands in every phase. Keeping for every intermediate sum suffices for two reasons. First, vanishes on and , so for all ,
Second, , as required for the next application of Theorem 2.
Start with weights . In phase let and let count the positive weights. Stop when . Otherwise apply Theorem 2 to the positive-weight summands with tolerance chosen below, reporting failure if the call does. Given a coloring , multiply the corresponding weights by . At least of these multipliers vanish. Since , we obtain
Every returned coloring gives the first inequality by the stopping rule. The second follows from its spectral guarantee on success. If , let be the least integer such that . Since , we make at most calls.
Choosing the tolerances. To keep , it suffices by (16) that . Each call to Theorem 2 requires . We first check that these minimum tolerances fit within the total error budget, leaving room to increase them later. Each earlier term is at most a geometrically decaying multiple of the last one, so their sum up to any active phase is controlled by that last term. Indeed, and give
Choose large enough that the required tolerances use at most half the available error.
We spend the rest to reduce the work of the colorings. In the graph algorithm a matrix product scans edges and applies a solver whose cost is independent of . Both costs are multiplied by . For the scans, adding a tolerance proportional to bounds by , since . Choosing makes , so the same geometric series bounds both the added tolerance and the scan work. For the solver, an equal allowance proportional to suffices in every phase. Take
The two allowances sum to at most . Taking large enough therefore gives for every prefix, and in particular . Induction using (16) now gives after every successful phase. This justifies each call and proves the final relative error bound.
The two allowances in (17) give the respective work bounds
Sparsifying a graph
We apply § 4 with and accuracy , so the stopping threshold is edges. Discard loops and combine each parallel class onto one representative in time. Return the graph if it meets the threshold.
Reducing the number of phases. To start within a factor of the desired edge count, first sample the input if it has more than edges. Use the row-sampling routine of Lee, Peng, and Spielman [3 Lemma 9.4] with constant reduction parameter and accuracy . With high probability the sampled Laplacian satisfies
If sampling is unnecessary, take . In either case uses edges of the input. Return this graph if it meets the threshold. Otherwise (16) brings the edge count below the threshold within phases.
Normalizing the edge matrices. We seek a map such that has its positive eigenvalues between a constant and , as required by § 4. For the weighted incidence matrix of , consider first the exact map . Since , we have
The first identity says that has the same effect on vector norms as , while the second says that its normalized edge matrices sum to a projector. This representation lets us use an approximate inverse in place of an inverse square root. Applying , however, requires the exact inverse and a scan of the edges of . We instead use a Laplacian solver and the incidence matrix of a sparse graph to construct a map whose normalized sum has positive eigenvalues bounded above and below by constants, and which costs to apply.
Apply the solver construction of Lee, Peng, and Spielman [3 Lemmas 9.4 and 9.7], choosing its recursion parameter to be a sufficiently large constant. With high probability, it gives a symmetric approximate inverse satisfying the first bound below. For the second bound, let be the incidence matrix of a constant-accuracy sample of the graph for , with edges. We may use the sample constructed in the first step of the solver construction. If already has edges, take . With high probability these choices satisfy
The solver has approximation factor . On a successful construction, applying takes operations. We report failure if an application exceeds operations, for a sufficiently large absolute constant . To make vanish on , subtract the mean on each connected component before applying the inverse, and again afterward.
Set and . The factor ensures the upper bound required in § 4. To verify both spectral bounds, put . The first bound in (19) gives on . Applying the bounds on to , for , then gives
Thus the squared singular values of on lie in . The map vanishes on , so the positive eigenvalues of lie in the same interval. We may therefore take .
The lower bound also makes injective on , since maps that space onto itself. Moreover, vanishes on , so . Let be a reweighted Laplacian using edges of . Both vanish on , so it suffices to compare their action on . Every in this space has the form , and hence
The relative error guarantee for with respect to therefore gives the same guarantee for with respect to .
Computing a probe on the graph. Fix a phase starting with edges of weights and let have rows for those edges. The normalized edge matrices are , and their sum is of rank at most . For normalized vectors , set and . The entries of and are the weighted endpoint differences, so the bilinear forms and the matrix product in Theorem 2 are
Once and are available, the first identity computes all edge forms in one scan. For the second, applying and costs in total. Multiplying by or costs because is a weighted incidence matrix with rows. Thus each multiplication by or costs , including one solver application. The normalized space has dimension equal to the number of rows of , so drawing and computing the squared norm in (6) also cost . Thus both operations in (20) cost .
Preprocessing time. On a graph with edges the solver construction takes expected time by the proof of Lemma 9.7 of [3]. The same estimate holds for the initial sampling in their Lemma 9.4. That routine constructs an inverse on a sample and applies it times. An edge’s incidence vector lies in the row space of the sample’s incidence matrix exactly when its endpoints are in the same sampled component. Finding those components therefore tests row-space membership for all edges in time.
Fix . Apply the following retry procedure separately to the initial sampling routine and the solver construction. Cap each attempt at a sufficiently large constant times its expected work. By Markov’s inequality and the size guarantee, an attempt meets the time and size bounds with probability at least . Return the first output meeting both bounds, or report failure after independent attempts. The chance of exhausting the attempts is at most . With sampling constants chosen for per-attempt error at most , the chance of accepting an inaccurate output is at most . Preprocessing thus costs on every run and succeeds with probability .
Proof of Theorem 1. Take an even with constant large enough for the desired failure exponent. Conditional on successful preprocessing and all preceding colorings, Theorem 2 bounds the failure probability in phase by . We have in each of at most phases, so a union bound gives success with high probability. On success, § 4 and the energy identities above give a approximation to with at most edges. Including the initial sampling changes the lower factor to and the upper factor to . By Theorem 2 and (20), a phase costs . Summing the edge and solver costs by (18) gives total coloring time
The step limit within a call and the bound on the surviving edge count hold on every run. Substituting and and adding preprocessing proves the worst-case time bound.
Acknowledgments
The author thanks Jason Li for suggestions regarding the exposition of this paper.
AI methodology
The author presented an outline of the algorithm to GPT-6 Astra Pro, which assisted in developing some of the proofs and wrote up the resulting work. The author then used the same model to remove a factor of from the running time and simplify the algorithm. The model also assisted in drafting and revising the exposition of this paper.
References
- [1][BSS12] Joshua Batson, Daniel A. Spielman, and Nikhil Srivastava. Twice-Ramanujan Sparsifiers. SIAM Journal on Computing, 41(6):1704–1721, 2012.
- [2][JRT24] Arun Jambulapati, Victor Reis, and Kevin Tian. Linear-Sized Sparsifiers via Near-Linear Time Discrepancy Theory. In Proceedings of the 2024 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 5169–5208, 2024.arxiv.org/abs/2305.08434
- [3][LPS15] Yin Tat Lee, Richard Peng, and Daniel A. Spielman. Sparsified Cholesky Solvers for SDD Linear Systems, 2015. arXiv:1506.08204v2.arxiv.org/abs/1506.08204
- [4][LS17] Yin Tat Lee and He Sun. An SDP-Based Algorithm for Linear-Sized Spectral Sparsification. In Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 678–687, 2017.arxiv.org/abs/1702.08415
- [5][LWZ25] Lap Chi Lau, Robert Wang, and Hong Zhou. Spectral Sparsification by Deterministic Discrepancy Walk. In 2025 Symposium on Simplicity in Algorithms (SOSA), pages 315–340, 2025.arxiv.org/abs/2408.06146
- [6]Victor Reis and Thomas Rothvoss. Linear Size Sparsifier and the Geometry of the Operator Norm Ball. In Proceedings of the 2020 ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2337–2348, 2020.arxiv.org/abs/1907.02145
- [7]Daniel A. Spielman and Nikhil Srivastava. Graph Sparsification by Effective Resistances. SIAM Journal on Computing, 40(6):1913–1926, 2011.