Explicit two-sided unique-neighbor expanders

We study the problem of constructing explicit sparse graphs that exhibit strong vertex expansion. Our main result is the first two-sided construction of imbalanced unique-neighbor expanders, meaning bipartite graphs where small sets contained in both the left and right bipartitions exhibit unique-neighbor expansion, along with algebraic properties relevant to constructing quantum codes. Our constructions are obtained from instantiations of the tripartite line product of a large tripartite spectral expander and a sufficiently good constant-sized unique-neighbor expander, a new graph product we defined that generalizes the line product in the work of Alon and Capalbo and the routed product in the work of Asherov and Dinur. To analyze the vertex expansion of graphs arising from the tripartite line product, we develop a sharp characterization of subgraphs that can arise in bipartite spectral expanders, generalizing results of Kahale, which may be of independent interest. By picking appropriate graphs to apply our product to, we give a strongly explicit construction of an infinite family of $(d_1,d_2)$-biregular graphs $(G_n)_{n\ge 1}$ (for large enough $d_1$ and $d_2$) where all sets $S$ with fewer than a small constant fraction of vertices have $\Omega(d_1\cdot |S|)$ unique-neighbors (assuming $d_1 \leq d_2$). Additionally, we can also guarantee that subsets of vertices of size up to $\exp(\Omega(\sqrt{\log |V(G_n)|}))$ expand losslessly.


Introduction
A bipartite graph G is a one-sided unique-neighbor expander if every small subset of its left vertices has many unique-neighbors, where a unique-neighbor of a set S is a vertex v with exactly one edge to S. Classically, there is a wealth of applications of one-sided unique-neighbor expanders to error-correcting codes [SS96, DSW06, BV09], high-dimensional geometry [BGI + 08, GLR10, Kar11, GMM22], and routing [ALM96], as well as several explicit constructions [AC02, CRVW02, AD23, Gol23,CRTS23].
A recent work of Lin & Hsieh [LH22] established a connection between quantum errorcorrecting codes and two-sided unique-neighbor expanders, which are graphs where every small subset of both the left and right vertices has many unique-neighbors.In particular, they showed that good quantum low-density parity check (LDPC) codes with efficient decoding algorithms can be obtained from two-sided lossless expanders satisfying certain algebraic properties, with the additional advantage of being simpler to analyze than earlier constructions of good quantum codes [PK22,LZ22].Here, lossless expanders are graphs achieving the quantitatively strongest form of unique-neighbor expansion possible.A random biregular graph is a two-sided lossless expander with high probability, but no explicit constructions are known; all explicit constructions of one-sided unique-neighbor expanders are not known to satisfy two-sided expansion.
The main contribution of this work is to give explicit constructions of infinite families of two-sided unique-neighbor expanders.We now delve into our results and provide context.

Our results
We give a formal description of the graphs we would like to construct, motivated by constructing quantum codes, and then describe our contributions.Definition 1.1 (Two-sided (algebraic) unique-neighbor expander).We say a (d 1 , d 2 )-biregular graph Z with left and right vertex sets L and R respectively is a γ-two-sided unique-neighbor expander if there is a constant δ depending on γ, d 1 , d 2 such that: 1. Every subset S ⊆ L with |S| < δ|L| has at least γ • d 1 |S| neighbors in R.

Every subset
We say Z is a γ-two-sided algebraic unique-neighbor expander if additionally: there is a group Γ of size Ω(|L| + |R|) that acts on L and R such that gv = v iff g is the identity element of Γ, and {gu, gv} is an edge iff {u, v} is an edge in Z.
The work of Lin & Hsieh [LH22] proves that for γ > 1/2, the existence of γ-two-sided algebraic unique-neighbor expanders with arbitrary aspect ratio implies the existence of linear-time decodable quantum LDPC codes.
We give an explicit construction of γ-two-sided algebraic unique-neighbor expanders for small constant γ.
We refer the reader to Theorem 4.4 for a formal statement.
Remark 1.3.Theorem 1.2 gives the first construction of two-sided unique-neighbor expanders where the left and right side have unequal sizes. 1 It also gives the only construction besides the one-sided lossless expander constructions of [CRVW02,Gol23,CRTS23] where the number of unique-neighbors of a set S can be made arbitrarily larger than |S|.We give a detailed comparison to prior work in Table 1.
We also give constructions of two-sided unique-neighbor expanders where we can additionally guarantee that small enough sets expand losslessly, at the expense of the algebraic property.
Theorem 1.5 (Two-sided unique-neighbor expanders with small-set lossless expansion; see Theorem 7.8).For every β ∈ (0, 1/2] and ε > 0, there are constants γ > 0 and K such that for all large enough d 1 , d2 with 1 ⩾ d 1 d 2 ⩾ β 1−β that are multiples of K, there is an explicit infinite family of (d 1 , d 2 )-biregular graphs (Z n ) n⩾1 where: 1. Z n is a γ-two-sided unique-neighbor expander, At a high level, all of our constructions involve taking a certain product of a large "base graph" with a constant-sized "gadget graph".In Theorems 1.2 and 1.5, the unique-neighbor expansion comes from strong spectral expansion properties of the base graph; see Section 1.3 for an overview.The algebraic property is also inherited from the base graph satisfying the same algebraic property.These two properties can be simultaneously achieved by choosing the base graph as Ramanujan Cayley graphs [LPS88,Mar88,Mor94].
Remark 1.6 (Bicycle-free Ramanujan graph construction).In Theorem 1.5, the small-set lossless expansion property comes from the base graph consisting of bipartite spectral expanders with no short bicycles (Definition 7.3): no bicycles of length-g roughly translates to lossless expansion for sets of size exp(g); see Theorem 7.8 for a formal statement.We believe that the biregular Ramanujan graph construction of [BFG + 15] should have no bicycles of length-Ω(log n) and also endow a group action, but we do not prove it in this work.We instead use constructions from the works of [MOP20,OW20], which have no bicycles of length Ω( log n) but no group action.
Remark 1.7 (One-sided lossless expanders).As explained in more detail in the technical overview (Section 1.3), our graph product generalizes the routed product defined in [AC02,AD23,Gol23].In particular, by instantiating the product with slightly different parameters, we are able to prove one-sided lossless expansion with essentially the same proof as Theorem 1.5, recovering the result of Golowich [Gol23].The analysis is carried out in Section 8.
New results in spectral graph theory.In service of proving Theorem 1.5, we prove two results that we believe to be independently interesting in spectral graph theory: (i) we give a sharp characterization of what subgraphs can arise in bipartite spectral expanders, generalizing results of Kahale [Kah95] and Asherov & Dinur [AD23], (ii) we give a refinement to the well-known irregular Moore bound of [AHL02] on the tradeoff between girth and edge density in a graph.
In particular, we show that for any small induced subgraph of a near-Ramanujan biregular graph, the spectral radius of its non-backtracking matrix (see Section 2.2) must be bounded.
Theorem 1.8 (See Theorem 5.1).Let ε ∈ (0, 0.1), and let 3 ⩽ c ⩽ d be integers.Let G = (L ∪ R, E) be a (c, d)-biregular graph and S ⊆ L ∪ R such that |S| ⩽ d −1/ε |L ∪ R|.Then, where λ = max(λ 2 (A G ), Remark 1.9.For the sake of intuition, we inspect what Theorem 1.8 tells us in the special case where G is a biregular near-Ramanujan graph.When we plug in λ = where δ(ε) → 0 as ε → 0. When c = d, Kahale's result for d-regular graphs (e.g., Theorem 3 of [Kah95]) also has the form 1 2 ( λ + λ 2 − 4(d − 1)).The above expression thus generalizes Kahale's result to biregular graphs.Remark 1.10 (Sharpness of Theorem 1.8).One can adapt the techniques of [MM21] to prove that for any graph H on o(n) vertices where there is a graph G that contains H as a subgraph, and As a consequence, we obtain the following result which answers a question raised by Our refinement to the Moore bound involves using the spectral radius of the non-backtracking matrix of the graph instead of the degree, and yields the existence of bicycles -pairs of short cycles that are close in the graph.
Theorem 1.12 (Generalized Moore bound; see Theorem 7.4).Let G be a graph on n vertices and let ρ = λ 1 (B G ) where B G is the non-backtracking matrix of G. Assuming ρ > 1, G must contain a cycle of length at most (2 + o n (1)) log ρ n and G must contain a bicycle of length at most (3 + o n (1)) log ρ n.
Remark 1.13.For a graph G with average degree d, ρ(B G ) is at least d − 1.Therefore, Theorem 1.12 is stronger than the girth guarantee of 2 log d−1 n from the classical irregular Moore bound of [AHL02] in some cases, in particular for some graphs arising in the proof of Theorem 1.5.A simple example where this yields tighter bounds is a (d, 2)-biregular graph.When d ≫ 2, the average degree is ≈ 4 and the classical Moore bound yield a cycle of length 2 log 3 n.Nevertheless, the generalized Moore bound tells us that there is a cycle of length ≈ 4 log d−1 n.

Context and related work
Spectral expansion vs. unique-neighbor expansion.In contrast to unique-neighbor expanders, we have a rich set of spectral and edge expander constructions.A key conceptual difficulty in unique-neighbor expansion is the lack of an "analytic handle" for it.Several other graph properties required in applications of expander graphs, such as high conductance on cuts, low density of small subgraphs, and rapid mixing of random walks, have an excellent surrogate in the second eigenvalue of the normalized adjacency matrix, which is a highly tractable quantity.
It is natural to wonder if any form of unique-neighbor expansion can be deduced from the eigenvalues of a graph.However, the connection between the unique-neighbor expansion in a graph and its spectral properties is tenuous at best.Kahale [Kah95] proved that in d-regular graphs with optimal spectral expansion, small sets have vertex expansion at least d/2, i.e., for a sufficiently small constant ε, any set S with at most εn vertices has roughly at least |S| • d/2 distinct neighbors.Observe that once the vertex expansion of a set exceeds d/2, it begins to be forced to have unique-neighbors.Strikingly, Kahale also showed the d/2 bound is tight for spectral expanders, which makes them fall short at the cusp of the unique-neighbor expansion threshold; indeed, it was proved in [KK22] that certain algebraic bipartite Ramanujan graphs contain sublinear-sized sets with zero unique-neighbors (see also [Kah95,MM21] for examples of near-Ramanujan graphs exhibiting a similar property).

Quantum codes.
Resilience to errors is essential for constructing quantum computers [Kit03], which makes quantum error correction fundamental for quantum computing.One approach to this problem is in the form of quantum LDPC codes (qLDPC codes).Recently, a flurry of work culminated in the construction of qLDPC codes with constant rate and distance [PK22,LZ22], which was also coupled with the construction of c 3 -locally testable codes [DEL + 22, PK22].At a high level, these codes are constructed by composing a structured spectral expander, a square Cayley complex, along with a structured inner code, a robustly testable tensor code.The analysis is complicated by the stringent requirements on the inner code, and poses a barrier for generalizing these constructions.Indeed, it is unclear how to generalize the square Cayley complex and the inner code to construct quantum locally-testable codes (qLTCs).
More recently, Lin and Hsieh [LH22] constructed good qLDPC codes with linear time decoders assuming the existence of two-sided algebraic lossless expander graphs.Their construction does not require an inner code, and as a byproduct, yields a simpler analysis and is plausibly easier to generalize to other applications such as qLTCs. 2 However, two-sided algebraic lossless expander graphs are not known to exist, and obtaining them is one of the primary motivations for the goals of this paper.
The chain complexes arising in the qLDPC constructions have also been fruitful for other problems in theoretical computer science -constructing explicit integrality gaps for the Sum-of-Squares semidefinite programming hierarchy for the k-XOR problem [HL22] & the resolution of the quantum NLTS conjecture [ABN23].
The previously known integrality gaps for k-XOR came from random instances [Gri01,Sch08].Building on the work of Dinur, Filmus, Harsha & Tulsiani [DFHT21], Hopkins & Lin [HL22] constructed explicit families of 3-XOR instances that are hard for the Sum-of-Squares (SoS) hierarchy of semidefinite programming relaxations (previously known lower bounds are random instances).Specifically, they illustrated k-XOR instances which are highly unsatisfiable but even Ω(n) levels of SoS fail to refute them (i.e., perfect completeness).

Previous constructions.
The first constructions of unique-neighbor expanders appeared in the work of Alon and Capalbo [AC02].One of their constructions, which we extend in this paper, takes the line product of a large Ramanujan graph with the 8-vertex 3-regular graph obtained by the union of the octagon and edges connecting diametrically opposite vertices.
Another construction in the same work gives one-sided unique-neighbor expanders of aspect ratio 22/21, and was extended in a recent work of Asherov and Dinur [AD23] to obtain one-sided unique-neighbor expanders of aspect ratio α for all α ⩾ 1 where every small set on the left side has at least 1 unique-neighbor.The construction takes a graph product called the routed product of a large biregular Ramanujan graph with a constant-sized random graph.(See the recent work of Kopparty, Ron-Zewi & Saraf [KRZS23] for a simplified analysis with weaker ingredients.) The work of Capalbo, Reingold, Vadhan & Wigderson [CRVW02] constructs one-sided lossless expanders of arbitrarily large degree and arbitrary aspect ratio.Their construction relies on a generalization of the zig-zag product of [RVW00] applied to various randomness conductors to construct lossless conductors, analyzed by tracking entropy, which then translates to lossless expanders.More recently, a simpler construction and analysis was given by Golowich [Gol23] based on the routed product (see also [CRTS23] for a similar construction, and see Remark 1.16 for a discussion on where the routed product constructions fall short of achieving two-sided expansion).
Finally, motivated by randomness extractors, the works [TSUZ07, GUV09] construct one-sided lossless expanders where the left side is polynomially larger than the right.
Applications of unique-neighbor expanders.Unique-neighbor expanders have several applications in theoretical computer science.In coding theory, it was shown in [DSW06, BV09] that unique-neighbor expander codes [Tan81] are "weakly smooth", hence when tensored with a code with constant relative distance, they give robustly testable codes.In high-dimensional geometry, unique-neighbor expanders were used in [GLR10,Kar11] to construct ℓ p -spread subspaces as well as in [BGI + 08, GMM22] to construct matrices with the ℓ p -restricted isometry property (RIP).
Unique-neighbor expanders were also used in designing non-blocking networks [ALM96]: given a set of input and output terminals, the network graph is connected such that no matter which input-output pairs are connected previously, there is a path between any unused input-output pair {3, 4, 6} Ω(|S|) KRZS23] large enough d at least 1 any * Non-bipartite construction that can be made bipartite by passing to the double cover.† d here refers to the degree of the left vertex set.‡ "Aspect ratio" refers to the ratio between the sizes of the left and right vertex sets.using unused vertices.

Technical overview
Line product.Our construction of two-sided algebraic unique-neighbor expanders, featured in Theorem 1.2, is based on the line product between a large base graph and a small gadget graph.Let G be a D-regular graph on n vertices and H be a d-regular graph on D vertices.The line product G ⋄ H is a graph on the edges of G where for each vertex v ∈ G we place a copy of H on the set of edges incident to v. See Definition 3.1 for a formal definition and Figure 1 for an example.This graph product was also used in the works of [AC02,Bec16].Observe that G ⋄ H has nD/2 vertices and is 2d-regular.Note also that the line graph of G (where two edges are connected if they share a vertex) is exactly the line product between G and the D-clique, hence the name.

G H G ◇ H
The key lemma (Lemma 3.3) is that if G is a small-set (edge) expander and H is a good uniqueneighbor expander, then G ⋄ H is a unique-neighbor expander as well.For the base graph G, we simply use the explicit Ramanujan graph construction [LPS88,Mor94].For the gadget H, we show that a random biregular graph is a good unique-neighbor expander with high probability (Lemma 4.3).Then, since D is a constant, we can find such a graph by brute force.
Remark 1.14 (On importance of Ramanujan base graphs).We require an O( √ D) bound on the average degree of small subgraphs in a D-regular expander, which is proved using the fact that the second eigenvalue of a D-regular Ramanujan graph is O( √ D).Typically, applications of expanders only need a second eigenvalue bound of o(D), so we find it noteworthy that the analysis of our construction seems to require being within a constant factor of the Ramanujan bound.
Tripartite line product.Our constructions with stronger vertex expansion guarantees for small sets, featured in Theorem 1.5, are based on a suitably generalized version of the line product, which we call the tripartite line product.The first ingredient is a large tripartite base graph G on vertex set L ∪ M ∪ R, where L, R, M denote the left, middle, right partitions respectively, and there are bipartite graphs between L, M and between M, R. The second ingredient is a small constant-sized bipartite gadget graph H, which is chosen to be an excellent unique-neighbor expander -as before, we can brute-force search to find H that has expansion as good as a random graph.
The tripartite line product G ⋄ H is a bipartite graph on L ∪ R whose edges are obtained by placing a copy of H between the left neighbors of v and the right neighbors of v for each v ∈ M. See Definition 7.6 for a formal definition and Figure 2 for an example.To prove Theorem 1.5, we construct the base graph by choosing a (K 1 , D 1 )-biregular spectral expander between L and M, and a (D 2 , K 2 )-biregular spectral expander between M and R for large enough and suitably chosen parameters

L H G ◇ H M R
Remark 1.15 (Generalizing the line product and routed product).The line product and routed product, which feature in [AC02, AD23, Gol23], arise from instantiating the tripartite line product with appropriate base graphs.The line product can be obtained by choosing a (2, D 1 )-biregular graph between L and M, and a (D 2 , 2)-biregular graph between M and R in the base graph.The routed product arises by choosing a (K, D 1 )-biregular graph between L and M, and a (D 2 , 1)-biregular graph between M and R in the base graph.
Remark 1.16 (One-sided vs. two-sided expanders).A key difference between our work and previous constructions that only achieve one-sided expansion is in the choice of the graph between M and R. [AD23, Gol23] choose the graph between M and R to be a (D 2 , 1)-biregular graphs, equivalently a disjoint collection of stars centered at the vertices in M.This results in very small sets on the right with no unique-neighbors: for example, for any v ∈ M, consider the set of all its right neighbors.
Overview of the analysis of the tripartite line product.Let Z = G ⋄ H, and let G (1) and G (2)  be the bipartite graphs between L, M and M, R in G respectively.We choose the gadget H to be a For a subset S ⊆ L, let U = N G (S) ⊆ M (neighbors of S in the base graph).Our analysis for the expansion of S roughly follows two steps: (1) We partition U according to the number of edges going to S -U ℓ ("low S-degree") and U h ("high S-degree").We then show that if we partition U according to a suitable threshold, then most edges leaving S go to U ℓ .
(2) Since each vertex in U ℓ has small S-degree, in the local gadget graph it has "large" uniqueneighbor expansion (here we rely on the expansion profile of the gadget; see Lemma 4.3).Then, we show that most of the unique-neighbors in the gadgets are also unique-neighbors of S in Z.
Both steps rely on Theorem 1.11.For step (1), we apply Theorem 1.11 on the induced subgraph For step (2), let T ⊆ R be the union of the unique-neighbors within each gadget.By the expansion of the gadgets on vertices in U ℓ , we have a lower bound on | T|.However, a uniqueneighbor in one gadget may also have edges from other gadgets, in which case it is not a uniqueneighbor of S in Z.To resolve this issue, we analyze the induced subgraph G (2) [U ∪ T] and show that a large fraction of T are unique-neighbors of U in G (2) , thus must also be unique-neighbors of S in Z.This is done by observing that the left average degree of G (2) [U ∪ T] must be ≳ d 1 .Thus, the right average degree is ≲ 1 + One might attempt to tweak the parameters of the construction to obtain two-sided lossless expansion.However, this fails because in step (1) we need the threshold to be large enough such that S has lossless expansion in G (1) , but then it is not possible to set the parameters of the gadget such that (i) each vertex in U ℓ expands losslessly, and (ii) for the analysis in step (2).See Section 7.2 (the proof of Theorem 7.8) for details.
Lossless expansion of small sets.For small subsets S ⊆ L, we directly show that S expands losslessly into U under the assumption that G (1) has no short bicycles.Specifically, in Lemma 7.5 we prove that if a graph has no bicycle of length g, then all sufficiently small subsets (in particular, of size at most exp(O(g))) expand losslessly.To prove this, we first show that if a degree-K set S has expansion less than (1 − ε)K, then we can lower bound the spectral radius of the non-backtracking matrix of the graph induced on S ∪ N(S) by C(ε) := ε(K − 1).Now, by the generalized Moore bound (Theorem 1.12), there is a bicycle of size O(log C(ε) |S|) in G. Since G has no bicycle of length-g, it lower bounds |S| via the inequality g ⩽ O(log C(ε) |S|).This tells us that small sets in G (1) exhibit lossless expansion.To establish that small sets in Z are losslessly expanding, we follow the same strategy as before for step (2): since most vertices in U has only 1 edge to S, they expand by a factor of d 1 (from the gadget), and we use Theorem 1.11 to show that T = N Z (S) are mostly unique-neighbors, proving the small set expansion result in Theorem 1.5.
One-sided lossless expanders.As mentioned in Remark 1.7, we are able to use the tripartite line product to construct one-sided lossless expanders, recovering the result of Louis [Gol23].Our proof is almost the same as Theorem 1.5, but with K 1 ≫ K 2 = 1 (hence G (2) is just a collection of stars).In step (1), we choose a smaller S-degree threshold ≈ ε √ D and large enough K 1 to ensure that 1 − ε fraction of edges from S go to U ℓ (via Theorem 1.11).Then, with the smaller threshold, each vertex in U ℓ expands losslessly, i.e., by a factor of (1 − ε) d 1 .Since all gadgets have disjoint right vertices, there is no collision between gadgets, which finishes the proof.
Subgraphs in near-Ramanujan bipartite graphs.We now give an overview of the proofs of Theorems 1.8 and 1.11.The main ingredient is the Bethe Hessian of a graph G defined as H G (t) := (D G − 1)t 2 − A G t + 1.Specifically, for an induced subgraph G[S], we identify α > 0 such that H G[S] (t) ≻ 0 for t ∈ [0, α] (Theorem 5.1), which then implies Theorem 1.8 via the well-known Ihara-Bass formula (Fact 2.3).
To prove To this end, we consider the regular tree extension T of G[S] (Definition 5.6), which is obtained by attaching trees (of depth ℓ) to each vertex in S such that the resulting graph is (c, d)-biregular except for the leaves.Intuitively, the tree extension serves as a proxy of the ℓ-step neighborhood of S in G.We then define the appropriate function extension f t of f (Definition 5.4) on the tree extension with "sufficient decay" down the tree (where the decay results from an upper bound on t).For appropriately bounded t, we can show which can be controlled via the spectrum of G. Erd ős-Rényi vs. random regular graphs.One technical subtlety is that the edges of a random regular graph are (slightly) correlated, which makes it difficult to directly analyze its unique-neighbor expansion.On the other hand, the analysis is straightforward for Erdős-Rényi graphs since the edges are drawn independently (Lemma B.1).Thus, we give a slight generalization of an embedding theorem given in [FK16] between Erdős-Rényi graphs and random regular graphs (Lemma B.2) which allows us to extend the analysis to random regular graphs.

Open questions
Quantum codes from unique-neighbor expanders.Lin & Hsieh [LH22] construct quantum codes assuming the existence of two-sided algebraic lossless expanders, and their current proof requires the unique-neighbor expansion of sets of vertices with degree-d to exceed d/2.
In contrast, in the setting of classical LDPC codes, if all subsets of vertices of size at most ∆ have even a single unique-neighbor, the resulting code is guaranteed to have distance at least ∆, albeit without a clear decoding algorithm.
Question 1.17.Does the construction of [LH22] yield a good quantum code when instantiated with a γ-two-sided algebraic unique-neighbor expander for small γ > 0?
Algebraic two-sided lossless expanders from random graphs.Two-sided lossless expanders with relevant algebraic properties are not known to exist, even using randomness.Random bipartite graphs exhibit two-sided lossless expansion (see, for example, [HLW06, Theorem 4.16]), but do not admit any nontrivial group actions.
A natural approach is to use an algebraic random graph, such as a random Cayley graph, and study its vertex expansion properties.It is also possible to achieve lossless expansion using the tripartite line product if the small-set edge expansion of the base graph is far better than that guaranteed by spectral expansion.A concrete question in this direction that could result in a lot of progress is the following.
Question 1.18 (Beyond spectral certificates).Let Γ be a group and let S be a set of D generators chosen independently and uniformly from Γ. Let G := Cay(Γ, S) be the Cayley graph given by the generator set S. Is it true that with high probability over the choice of S: for all subsets of vertices T ⊆ Γ where |T| ⩽ |Γ|/poly(D), the number of edges inside T is at most 0.1 √ D|T|?
Remark 1.19.Spectral expansion can at best guarantee that the number of edges inside a set T is at most √ D|T|.A resolution to the above question would necessarily use other properties of the random graph and group, beyond merely the magnitude of its eigenvalues.

Organization
In Section 2, we give some technical preliminaries.In Section 3, we define the line product and prove its unique-neighbor expansion assuming good expansion properties of the base and gadget graphs.In Section 4, we prove Theorem 1.2 by instantiating the line product with a suitably chosen base graph and gadget graph.
In Section 5, we prove Theorem 1.8.In Section 6, we use Theorem 1.8 to prove Theorem 1.11.In Section 7, we define the tripartite line product, and instantiate it with an appropriately chosen base graph and gadget graph to prove Theorem 1.5 via Theorem 1.11 and Theorem 1.12.In Section 8, we show how we can recover Golowich's [Gol23] construction and analysis of one-sided lossless expanders as an instantiation of the tripartite line product and an application of Theorem 1.11.
In Appendix A, we prove the sharpened Moore bound Theorem 1.12.In Appendices B and C, we analyze the expansion profile of the gadget graph.

Preliminaries
Notation.Given a graph G, we use V(G) to denote its set of vertices, E(G) to denote its set of edges.If G is bipartite, we use L(G) and R(G) to denote its left and right vertex sets respectively.We write deg G (v) to denote the degree of vertex v in G (we will omit the subscript G if clear from context).We say that a bipartite graph For any subset of edges F, we use For a set of vertices S, we use e F (S) to denote the number of edges in F with both endpoints in S, and e F (S, T) to denote the number of (u, v) ∈ S × T such that {u, v} ∈ F (for disjoint sets S and T).We will omit the subscript if F = E(G).We denote the eigenvalues of the normalized adjacency matrix of Random bipartite graph models.Throughout the paper, we will write random variables in We denote K n 1 ,n 2 as the complete bipartite graph with left/right vertex sets L = [n 1 ] and R = [n 2 ].We use G ∼ G n 1 ,n 2 ,m to denote a random graph sampled from the uniform distribution over (simple) bipartite graphs on with exactly m edges.With slight abuse of notation, we use H ∼ G n 1 ,n 2 ,p for p ∈ (0, 1) to denote a random graph such that each potential edge is included with probability p.Similarly, we use

Graph expansion
It is a standard fact that small subgraphs in spectral expanders have bounded number of edges.The following is a special case of the Expander Mixing Lemma [AC88], and we include a short proof for completeness.
Proof.Let n = |V(G)|, A be the (unnormalized) adjacency matrix of G, and ⃗ 1 S ∈ {0, 1} n be the indicator vector of S. We can decompose ⃗ 1 S as Within graphs of low "hereditary" average degree, a significant fraction of edges are incident to low-degree vertices.Lemma 2.2.For any γ > 0, let F be a graph such that for all S ⊆ V(F), 2e(S) ⩽ γ|S|.Write V(F) = F ℓ ⊔ F h where F ℓ comprises all vertices v such that deg(v) ⩽ 2γ and F h to denote the remaining vertices.Then: Proof.On one hand, by assumption we have:

Non-backtracking matrix
Notation.Given an undirected graph G = (V, E) with |V| = n vertices and |E| = m edges, we denote A G ∈ {0, 1} n×n to be its adjacency matrix, D G ∈ R n×n to be its diagonal degree matrix, and finally B G ∈ {0, 1} 2m×2m to be its non-backtracking matrix (introduced by [Has89]) defined as follows: for directed edges (u 1 , v 1 ), (u 2 , v 2 ) in the graph, Note that the non-backtracking matrix is not symmetric.Let λ 1 , . . ., λ 2m ∈ C be the eigenvalues of The Perron-Frobenius theorem implies that λ 1 is real and non-negative.We denote ρ(B G ) = λ 1 to be the spectral radius of B G .
A crucial identity we will need is the Ihara-Bass formula [Iha66,Bas92] which gives a translation between the eigenvalues of the adjacency matrix and the eigenvalues of the non-backtracking matrix: Fact 2.3 (Ihara-Bass formula).For any graph G with n vertices and m edges, the following identity on univariate polynomials is true: The Ihara-Bass formula gives a direct relationship between the spectral radius of B G and the positive definiteness of H G (t).The following is classic (e.g.[FM17, Proof of Theorem 5.1]), though we include a proof for completeness.Lemma 2.4.Let G be a graph and 0 < α < 1.Then, the spectral radius ρ(B G ) ⩽ 1 α if and only if H G (t) ≻ 0 for all t ∈ [0, α).As a result, if H G ( 1 ρ ) has a non-positive eigenvalue for some ρ > 0, then ρ(B G ) ⩾ ρ.
and move continuously on the real line as t increases from 0. Note also that by the Perron-Frobenius theorem,

The line product of graphs
Our construction is based on taking the line product of a suitably chosen spectral expander and unique-neighbor expander.See Figure 1 for an example.Definition 3.1 (Line product).Let G be a D-regular graph on vertex set [n], and let H be a graph on vertex set [D].For each v ∈ V(G) and i ∈ [D], let e i v denote the i-th incident edge to v. The line product G ⋄ H is the graph on vertex set E(G) and edges obtained by placing a copy of H on E(v) for each v ∈ V(G), such that {e i v , e j v } is an edge in H(v) if and only if {i, j} is an edge in H.For convenience, we denote H(v) to be the subgraph of G ⋄ H given by the copy of H associated with v. Definition 3.2.Given a graph H, we denote UN H (S) to be the set of unique-neighbors of S. The unique-neighbor expansion profile of a graph H, denoted P H , is defined: When H is a bipartite graph, we use P (L) H (t) to denote the analogous quantity where the minimum is taken only over subsets of the left and right respectively.Lemma 3.3 (Expansion profile of the line product).Let γ > 0 and ε ∈ (0, 1).Suppose 1. G is a D-regular graph such that 2e(S) ⩽ γ|S| for all S ⊂ V(G) with |S| ⩽ ε|V(G)|, and be the set of vertices of G touched by T. Note that |S| ⩽ 2|T| ⩽ ε|V(G)|.Recall that we denote T(v) ⊆ T to be the set of edges in T incident to v, and we have deg Each summand in the first term of the right-hand side can be lower bounded using P H (see below).A vertex {v 1 , v 2 } ∈ V(Z) (an edge in G) is contained in exactly two subgraphs H(v 1 ) and H(v 2 ), so it can only be counted twice in the second term, which means we can bound the whole sum by 2e(S).
Since |S| ⩽ ε|V(G)|, by the assumption on G, both the induced subgraph G[S] and T (viewed as a subgraph of G[S]) satisfy the assumption of Lemma 2.2, i.e., all S ′ ⊆ S satisfies 2e where the last inequality is by |T(v)| = deg T (v) ⩽ 2γ for all v ∈ S 1 and the assumption that P H (t) ⩾ 12γ/t for all t ⩽ 2γ.Then since P H (t) is monotonically decreasing with t and

Algebraic unique-neighbor expanders
We use a Ramanujan graph equipped with symmetries bestowed by its Cayley graph structure as our base spectral expander.
Proof.For odd D, there exists an r ∈ N such that D − 1 ⩽ 2 r ⩽ 2(D − 1), thus we set D ′ = 2 r + 1 ⩽ 2D.For even D, there exists an r ∈ N such that D − 1 ⩽ 3 r ⩽ 3(D − 1), thus we set is decreasing with x for x ⩾ 2).Since D and D ′ have the same parity, we can remove pairs of generators g ̸ = g −1 from A ′ until there are D elements left (if at some point only self-inverse elements remain, then we start removing them one at a time).Let A be the remaining generators with |A| = D.By construction, G := Cay(Γ n , A) is D-regular.Now, we upper bound e(S).Deleting edges can only decrease e(S), so by Lemma 2.1, This completes the proof.
For the gadget, we will need a unique-neighbor expander with strong quantitative guarantees.
We defer the proof of Lemma 4.3 to Appendix B, and prove our main theorem below.
Note that by Lemma 4.2, G n satisfies 2e(S) which satisfies the first condition in Lemma 3.
Thus, it suffices to show that P H (t) satisfies the second condition in Lemma 3.3 (a weaker lower bound): (2) This allows us to apply Lemma 3.3 and the (stronger) lower bound of P H (t) in Eq. ( 2) to get As P Z n (t) is a decreasing function with t, this establishes the desired unique-neighbor expansion as articulated in Eq. (1), finishing the proof of the theorem.Now, to establish Eq. ( 3), observe that the function xe −x is monotone increasing for x ⩽ 1 and monotone decreasing for x ⩾ 1, hence for By using and the above, from Eq. ( 2) we get P H (t) ⩾ . Therefore, we have established Eq. ( 3).
Finally, we show that Z n is a (2d 1 , 2d 2 )-biregular graph.Since G n = Cay(Γ, A) is a Cayley graph with generators A, each edge {u, v} is labeled by group elements a and a −1 in A, i.e., {u, v} = e a u = e a −1 v .To construct the line product G n ⋄ H, we need a bijective map φ between A and V(H) = L(H) ∪ R(H) such that each pair a, a −1 ∈ A gets assigned to the same side of H.This can be done as long as d 1 and d 2 are even. Let are assigned to the same side of H.Moreover, all edges of Z n are between L(Z n ) and R(Z n ), establishing bipartiteness of Z n .Finally, observe that the degree of e ∈ V(Z n ), an edge between u and v, is d 1 in both H(u) and H(v) if e ∈ L(Z n ), and d 2 in both if e ∈ R(Z n ), which implies (2d 1 , 2d 2 )-biregularity.

Non-backtracking matrix of subgraphs
In this section, we bound the spectral radius of the nonbacktracking matrix of subgraphs of bipartite spectral expanders.This gives us tight control over the degree profile of subgraphs, improving on bounds provided by classic tools like the expander mixing lemma [AC88].
The following is a generalization of an analogous result of Kahale for regular graphs [Kah95, Theorem 1].
Overview of the proof.We prove R. The way we prove ⟨ f , H G[S] (t) f ⟩ > 0 is by relating it to a quadratic form against the matrix H G (t), which we can control via the spectrum of G.In particular, we consider the depth-ℓ regular tree extension T of G[S], and for f we define an appropriate function extension f t on the tree depending on t (Definition 5.4 The function f t additionally has the property that its ℓ 2 mass on vertices r-far from G[S] decays exponentially in r.At a high level, we use the tree extension as a proxy for the ℓ-step neighborhood of S in G, and this is made precise in Section 5.3 as we define a natural folded function f t of f t into G (Definition 5.9).This allows us to lower bound ⟨ f , H G[S] (t) f ⟩ by ⟨ f t , H G (t) f t ⟩ with some errors.The errors can be bounded using the decay of f t from the definition, though this requires t < ((c − 1)(d − 1)) −1/4 (see Lemma 5.7).Ignoring errors, it comes down to showing that and we solve the quadratic formula in Lemma 5.12 and show that the above gives rise to Eq. (4).The full proof is presented in Section 5.4.

Tree extensions
We start with defining tree extensions of a graph.

Definition 5.3 (Tree extension)
. For a graph G = (V, E), we say that T = (V(T), E(T)) is a tree extension of G if T is obtained by attaching a tree T r to each vertex r ∈ V, with r being the root.Each vertex x ∈ T belongs to a unique tree T r rooted at r.For any x ∈ T, we write depth(x) to be the distance between x and the root of the tree containing x.
Fix a tree extension T of G, for functions f , g : Definition 5.4 (Function extension).Given a function f : V(G) → R, a tree extension T of G, and parameter t ∈ R, we define f t : V(T) → R to be the extension of f to T such that for x ∈ T, The following simple but crucial lemma establishes a relationship between H G and H T , which also motivates the definition of f t .Lemma 5.5.Let G be a graph and T be any tree extension of G.Then, for any t ∈ R and f : V(G) → R, the extension f t : V(T) → R defined in Eq. (5) satisfies ∈ V(G), let d(x) be its degree and let r ∈ V(G) be the root of the tree containing x. Observe that x has 1 parent (with value f (r)t depth(x)−1 ) and d(x) − 1 children (with value f (r)t depth(x)+1 ) in the tree T r .Thus, For x ∈ V(G), let d G (x) be its degree in G and d T (x) be its degree in T.Then, This completes the proof.

Regular tree extensions of subgraphs
For a subgraph G[S] in a regular (or biregular) graph, we consider its regular tree extension.We show that given a graph G = (V, E) and S ⊆ V, for any function f : S → R and its extension f t to the depth-ℓ regular tree extension of G[S], the contribution from the leaves decays exponentially with ℓ when t < ((c − 1)(d − 1)) −1/4 .Lemma 5.7 (Decay of f t ).Let G = (L ∪ R, E) be a (c, d)-biregular graph with c ⩽ d, let S ⊆ L ∪ R, let ℓ ∈ N be even, and let T be the depth-ℓ regular tree extension of G[S].Moreover, let t ∈ R such that t 2 (c − 1)(d − 1) = 1 − δ for some δ ∈ (0, 1).Given any function f : S → R, let f t : V(T) → R be the function extension (as defined in Eq. (5)), and let f =ℓ t be f t restricted to the leaves of T.Then, Since the function 2x e xℓ −1 is monotone decreasing, we have for any δ ′ > δ, Proof.We will lower bound ∥ f t ∥ 2 2 and upper bound the contribution from the leaves at depth ℓ.Fix a vertex r ∈ R (with deg G (r) = d) and consider the tree T r rooted at r. Let deg T r (r) be the degree of r in T r .The number of children of vertices in the tree alternates between c − 1 and d − 1 as we go down the tree.Thus, for an even integer k ⩽ ℓ, the number of vertices in the k-th level is The same argument shows that the above also holds for r ∈ L (with deg G (r) = c).Thus, the contribution of the tree T r to ∥ f t ∥ 2 2 can be lower bounded by the product of the following two terms: Next, the contribution from the leaves of T r to f =ℓ t 2 2 is also given by Eq. ( 6).Thus, we have , finishing the proof.

Folding regular tree extensions
Given a regular tree extension T of an induced subgraph G[S], there is a natural folding into G via breadth-first search from S.
Definition 5.8 (Folding into G).Let G = (V, E) be a d-regular or (c, d)-biregular graph, let S ⊆ V, and let T be the depth-ℓ regular tree extension of G[S].There is a natural homomorphism σ : T → G such that • σ(x) = x for all x ∈ S; • Two edges {x, y} and {y, z} in T sharing a vertex are not mapped to the same edge in E, i.e., all edges in T that map to the same edge in E are vertex-disjoint.
Definition 5.9 (Folded function).Fix a map σ : T → G. Given any f : We define the folded function f : V(G) → R to be Observation 5.10.The f v 's have disjoint support, thus We next prove the following useful lemma that relates the quadratic forms of f and f with A G .Lemma 5.11.Let G = (V, E) be a d-regular or (c, d)-biregular graph, let S ⊆ V, and let T be a regular tree extension of G[S].For any f : V(T) → R and its folded function f : V(G) → R, we have Proof.Recall from Definition 5.8 that the map σ : T → G satisfies that if {x, y} is an edge in T, then {σ(x), σ(y)} ∈ E.Then, Moreover, all edges in T that map to the same edge are vertex-disjoint.Thus, for any {u, v} ∈ E, ∑ {x,y}∈E(T) 1(σ({x, y}) = {u, v}) • f σ(x) (x) f σ(y) (y) can be expressed as an inner product between some permutations of f u and f v , which is upper bounded by
We would like to show that 2ε ⌉ be an even integer and let T be the depth-ℓ regular tree extension of G[S] (Definition 5.6).Let f t : V(T) → R be the function extension of f to T with parameter t.By Lemma 5.5, we have Note that all internal vertices x ∈ T \ Leaves(T) have degree c or d while the leaves have degree 1.Let D ′ T be the diagonal matrix such that the leaves have the "correct" degree, i.e., for x ∈ Leaves(T) in the tree T r rooted at r ∈ S, D ′ T [x, x] = deg G (r) (since ℓ is even).Then, by Eq. ( 7), Lemma 5.7 states that f =ℓ t decays with a factor 2ε e εℓ −1 ⩽ 4ε, thus Consider the folded function f t : V(G) → R as defined in Definition 5.9.By Observation 5.10, we have We would like to show that the above is non-negative.Denote Γ G := t 2 (D G − 1) + 1, and γ 1 := t 2 (c − 1) + 1 and γ 2 := t 2 (d − 1) + 1.Note that γ 2 ⩾ γ 1 > 0 as we assume that c ⩽ d.Since G is a (c, d)-biregular graph, Γ G and A G have the following block structure, In particular, Then, denoting g := Γ 1/2 G f t , we can write Eq. ( 8) as Next, we upper bound ⟨g, A G g⟩.For any (c, d)-biregular graph, the (normalized where λ = max(λ 2 (A G ), is the second eigenvalue.Since T has depth ℓ, the support of f t (and g) must be contained in , and from Eq. ( 9), As 1+ε 1−4ε ⩽ 1 + 5ε, to prove that the above is positive, it suffices to prove that With λ = λ(1 + 5ε) and the assumption on t (Eq.(4)), the above holds via Lemma 5.12.

Expansion and density of subgraphs
The spectral radius of the nonbacktracking matrix of a subgraph of a bipartite graph imposes constraints on the left and right degrees, articulated by the following.Theorem 6.1 (Subgraph density in (near-)Ramanujan graphs; restatement of Theorem 1.11).Let Theorem 6.1 is a direct consequence of Theorem 5.1 and the following lemma: Lemma 6.2.Let G = (L ∪ R, E) be a bipartite graph, and let the left and right average degrees be d 1 = |E| |L| and d 2 = |E| |R| , respectively.Then, for any t ∈ (−1, 1) \ {0} such that H G (t) ⪰ 0, we have Proof.We can assume that d 1 , d 2 > 1, otherwise the statement holds trivially with |t| < 1.Let x be the vector such that for u ∈ L ∪ R, where α ∈ R will be determined later.Recall that Then, H G (t) ⪰ 0 and t ∈ (−1, 1) imply that To maximize the right-hand side, we choose 1 α = Rearranging the above gives (d We can now prove Theorem 6.1.
Proof of Theorem 6.1.We consider the induced subgraph G[S 1 ∪ S 2 ].By Theorem 5.1, we can choose Plugging the above into Lemma 6.2 completes the proof.
As a corollary of Theorem 6.1, we recover the following result of Asherov and Dinur [AD23] proved for Ramanujan graphs, which further extends to near-Ramanujan graphs.
Lemma 7.5 (Expansion of small sets).Let G = (L ∪ R, E) be a d-left-regular bipartite graph, and let ε ∈ (0, 1) such that ε(d − 1) > 1. Suppose G has no cycle of length at most g, then for all S ⊆ L with Proof.Let T := N G (S) ⊆ R. Suppose S does not expand losslessly, i.e., |T| < (1 − ε)d|S|.Then, the subgraph G[S ∪ T] must have right average degree at least d|S| Let ρ > 0 be the spectral radius of the non-backtracking matrix B G[S∪T] so that H G [S∪T] (1/ρ) ⪰ 0.Then, applying Lemma 6.2, we have Next, by Theorem 7.4, G[S ∪ T] must contain a cycle of size at most , then there exists a cycle of length at most g, which is a contradiction.
Similarly, by Theorem 7.4, G[S ∪ T] must contain a bicycle of size at most , then there exists a bicycle of length at most g, which is a contradiction.

Tripartite line product
We now define a generalization of the line product.

Definition 7.6 (Tripartite line product). Let
The tripartite line product G ⋄ H is the bipartite graph on vertex set L ∪ R and edges obtained by placing a copy of H on the neighbors of v for each v ∈ M. Remark 7.7.Note that Definition 7.6 is indeed a generalization of the line product in Definition 3.1 (where H is bipartite).To see this, consider a D-regular graph G and define a tripartite graph G ′ as follows: set M = V(G), set L, R to be a partition of E(G), and for v ∈ M and e = L ∪ R, connect {v, e} if and only if v ∈ e.Note that in this case We now prove Theorem 1.5; we use the tripartite line product to construct two-sided uniqueneighbor expanders where we can additionally guarantee that small enough sets expand losslessly.as long as |S| ⩽ µ|L| for some µ = µ(K, D 1 ) > 0 (depending only on ε, β, d 1 , d 2 ).For any K ⩾ 100, the above is at most 0.2K.Thus, we know that |E 1 (S, U ℓ )| ⩾ 0.8K|S|, i.e., a constant fraction of edges incident to S go to U ℓ .This also implies that |U h | ⩽ 0.2|U|.
For each v ∈ U, let S v ⊆ S be the vertices in S incident to v. Consider the gadget H placed on v, and let T v ⊆ R be the set of unique-neighbors of S v in the gadget.Further, let T := v∈U T v .Note that each vertex in T is a unique-neighbor within some gadget, but there may be edges coming from other gadgets, so not all of T are unique-neighbors of S in the final product graph.Our goal is to show that a large fraction of T are unique-neighbors of S.
We will analyze the induced subgraph G n [U ∪ T], and we claim that a large fraction of T are unique-neighbors of U in G (2) n , thus are also unique-neighbors of S in Z n .We first lower bound the left average degree of and by the expansion profile of the gadget (Eq.( 10)), v has degree at least Since θ depends only on ε, β, we choose C 0 = C 0 (ε, β) to be large enough (thus also D) such that the above is at least 0.8 • d 1 .
Next, for v ∈ U h , we have no control over its degree in G (2) Then, for |S| ⩽ µ|L| where µ is small enough, we have |U| ⩽ µ ′ |M| where µ ′ (depending on ε, β, K, D 2 ) is small enough to apply Theorem 6.1 and conclude that the right average degree /C with some large C by our choice of θ and D 2 .This implies that 0.9 fraction of T are unique-neighbors of S. Finally, we lower bound |E 2 (U, T)|.Again by Eq. (10), Small set lossless expansion.We now turn to the expansion of small subsets S ⊆ L(Z n ).Let U := N G (1) n (S) ⊆ M and T := N Z n (S) ⊆ R. By assumption, G n has no bicycle of size at most g n , thus Lemma 7.5 states that |U| ⩾ (1 − ε/2)K|S| (i.e., S expands losslessly in G (1) With our choice of K and g n = ω n (1), it suffices that |S| ⩽ exp(g n ).
Next, as each gadget on v ∈ U expands with a factor of at least d 1 , we can lower bound |E 2 (U, T)| by d 1 • |U|.Moreover, the left average degree of the induced subgraph G (2) Then, by Theorem 6.1, the right average degree of For S ⊆ R(Z n ), the analysis is symmetric with d 1 , d 1 replaced by d 2 , d 2 .

One-sided lossless expanders
In this section, we illustrate how the construction of Golowich [Gol23] can be instantiated using the tripartite line product, and give a succinct proof of lossless expansion using our results on subgraphs of spectral expanders.
For the tripartite base graph n = (L ∪ M, E 1 ) to be a (K 1 , D 1 )-biregular near-Ramanujan graph, and Next, we analyze the vertex expansion of a subset S ⊆ L(Z n ) in the product graph Z n .Similar to the proof of Theorem 7.8, let U := N G n (S) ⊆ M be the neighbors of S in G By Theorem 6.1, we can bound the left average degree by , most edges incident to S go to U ℓ .
Moreover, for each v ∈ U ℓ , the gadget placed on H has at most ε 4 √ D vertices on the left, thus by Eq. (11) each gadget expands losslessly.Specifically, denoting T := N Z n (S) ⊆ R, we have that for large enough C 0 (hence large enough D).
Finally, since G n is a (D 2 , 1)-biregular graph, This completes the proof.
By Lemma A.2, we have Now, let k := ⌊log ρ n⌋ + 1 and suppose for contradiction that G contains no cycle of size ⩽ ℓ = 2k.Observe that every entry of A (k) must be either 0 or 1, otherwise if A (k) [i, j] > 1 then there are two distinct length-k paths from i to j, meaning there is a cycle of length at most 2k = ℓ, a contradiction.Therefore, the L 1 norm of each row of A (k) is at most n, hence ∥A (k) ∥ 2 ⩽ n.
Similarly, let k ′ := ⌊log ρ 2n⌋ + 1 and suppose for contradiction that G hs no bicycle of size ⩽ ℓ ′ = 3k ′ .We claim that three distinct non-backtracking walks of a given length-k ′ between any two vertices must form a bicycle, hence every entry of A (k ′ ) must be at most 2. Suppose the union of the three distinct nonbacktracking walks between vertices u and v, called H uv , did not give rise to a bicycle, its excess must be at most 0. Since H uv is connected, it must have at most one cycle.If there are no cycles, then there is exactly one nonbacktracking walk from u to v, so we assume there is exactly one cycle.Any nonbacktracking walk in H uv can enter and exit the cycle at most once.Further, there is a unique way to start from u and enter the cycle, and a unique way to exit the cycle and arrive at v. Between entering and exiting the cycle, there are only two choices: walking in the cycle clockwise or counterclockwise.There are at most two ways to walk between u and v in k ′ steps -either the shortest path between them is of length exactly k ′ and does not touch the cycle, or a length-k nonbacktracking walk must enter the cycle, which we established gives at most 2 distinct walks.

B Expansion profile of random graphs
In this section we prove Lemma 4.3 (existence of biregular graphs with good expansion profile).We first prove the desired statement for Erdős-Rényi graphs given in Lemma B.1, and then transfer the result to random regular graphs via a coupling articulated in Lemma B.2. See Section 2 for the notations of various random bipartite graph models.

Lemma B.2 (Embedding Erdős-Rényi graphs into random regular graphs
We first give a proof of Lemma 4.
, and since which completes the proof.
We now prove Lemma B.1: we show a lower bound on the expansion profile of G n 1 ,n 2 ,p using standard concentration inequalities and union bound.For S ⊆ R(H) with |S| = t, we have: For each v ∈ L(H), the number of edges between v and S is distributed as Bin(t, p), so each 1[v ∈ UN H (S)] is an independent Bernoulli with bias q t := tp(1 − p) t−1 .By the Chernoff bound: Let γ = 3ε and fix m ⩽ ⌊(1 − γ)m⌋ ⩽ (1 − ε) 3 m.We now take the first m edges from S ⊂ R ′ , and the resulting graph G ′ is distributed as G n 1 ,n 2 , m .Thus, we have obtained a joint distribution between The second statement of the theorem is a simple modification.We sample G n 1 ,n 2 ,p as follows: (1) sample m ′ ∼ Bin(n 1 n 2 , p), and ( 2 , and conditioned on m ′ ⩽ ⌊(1 − γ)m⌋, the exact same analysis goes through.Thus, we get Pr[H ⊂ R ′ ] = 1 − o(1), completing the proof.

C.1 Random graph extension
To prove Lemma C.3, we first need a few definitions and lemmas about extensions of graphs.
As before, fix n We first introduce the following definitions.

Definition C.4 (Graph extension)
. Given an ordered bipartite graph G = (e 1 , . . ., e t ), we say that an ordered simple (d 1 , d 2 )-biregular graph H = ( f 1 , . . ., f m ) with m edges is an extension of G if e i = f i for i ⩽ t.We write S G := S G (n 1 , n 2 , d 1 , d 2 ) to denote the set of extensions of G, and write S G as a random graph sampled uniformly from S G (we will drop the dependence on n 1 , n 2 , d 1 , d 2 when clear from context).
Given G and an extension H, for vertices u, v ∈ L or u, v ∈ R, Note that deg H|G (u, v) is not symmetric in u and v.
Although Definition C.4 is a natural definition, it is difficult to analyze since we require the extension of G to be simple.On the other hand, if we allow multigraphs (parallel edges allowed), then there is a very simple process to sample a multigraph extension from G, namely the "configuration model".Furthermore, it is easy to see that conditioned on the sampled multigraph being simple, the process gives the uniform distribution over S G .

Definition C.5 (Random multigraph extension)
. Given a graph G = (e 1 , . . ., e t ) of size t, we denote M G to be an ordered random multigraph extension of G sampled as follows: 1. Set U to be a random permutation of (1, . . ., 1, . . ., n 1 , . . ., n 1 ) where each u ∈ For v 1 , v 2 ∈ [n 2 ], the same analysis shows that Pr[deg εm ⌉.This completes the proof.We can now complete the proof of Lemma C.7.
Proof of Lemma C.7.We will write M = M G∪e and M ′ = M G∪e ′ for simplicity.We will construct a coupling of M and M ′ such that they differ in at most 3 positions.Given M and e = (u, v), e ′ = (u ′ , v ′ ), we perform a switching operation: 1. Delete e and add e ′ to M.
2. Recall U and V of length m − (t + 1) defined in Definition C.5.
• If e and e ′ are disjoint, then randomly select a copy of u ′ in U and change to u, and similarly randomly select a copy of v ′ in V and change to v.
• If e and e ′ are not disjoint (w.l.o.g.assume v = v ′ ), then just change a random copy of u ′ in U to u.
Then, connect edges according to U and V as in Definition C.5.
Note that step 2 is equivalent to sampling a random edge (u ′ , w R ) incident to u ′ in M \ (G ∪ e) and replacing (u ′ , w R ) with (u, w R ), and similarly replacing a random (w L , v ′ ) with (w L , v).
We denote the resulting graph as M * .It is clear that the resulting vector V after step 2 is distributed as a random permutation of (1, . . ., 1, . . ., n 2 , . . ., n 2 ) with multiplicity d 2 − deg G∪e ′ (v) for each v, thus M * has the same distribution as M ′ .
We now analyze the probability of M * being simple conditioned on M being simple.We first identify some nice properties of M, which we will show to occur with high probability.We define .
By the assumption on the degrees of G, we know that deg By the same analysis, the inequality is true for v ∈ [n 2 ] if we replace d 1 with d 2 .
The lemma now follows from taking the union bound over all t ⩽ (1 − ε)m and u ∈ [n 1 ], v ∈ [n 2 ].
We are now ready to prove Lemma C.3.

Figure 1 :
Figure 1: An example of the line product.

Figure 2 :
Figure 2: An example of the tripartite line product.The gadget placed on the first vertex in M is highlighted in G ⋄ H.

Fact 4. 1 ( 2 √
Ramanujan graph construction[LPS88,Mor94]).For every D = p r + 1 where p is prime and r ∈ N, there is an infinite family of groups (Γ n ) n∈N and a collection of generators A ⊆ Γ n closed under inversion where |A| = D such that the Cayley graph G := Cay(Γ n , A) is a D-regular Ramanujan graph, i.e., it is a For arbitrary D, by deleting a few edges, we can get D-regular Cayley graphs that satisfy the expanding condition in Lemma 3.3 with similar parameters as Ramanujan graphs.

Lemma 4. 2 (
Expanding Cayley graphs of every degree).For every D ∈ N, D ⩾ 3, there is an infinite family of groups (Γ n ) n∈N and a collection of generators A ⊆ Γ n closed under inversion where |A| = D such that the Cayley graph G := Cay(Γ n , A) is a D-regular graph such that

Proof. 2 • 2 •
The construction of Z n is based on taking the line product of G n from Fact 4.1 and a bipartite gadget graph H from Lemma 4.3 for suitably chosen parameters.Fix parameters τ = 18, θ = 40τ β , and choose d 0 to be large enough such that d 0 ⩾ 8 β e τθ and such that for D ⩾ 4d 2 0 /θ 2 , the o D (1) terms in Lemma 4.3 and all subsequent occurrences in this proof are smaller than 0.1.For d 1 , d 2 ⩾ d 0 , let D 1 := d 1 +d 2 θ d 2 and D 2 := d 1 +d 2 θ d 1 , and define D := D 1 + D 2 .This choice of parameters satisfies the requirements of Lemma 4.3, and hence there is a (d 1 , d 2 )-biregular graph H with D 1 left vertices, D 2 right vertices, and

Definition 5. 6 (
Regular tree extension).Let G = (V, E) be a d-regular graph, S ⊆ V, ℓ ∈ N, and consider the induced subgraph G[S].We define the depth-ℓ regular tree extension of G[S] to be the tree extension T of G[S] where depth-ℓ trees are attached to vertices in S such that the resulting graph is d-regular except for the leaves.Let Leaves(T) denote the set of leaves.Similarly, let G = (L ∪ R, E) be a (c, d)-biregular graph, S ⊆ L ∪ R, and ℓ ∈ N. The depth-ℓ regular tree extension of G[S] is the tree extension such that the resulting graph is (c, d)-biregular except for the leaves.

n
, and we partitionU into U ℓ := {v ∈ U : |E 1 (v, S)| ⩽ ε 4 √D} (the "low S-degree" vertices) and U h := U \ U ℓ (the "high S-degree" vertices).Consider the bipartite subgraph induced by S ∪ U h .By definition, the right average degree in G(1) Proof of Lemma B.1.Write S ⊆ V(H), write S := S L ∪ S R where S L := S ∩ L(H) and S R := S ∩ R(H).Observe that |UN H (S)| = |UN H (S L )| + |UN H (S R )|.Therefore, without loss of generality we can study S completely in L(H) or R(H).

Table 1 :
Comparison of our Theorem 1.2 with prior work.