cs.LGMar 27, 2026

A Boltzmann-machine-enhanced Transformer For DNA Sequence Classification

Authors: Zhixuan Cao, Yishu Xu, Xuang WU

Organizations: Tsinghua University · University of California, Berkeley

Abstract

DNA sequence classification requires not only high predictive accuracy but also the ability to uncover latent site interactions, combinatorial regulation, and epistasis-like higher-order dependencies. Although the standard Transformer provides strong global modeling capacity, its softmax attention is continuous, dense, and weakly constrained, making it better suited for information routing than explicit structure discovery. In this paper, we propose a Boltzmann-machine-enhanced Transformer for DNA sequence classification. Built on multi-head attention, the model introduces structured binary gating variables to represent latent query-key connections and constrains them with a Boltzmann-style energy function. Query-key similarity defines local bias terms, learnable pairwise interactions capture synergy and competition between edges, and latent hidden units model higher-order combinatorial dependencies. Since exact posterior inference over discrete gating graphs is intractable, we use mean-field variational inference to estimate edge activation probabilities and combine it with Gumbel-Softmax to progressively compress continuous probabilities into near-discrete gates while preserving end-to-end differentiability. During training, we jointly optimize classification and energy losses, encouraging the model to achieve accurate prediction while favoring low-energy, stable, and interpretable structures. We further derive the framework from the energy function and variational free energy to the mean-field fixed-point equations, Gumbel-Softmax relaxation, and the final joint objective. The proposed framework provides a unified view of integrating Boltzmann machines, differentiable discrete optimization, and Transformers for structured learning on biological sequences.

Figures & tables

Explore similar work

CardsList
  1. Continuous Diffusion Transformers for Designing Synthetic Regulatory Elements

    Mar 11, 2026Jonathan Liu, Kia GhodsMolecular GenerationDiffusion Transformer

  2. D3LM: A Discrete DNA Diffusion Language Model for Bidirectional DNA Understanding and Generation

    Mar 2, 2026Zhao Yang, Hengchang Liu, Chuan Cao +1Language ModelingMolecular Generation

  3. EvoLen: Evolution-Guided Tokenization for DNA Language Model

    Apr 9, 2026Nan Huang, Xiaoxiao Zhou, Junxia Cui +4Language ModelingSequence Modeling