---
title: Block-Pattern Enhanced Test (BPET)
url: https://www.emergentmind.com/topics/block-pattern-enhanced-test-bpet
type: topic
---

# Block-Pattern Enhanced Test (BPET)

Block-Pattern Enhanced Test (BPET) denotes, in current arXiv usage, several testing methodologies organized around explicit block or pattern structure. Its primary statistical meaning is a general framework for two-sample hypothesis testing in multi-source and multi-modal data with block-wise missingness, where entire data sources or modalities are systematically absent for subsets of subjects [2508.17411]. The same acronym is also used for a pattern-based quantum functional testing methodology for quantum memories [2405.20828] and for a block-structured network two-sample procedure for stochastic block models [2406.06014]. Across these settings, BPET refers not to a single universal algorithm but to domain-specific procedures that exploit structured partitions of the observed data.

## 1. BPET in multi-source data with block-wise missingness

In "Two-Sample Testing with Block-Wise Missingness in Multi-Source Data" [2508.17411], BPET is defined for observations
\[
Z_i=\bigl(Z_i^{(1)},\dots,Z_i^{(L)}\bigr),\quad Z_i^{(l)}\in\mathcal S^{(l)},
\]
together with a binary missingness pattern
\[
S_i=(S_i^{(1)},\dots,S_i^{(L)})\in\{0,1\}^L,
\]
where \(S_i^{(l)}=1\) if modality \(l\) is present and \(0\) otherwise. The motivating setting is multi-source and multi-modal data in applications such as neuroimaging, multi-omics, and electronic health records, where whole modalities may be missing for subgroups of subjects. In that setting, naïve imputation or complete-case deletion can introduce bias or waste large swaths of valuable data, especially when the missingness mechanism is not random.

The two-sample problem is posed for pooled observations
\[
\{X_1,\dots,X_m\}\sim F_X,\quad \{Y_1,\dots,Y_n\}\sim F_Y,
\]
with labels \(J_i\in\{X,Y\}\). BPET partitions the pooled sample into missingness-pattern strata \(\mathcal P_1,\dots,\mathcal P_{n_P}\), with at most \(2^L-1\) nonempty patterns,
\[
\mathcal Z^{(\alpha)}=\{Z_i:S_i=\mathcal P_\alpha\},\quad \alpha=1,\dots,n_P.
\]
Within pattern \(\alpha\), \(m_\alpha\) and \(n_\alpha\) denote the numbers of \(X\) and \(Y\) observations, and \(N_\alpha=m_\alpha+n_\alpha\).

The framework proceeds in three stages. Stage 1 is **Pattern Partition**, which splits the pooled data into \(\{\mathcal Z^{(\alpha)}\}_{\alpha=1}^{n_P}\). Stage 2 is a **Pattern-aware Procedure**, in which each ordered pair \((\alpha,\beta)\) is assigned a dissimilarity
\[
\rho(Z_i,Z_j)=\mathtt{Norm}\Bigl(\sum_{l=1}^L S_i^{(l)}S_j^{(l)}\,\rho_l\bigl(Z_i^{(l)},Z_j^{(l)}\bigr)\Bigr),
\]
where \(\rho_l\) is any source-specific metric and \(\mathtt{Norm}\) rescales for comparability. If \(\mathcal P_\alpha\) and \(\mathcal P_\beta\) share no modalities, the framework allows either zero-filling with \(\rho(Z_i,Z_j)=0\) or the use of a latent-space embedding. Stage 3 is **Test-statistic Assembly**, which applies any two-sample procedure—graph-based, kernel MMD, distance-based, and related methods—to the resulting block-structured dissimilarity matrix and then combines the pattern-pair statistics into one global measure.

The central methodological point is that BPET restricts comparisons to shared modalities, thereby using all available data without imputation or deletion. To guard against spurious rejections when the two groups differ in their marginal pattern frequencies, BPET employs a **pattern-wise permutation**: within each \(\mathcal P_\alpha\), the \(X/Y\) labels are shuffled while \((m_\alpha,n_\alpha)\) is fixed. Valid inference is established under the null \(F_X=F_Y\) and the exchangeability condition
\[
\frac{P_X(S=s\mid Z=z)}{P_X(S=s)}=\frac{P_Y(S=s\mid Z=z)}{P_Y(S=s)} \quad\forall s,z,
\]
which the paper states is strictly weaker than MCAR [2508.17411].

## 2. BRISE: graph-induced ranks, test statistics, and null theory

The concrete instantiation developed in the same paper is BRISE, the **Block-wise Rank In Similarity-graph Edge-count** test [2508.17411]. For each pattern pair \((\alpha,\beta)\) satisfying \(\mathcal P_\alpha\cdot\mathcal P_\beta^T>0\), BRISE constructs a \(k\)-nearest-neighbor graph on \(\mathcal Z^{(\alpha)}\cup\mathcal Z^{(\beta)}\): a standard \(k\)-NNG when \(\alpha=\beta\), and a bipartite \(k\)-NNG when \(\alpha\neq\beta\).

Its basic local quantity is the graph-induced rank of \(Z_j\) with respect to \(Z_i\),
\[
\mathrm{rank}(Z_j\mid Z_i)=
\begin{cases}
k+1-k',&\text{if \(Z_j\) is the \(k'\)th neighbor of \(Z_i\), }1\le k'\le k,\\
0,&\text{otherwise,}
\end{cases}
\]
and the corresponding symmetrized rank matrix \(\mathbf R=[R_{ij}]\in\mathbb R^{N\times N}\). Within a pattern pair, \(\mathbf R^{(\alpha\beta)}\) is partitioned into the four blocks induced by \(\mathcal X^{(\alpha)},\mathcal X^{(\beta)},\mathcal Y^{(\alpha)},\mathcal Y^{(\beta)}\).

For each \((\alpha,\beta)\in\mathcal I=\{(\alpha,\beta):\mathcal P_\alpha\!\cdot\!\mathcal P_\beta^T>0,\;\alpha\le\beta\}\), BRISE defines the within-group rank sums
\[
U_x^{(\alpha\beta)}=\sum_{i=1}^{m_\alpha}\sum_{j=1}^{m_\beta}R_{ij}^{(\alpha\beta)},\quad
U_y^{(\alpha\beta)}=\sum_{i=1}^{n_\alpha}\sum_{j=1}^{n_\beta}R_{ij}^{(\alpha\beta)}.
\]
With \(\mu_x^{(\alpha\beta)}=\mathbb E[U_x^{(\alpha\beta)}]\) and \(\mu_y^{(\alpha\beta)}=\mathbb E[U_y^{(\alpha\beta)}]\), the vectorized statistic is
\[
T_v=V^\top\Sigma_v^{-1}V,
\]
where \(V\in\mathbb R^{2|\mathcal I|}\) collects the centered \((U_x^{(\alpha\beta)},U_y^{(\alpha\beta)})\) terms and \(\Sigma_v=\mathrm{Cov}(V)\) under the pattern-wise permutation null. The alternative **congregated** statistic aggregates across pattern pairs:
\[
\bar U=\bigl(U_x-\mu_x,\;U_y-\mu_y\bigr)^\top,
\quad
U_x=\sum_{(\alpha,\beta)\in\mathcal I}U_x^{(\alpha\beta)},
\quad
U_y=\sum_{(\alpha,\beta)\in\mathcal I}U_y^{(\alpha\beta)},
\]
with covariance \(\Sigma_c=\mathrm{Cov}(\bar U)\), and
\[
T_c=\bar U^\top\Sigma_c^{-1}\bar U.
\]

The large-sample theory is explicit. The exact means, variances, and covariances of \(U_x^{(\alpha\beta)}\) and \(U_y^{(\alpha\beta)}\) are given in closed form in Theorem 1 in terms of first- and second-order moments of the rank matrix, and these formulae generalize those in Zhou et al. (2023). Under a growing-sample regime in which \(m_\alpha,n_\alpha\to\infty\), pattern fractions are fixed, and mild graph-regularity and moment conditions hold, Theorem 2 yields
\[
T_v\xrightarrow{d}\chi^2_{2|\mathcal I|},\qquad
T_c\xrightarrow{d}\chi^2_2
\]
under the pattern-wise permutation null. The paper therefore permits asymptotic \(p\)-values without costly resampling [2508.17411].

## 3. Implementation, simulation behavior, and real-data performance

The practical algorithm described for BRISE begins by partitioning data by missingness pattern and discarding extremely rare patterns, for example when \(m_\alpha<2\) or \(N_\alpha<p_{\mathrm{thres}\max_\beta N_\beta}\) [2508.17411]. For each admissible pattern pair \((\alpha,\beta)\) with shared modalities, pairwise distances \(\rho(Z_i,Z_j)\) are computed on the shared coordinates, a \(k\)-NNG is built, graph-induced ranks \(R_{ij}^{(\alpha\beta)}\) are derived, and the within-group rank sums \(U_x^{(\alpha\beta)}\) and \(U_y^{(\alpha\beta)}\) are formed. The global statistic then assembles either \(V\) or \(\bar U\), estimates null means and covariance analytically from Theorem 1, computes \(T_v\) or \(T_c\), and obtains a one-sided \(p\)-value either from the \(\chi^2\) limit or by pattern-wise permutation.

The simulation study evaluates BRISE-c and BRISE-v with \(k=10\) and Euclidean distance against five competitors: MMD-Miss, complete-case RISE, standard MMD, Ball-Divergence, and Measure-Transportation. The experiments cover \(d\in\{200,500,1000\}\), \(L=2\) sources, sampling rates \(p_X=p_Y\in\{0.2,0.5,0.8\}\) as well as imbalanced \(p_X\neq p_Y\), and Gaussian, log-normal, and \(t_5\) distributions under the null and three classes of alternatives: location shift, scale change, and combined location plus scale. The reported findings are specific: both BRISE variants tightly control type I error at nominal \(0.05\), even under imbalanced missingness; standard permutation RISE fails catastrophically; MMD-Miss is ultra-conservative with zero power; complete-case tests lose power in proportion to missingness; BRISE-c dominates in scale and mixed alternatives; BRISE-v excels in pure location shifts; and overall BRISE achieves the highest power across all scenarios. Power is also described as robust to the choice of \(k\) and remaining high even as sampling rates fall to \(0.2\) [2508.17411].

Two real-data demonstrations are reported.

| Dataset | Data structure | Reported result |
|---|---|---|
| Surgical ICU sepsis biomarkers | 56 hospital-acquired sepsis vs. 74 critically ill non-septic; measurements collected on days 1, 2, or 4; no complete-case subjects across all days | BRISE-c and BRISE-v both yield \(p<10^{-13}\); MMD-Miss returns \(p=1\) |
| ADNI multi-modal Alzheimer's study | MRI, PET, and proteomic/metabolomic serum markers; balanced subsample \(200\) AD vs. \(200\) CN and full sample \(507\) AD vs. \(2{,}047\) CN | BRISE-c and BRISE-v reject \(H_0\) with \(p\approx0\) by permutation and asymptotic calibration |

The paper also states that BPET is not limited to graph-rank approaches. Any two-sample statistic that can be written in terms of pairwise dissimilarities or kernels may be slotted into the framework, including kernel MMD, energy statistics, Ball-Div., and classification-based scores. Other similarity graphs, such as the minimum spanning tree and minimum distance pairing, may replace the \(k\)-NNG. Beyond two-sample testing, the proposed framework is said to generalize to independence tests, clustering, and change-point detection. The practical recommendations are correspondingly technical: rare patterns should be dropped or merged to stabilize covariance estimation; zero-filling is simple and empirically effective for pattern pairs with no overlap, though latent-space embeddings may better harness those data; \(k\) should balance sensitivity and locality, with \(k\approx10\) recommended for \(N\) in the hundreds; and small ridge regularization can enforce invertibility when positive-definiteness of the pattern-wise covariance matrices is problematic [2508.17411].

## 4. Quantum-memory BPET: block patterns, pseudo-identity circuits, and device diagnostics

In "Pattern-based quantum functional testing" [2405.20828], BPET is defined for a quantum device with physical qubits \(\mathcal Q=\{q_1,\dots,q_n\}\) as a finite set \(\mathcal P\) of block patterns. Each pattern \(p\in\mathcal P\) specifies a target set \(T_p\subseteq\mathcal Q\), a spectator set \(S_p=\mathcal Q\setminus T_p\), a local preparation unitary \(U_p\), an associated idle protocol, and the inverse \(U_p^\dagger\). Operationally, the pattern is implemented as \(U_p\), then an idle wait \(\tau\), then \(U_p^\dagger\), followed by measurement in the computational basis. In the absence of errors, this sequence is a “pseudo-identity.”

The paper introduces eight pattern families:

- **Blank \(\ket{1}\) pattern (“all-1”)**: \(T_p=\mathcal Q\), \(U_p=X^{\otimes n}\); used to measure energy relaxation \(T_1\).
- **Checkerboard \(\ket{1}\) patterns A/B**: non-adjacent partitions \(A,B\), with \(X\) applied only to one partition; used to probe neighbor-state dependence of \(T_1\).
- **Active-spectator checkerboard**: repeated even-count \(X\) gates on spectators to inject heating quasiparticles.
- **Blank \(\ket{+}\) pattern (“all-+”)**: \(U_p=H^{\otimes n}\); used to measure pure dephasing \(T_2^*\).
- **Echoed \(\ket{+}\) blank**: \(H\), wait \(\tau/2\), apply \(X\), wait \(\tau/2\), then \(H\); used to probe \(T_{2,\rm echo}\).
- **Checkerboard \(\ket{+}\)**: checkerboard superposition patterns, with echoed variants, used to reveal crosstalk in coherence.
- **Entangled Bell patterns \(\ket{\Phi^\pm}\)**: paired-qubit Bell states, then idle and uncompute; used to probe two-qubit entanglement lifetimes under neighbor influence.
- **Three-qubit frequency-collision patterns**: a \(\ket{1}\) preparation on qubit \(A\) together with a neighboring CNOT or equal-duration delay on \((B,C)\); used to detect control-target spurious resonances.

The collected measurements are fidelities. For single-qubit patterns,
\[
F_{p,q}(\tau)=\mathrm{Prob}(\text{measured 0 on }q),
\]
and for Bell patterns,
\[
F_{p,ij}(\tau)=\mathrm{Prob}(q_i=0 \text{ and } q_j=0).
\]
The fitting formulas are explicit. For energy relaxation,
\[
F_{1,q}(\tau)=\langle 0|\rho_q(\tau)|0\rangle
=1-[1-e^{-\tau/T_1^{(q)}}]
=e^{-\tau/T_1^{(q)}+O(\text{SPAM})},
\]
and \(T_1^{(q)}\) is obtained from a fit of the form \(A\,e^{-\tau/T_1}+B\). For dephasing,
\[
F_{+,q}(\tau)=\tfrac12\bigl[1+e^{-\tau/T_2^*(q)}\bigr],\qquad
F_{+,q}^{\rm echo}(\tau)=\tfrac12\bigl[1+e^{-\tau/T_{2,\rm echo}(q)}\bigr].
\]

Neighbor influence is quantified by the crosstalk metric
\[
\Delta F_q(\tau)=F_{1,q}^{\rm blank}(\tau)-F_{1,q}^{\rm checkerboard}(\tau),
\]
or the analogous quantity for \(\ket{+}\) patterns. A qubit is declared failing under pattern \(p\) at delay \(\tau\) if
\[
F_{p,q}(\tau)<F_{\rm thresh}
\quad\text{or}\quad
\Delta F_q(\tau)>\Delta F_{\rm thresh},
\]
with typical thresholds in the paper described as being on the order of a few percent. For non-Markovian or coupling effects, the paper uses a residual \(zz\)-coupling Hamiltonian
\[
H=\hbar\sum_{i=1}^N \Omega_{zz}^{(i)}\,\sigma_z^{\,q_1}\,\sigma_z^{\,q_{i+1}},
\]
together with a Lindblad dephasing model, leading to the fitting form
\[
F(\tau)\approx \tfrac12\Bigl[1+\exp(-\tau/T_2)\prod_{i=1}^N\cos(2\,\Omega_{zz}^{(i)}\,\tau)\Bigr].
\]
For entanglement sensitivity, the paper compares Bell-pair fidelity with the product of single-qubit checkerboard \(\ket{+}\) fidelities and defines
\[
\Delta F_{\rm entangled}=F_{\rm single\_prod}-F_{\Phi^\pm}.
\]

The experimental outcomes are device-specific. On the 27-qubit ibmq_ehningen device, qubit 21 exhibited \(T_1^{\rm blank}=35\)\,µs, \(T_1^{\rm checkerboard}=40\)\,µs, and \(\Delta F_{21}(75\,\mu\mathrm s)\approx0.05\). Active spectator dynamics with 250 \(X\)-gates shortened \(T_1\) by up to \(10\%\) on adjacent targets. On ibm_brisbane, echoed \(\ket{+}\) blank versus checkerboard patterns gave \(T_{2,\rm echo}^{\rm blank}\approx80\)\,µs and \(T_{2,\rm echo}^{\rm check}\approx120\)\,µs for many qubits, and some qubits recovered fidelity at long \(\tau\) under blank patterns. Non-Markovian oscillations on ibmq_ehningen yielded, for qubit 20 with one neighbor, \(\Omega_{zz}=0.155\times2\pi\) MHz and \(T_2=204\)\,µs. The three-qubit frequency-collision test exposed triplets \(24\text{–}25\text{–}22\) and \(2\text{–}3\text{–}5\), with fidelity drops of approximately \(0.15\) and \(0.12\), respectively. Entangled versus checkerboard \(\ket{+}\) patterns gave \(\Delta F\approx0.10\) at \(50\) µs, indicating Bell-state fragility [2405.20828].

## 5. Network BPET for stochastic block models

In "Network two-sample test for block models," Nguen, Padilla, and Amini formulate a two-sample test for unlabeled networks under the stochastic block model and describe it, in the supplied technical exposition, as a BPET for network data [2406.06014]. The observations are two independent samples of undirected networks,
\[
\{G_{1t}\}_{t=1}^{N_1},\qquad \{G_{2t}\}_{t=1}^{N_2},
\]
with possibly varying numbers of nodes. Each adjacency matrix \(A_{rt}\in\{0,1\}^{n_{rt}\times n_{rt}}\) is assumed to arise from an SBM with symmetric block-connectivity matrix \(B_r\in[0,1]^{K\times K}\), community-size probabilities \(\pi_r\), and latent labels \(z_{rt}\in[K]^{n_{rt}}\). Since no vertex correspondence is assumed across graphs, the null is stated up to relabeling of communities:
\[
H_0:\exists P\in\Pi_K \text{ such that } B_1=P\,B_2\,P^T,
\]
versus
\[
H_1:\forall P,\; B_1\neq P\,B_2\,P^T.
\]

The procedure has three main ingredients: community detection, block summarization, and block matching. For each graph, any consistent \(K\)-community detector may be used to obtain labels \(\hat z_{rt}^{(0)}\). Given labels \(z\) and adjacency \(A\), the paper defines the block-sum and block-count operators
\[
S(A,z)_{k\ell}=\sum_{i,j}A_{ij}I\{z_i=k,z_j=\ell\},
\qquad
M(z)_{k\ell}=\#\{(i,j):z_i=k,z_j=\ell,\;i\neq j\}.
\]
The per-graph raw estimate is
\[
\tilde B_{rt}=S(A_{rt},\hat z_{rt}^{(0)})\circ M(\hat z_{rt}^{(0)})^{-1},
\]
with optional random pre-permutation of labels as a technical device.

To align \(\tilde B_{1t}\) and \(\tilde B_{2s}\), the paper uses **SpectralMatching** on \(K\times K\) matrices. It computes eigendecompositions, recovers a sign-flip matrix \(S\), forms \(W=Q_XSQ_Y^T\), and solves a Hungarian linear assignment problem
\[
P^*=\arg\max_{P\in\Pi_K}\mathrm{tr}(PW).
\]
The full complexity is \(O(K^3)\). After within-group alignment and a global matching step, the procedure aggregates aligned block sums and block counts into group-level quantities \(S_r\) and \(M_r\), constructs
\[
\hat B^{(1)}=S_1\circ M_1^{-1},\qquad
\hat B^{(2)}=S'_2\circ {M'_2}^{-1},
\]
estimates pooled variances
\[
\hat\sigma^2_{k\ell}=\bar B_{k\ell}(1-\bar B_{k\ell}),
\qquad
\bar B_{k\ell}=\frac{S_{1,k\ell}+S'_{2,k\ell}}{M_{1,k\ell}+M'_{2,k\ell}},
\]
and forms the test statistic
\[
T_n=\sum_{1\le k\le \ell\le K}
\frac{\bigl(\hat B^{(1)}_{k\ell}-\hat B^{(2)}_{k\ell}\bigr)^2}
{\hat\sigma^2_{k\ell}\cdot[2/h_{k\ell}]},
\]
where \(h_{k\ell}\) is the harmonic mean of \(M_{1,k\ell}\) and \(M'_{2,k\ell}\).

The asymptotic null distribution is chi-squared. Under \(H_0\), with sparsity scaling \(B_{k\ell}\sim\Theta(\nu_n/n)\), bounded graph sizes \(n\le n_{rt}\le Cn\), sample-size growth \(N_r=O(n^\alpha)\), and misclassification error \(o_p((N_r n\nu_n)^{-1/2})\), the paper states
\[
T_n\Rightarrow \chi^2_d,\qquad d=\frac{K(K+1)}{2}.
\]
Theorem 3.3 further gives consistency: if
\[
\Delta=\min_{P\in\Pi_K}\|B_2-PB_1P^T\|_F
\]
dominates the stated error terms, then \(T_n\) grows on the order of \(Nn^2\Delta^2\) and the test power tends to one. The empirical summary reports that BPET outperforms ASE-MMD in 2-block SBM experiments, attains AUC approximately \(0.8\)–\(0.95\) for random-\(B\) SBMs with \(K\) up to \(20\), reaches ROC approximately \(0.99\) on random dot-product graphs, is far stronger than ASE-MMD on graphon perturbation tasks, and achieves ROC-AUC approximately \(0.8\)–\(0.95\) on COLLAB and SW–GOT ego-networks while outperforming both NCLM and ASE-MMD [2406.06014].

## 6. Terminological scope and structural comparison

The supplied literature indicates that BPET is an acronym with domain-dependent meanings rather than a single standardized method. In one usage, it is a missingness-aware two-sample framework for multi-source data [2508.17411]. In another, it is a library of hardware-aware block patterns for quantum-memory diagnostics [2405.20828]. In a third, it is a block-aligned network two-sample procedure for stochastic block models [2406.06014]. A plausible unifying interpretation is that each formulation turns an otherwise difficult global testing problem into a collection of structured local comparisons indexed by patterns or blocks.

| Usage of BPET | Basic unit of structure | Global objective |
|---|---|---|
| Multi-source statistics | Missingness patterns \(\mathcal P_\alpha\) | Two-sample testing without imputation or deletion |
| Quantum functional testing | Target/spectator block patterns \(p\) | Detect \(T_1\), \(T_2\), crosstalk, non-Markovian behavior, and collision faults |
| Network testing for SBMs | Community blocks and block matchings | Test equality of network distributions up to relabeling |

The distinctions are substantive. The statistical BPET for block-wise missingness is built around pattern-wise permutation, graph-induced ranks, and asymptotic \(\chi^2\) limits for \(T_v\) and \(T_c\). The quantum BPET is built around pseudo-identity circuits, fidelity-decay fits, difference maps, and failure thresholds. The network BPET is built around community estimation, spectral matching, blockwise variance normalization, and a \(\chi^2_{K(K+1)/2}\) null law. These procedures therefore share a naming motif and a block-oriented design principle, but they address different data types, different null hypotheses, and different operational definitions of a “pattern.”

This multiplicity of usages matters for citation and interpretation. In contexts involving block-wise missing multi-modal observations, BPET refers specifically to the framework instantiated by BRISE. In quantum-hardware diagnostics, BPET denotes a pattern-based stress-testing protocol over qubit blocks. In network inference, it denotes a matched-block test for stochastic block models. For arXiv readers, the acronym is therefore best read together with its surrounding domain: missingness patterns, qubit patterns, or community blocks.

Source: https://www.emergentmind.com/topics/block-pattern-enhanced-test-bpet