[论文解读] Transformer-QEC: Quantum Error Correction Code Decoding with Transferable Transformers
本文提出 Transformer-QEC,一种可迁移的基于 Transformer 的量子纠错解码器,利用自注意力机制进行全局校验子分析,并采用混合损失训练,在多种码距下实现了更优的逻辑错误率。通过迁移学习,其训练成本降低了 10 倍以上,优于非机器学习方法及现有的机器学习解码器(如 Union Find、MWPM 和 MLPs)。
Quantum computing has the potential to solve problems that are intractable for classical systems, yet the high error rates in contemporary quantum devices often exceed tolerable limits for useful algorithm execution. Quantum Error Correction (QEC) mitigates this by employing redundancy, distributing quantum information across multiple data qubits and utilizing syndrome qubits to monitor their states for errors. The syndromes are subsequently interpreted by a decoding algorithm to identify and correct errors in the data qubits. This task is complex due to the multiplicity of error sources affecting both data and syndrome qubits as well as syndrome extraction operations. Additionally, identical syndromes can emanate from different error sources, necessitating a decoding algorithm that evaluates syndromes collectively. Although machine learning (ML) decoders such as multi-layer perceptrons (MLPs) and convolutional neural networks (CNNs) have been proposed, they often focus on local syndrome regions and require retraining when adjusting for different code distances. We introduce a transformer-based QEC decoder which employs self-attention to achieve a global receptive field across all input syndromes. It incorporates a mixed loss training approach, combining both local physical error and global parity label losses. Moreover, the transformer architecture's inherent adaptability to variable-length inputs allows for efficient transfer learning, enabling the decoder to adapt to varying code distances without retraining. Evaluation on six code distances and ten different error configurations demonstrates that our model consistently outperforms non-ML decoders, such as Union Find (UF) and Minimum Weight Perfect Matching (MWPM), and other ML decoders, thereby achieving best logical error rates. Moreover, the transfer learning can save over 10x of training cost.
研究动机与目标
- 为解决现有量子纠错(QEC)解码器的局限性,如感受野受限以及在改变码距时训练成本过高的问题。
- 开发一种基于机器学习的 QEC 解码器,可在不从头开始重新训练的情况下,实现不同码距下的高精度。
- 通过利用 Transformer 架构对可变长度输入的灵活性,实现在 QEC 解码中高效迁移学习。
- 通过自注意力机制建模长程错误相关性,提升解码性能。
- 在保持或提升逻辑错误率性能的同时,降低训练开销,优于当前最先进解码器。
提出的方法
- 模型采用 Transformer 编码器-解码器架构,处理三维校验子输入(空间 x、y 与时间轮次),并使用三维正弦位置编码以保留空间与时间上下文。
- 输入的校验子位被嵌入可学习的 token 嵌入表示,使模型能够处理不同码距下的可变长度校验子序列。
- 采用混合损失函数,结合局部物理错误损失(按量子比特预测)与全局奇偶校验标签损失(逻辑结果正确性),以提升泛化能力与错误检测可靠性。
- 模型在距离为 5 的表面码数据上进行预训练,并通过固定低初始学习率的迁移学习方法,对其他码距进行微调。
- 自注意力机制使模型能够捕捉远距离校验子量子比特之间的长程相关性,这对检测错误链至关重要。
- 解码器在六个码距和十个错误配置下进行评估,性能与 Union Find、MWPM 及基于 MLP 的解码器进行对比。

实验结果
研究问题
- RQ1基于 Transformer 的解码器是否能在多种码距下实现优于经典解码器(如 Union Find 与 MWPM)的逻辑错误率?
- RQ2单个预训练模型是否能通过微调有效适配不同码距,而无需完全重新训练,从而降低训练成本?
- RQ3采用结合局部与全局监督的混合损失函数是否能提升解码准确率与泛化能力?
- RQ4自注意力机制的全局感受野与 CNN 和 MLP 等局部模型相比,在检测复杂错误模式方面表现如何?
- RQ5模型规模与迁移学习对不同码距下解码性能与泛化能力的影响如何?
主要发现
- Transformer-QEC 在所有测试码距(3 至 10)和物理错误率下均实现了最低的逻辑错误率,优于 Union Find、MWPM 与 MLP 解码器。
- 通过迁移学习,模型将训练成本降低了 10 倍以上,新码距的微调仅需 10 个周期且学习率固定。
- 消融实验证明,在十组测试中的九组中,结合局部与全局损失能提升性能,其中全局损失显著提高了逻辑结果的准确性。
- 参数量更大的模型(790 万参数)优于参数量更小的模型(50.3 万参数),且由于训练数据集规模大,未出现过拟合现象。
- 与基线 MLP 相比,该模型在真实错误检测(类别 1)上的准确率高出 43%,表明其对校验子模式中实际错误的检测能力更强。
- 逻辑错误率降低的阈值约为 0.038,表明 Transformer-QEC 在此物理错误率以下仍能保持容错能力。

更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。