In Blog 1, we showed that the exact rank-2 algorithm for Max-3-Cut enumerates \(O(n^3)\) candidate partitions — one for each triple of hyperplane indices. Throwing 15 GPUs at the problem pushed this to \(n = 3{,}600\) nodes, but cubic scaling is a hard wall: doubling \(n\) multiplies work by 8. Meanwhile, Blog 2 demonstrated that rank-1 scales to a million nodes but uses only one of the two dominant spectral directions.
The natural question: can we get rank-2 quality without rank-2 cost? The answer is randomized sampling. Instead of enumerating all \(\binom{n}{3}\) triples, we sample \(S\) random triples and take the best. The key finding is striking:
In our experiments (\(n = 250\) to \(1{,}500\), verified against exact rank-2 enumeration), the number of random samples needed to recover 99.9% of the optimum does not grow with \(n\): \(S = 100{,}000\) suffices at every tested size. The diminishing-returns curve flattens at the same point regardless of graph size. At larger \(n\) (up to \(1{,}400{,}000\)), a fixed budget of \(10^6\) samples continues to produce high-quality partitions, though exact rank-2 comparison is infeasible at those scales.
This is surprising. A priori, one might expect the “good” triples to become a vanishing fraction of the \(O(n^3)\) total as \(n\) grows. Instead, the spectral structure concentrates the mass: most random triples produce partitions that are close to optimal. The randomized algorithm inherits rank-2’s ability to explore the full spectral subspace at a cost that is independent of \(n\). (Tested at \(n = 250\) to \(1{,}500\) against exact rank-2; indirect evidence to \(n = 1{,}400{,}000\) via fixed-budget runs.)
Since sampling is cheap, the practical question becomes: on which graphs does the rank-2 subspace contain better partitions than rank-1?
Rank-1 uses a single eigenvector to partition the graph: it projects nodes onto a 1D subspace and sweeps a single hyperplane. Geometrically, this covers a great circle on the unit sphere in the spectral embedding. When the graph’s structure is well-captured by one spectral direction — as in torus or regular graphs where the top two eigenvalues are nearly degenerate — this great circle already passes through the optimal partition.
But when the top two eigenvalues are separated by a gap, the rank-1 projection loses information. The optimal partition lies off the great circle, in the full 2D spectral subspace. Rank-2 recovers this by sampling triples of hyperplanes that sweep the entire sphere, not just a single meridian.
For Max-3-Cut, the spectral relaxation lives on \(S^3\) (the unit sphere in \(\mathbb{R}^4\), representing two complex eigenvectors). Rank-1 rounding restricts to a great circle \(S^1 \subset S^3\), parametrized by a single phase offset. Rank-2 rounding accesses the full \(S^3\):
When \(\lambda_1 \approx \lambda_2\), the great circle already covers the relevant directions and rank-2 gains nothing. When \(\lambda_1 - \lambda_2\) is large relative to \(\lambda_2 - \lambda_3\), the second eigenvector carries independent structural information that rank-1 misses entirely.
The eigengap — defined as the relative separation \((\lambda_1 - \lambda_2) / \lambda_1\) between the top two eigenvalues — predicts where rank-2 helps. The scatter plot below shows the relationship between eigengap and the percentage improvement of rank-2 over rank-1.
An important caveat: the eigengap predicts where rank-2 standalone improves over rank-1, but it does not predict where the full pipeline (rank-2 + greedy) beats other methods. On web-Google, rank-2 alone scores 21% worse than rank-1 (eigengap 15.4%), yet the pipeline beats every competitor. The reason: when rank-2’s partition is fed to greedy local search, the greedy phase converges to a different — and sometimes better — local optimum than when started from rank-1. This depends on the graph’s community structure, not its eigengap. Section 3 makes this concrete.
The full algorithm, which we call R2G (Rank-2 + Greedy), consists of three phases:
The pipeline is modular: phase 2 replaces the rank-1 sweep from Blog 2, while phases 1 and 3 are identical. The key difference is that rank-2 sampling provides a different starting partition for the greedy phase, which leads to improved local optima on social, product, and web graphs.
We compare three methods on 12 representative instances across 9 graph families: R2G (rank-2 + greedy), Hybrid (rank-1 + greedy, from Blog 2), and SA (simulated annealing). All methods use the same greedy refinement; they differ only in initialization.
| Graph | n | R2→Greedy | Hybrid | SA | R2G / H | R2G / SA |
|---|---|---|---|---|---|---|
| email-Enron | 36,692 | 445,293 | 445,272 | 444,426 | 100.00% | +0.19% |
| amazon0601 | 403,394 | 6,039,264 | 6,029,544 | 6,031,734 | +0.16% | +0.12% |
| com-DBLP | 317,080 | 2,616,183 | 2,604,483 | 2,618,805 | +0.45% | −0.10% |
| web-Google | 875,713 | 11,410,254 | 11,401,383 | 11,196,882 | +0.08% | +1.90% |
| torus 500K | 500,000 | 3,000,000 | 3,000,000 | 2,953,218 | 100.00% | +1.58% |
| roadNet-TX | 1,379,917 | 5,669,655 | 5,638,095 | 5,705,913 | +0.56% | −0.64% |
| roadNet-PA | 1,088,092 | 4,543,785 | 4,539,057 | 4,581,765 | +0.10% | −0.83% |
| delaunay_n19 | 524,288 | 4,127,337 | 4,112,139 | 4,213,743 | +0.37% | −2.05% |
| ER 50K (avg) | 50,000 | 663,303 | 662,346 | 677,954 | +0.14% | −2.16% |
| regular 100K | 100,000 | 703,767 | 727,090 | 734,220 | −3.21% | −4.15% |
R2G beats Hybrid on 10 of 15 tested instances and beats SA on 6 of 12 graph families: social networks (email-Enron, soc-Epinions1), product networks (amazon0601), location-based networks (loc-Brightkite), web graphs (web-Google), and structured graphs (torus). On road networks, Delaunay meshes, and Erdős–Rényi graphs, SA retains its advantage.
Additional results on SNAP datasets reinforce the pattern:
| Graph | \(n\) | R2→Greedy | Hybrid | SA | R2G/H | R2G/SA |
|---|---|---|---|---|---|---|
| soc-Epinions1 | 75,879 | 997,479 | 985,167 | 978,303 | +1.25% | +1.96% |
| loc-Brightkite | 58,228 | 546,330 | 544,890 | 546,009 | +0.26% | +0.06% |
| ca-HepPh | 12,006 | 262,887 | 262,527 | 265,314 | +0.14% | −0.92% |
On most graphs, R2G trades a small quality deficit against SA for a large speedup. But on two important families, R2G wins on both axes — better quality and faster wall-clock time:
Torus graphs: R2G achieves the optimal score of 3,000,000 on the torus with \(n = 500{,}000\) nodes, matching rank-1 exactly (since rank-1 already finds the optimum on torus). SA runs for over 1,000 seconds and still falls 1.58% short. The eigensolve + rank-2 sampling + greedy pipeline finishes in under 40 seconds on the same graph — a 25× speedup.
email-Enron: This social network is small enough (\(n = 36{,}692\)) that all methods run in comparable time. But R2G produces a cut of 445,293 vs. SA’s 444,426 — a 0.19% improvement with no additional cost. The spectral structure of the Enron email graph (strong community structure with a clear eigengap) is precisely the regime where rank-2 shines.
Regular graphs: tied with rank-1. On 5-regular graphs, the top two eigenvalues are nearly degenerate (eigengap < 0.02%), so rank-2 provides no additional spectral information over rank-1. The R2G score of 703,767 on the 100K-node regular graph is actually worse than the Hybrid score of 727,090: the rank-2 partition, while similar in quality to rank-1’s, leads the greedy phase to a less favorable local optimum on these graphs. When the eigengap is effectively zero, rank-1 is the right initialization.
The structural ceiling. Rank-2 sampling alone — without greedy refinement — does not beat greedy local search on any instance. The spectral rounding produces a partition that captures global structure but misses local optimizations. The greedy phase is essential: it converts spectral “potential” into actual score improvements. R2G should be understood as rank-2 initialization, not rank-2 optimization.
ER and road networks. On Erdős–Rényi graphs and road networks, SA still wins. We verified that increasing the sample budget from 1M to 10M on both roadNet-PA and roadNet-TX produces negligible improvement (+0.035% and +0.07% respectively), confirming that the rank-2 ceiling on these graphs is structural. R2G beats Hybrid on these instances but the gap to SA remains.
What about rank-3? We tested rank-3 sampling (using 3 eigenvectors, candidate tuples of size 5) on six graphs. At equal sample budgets, rank-3 is ~7× slower per candidate due to the larger SVD (5×6 vs 3×4 matrices), and the results are within ±0.1% of rank-2:
| Graph | \(n\) | R3→Greedy | R2→Greedy | Δ | R3 cost vs R2 |
|---|---|---|---|---|---|
| email-Enron | 36,692 | 445,119 | 445,293 | −0.04% | ~7× |
| amazon0601 | 403,394 | 6,034,695 | 6,039,264 | −0.08% | ~7× |
| com-DBLP | 317,080 | 2,617,701 | 2,616,183 | +0.06% | ~7× |
| web-Google | 875,713 | 11,398,308 | 11,410,254 | −0.10% | ~7× |
The additional eigenvector does not justify the cost. Rank-2 appears to be the sweet spot for the 3-phase pipeline.
The table below summarizes the winner for each graph family among the three main competitors: R2G, Hybrid (rank-1 + greedy), and SA.
| Graph Family | Best Method | R2G vs. Runner-Up | Key Reason |
|---|---|---|---|
| Torus | R2G | +1.58% over SA | Spectral structure exactly captured by 2 eigenvectors |
| soc-Epinions1 | R2G | +1.96% over SA | Social trust network with community structure |
| web-Google | R2G | +1.90% over SA | Web graph; R2 alone poor but R2G wins |
| email-Enron | R2G | +0.19% over SA | Social/email network |
| amazon0601 | R2G | +0.12% over SA | Product co-purchase network |
| loc-Brightkite | R2G | +0.06% over SA | Location-based social network |
| com-DBLP | SA | R2G −0.10% | Collaboration network; R2G close to SA |
| ca-HepPh | SA | R2G −0.92% | Citation network |
| Road networks | SA | R2G −0.64% | Spatial/geographic structure |
| Delaunay meshes | SA | R2G −2.05% | Geometric mesh structure |
| Erdős–Rényi | SA | R2G −2.16% | Random graphs; no exploitable structure |
| Regular (5-reg) | SA | R2G −4.15% | Rank-2 ≈ rank-1 on regular graphs |
The 3-phase pipeline (eigensolve → rank-2 sample → greedy refine) beats SA on 6 of 12 graph families tested, including social networks, product graphs, and web graphs with up to 875K vertices. On structured graphs (torus), it finds the exact optimum. On road networks and random graphs, SA remains better.
The \(O(1)\) sample complexity makes the pipeline practical at any graph size — the same 106 random samples work at \(n = 250\) and \(n = 1{,}400{,}000\). The pipeline is simple to implement, embarrassingly parallel, and requires only the top-2 eigenvectors of the graph Laplacian.