acceptodds
Under review as a conference paper at ICLR 2027

Distance Prediction for Quantum Codes

Abstract

The distance of a quantum code is a fundamental metric that dictates its error-correction capability. While quantum low-density parity-check (qLDPC) families such as Bivariate Bicycle (BB) codes offer a promising pathway to low-overhead fault-tolerant quantum computing, computing their distance is challenging. Current exact solvers and even search heuristics that provide a distance upper bound suffer from severe computational bottlenecks, restricting the discovery of optimal codes. In this paper, we construct a dataset of BB codes with corresponding distance upper bounds obtained through high-budget heuristic searches. We introduce BB-Net, an attention-based neural network architecture for predicting the distance of BB codes. It achieves 96.39% accuracy on the reference distances in the test set, compared with 94.86% for state-of-the-art heuristics with a budget of up to times more computational runtime. On a subset with certified exact distances, BB-Net achieves 98.94%. By relieving the distance-calculation bottleneck, BB-Net enables faster screening of large code spaces, particularly in ML-driven search pipelines, and thereby can accelerate the discovery of novel quantum error-correcting codes, an important capability for advancing scalable fault-tolerant quantum computing.

Primary area:
applications to physical sciences (physics, chemistry, biology, etc.)
Keywords:
Distance Prediction, Distance Finding, Neural Network, BB QLDPC Codes, Quantum Error Correction Codes, QECC, Bivariate Bicycle Codes, Transformers

Reviews

Among:
Shape:
1234this paper, Top 30%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.67 over 3 reviews, above 70% of the others.
Reviewer_fdMNOpenReview ↗
Rating
3(+1)
Confidence
2
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper presents BB-Net, a neural network trained with supervision for predicting the code distance of Bivariate Bicycle (BB) codes. The architecture includes a polynomial encoder to capture the local algebraic structure and a Tanner spectral encoder for global properties. Shift canonicalization and augmentation are introduced to enable effective training. The experiments show promising results in distance prediction within a tolerance, and comparable performance with heuristic methods for distance screening.

Critical strengths
  1. Distance prediction is a timely and important problem for fault-tolerant quantum computing, which the field is gradually transitioning into.
  2. The paper presents well-thought-out representation and architecture which captures the structure of the problem. The network runs with high efficiency compared with heuristic methods. The authors conducted rather extensive experiments, including heuristic label prediction, evaluation on certified distances, distance screening analysis, and ablation studies.
Critical weaknesses

The main concerns lie in the experiments. (1) The headline “96.39% accuracy” allows an error of ±2\pm 2, which is somewhat misleading. Moreover, it is measured against heuristic labels instead of certified true distance. While this effectively evaluates the accuracy of the learning task and is understandable for large instances, it isn't persuasive enough for accuracy for true distance prediction. (2) The performance on the certified subset and distance screening are less favorable compared with strongest heuristic methods. This downstream application however, in my understanding, is the primary goal of distance prediction. Also, the screening evaluation is limited to AUC. More evidence of its practical advantage would help strengthen the paper.

Questions for authors
  1. What is the exact accuracy without ±2\pm 2 tolerance on the test benchmark?
  2. Does the distance screening uses comparable compute budget? BB-Net has a good performance-speed tradeoff in my opinion, which isn't sufficiently shown in this result.
  3. I want a clear description of the distribution of (l, m) in training and test dataset. A discussion about the generalization of BB-Net over (l, m) would be meaningful.
6 comments
AuthorsOpenReview ↗

Clarifications and Additional Experiments [1/2]

We thank the reviewer for their careful reading of our manuscript and for their constructive feedback. We address each concern individually, providing additional explanations, experimental evidence, and clarifications where appropriate. We will incorporate the relevant clarifications and additional results into the revised manuscript.

1. Distance prediction proximity to the ground truth distance has a meaning. For example, prediction of 14 to a ground truth distance of 15 is a lot better than prediction of 22. Thus, the task at hand is not a standard categorical classification problem. RMSE, MAE are better metrics than accuracy to measure performance. However, accuracy is a more intuitive metric than the above. We introduce the accuracy tolerance to present accuracy while still consider the proximity factor. Following the reviewer request we also add the exact match accuracy results:

Acc Exact ↑
BBNet88.04%
QDistEvol87.56%
QDistRand85.78%
BP-OSD77.43%
UEStim60.32%
GEStim0.02%
CCStim30.07%

2. The reviewer correctly identifies the heuristics in distance screening have larger compute budget than BB-Net, hence, are not comparable. We have ran this experiment again but with less compute for the heuristics, reduced to 10 trials while stim based methods remained the same (1 trial and 3 for UEstim) approaching BBNet compute, however, still a lot less efficient. These are the results:

d≥4 ↑d≥8 ↑d≥10 ↑d≥12 ↑d≥14 ↑d≥16 ↑d≥18 ↑d≥20 ↑d≥22 ↑d≥24 ↑
BB-Net1.0000.9980.9960.9930.9890.9890.9880.9870.9900.991
QDistEvol1.0001.0000.9980.9950.9880.9850.9880.9830.9820.982
QDistRnd1.0001.0001.0000.9960.9900.9820.9810.9760.9750.973
BP-OSD1.0000.9980.9850.9660.9450.9190.9030.8910.8920.892
UEStim0.9960.9960.9970.9920.9730.9430.9150.8980.8890.882
GEStim0.9980.9460.9130.8920.8760.8710.8550.8490.8450.845
CCStim0.9910.9730.9340.9240.9080.9090.8950.8890.8840.893
QDistRndQDistEvolBP-OSDGEStimCCStimUEStimBB-Net (ours)
Time Per Code [s] (↓)0.380.130.911.21.213.10.005
Total Time [s] (↓)2,2827815,3636,9407,16476,77526.8

Following the reviewer request, we conduct an additional experiment to better emphasize the importance and the good performance-speed tradeoff of BBNet.

We use IBM's pipeline for searching optimal BB codes with an LLM [1]. This research presents a workflow where an LLM generate code candidate, then BP-OSD evaluate the distance and only high upper bound distance continue to the expensive part of exact distance computation. We present a short experiment demonstrating a more extensive search using BBNet instead of BP-OSD, finding better candidates with the same time budget. The experiment results are:

BP-OSDBB-Net
Time12:4412:45
Number of Evaluated Codes ↑339614
Time spent on d ↓4:230:15

During this search, BB-Net managed to evaluate nearly twice as many codes as BP-OSD, finding better candidates with better FOM. The top three candidates found by each search are as follows:

BP-OSD

LatticeCodeFOM ↑AB
15x3[90,20,<=4]3.561+y+x^51+y^2+x^10
12x9[216,4,<=16]4.741+y+x1+y^8+x^8
18x6[216,8,<=12]5.331+x^2y+x^4y^21+x^4+x^8y

BB-Net

LatticeCodeFOM ↑AB
15x3[90,8,<=8]5.69x^3+x^4y^2+x^7y^2y^2+x^3y+x^7y^2
12x9[216,4,<=18]6.00y^2+x+x^3y^3y^2+x^4+x^6y^6
18x6[216,8,<=14]7.26x^2y^2+x^4y+x^7y^3x^2y^5+x^7y^3+x^7y^4

This experiment demonstrates the effectiveness and the importance of BBNet in a real code search pipeline.

AuthorsOpenReview ↗

Clarifications and Additional Experiments [2/2]

3. Following the reviewer request we add l,m distribution for both train and test set. The training and test codes consist of pairs of l and m from 3 to 30 under the constraint of n=2lm<=360.

Train:

l \ m3–910–1617–2324–30Sum
3–97.28%4.49%7.79%7.01%26.56%
10–1623.13%9.95%0.21%.33.29%
17–2322.03%0.87%..22.90%
24–3017.25%...17.25%
Sum69.68%15.31%8.00%7.01%100%

Test:

l \ m3–910–1617–2324–30Sum
3–912.56%1.77%3.58%2.93%20.83%
10–1628.25%8.43%0.05%.36.73%
17–2322.86%1.06%..23.92%
24–3018.52%...18.52%
Sum82.18%11.26%3.63%2.93%100%

Following the reviewer request, we tested BBNet on 32 out of distribution l,m lattice sizes codes and got a good result. BBNet exact match has dropped significantly, however, it has managed to maintain close predictions to the distance achieving 93.8% on accuracy with tolerance of 2.

Acc Exact ↑Acc@2 ↑MAE ↓RMSE ↓
BBNet59.4%93.8%0.9381.541

The constraint of n=2lm<=360 is preserved. Example of l,m codes that were tested are:

nklmDistance
27684638
360836018
25244234
324454318
306435122

[1] - Cruz-Benito, Juan, et al. "Evolutionary Discovery of Bivariate Bicycle Codes with LLM-Guided Search." arXiv preprint arXiv:2606.02418 (2026).

Thank you for your response and the additional experiments. The exact match and distance screeing experiments effectively addressed my first and second concern.

Some followups regarding the remaining points: (1) In Response 2, FOM is provided as upper bound. Were the candidates independently evaluated with a heuristic or exact solver? (2) The distribution of (l,m) seems quite uneven. Could the authors clarify the reason?

Reviewer_VhEFOpenReview ↗
Rating
2
Confidence
1
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

First, I must declare that I am not an expert in quantum codes. Although I have tried to relearn these codes, some of my judgements come from my experiments with ECC and my general understanding of deep learning. The AC may give less weight to this review.

Computing the distance of a quantum code is obviously a key topic, but exact distance computation for general stabilizer codes is NP-hard. The authors proposed a method called BB-Net for predicting the distance of BB and PBB codes. Specifically, polynomial tokens and Tanner spectral tokens are proposed to encode a specific quantum code, and separate Transformers are applied to process each type of token. Finally, the features are combined, and a classification head is applied to predict the distance.

Critical strengths

To my knowledge, this is the first work to use a neural network to directly estimate the distance of quantum codes from their structure.

The experimental results suggest that the proposed method is far more time-efficient than the conventional baselines at inference.

Critical weaknesses

The choice of a classification head and cross-entropy for predicting code distance needs more justification. Why not use regression instead?

The authors use distance bins of width 1 to define the classes during training, but report test accuracy using ∣d^−d∣≤2|\hat{d}-d|\leq 2. The authors could explain why 2 was chosen as the tolerance.

For codes with certified distances, the proposed method performs worse than the conventional baselines. A skeptical reviewer might also wonder whether the tolerance of 2 was tuned to improve the reported numbers.

The distance screening experiments also suggest that the proposed method performs somewhat worse than the baselines.

I have questions about how the codes are split into training and test sets. I am not familiar with these codes, but I am concerned about potential overlap between the two sets. The authors could report results using a split based on code parameters rather than random sampling.

Questions for authors

How is the ``Total Time'' metric calculated?

5 comments
AuthorsOpenReview ↗

Clarifications and Additional Experiments [1/2]

We thank the reviewer for their careful reading of our manuscript and for their constructive feedback. We address each concern individually, providing additional explanations, experimental evidence, and clarifications where appropriate. We will incorporate the relevant clarifications and additional results into the revised manuscript.

1. Following the reviewer request, we train the exact configuration and architecture but with a regression head. The results:

Acc Exact ↑Acc@2 ↑MAE ↓RMSE ↓
BBNet88.04%96.39%0.3611.131
BBNet-Reg45.16%81.36%1.2632.124

As the results demonstrate, the cross-entropy classification task achieves significantly better performance. In addition, there is evidence in the literature that cross-entropy is better trained than regression [1].

2. Distance prediction proximity to the ground truth distance has a meaning. For example, prediction of 14 to a ground truth distance of 15 is a lot better than prediction of 22. Thus, the task at hand is not a standard categorical classification problem. RMSE, MAE are better metrics than accuracy to measure performance. However, accuracy is a more intuitive metric than the above. We introduce the accuracy tolerance to present accuracy while still consider the proximity factor. Following the reviewer request we also add the exact match accuracy results:

Acc Exact ↑
BBNet88.04%
QDistEvol87.56%
QDistRand85.78%
BP-OSD77.43%
UEStim60.32%
GEStim0.02%
CCStim30.07%

3. Distance screening heuristics results are not with comparable compute budget to BBNet. The advantage of BBNet is within the performance-speed tradeoff. We have ran this experiment again but with less compute for the heuristics, reduced to 10 trials while stim based methods remained the same (1 trial and 3 for UEstim), approaching BBNet compute, however, still a lot less efficient. These are the results:

d≥4 ↑d≥8 ↑d≥10 ↑d≥12 ↑d≥14 ↑d≥16 ↑d≥18 ↑d≥20 ↑d≥22 ↑d≥24 ↑
BB-Net1.0000.9980.9960.9930.9890.9890.9880.9870.9900.991
QDistEvol1.0001.0000.9980.9950.9880.9850.9880.9830.9820.982
QDistRnd1.0001.0001.0000.9960.9900.9820.9810.9760.9750.973
BP-OSD1.0000.9980.9850.9660.9450.9190.9030.8910.8920.892
UEStim0.9960.9960.9970.9920.9730.9430.9150.8980.8890.882
GEStim0.9980.9460.9130.8920.8760.8710.8550.8490.8450.845
CCStim0.9910.9730.9340.9240.9080.9090.8950.8890.8840.893
QDistRndQDistEvolBP-OSDGEStimCCStimUEStimBB-Net (ours)
Time Per Code [s] (↓)0.380.130.911.21.213.10.005
Total Time [s] (↓)2,2827815,3636,9407,16476,77526.8

Continued in the following comment.

AuthorsOpenReview ↗

Clarifications and Additional Experiments [2/2]

3. To better emphasize this tradeoff, we conduct an additional experiment. We use IBM's pipeline for searching optimal BB codes with an LLM [2]. This research presents a workflow where an LLM generate code candidate, then BP-OSD evaluate the distance and only high upper bound distance continue to the expensive part of exact distance computation. We present a short experiment demonstrating a more extensive search using BBNet instead of BP-OSD, finding better candidates with the same compute budget. The experiment results are:

BP-OSDBB-Net
Time12:4412:45
Number of Evaluated Codes ↑339614
Time spent on d ↓4:230:15

During this search, BB-Net managed to evaluate nearly twice as many codes as BP-OSD, finding better candidates with better FOM. The top three candidates found by each search are as follows:

BP-OSD

LatticeCodeFOM ↑AB
15x3[90,20,<=4]3.561+y+x^51+y^2+x^10
12x9[216,4,<=16]4.741+y+x1+y^8+x^8
18x6[216,8,<=12]5.331+x^2y+x^4y^21+x^4+x^8y

BB-Net

LatticeCodeFOM ↑AB
15x3[90,8,<=8]5.69x^3+x^4y^2+x^7y^2y^2+x^3y+x^7y^2
12x9[216,4,<=18]6.00y^2+x+x^3y^3y^2+x^4+x^6y^6
18x6[216,8,<=14]7.26x^2y^2+x^4y+x^7y^3x^2y^5+x^7y^3+x^7y^4

This experiment demonstrates the effectiveness and the importance of BBNet in a real code search pipeline.

4. There is no overlap between the training and test sets: no test code is equivalent to any training code under the distance-preserving symmetries of BB codes. We ensure this in two ways: (i) symmetry-equivalent specifications are removed during dataset construction, and (ii) the train/test partition is made at the level of equivalence classes. Each code is mapped to a canonical form that identifies its equivalence class, and every class is assigned entirely to either the training set or the test set.

5. Total time is the sum of all the inference time of codes evaluated in the specified test benchmark.

[1] - Glorot, Xavier, and Yoshua Bengio. "Understanding the difficulty of training deep feedforward neural networks." Proceedings of the thirteenth international conference on artificial intelligence and statistics. JMLR Workshop and Conference Proceedings, 2010.

[2] - Cruz-Benito, Juan, et al. "Evolutionary Discovery of Bivariate Bicycle Codes with LLM-Guided Search." arXiv preprint arXiv:2606.02418 (2026).

Dear reviewer,

We sincerely thank you for your constructive feedback, which has helped us improve our manuscript.

Following your suggestions, we have added several experiments and clarifications, including classification vs. regression comparisons, exact-match accuracy and MAE metrics, additional distance screening experiments, and clarification of our dataset splitting procedure. We also evaluated generalization on unseen lattice sizes and introduced a real-world code discovery experiment, demonstrating that BB-Net evaluates nearly twice as many candidates as BP-OSD under the same compute budget while discovering better codes.

We hope these additions address your concerns. We would be happy to conduct further experiments or provide additional clarifications if needed.

Given these substantial revisions, we kindly ask whether you would consider reconsidering your initial score.

Thank you again for your time and consideration.

Reviewer_FBtPOpenReview ↗
Rating
3(+1)
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper proposes BB-Net, an attention-based model for predicting the distances of bivariate bicycle quantum codes. The model combines polynomial representations with Tanner spectral features and is trained on approximately 58K codes labeled by computationally expensive heuristic searches.

Critical strengths
  • The paper addresses a meaningful computational bottleneck in quantum error correction.
  • I like that the architecture considers the algebraic structure of BB codes.
  • The experimental effort is substantial.
Critical weaknesses
  • The evaluation relies heavily on heuristic upper bounds. Only 2,366 of the 5,870 test codes have certified exact distances, and none of these certified instances has a target distance greater than 14. The remaining results measure agreement with upper bounds obtained from high-budget heuristic searches. I understand that exact distance computation is expensive, but matching these reference labels does not necessarily mean that the model accurately predicts the true distance.
  • There appear to be inconsistencies in the reported RMSE values. The full test set in Table 1 is partitioned into the certified and unresolved subsets in Tables 2 and 3. However, the RMSE values for GEStim, CCStim, and UEStim in Table 1 cannot be obtained by combining the corresponding subset results. For example, the reported full-set RMSE for GEStim is 4.950, while the two subset RMSE values imply approximately 33.52. The other methods are consistent under the same calculation.
  • The comparison lacks simpler supervised learning baselines. The authors compare BB-Net against distance-finding heuristics and provide architectural ablations, but these experiments do not establish whether the proposed attention-based architecture is necessary. Since the model also receives code parameters such as n and k, I would be interested in seeing how a simple MLP or a tree-based predictor performs using the same training labels.
  • The ablations support the usefulness of the spectral features within BB-Net, but a comparison with simpler learned predictors would make the architectural contribution more convincing.
Questions for authors
  • Could the authors clarify the RMSE discrepancies between Tables 1, 2, and 3, particularly for the three Stim-based baselines?
  • Could the authors report exact-match accuracy, MAE, and the distribution of signed prediction errors?
  • How well does the model generalize to held-out code sizes or construction families?
3 comments
AuthorsOpenReview ↗

Clarifications and Additional Experiments

We thank the reviewer for their careful reading of our manuscript and for their constructive feedback. We address each concern individually, providing additional explanations, experimental evidence, and clarifications where appropriate. We will incorporate the relevant clarifications and additional results into the revised manuscript.

1. The reviewer correctly identified that not all test codes have certified exact distances. We mention and introduce the dataset as an upper bound distance target. 2,366 codes on the test subset have been additionally verified by exact solvers to evaluate BBNet's capacity on verified exact distances. Following the reviewer request, we are currently running exact solvers to further expand the certified subset.

2. There was indeed an inconsistency with the RMSE values of GEStim, CCStim and UEStim between Table 1 and Table 2,3. The reason is that in Table 1 invalid answers from these heuristics were not counted on the RMSE. We fixed that: UEStim - 28.782, GEStim - 33.522 and CCStim - 27.726.

3. Distance prediction proximity to the ground truth distance has a meaning. For example, prediction of 14 to a ground truth distance of 15 is a lot better than prediction of 22. Thus, the task at hand is not a standard categorical classification problem. RMSE, MAE are better metrics than accuracy to measure performance. However, accuracy is a more intuitive metric than the above. We introduce the accuracy tolerance to present accuracy while still consider the proximity factor. Following the reviewer request, we add the exact match and MAE. We would be glad if the author could clarify his request of "distribution of signed prediction errors" so we can provide that as well.

Acc Exact ↑Acc@2 ↑MAE ↓
BBNet88.04%96.39%0.361
QDistEvol87.56%94.86%0.426
QDistRand85.78%92.20%0.685
BP-OSD77.43%82.23%7.649
UEStim60.32%61.23%14.332
GEStim0.02%0.02%21.476
CCStim30.07%34.60%15.672

4. Following the reviewer request, we trained a simple MLP on the parameters alone (l,m,n,k), the polynomials features and the spectral features:

Acc Exact ↑Acc@2 ↑MAE ↓RMSE ↓
MLP-params59.23%75.33%2.2644.566
MLP-params-poly69.71%84.04%1.2162.665
MLP-params-poly-spectral81.07%92.57%0.6131.670
BBNet88.04%96.39%0.3611.131

The results prove the necessity of our architecture. Training on parameters alone is insufficient as presented, and training MLP with the same input features representations damaged performance.

5. To examine BBNet capability of generalization requested by the reviewer, we tested BBNet on 32 out of distribution l,m lattice sizes codes and got a good result. BBNet exact match has dropped significantly, however, it has managed to maintain close predictions to the distance achieving 93.8% on accuracy with tolerance of 2.

Acc Exact ↑Acc@2 ↑MAE ↓RMSE ↓
BBNet59.4%93.8%0.9381.541

The constraint of n=2lm<=360 is preserved. Example of l,m codes that were tested are:

nklmDistance
27684638
360836018
25244234
324454318
306435122

I appreciate the responses from the authors, I will raise my score accordingly.

We thank the reviewer for their positive feedback and for taking the time to reconsider our work. We appreciate their thoughtful evaluation and willingness to update their score.

Comments on the paper

1 comment

Dear Reviewers and AC,

Following the reviewer’s suggestion, we have addressed the raised concerns and uploaded a new revision. Modified text is marked with blue.

  • Exact accuray metric was added for every table, along with MAE.
  • Code discovery, a real-world downstream task was added. Utilizing IBM's pipeline for code discovery with LLM, we replaced the current BP-OSD heuristic for code distance evaluation with BB-Net. BB-Net managed to evaluate nearly twice as many codes, finding better candidates with better kd2/nkd^2/n (FOM) with the same search compute budget.
  • We have added additional experiments to further justify BB-Net's architecture. We replaced its current architecture with standard MLP and trained it on several configurations. Performance was significantly reduced, demonstrating the importance of BB-Net's components. To justify classification task over regression for distance prediction we also replaced the classification head with regression and observed performance degredation.
  • Generalization was tested by testing 32 out of distribution (l.m) pairs codes. Performance of exact match accuracy was significantly reduced, however, BB-Net maintained an impressive Acc@2 result of 93.8%. For clarity, (l,m) codes distribution in train and test was also added.
  • We employed Exponential Moving Average (EMA) of the model weights during training to smooth parameter updates, reduce training fluctuations, and improve performance.

We appreciate the thoughtful feedback, which has greatly improved the quality and clarity of our work.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.