Chapter 4: Multilinear Extensions
In 1971, the Mariner 9 probe became the first spacecraft to orbit another planet. Its mission: map the surface of Mars. But transmitting high-resolution images across 100 million miles of static-filled space was a nightmare. A single burst of cosmic noise could turn a crater into a glitch.
NASA didn't send raw pixels. They used a code developed years earlier by Irving Reed and David Muller: treat the pixel data as evaluations of a multivariate polynomial. The Reed-Muller code could correct up to seven bit errors per 32-bit word. When Mariner 9 arrived to find Mars engulfed in a planet-wide dust storm, mission control reprogrammed the spacecraft from Earth and waited. When the dust cleared, the code delivered 7,329 images, mapping 85% of the Martian surface.
Why not Reed-Solomon? In Chapter 2, we encoded values as a univariate polynomial of degree . That works when is modest. But Mariner's data was indexed by bit positions: a 32-bit word has bit combinations, a memory address space has locations, a boolean formula with 100 variables has possible assignments. Encoding values as a univariate polynomial means degree . Impossible.
The solution: let each bit be its own variable. A 100-bit index becomes 100 coordinates, each 0 or 1. The polynomial has 100 variables instead of degree . Data lives not on a line but on a hypercube. This chapter develops that theory.
In Chapter 2, we turned data into polynomials via Lagrange interpolation: given values, construct the unique degree- univariate polynomial passing through them. That was interpolation over a line.
Now we need interpolation over a hypercube. The data lives at vertices, indexed by bit strings. The polynomial must agree with the data at these vertices and extend smoothly to all of . The construction is analogous to univariate Lagrange, but the geometry is different, and the efficiency implications are dramatic.
This chapter develops the theory of multilinear extensions: the canonical way to extend functions from the Boolean hypercube to polynomials over . These extensions are the workhorses of sum-check-based proof systems, encoding everything from circuit wire values to constraint satisfaction.
The Boolean Hypercube
Consider the set , all -bit binary strings. This is the Boolean hypercube, and it contains exactly points.
n = 2:
(1,1)
/ \
(0,1) (1,0)
\ /
(0,0)
n = 3: A cube with 8 vertices
Any function assigns a field element to each vertex of this hypercube. There are vertices, so is essentially a table of values.
For example:
-
A vector can be viewed as where converts the bit string to an index
-
The output values of a layer of circuit gates
-
A database of records indexed by -bit keys
Why does the hypercube matter? Because computation is fundamentally boolean. A memory address is a bit string. A circuit's inputs are bits. A satisfying assignment to a boolean formula is a point in . When we want to verify a computation, the objects we care about (wire values, memory contents, constraint satisfaction) are naturally indexed by binary strings. The hypercube is where computational problems live.
But polynomials live over fields, not just . We want a polynomial that agrees with on the hypercube but extends smoothly to all of . This extension is what lets us apply the algebraic machinery (Schwartz-Zippel, sum-check) that makes verification efficient.
Why Multilinear?
In Chapter 2, we used univariate polynomials (Reed-Solomon). Why switch to multivariate now?
The problem with univariate encoding is degree: if you encode data points into a single-variable polynomial , that polynomial has degree about one million. Manipulating degree-million polynomials is expensive, requiring heavy FFT operations.
Multilinear polynomials avoid this. If you encode the same points into a 20-variable multilinear polynomial, the degree in each variable is just 1. The total degree is only 20. By increasing the number of variables, we drastically lower the per-variable degree. This tradeoff (more variables, lower degree) enables the linear-time prover algorithms that power modern systems like HyperPlonk and Lasso, avoiding the expensive FFTs required by univariate approaches.
A polynomial in variables has terms like with various exponents. The degree in variable is the maximum exponent of across all terms.
A polynomial is multilinear if its degree in every variable is at most 1. Every term looks like a product of distinct variables (or subsets thereof). We write (with a tilde) to denote the multilinear extension of a function :
For example, with :
There are possible subsets , hence coefficients. A multilinear polynomial in variables is fully specified by numbers, exactly matching the number of points in the hypercube.
This is not a coincidence. It's the key theorem:
Theorem (Multilinear Extension). For any function , there exists a unique multilinear polynomial such that for all .
The function is called the multilinear extension (MLE) of .
Constructing the Multilinear Extension
The theorem claims uniqueness. How do we actually construct ?
The Lagrange Basis
For each point , define the Lagrange basis polynomial:
Here is a fixed boolean vector, where each . You can read as the binary representation of an index from 0 to , addressing one of the vertices of the hypercube. Meanwhile is a vector of formal variables where each ranges over all of . Geometrically, lives at a corner of the unit hypercube, while can be any point in , including points "between" corners. The polynomial is defined over all of , but it has a special property on the hypercube: it equals 1 at and 0 at every other boolean point.
To see why, consider what happens at point :
-
If : the factor is , which evaluates to
-
If : the factor is , which evaluates to
Every factor equals 1, so .
At any other point :
-
There exists some coordinate where
-
If and : the factor evaluates to
-
If and : the factor evaluates to
One factor is zero, so .
The Extension Formula
The multilinear extension is now simply:
At any hypercube point :
The extension agrees with on the hypercube. Since it's a sum of multilinear terms (each is multilinear), is multilinear.
Uniqueness
Claim: If a multilinear polynomial vanishes on all of , then .
Proof by induction on :
Base case (): A multilinear polynomial in one variable has form . If and , then and , so . Thus .
Inductive step: Write where are multilinear in variables. Evaluating at : . Since vanishes on all of , in particular vanishes on . By induction, . Similarly, vanishes on , so . Thus .
Corollary: If two multilinear polynomials agree on , their difference vanishes there, hence is identically zero, so they are equal.
The Equality Polynomial
One Lagrange basis polynomial deserves special attention: the equality polynomial.
This is the MLE of the equality function:
for .
The Lagrange basis polynomials are just the equality polynomial with one input fixed:
The equality polynomial appears constantly in sum-check-based protocols, through the identity:
This follows directly from the Lagrange formula: . Summing weighted by over the hypercube gives the MLE of evaluated at . This means evaluating an MLE at a random challenge reduces to a sum-check on .
This immediately gives a powerful zero test. Suppose the verifier wants to check that vanishes on the entire Boolean hypercube. By the identity above, checking that all values are zero is the same as checking that . The verifier picks a random and runs sum-check on:
This is a random linear combination of all values. If truly vanishes on the hypercube, then (by the uniqueness theorem above), so the sum is always 0. If even one value , then is a nonzero multilinear polynomial, and Schwartz-Zippel guarantees with probability at least . Over a 254-bit field, this is negligible. This "zero-on-hypercube" test is the foundation of Spartan and related sum-check-based proof systems.
Worked Example: A 2-Variable Function
Let's trace through a complete example.
Consider defined by the table:
The Lagrange basis polynomials are:
The multilinear extension is then:
Expanding:
We can verify this matches the table:
-
(matches)
-
(matches)
-
(matches)
-
(matches)
What happens at a non-boolean point? Evaluating at :
This value has no "meaning" on the hypercube; isn't a Boolean point. But this is exactly what we want: the polynomial is defined everywhere, and random evaluation is the key to probabilistic verification.
Efficient Evaluation
Given the table of values and a query point , how fast can we compute ?
The naive approach sums over all terms:
Each takes to compute. Total: .
We can do better with streaming evaluation. is computable in time with the following observation.
Define as the "partial extension" using only the first variables of :
At : (the original table).
At : (a single value).
The recursion from to :
Each step halves the table size. Total work: .
This is linear in the table size, optimal for any algorithm that must touch all values.
Worked Example: Streaming Evaluation
Let's trace through this algorithm with our earlier function :
We want to compute at the point .
Step 0: Initialize
is just the original table, a function of both variables:
Think of it as four values indexed by :
Step 1: Compute by "folding in"
The recursion says:
This is a weighted combination of the two rows, using and :
The table has shrunk from 4 values to 2 values: .
Step 2: Compute by "folding in"
The table has shrunk from 2 values to 1 value. This single value is .
We can verify using the explicit formula :
This works because the Lagrange basis polynomial factorizes into independent pieces, one per coordinate:
where and are univariate selectors. This factorization holds because the multilinear Lagrange formula is a product over coordinates:
Each factor depends only on one coordinate of and one coordinate of . So evaluating at gives a product of independent terms.
The algorithm exploits this factorization. The MLE evaluation is:
Rearranging the sum (grouping by ):
The inner sum is exactly what Step 1 computes: for each value of , it combines the two cases using weights and . The result has half as many entries. Step 2 then folds in the weights similarly.
An analogy helps here: think of a single-elimination tournament with players. In each round, pairs compete and half are eliminated. After rounds, one champion remains. The streaming algorithm works the same way: table entries enter, each round uses a random weight to combine pairs, and after rounds a single evaluation emerges. The tournament bracket is the structure of multilinear computation.
This pattern of using a random challenge to collapse pairs of values and halving the problem size will reappear throughout this book. In Chapter 10 (FRI), we'll name it folding and see it as one of the central techniques in zero-knowledge proofs.
Code: Streaming MLE Evaluation
The algorithm above translates directly to code. Each coordinate of folds the table in half.
def mle_eval(table, r):
"""
Evaluate the multilinear extension of `table` at point `r`.
Args:
table: List of 2^n field elements (the function values on hypercube)
r: Tuple of n coordinates (r_1, ..., r_n)
Returns: The value of the MLE at r
"""
T = table.copy()
for r_i in r:
half = len(T) // 2
# Fold: T'[j] = (1 - r_i) * T[2j] + r_i * T[2j+1]
T = [(1 - r_i) * T[2*j] + r_i * T[2*j + 1]
for j in range(half)]
return T[0] # Single value remains
# Example from the worked example above
table = [3, 7, 2, 5] # f(0,0)=3, f(0,1)=7, f(1,0)=2, f(1,1)=5
r = (0.4, 0.7)
result = mle_eval(table, r)
print(f"Streaming: MLE({r}) = {result}")
# Verify against explicit formula: f(X1,X2) = 3 - X1 + 4*X2 - X1*X2
explicit = 3 - 0.4 + 4*0.7 - 0.4*0.7
print(f"Explicit: MLE({r}) = {explicit}")
Output:
Streaming: MLE((0.4, 0.7)) = 5.12
Explicit: MLE((0.4, 0.7)) = 5.12
The streaming algorithm touches each table entry exactly once. For a table of size , total work is .
Tensor Product Structure
The factorization we used in the streaming algorithm generalizes to any number of variables. For :
where and .
This is a tensor product structure. To see what this means concretely, consider . Define the vectors:
Their tensor product is the matrix (or equivalently, length-4 vector) of all pairwise products:
Reading off the entries: . The tensor product is the vector of Lagrange evaluations.
For general , the vector of all Lagrange evaluations is:
The streaming algorithm exploits this tensor structure. Instead of computing all Lagrange values (expensive), it processes one coordinate at a time, folding the tensor product incrementally. This is why MLE evaluation costs instead of . The same tensor structure enables:
-
Efficient prover algorithms for sum-check (Chapter 19)
-
Recursive proof constructions
-
Memory-efficient streaming over large tables
Multilinear Extensions of Functions on Larger Domains
What if our function isn't defined on ?
Suppose for some . We can interpret the domain as via binary encoding:
Any function on a power-of-two domain has a natural multilinear extension.
For domains not of size , we can pad with zeros or use more sophisticated encodings. The key insight: as long as the domain is finite, we can always encode it in binary and take the MLE.
Connection to Sum-Check
The sum-check protocol (Chapter 3) proves claims of the form:
for some polynomial . When is the multilinear extension of a function , this sum equals , the sum of all function values on the hypercube.
As an example, suppose we want to prove that a vector with sums to a claimed value .
Let be the MLE encoding the vector. Then:
Sum-check verifies this identity without the verifier seeing all of . The protocol reduces the sum to a single random evaluation , which the prover supplies (with a commitment proof).
This is the bridge from "data" to "proof": encode data as an MLE, verify properties via sum-check, bind via polynomial commitment.
Evaluations and Coefficients
A perspective that clarifies many constructions:
A multilinear polynomial has coefficients (the values in the monomial expansion ). These coefficients live in an abstract "coefficient space."
But also has evaluations on the hypercube. These evaluations are just , the original table values you started with.
These are not the same numbers. The table entry in our worked example is not a coefficient of the polynomial. The polynomial has coefficients , while the table values are . They're related by the Lagrange interpolation formula.
For multilinear polynomials, the evaluation table is a complete description. You can recover coefficients from evaluations and vice versa. They're just two bases for the same -dimensional vector space.
The transformation between bases is exactly the Lagrange interpolation formula and its inverse. Both can be computed in time.
This means:
-
Committing to a multilinear polynomial = committing to its evaluation table
-
Evaluating at a random point = a linear combination of table entries
-
Sum-check over an MLE = verifying global properties through local queries
The table has entries. The verifier touches of them. The polynomial is what bridges the gap: it's a compressed representation that can be probed at random points, and those random probes reveal whether the full table satisfies the claimed property. Extension creates redundancy; redundancy enables compression; compression enables succinctness.
Polynomial Evaluation as Inner Product
There's a beautiful way to see this algebraically: polynomial evaluation is an inner product.
For a multilinear polynomial, the evaluation at any point is:
where is the table of values and is the vector of Lagrange basis evaluations at .
This linear algebra perspective is surprisingly powerful. For decades, sum-check was seen as a beautiful theoretical result with limited practical use. Then came the realization: polynomial evaluation is an inner product, and inner products interact beautifully with commitment schemes. No FFTs, no trusted setups, just vectors and dot products. Systems like Spartan, HyperPlonk, and Lasso all exploit this insight. Chapter 19 tells the full story of this "Sum-Check Renaissance."
The consequences are immediate:
- Commitment: Committing to means committing to the vector
- Evaluation proof: Proving means proving an inner product claim
- The verifier knows : Given , anyone can compute the Lagrange evaluations
This reduces polynomial evaluation proofs to inner product proofs, and inner products interact beautifully with homomorphic commitments. We'll exploit this connection in Chapters 6 and 9.
Key Takeaways
-
The Boolean hypercube is the natural domain for multilinear polynomials. It has points.
-
Multilinear extension (MLE): The unique polynomial of degree at most 1 in each variable that agrees with on the hypercube.
-
Lagrange basis polynomials equal 1 at and 0 elsewhere. The MLE is .
-
The equality polynomial is the MLE of the equality indicator. Lagrange bases are .
-
Tensor product structure: . The basis factorizes, enabling fast algorithms.
-
Efficient evaluation: Given the table and a point, compute the MLE in time via streaming.
-
Sum over the hypercube: . Sum-check verifies such sums efficiently.
-
Evaluations = coefficients: For MLEs, the table of values completely determines the polynomial. They're dual representations.
-
Binary encoding: Any function on can be encoded as a function on , then extended multilinearly.
-
The bridge to proofs: MLEs encode data; sum-check verifies properties; polynomial commitment binds the prover. This trinity underlies sum-check-based SNARKs.