Factorization Machine with Quadratic-Optimization Annealing for RNA Inverse Folding and Evaluation of Binary-Integer Encoding and Nucleotide Assignment
Authors: Shuta Kikuchi, Shu Tanaka
Organizations: Graduate School of Science and Technology, Keio University, Yokohama, Kanagawa 223-8522, Japan · Keio University Sustainable Quantum Artificial Intelligence Center (KSQAIC), Keio University, Minato-ku, Tokyo 108-8345, Japan · Department of Applied Physics and Physico-Informatics, Keio University, Yokohama, Kanagawa 223-8522, Japan · Human Biology-Microbiome-Quantum Research Center (WPI-Bio2Q), Keio University, Minato-ku, Tokyo 108-8345, Japan
The RNA inverse folding problem aims to identify nucleotide sequences that preferentially adopt a given target secondary structure. While various heuristic and machine learning-based approaches have been proposed, many require a large number of sequence evaluations, which limits their applicability when experimental validation is costly. We propose a method to solve the problem using a factorization machine with quadratic-optimization annealing (FMQA). FMQA is a discrete black-box optimization method reported to obtain high-quality solutions with a limited number of evaluations. Applying FMQA to the problem requires converting nucleotides into binary variables. However, the influence of integer-to-nucleotide assignments and binary-integer encoding on the performance of FMQA has not been thoroughly investigated, even though such choices determine the structure of the surrogate model and the search landscape, and thus can directly affect solution quality. Therefore, this study aims both to establish a novel FMQA framework for RNA inverse folding and to analyze the effects of these assignments and encoding methods. We evaluated all 24 possible assignments of the four nucleotides to the ordered integers (0-3), in combination with four binary-integer encoding methods. Our results demonstrated that one-hot and domain-wall encodings outperform binary and unary encodings in terms of the normalized ensemble defect value. In domain-wall encoding, nucleotides assigned to the boundary integers (0 and 3) appeared with higher frequency. In the RNA inverse folding problem, assigning guanine and cytosine to these boundary integers promoted their enrichment in stem regions, which led to more thermodynamically stable secondary structures than those obtained with one-hot encoding.
Figures & tables
Figure 1: Overview of the RNA inverse folding problem. White circles represent arbitrary nucleotides in target secondary structure, and black lines indicate base pairs formed through hydrogen bonding. A, U, G, and C denote adenine, uracil, guanine, and cytosine, respectively.
Figure 2: Schematic illustration of the proposed FMQA for the RNA inverse folding problem. As an example, the BB function is defined as the NED.
Integer
Binary variable sequence
One-hot encoding
Domain-wall encoding
Binary encoding
Unary encoding
0
1000
000
00
000
1
0100
100
10
100, 010, 001
2
0010
110
01
110, 101, 011
3
0001
111
11
111
Table 1: Binary variable sequence representing integers I∈{0,1,2,3} under different binary-integer encoding methods.
Figure 3: Normalized ensemble defect values obtained by FMQA under different combinations of binary-integer encoding methods and integer-to-nucleotide assignments. Crosses indicate the average NED over 10 runs. The upper and lower whiskers denote the maximum and minimum NED values, respectively. Black circle, red triangle, blue square, and green diamond represent outliers. Panels in the top row correspond to assignments in which A or U was assigned to integer 0 , whereas panels in the bottom row correspond to assignments in which G or C was assigned to integer 0 .
Figure 4: Success rate obtained by FMQA under different combinations of binary-integer encoding methods and integer-to-nucleotide assignments. Panels in the top row correspond to assignments in which A or U was assigned to integer 0 , whereas panels in the bottom row correspond to assignments in which G or C was assigned to integer 0 .
Figure 5: Minimum free energy values obtained by FMQA under different combinations of binary-integer encoding methods and integer-to-nucleotide assignments. Only success solutions are plotted. When two or more success solutions were obtained, their average MFE value is indicated by a cross marker. When three or more success solutions were obtained, the standard deviation is shown as error bars. Panels in the top row correspond to assignments in which A or U was assigned to integer 0 , whereas panels in the bottom row correspond to assignments in which G or C was assigned to integer 0 .
Figure 6: Relationship between the number of BB function evaluations and the best normalized ensemble defect value up to each evaluation.
Figure 7: Target secondary structures selected from the Eterna100 benchmark and evaluated in this study. White circles represent nucleotides, and black lines indicate base pairs formed by hydrogen bonding. The target structures are: (a) G-C Placement ( 12 nt), (b) Simple Hairpin ( 16 nt), (c) Shortie 4 ( 17 nt), (d) stickshift ( 26 nt), (e) Small and Easy 6 ( 30 nt), (f) Corner bulge training ( 31 nt), (g) Prion Pseudoknot – Difficulty Level 0 ( 36 nt), and (h) infoRNA test 16 ( 36 nt).
Figure 8: Performance metrics on multiple Eterna100 benchmark target structures. (a) Normalized ensemble defect values obtained by FMQA for each target structure. Crosses indicate the average NED over 10 independent runs. The upper and lower whiskers denote the maximum and minimum NED values, respectively. Black circle and red triangle represent outliers. (b) Success rate. (c) Minimum free energy values. Only success solutions are plotted. When two or more success solutions were obtained, their average MFE value is indicated by a cross marker. When three or more success solutions were obtained, the standard deviation is shown as error bars.
Figure 9: Nucleotide frequencies obtained from the success solutions across different integer-to-nucleotide assignments. (a) Nucleotide frequency in stem regions, (b) nucleotide frequency in non-stem regions, and (c) nucleotide frequency over the entire RNA sequence. The baseline value of 0.25 corresponds to the expected frequency under a random uniform nucleotide frequency. Red indicates frequencies higher than 0.25, whereas blue indicates frequencies lower than 0.25.
Figure 10: Performance metrics for different values of the hyperparameter K under each binary-integer encoding method. (a) Normalized ensemble defect values obtained by FMQA for each encoding method and value of K . Crosses indicate the average NED over 10 independent runs. The upper and lower whiskers denote the maximum and minimum NED values, respectively. Black circle, red triangle, blue square, and green diamond represent outliers. (b) Success rate. (c) Minimum free energy values of the success solutions. Only success solutions are plotted. When two or more success solutions were obtained, their average MFE value is indicated by a cross marker. When three or more success solutions were obtained, the standard deviation is shown as error bars.
Black-box optimization (BBO) deals with problems where objective functions lack explicit analytical forms and are expensive to evaluate. Factorization machine with quadratic-optimization annealing (FMQA) constructs a surrogate model using a factorization machine (FM) and optimizes it with an Ising machine. Conventional FMQA applies a single integer-binary encoding throughout the optimization process, although the encoding best suited to surrogate learning may differ from the one best suited to Ising-machine solution search. We propose a stage-dependent FMQA framework and derive conversion formulas between one-hot and domain-wall QUBO matrices that preserve the surrogate objective over feasible integer states up to an additive constant. We evaluate the OhDw variant, which employs one-hot encoding for learning and domain-wall encoding for search, on the Rastrigin function with input dimensions N = 2 and 5 and discretization levels q = 61 and 301. Across all conditions, the dominant factor governing optimization performance is the encoding used in the learning stage, with one-hot encoding consistently yielding lower residual errors than domain-wall or binary encoding. The additional benefit of switching to domain-wall encoding for solution search is condition-dependent. For N = 5 and q = 301, OhDw achieves a lower residual error and solutions closer to the global optimum than one-hot-only FMQA, whereas for N = 5 and q = 61 the latter achieves a lower residual error. These results indicate that one-hot encoding in the learning stage is the primary performance driver and that stage-dependent encoding can provide further improvement under finer discretization.
Ryo Ogawa, Mayumi Nakano, Yuya Seki +1
Graduate School of Science and Technology, Keio University, Kanagawa 223-8522, Japan · Keio University Sustainable Quantum Artificial Intelligence Center (KSQAIC), Keio University, Tokyo 108-8345, Japan · Department of Applied Physics and Physico-Informatics, Keio University, Kanagawa 223-8522, Japan +2
Accurate RNA structure modeling remains difficult because RNA backbones are highly flexible, non-canonical interactions are prevalent, and experimentally determined 3D structures are comparatively scarce. We introduce RiboSphere, a framework that learns discrete geometric representations of RNA by combining vector quantization with flow matching. Our design is motivated by the modular organization of RNA architecture: complex folds are composed from recurring structural motifs. RiboSphere uses a geometric transformer encoder trained using mean-centered coordinates and random rotation augmentation to produce geometry-aware features, which are discretized with finite scalar quantization (FSQ) into a finite vocabulary of latent codes. Conditioned on these discrete codes, a flow-matching decoder reconstructs atomic coordinates, enabling high-fidelity structure generation. We find that the learned code indices are enriched for specific RNA motifs, suggesting that the model captures motif-level compositional structure rather than acting as a purely compressive bottleneck. Across benchmarks, RiboSphere achieves strong performance in structure reconstruction (RMSD 1.25,Å, TM-score 0.84), and its pretrained discrete representations transfer effectively to inverse folding and RNA--ligand binding prediction, with robust generalization in data-scarce regimes. Code is available at https://github.com/Zhangz312/RiboSphere.
Zhou Zhang, Hanqun Cao, Cheng Tan +3
State Key Laboratory for Novel Software Technology at Nanjing University, School of Computer Science, Nanjing University · The Chinese University of Hong Kong · Stanford University
Protein fitness optimization is a discrete search problem, and the representation used for prediction also determines the neighborhood graph traversed by an optimizer. We introduce Q-BioLat, a framework that maps pretrained protein-language-model embeddings to compact binary codes and fits a quadratic unconstrained binary optimization (QUBO) surrogate with unary and pairwise latent interactions. Our central contribution is an optimization-aware view of representation: binary encodings that are similar in pointwise predictive accuracy can induce different Hamming neighborhoods, local optima, and search trajectories. We formalize when a recoding is only a Hamming-isometric reparameterization and give a constructive example showing that exact pointwise agreement does not imply optimization equivalence. We study experimentally measured GFP and AAV fitness landscapes from ProteinGym. The internal QUBO surrogate is evaluated against labels withheld from QUBO fitting. A conservative retrieval analysis maps optimized codes to measured variants and reports their experimental fitness, while neural decoding of potentially unmeasured sequences is evaluated separately with an experiment-trained sequence surrogate and is interpreted only as model-based candidate prioritization. Across the reported comparisons, PCA followed by per-coordinate median thresholding yields a more balanced and decodable binary space than the post-hoc-zero-threshold AE/VAE baselines, despite the latter's low continuous reconstruction error. In the measured-library retrieval analysis, simulated annealing, genetic algorithms, and greedy hill climbing frequently return high-percentile variants; decoded candidates are reported separately using surrogate-predicted scores.
Truong-Son Hy
Department of Computer Science, University of Alabama at Birmingham, Birmingham, Alabama, USA