Skip to main content
Version: Next (unstable)

LogUp: multivariate lookups with logarithmic derivatives

LogUp proves multiset equality through logarithmic derivatives. Given a column aa of lookup requests and a table column bb with multiplicities mm, the basic identity is:

∑i=0l−11(α−ai)=∑i=0n−1mi(α−bi)\sum_{i=0}^{l-1} \frac{1}{(\alpha - a_i)} = \sum_{i=0}^{n-1} \frac{m_i}{(\alpha - b_i)}

In the above:

  • ll is the number of values in aa, which must be smaller than the size of the field. The Miden base field has modulus p=264−232+1p = 2^{64} - 2^{32} + 1, so l<pl < p.
  • nn is the number of values in bb, which must also satisfy n<pn < p.
  • mim_i is the multiplicity of bib_i, which is expected to match the number of times bib_i occurs in aa.
  • α\alpha is a random value sent to the prover after it commits to the execution trace.

The equality of these rational sums implies equality of the encoded multisets except with the standard challenge-collision and zero-denominator probability.

Usage in Miden VM​

Miden VM uses LogUp for both virtual tables and communication buses. The diagrams below illustrate the basic request-and-table construction, where component XX requests values supplied by table TT.

logup_component_x

logup_table_t

Typed message encoding​

Every interaction has a BusId and payload values assigned to fixed positions within a width-WW message. After the prover commits to the main traces, the verifier samples extension-field challenges α\alpha and β\beta. For zero-based bus identifier bb, let vjv_j be the value in payload position jj, or zero when that position is unused. The denominator is

d(b,v)=α+(b+1)βW⏟bus_prefix[b]+∑j=0W−1βjvj.d(b, v) = \underbrace{\alpha + (b + 1)\beta^W}_{\mathtt{bus\_prefix}[b]} + \sum_{j=0}^{W-1} \beta^j v_j.

The bus prefix domain-separates message types, while each message schema assigns its fields to fixed payload positions. Contributions with the same encoded denominator balance when their signed multiplicities sum to zero, except with the standard challenge-collision probability.

Signed interactions​

An interaction with signed multiplicity mm contributes m/dm/d to the LogUp sum. The native VM execution proof assigns positive multiplicities to providers and virtual-table insertions, and negative multiplicities to consumers and virtual-table removals. A table row may use a larger multiplicity to provide the same encoded value several times.

The aggregate precompile proof fixes polarity per relation schema. Many arithmetic and storage relations use positive consumers and negative providers, while Eidos owner/controller relations use the native VM orientation. Globally negating every endpoint of any one relation is equivalent; what matters is that its providers and consumers use opposite signs consistently.

For row rr, let

t(r)=∑jmj(r)dj(r)t(r) = \sum_j \frac{m_j(r)}{d_j(r)}

be the sum of all interactions emitted on that row.

Constraints​

AIR constraints do not divide by encoded messages. For each packed set of row interactions, the lookup builder derives a numerator NkN_k and denominator DkD_k such that Nk/DkN_k/D_k is their rational sum. Column 0 is the running accumulator; columns k>0k>0 hold additional per-row fraction sums when one accumulator cannot contain every interaction within the AIR's degree bound. The fraction columns are constrained on every row by

Dkak−Nk=0(k>0).D_k a_k - N_k = 0 \qquad (k>0).

The column-0 transition folds those values into the running accumulator. In the normalized cyclic form described below, its cross-multiplied constraint is

D0(a0′−∑k=0L−1ak+σ′)−N0=0,D_0 \left(a'_0 - \sum_{k=0}^{L-1} a_k + \sigma'\right) - N_0 = 0,

where LL is the number of LogUp columns in the AIR.

Normalized cyclic closure​

For an AIR with nn rows, define

σ=∑r=0n−1t(r)andσ′=σn.\sigma = \sum_{r=0}^{n-1} t(r) \qquad\text{and}\qquad \sigma' = \frac{\sigma}{n}.

The AIR commits to σ′\sigma' and constrains an accumulator anchored at a(0)=0a(0)=0 by

a((r+1) mod n)=a(r)+t(r)−σ′.a((r + 1) \bmod n) = a(r) + t(r) - \sigma'.

The recurrence is enforced on every row, including the last-to-first edge. Summing the nn recurrence equations yields nσ′=σn\sigma'=\sigma.

The native VM execution proof contains four AIRs with independent trace lengths: Core, Chiplets, Eidos compression, and the fixed And8 table. Each uses the normalized cyclic form above. The verifier closes their shared buses with

∑iniσi′+cboundary=0,\sum_i n_i\sigma'_i + c_{\mathrm{boundary}} = 0,

where nin_i is AIR ii's trace length and cboundaryc_{\mathrm{boundary}} is the signed sum of once-per-proof interactions derived from public statement data. Boundary contributions are added once; they are not scaled by a trace length.

Aggregate precompile proof​

Every AIR in the aggregate precompile proof uses the same normalized cyclic form. Each AIR commits σi′=σi/ni\sigma'_i = \sigma_i / n_i, and the external closure reconstructs every raw sum by multiplying the residue by that AIR's trace length:

∑iniσi′+cboundary=0.\sum_i n_i\sigma'_i + c_{\mathrm{boundary}} = 0.

Extending the construction to multiple components​

The same bus may receive interactions from multiple components. Each interaction contributes its own signed fraction to t(r)t(r):

t(r)=mdT−1dX−1dY.t(r) = \frac{m}{d_T} - \frac{1}{d_X} - \frac{1}{d_Y}.

The lookup layout splits or packs these terms across auxiliary columns so that every cross-multiplied constraint remains within the AIR's declared degree bound.

Extending the construction with flags​

Boolean flags determine whether an interaction is present. If fxf_x and fyf_y select requests from XX and YY, their row contribution is

t(r)=mdT−fxdX−fydY.t(r) = \frac{m}{d_T} - \frac{f_x}{d_X} - \frac{f_y}{d_Y}.

The selector degree contributes to the cross-multiplied constraint degree and therefore affects how many interactions can share an auxiliary column.