---
title: 'BlockBP: Block Belief Propagation'
url: https://www.emergentmind.com/topics/blockbp-algorithm
type: topic
---

# BlockBP: Block Belief Propagation

Searching arXiv for recent papers on BlockBP and closely related generalized/block belief propagation methods.
BlockBP, short for **block belief propagation**, is an approximate contraction algorithm for **two-dimensional tensor networks** that replaces site-level message passing by message passing between **blocks** of tensors, thereby capturing short loops and short-range correlations more accurately than ordinary belief propagation while retaining a parallel message-passing structure [2301.05844]. In the tensor-network-decoding setting, BlockBP is used as an approximate contraction engine for the tensor networks whose contractions equal surface-code logical-coset probabilities, so it functions inside a **degenerate quantum maximum-likelihood decoding** pipeline rather than as a Tanner-graph decoder in the usual sense [2402.04834]. Closely related work places BlockBP within a broader **generalized belief propagation** or **tree-equivalent** framework for loopy graphical models and tensor networks, clarifying its relationship to region-based approximations and Bethe-style overlap corrections [2411.04957].

## 1. Origins and problem setting

BlockBP was introduced in the context of the longstanding difficulty of contracting **2D tensor networks**, especially PEPS and iPEPS, for computing norms, local environments, local observables, and imaginary-time-evolution updates [2301.05844]. The underlying computational problem is hard: the contraction of a general 2D tensor network is intractable in the worst case, and exact contraction becomes exponentially expensive because loops are ubiquitous and intermediate tensors grow rapidly [2603.13304]. Standard approximate contraction methods such as **boundary MPS**, **CTMRG**, and related truncation-based schemes remain effective but can be costly and less naturally parallelizable [2301.05844].

The algorithmic motivation for BlockBP comes from the connection between **tensor networks** and **probabilistic graphical models**. Ordinary belief propagation can be adapted from graphical models to tensor-network contraction, where local messages summarize the influence of the rest of the network on a site or region [2301.05844]. However, ordinary BP is exact only on trees and degrades on loopy, highly correlated, or frustrated 2D systems because it treats the environment as separable across incoming edges and therefore fails to represent strong local loop correlations adequately [2603.13304].

This limitation is especially relevant in two applications discussed in the literature. In many-body simulation, ordinary tensor-network BP is closely related to **simple update**, and inherits its mean-field-like approximation of the environment [2603.13304]. In quantum error correction, surface-code decoding via tensor networks requires comparing logical-coset partition functions, and a purely local BP approximation is often too crude on the highly loopy networks that arise there [2402.04834].

## 2. Core construction and message-passing rule

The defining idea of BlockBP is to **coarse-grain the tensor network into blocks** and run BP between those blocks instead of between individual tensors [2301.05844]. In ordinary BP, a node corresponds to one tensor in the double-layer network and a message lives on a single virtual bond. In BlockBP, a node is a **block** containing many tensors, and the message from one block to another is an **MPS** living on the whole block boundary shared by the two blocks [2603.13304].

For a tensor network \(T\) defined on a graph, ordinary tensor-network BP uses messages \(m_{u\to v}(x_e)\) on directed edges, with update rule
\[
m^{(t+1)}_{v\to u} = \Tr(T_v\!\!\!\!\!\!\!\! \prod_{u'\in N_v\setminus\{u\}\!\!\!\!\! m^{(t)}_{u'\to v}),
\]
where \(N_v\) is the set of neighbors of \(v\) [2402.04834]. BlockBP keeps the same cavity logic but lifts it to the block level. In the formulation of the 2023 tensor-network paper, the central BlockBP update is
\[
m_{A\rightarrow B}^{(\ell+1)} = \mathrm{Tr} \left( T_A \prod_{A'\in N_A \setminus \{B\} } m_{A'\rightarrow A}^{(\ell)} \right),
\]
where \(T_A\) is the open double-layer tensor network corresponding to block \(A\), \(N_A\) is the set of neighboring blocks, and the result is compressed as an MPS on the \(A\)-\(B\) boundary [2301.05844]. In the infinite-lattice thesis version, the same idea is written as
\[
M^{(l)}_{a\rightarrow b} = contract \left( B_{a} \prod_{ c\in N_{a} \setminus \{b\} } M^{(l-1)}_{c\rightarrow a} \right),
\]
with block tensors \(B_a\) and MPS messages \(M_{c\to a}\) [2603.13304].

The essential approximation is structural. The exact environment of a block is generally a correlated object surrounding the entire block, but BlockBP approximates that environment by a **product of edge MPSs**, one for each boundary side [2301.05844]. This preserves all correlations inside a block while breaking entanglement between different block edges. The literature identifies this as the main residual error of the method [2603.13304].

## 3. Tensor-network implementation details

BlockBP is implemented on the **double-layer** tensor network obtained by contracting ket and bra tensors along the physical legs, so that the contraction represents quantities such as \(\langle \psi | \psi \rangle\) or local expectation values [2301.05844]. A block is then a connected subnetwork of these double-layer tensors with open legs on its boundary [2603.13304].

A crucial practical point is that one does **not** simply fuse a block into one exact tensor and pass exact boundary tensors between blocks, because those block tensors and messages would grow exponentially with boundary size [2402.04834]. Instead, BlockBP uses compressed one-dimensional tensor representations. Messages are represented as **MPS of bond dimension \(\chi\)**, and block contractions needed for message updates are themselves carried out approximately using a **boundary MPS** or **bubblecon**-type contraction engine [2402.04834; 2603.13304].

In the surface-code decoder based on BlockBP, the tensor network is partitioned into disjoint spatial blocks, typically \(k\times k\) blocks, with a tunable **local block size** \(k\) [2402.04834]. To send a message from block \(\bar v\) to neighboring block \(\bar u\), the algorithm attaches all incoming neighboring messages except from \(\bar u\), contracts the resulting small 2D tensor network approximately using the **boundary MPS method** with maximal truncation bond \(\chi\), and outputs the resulting boundary object as an MPS message [2402.04834]. This produces two approximation layers: a **Bethe / BP approximation** across blocks and an **MPS truncation** inside message and block contractions [2402.04834].

The infinite-lattice formulation imposes additional geometric constraints on the block. The block must tile the infinite lattice, and all edges exiting a given face must enter together through the opposite face, since one block face is represented by a single MPS message [2603.13304]. For the Kagome lattice, the thesis discusses both hexagonal and parallelogram blocks and chooses a **hexagonal block** because preserving rotational symmetry is useful for that problem [2603.13304].

## 4. Bethe approximation, beliefs, and partition functions

After message convergence, BlockBP estimates the full tensor-network contraction using a **Bethe free-energy** expression [2402.04834]. If \(m_{u\to v}(x_e)\) are converged BP messages and \(\hat m_{u\to v}\) are rescaled messages normalized so that
\[
\Tr(\hat{m}_{u\to v}\cdot \hat{m}_{v\to u}) = 1,
\]
then
\[
e^{-F_{Bethe}(T)} = \prod_{v}\Tr\big(T_v\prod_{u\in N_v}\hat{m}_{u\to v}\big),
\]
and the contraction is approximated by
\[
\Tr(T)\simeq e^{-F_{Bethe}(T)}.
\]
These formulas are used explicitly in the surface-code decoder to assemble a global contraction estimate from local block computations [2402.04834].

The same paper gives the associated Bethe marginals. For an edge \(e=(u,v)\),
\[
P_e(x_e) = \frac{1}{Z_e} m_{u\to v}(x_e) \cdot m_{v\to u}(x_e),
\]
and for a vertex \(v\),
\[
P_v(x_v) = \frac{1}{Z_v} T_v(x_v) \cdot \prod_{u\in N_v} m_{u\to v}(x_e).
\]
With normalized messages,
\[
P_e(x_e) = \hat{m}_{u\to v}(x_e) \cdot \hat{m}_{v\to u}(x_e),
\]
and the Bethe free energy is
\[
F_{Bethe}(T) = \sum_{v\in V} \sum_{x_v} P_v(x_v)\ln \frac{P_v(x_v)}{T_v(x_v)}
 - \sum_{e \in E} \sum_{x_e} P_e(x_e)\ln P_e(x_e).
\]
This makes explicit that BlockBP is not only a heuristic contraction routine but a blockwise realization of a Bethe-style variational approximation [2402.04834].

Related generalized-BP work presents a broader inclusion–exclusion view of these formulas. For tensor networks, one writes a partition function
\[
Z=\operatorname{Tr}(T),
\]
defines neighborhoods or regions \(S_i\), and derives overlap-corrected partition-function expressions in which region contributions appear in the numerator and overlap regions remove overcounting in the denominator [2411.04957]. In that formulation, the partition-function expression used in BlockBP,
\[
Z = \prod_{i \in V} \operatorname{Tr} \left( S_i \prod_{j \in \mathcal{NN}(i)} \widehat{m}_{j \to i} \right),
\]
with
\[
\operatorname{Tr}\!\left(\widehat{m}_{i\to j}\widehat{m}_{j\to i}\right)=1,
\]
is interpreted as a simplification valid when the only redundant information between blocks lies in the shared boundary variables [2411.04957].

## 5. Surface-code decoding and degenerate maximum-likelihood decoding

A major use of BlockBP is in a **surface-code decoder** that works in the **degenerate quantum maximum-likelihood decoding** framework [2402.04834]. The physical noise is assumed to be a stochastic Pauli channel
\[
N(\rho) = \sum_{f\in P_n} \pi(f) \cdot f \rho f^\dagger ,
\]
and because stabilizer codes are degenerate, decoding should compare coset probabilities
\[
\pi(f_\alpha G) = \sum_{g\in G} \pi(f_\alpha g).
\]
Given a syndrome \(s\), one chooses a reference Pauli \(f_s\) consistent with that syndrome and compares the four logical cosets
\[
f_s \bar{I}G,\quad f_s \bar{X}G,\quad f_s \bar{Y}G,\quad f_s \bar{Z}G
\]
to perform **DQMLD** [2402.04834].

For the surface code, prior tensor-network decoders showed that each coset probability can be written as the contraction of a \((2d-1)\times(2d-1)\) square tensor network of bond dimension \(2\):
\[
\pi(f_s \bar{L} G) = \Tr\!\big(T_s(\bar{L})\big), \qquad \bar{L}\in\{\bar{I},\bar{X},\bar{Y},\bar{Z}\}.
\]
BlockBP is then used as a drop-in replacement for the expensive contraction step [2402.04834].

The decoding workflow is explicit. For a syndrome \(s\), one constructs the four tensor networks
\[
T_s(\bar I),\quad T_s(\bar X),\quad T_s(\bar Y),\quad T_s(\bar Z),
\]
partitions each into \(k\times k\) blocks, initializes the block-to-block MPS messages to represent a **uniform probability distribution**, and iterates message updates up to `max-iter` rounds [2402.04834]. The paper defines a convergence metric \(\Delta\) as an average message-change norm between consecutive rounds, uses an early-stop threshold \(\delta_0\), and accepts the Bethe contraction estimate only if the final convergence error also satisfies a looser threshold \(\delta_1\) [2402.04834].

Once the estimated coset contractions are available, the decoder returns the \(f_s\bar L\) with maximal estimated \(\Tr(T_s(\bar L))\). If no coset reaches \(\Delta<\delta_1\), the decoder returns the coset with the **smallest** \(\Delta\) [2402.04834]. The paper treats this fallback rule as an empirical heuristic and reports that the correct coset is almost always the one with the fastest BP convergence [2402.04834].

This decoder is conceptually distinct from Tanner-graph BP decoders. BP is not run on the surface-code Tanner graph to infer a most likely error directly; it is run on tensor networks representing coset probabilities, so the decoder remains a **degenerate maximum-likelihood decoder** rather than a QMLD-style decoder that ignores stabilizer degeneracy [2402.04834]. This distinction is central to why BlockBP is compared to tensor-network decoders rather than to ordinary quantum-code BP.

## 6. Relation to ordinary BP, generalized BP, and surface-code region methods

BlockBP is best understood as one member of a broader family of **region-based** or **generalized BP** methods. The 2024 paper "Belief propagation for general graphical models with loops" makes this connection explicit: BlockBP is described as a tensor-network BP method in which a PEPS tensor network is partitioned into square blocks and messages are exchanged between blocks “in the spirit of the tree-equivalent method” [2411.04957]. That paper argues that BlockBP is not an isolated heuristic but a concrete instance of a more general neighborhood-based message-passing construction related to the proposal of Kirkley, Cantwell, and Newman [2411.04957].

In that generalized view, one chooses neighborhoods \(S_i\), defines region differences \(S_{i\setminus j}\) and overlaps \(S_{i\cap j}\), and updates messages by contracting region differences against incoming messages [2411.04957]. When the chosen neighborhood size is large enough to contain all loops of the original graph, the region construction becomes **tree-equivalent** and the corresponding generalized-BP equations are exact [2411.04957]. This suggests that BlockBP can be interpreted as exact on a tree of blocks and approximate otherwise.

The same paper further states that BlockBP and the Kirkley-style method rely on essentially the **same approximation principle**: compute correlations exactly inside chosen neighborhoods or blocks, and approximate the full loopy model by exchanging messages between those larger regions while correcting for overlap only approximately in a Bethe-like way when the induced region graph is not a tree [2411.04957]. A plausible implication is that BlockBP should be viewed less as a sui generis tensor trick and more as a specialized tensor-network realization of generalized BP.

This broader perspective is useful when comparing BlockBP to other surface-code BP-family decoders. The 2022 paper "Generalized Belief Propagation Algorithms for Decoding of Surface Codes" studies a different decoder: **generalized belief propagation on a region graph**, with regions built from local Tanner-graph substructures plus a crucial outer re-initialization loop [2212.03214]. That decoder diagnoses the failure of naive BP on surface codes in terms of **surface-code symmetry and degeneracy**, including “split belief,” and shows that a region-based BP-family method can recover a sub-threshold regime where naive BP fails [2212.03214]. However, its surface-code region choice is conceptually adjacent to BlockBP rather than identical, because it is a GBP interpretation of the Bethe approximation rather than a multi-tensor block contraction scheme [2212.03214].

The conceptual bridge is nevertheless strong. Both BlockBP and region-graph surface-code GBP are motivated by the inadequacy of qubit- or tensor-local BP on highly symmetric, loopy structures, and both improve the local approximation by grouping variables or tensors into larger regions [2212.03214; 2411.04957]. This suggests that “BlockBP” may designate either a specific tensor-network block algorithm or, more loosely, a broader family of block- or region-based BP corrections to ordinary loopy BP. The exact terminology is paper-dependent.

## 7. Computational scaling, empirical behavior, and limitations

The literature emphasizes that BlockBP is not chiefly an improvement in **serial asymptotic runtime**; its main advantage is the tradeoff between local accuracy and **parallelizability** [2402.04834]. In the surface-code decoder, if \(N\) is the number of blocks, \(k\) the linear block size, \(\chi\) the maximal MPS bond dimension, and `max-iter` the number of BP rounds, then the serial runtime is
\[
O(n\chi^3\cdot \texttt{max-iter}),
\]
with
\[
N=O(d^2/k^2),\qquad T=O(k^2\chi^3),
\]
which the paper describes as “identical or higher than the regular TN decoder” [2402.04834]. The claimed benefit is instead the parallel runtime
\[
O(\texttt{max-iter}\cdot k^2\chi^3 + n),
\]
neglecting message overhead, with a further factor-of-\(4\) reduction if the outgoing messages of each block are computed in parallel [2402.04834].

The more general infinite-lattice thesis gives a per-sweep BlockBP complexity of
\[
\mathcal{O}(m n \chi^3),
\]
for a block with \(n\) tensors and \(m\) boundary messages, and with multithreading reduces the effective per-iteration time to
\[
\mathcal{O}\left( n \chi^3 \right),
\]
with memory
\[
\mathcal{O}\left( r d D^p  + m k \chi^2 \right)
\]
and typical convergence in \(5\)–\(15\) iterations [2603.13304]. These formulas again underscore that the method is heavier than ordinary BP but still structured as a message-passing algorithm with natural parallel decomposition.

Empirically, the 2024 surface-code paper reports simulations for perfect-measurement surface codes with depolarizing noise
\[
N(\rho) = (1-p)\rho + \frac{p}{3}\big(X\rho X + Y\rho Y +Z\rho Z\big),
\]
for \(p=0.08,0.09,\ldots,0.15\), distances \(d=5,9,13,17,21,25\), and simulation parameters \(k=1,2,4,6\), \(\chi=16\), `max-iter` \(=20\), \(\delta_0=10^{-4}\), \(\delta_1=10^{-2}\), and \(\eta=0.1\) [2402.04834]. It reports that for \(d=5\) all BlockBP variants are nearly indistinguishable from the bMPS decoder, and that the practical “usable distance” depends strongly on \(k\): \(k=1,2\) are good up to about \(d\lessapprox 9\), \(k=4\) up to about \(d\lessapprox 17\), and \(k=6\) up to about \(d\lessapprox 25\) [2402.04834]. The paper’s central empirical claim is that over a substantial range of \(d\) and \(p\), BlockBP achieves a logical error probability lower than **MWPM**, sometimes by more than an order of magnitude [2402.04834].

The many-body literature reports a similar middle-ground profile. The 2023 paper states that BlockBP significantly outperforms plain BP or simple update because it captures intra-block loops exactly, and reaches energies and observables comparable to bMPS or CTM away from criticality [2301.05844]. For finite transverse Ising and Heisenberg models, BlockBP energies closely match bMPS full-update energies, while two-site reduced density matrices agree extremely well away from criticality and degrade only near the critical region [2301.05844]. For infinite systems, the method works for both finite and infinite lattices, accommodates different unit cells, and shows accuracy on par with state-of-the-art results in the cited benchmarks [2301.05844].

The main limitations are consistent across papers. First, the environment is represented by several separate MPS messages, so **entanglement between different block faces is broken** [2603.13304]. Second, accuracy degrades as correlation length grows, especially near critical points or strongly entangled ground states, where larger blocks and larger bond dimensions are required [2301.05844; 2603.13304]. Third, although BlockBP is more accurate than ordinary BP, it is more expensive because messages are MPSs rather than matrices and every message update requires a nontrivial block contraction [2603.13304].

A common misconception is that BlockBP is merely ordinary BP with a larger local tensor. The cited papers reject that simplification. The algorithm’s distinctive content lies not only in grouping tensors into blocks but also in representing block-boundary messages as compressed MPS objects and using approximate internal block contractions to make those messages tractable [2402.04834; 2603.13304]. Another misconception is that BlockBP is simply a surface-code BP decoder. In the surface-code setting, it is instead a **tensor-network contraction algorithm** inserted into a degeneracy-aware decoder that compares logical-coset probabilities [2402.04834].

Overall, BlockBP occupies an intermediate position between ordinary BP and full tensor-network contraction. It is more accurate than BP because short loops inside blocks are treated more accurately, cheaper and more parallel-friendly than full global contraction, and flexible enough to be used both as a many-body contraction method and as the core inference engine in approximate degenerate quantum maximum-likelihood decoding [2301.05844; 2402.04834; 2411.04957].

Source: https://www.emergentmind.com/topics/blockbp-algorithm