Abstract
Cytochrome c oxidase subunit I (COI) DNA barcoding is widely used for species identification and biodiversity studies. However, COI datasets exhibit high intra-species similarity and significant inter-species imbalance, which limits sequence analyses. To address data scarcity, deep learning based generative models have been explored for sequence generation. We implemented six generative models incorporating gated recurrent unit (GRU) layers, Transformer blocks, and convolutional layers to generate species-specific COI sequences across four taxonomic groups: Cypraeidae, Drosophila, Bats, and Birds. The generated sequences were evaluated in terms of plausibility, phylogenetic consistency, and diversity. Finally, GRU-based autoregressive language model achieved the best performance. It preserved codon-level structures to real data, with GC₃ content differences (Δ) ≤ 0.004, codon bias JSD ≤ 0.013, and ORF mean length differences (Δ) < 0.05. It also reproduced genetic structures with intra-species K2P mean differences (Δ) ≤ 0.13, real–synthetic K2P mean ≤ 0.09, and barcode gap rate differences (Δ) ≤ − 0.6. Additionally, it generated sequences with minimal redundancy, indicated by JSD-kmer ≤ 0.03, Self-BLEU differences (Δ) ≤ 0.001, and AA values between 0.54 and 0.75. These results suggest that GRU-based COI sequence generation can serve as a robust simulation strategy for addressing data scarcity and imbalance in bioinformatics applications.
Introduction
In diverse animal taxa, species identification based solely on traditional morphology has limitations due to morphological variation, trait changes across life-history stages, and physical damage to diagnostic characters during distribution and processing1,2. This issue is particularly pronounced in marine invertebrates frequently traded and processed; their external features are often unavailable or obscured, making species-level identification difficult and creating downstream challenges for fisheries resource management and food safety assurance3. Such constraints of morphology-based classification are not restricted to a single taxonomic group and are repeatedly observed across situations in which morphological information from specimens is limited1. To address these limitations, DNA barcoding based on the mitochondrial cytochrome c oxidase subunit I (COI) gene has been widely adopted as a standardized tool for species identification. DNA barcoding is a molecular method that distinguishes interspecific genetic variation using a short standardized DNA sequence, enabling broad taxonomic coverage and relatively rapid, consistent species identification even when morphological information is limited2. Accordingly, COI-based DNA barcoding has been validated across a wide range of animal groups—including birds, fishes, mollusks, and arthropods—and has been broadly applied in species identification and biodiversity research4,5.
Recently, species classification methods based on COI sequences have expanded beyond traditional approaches, such as tree-based, similarity-based, and feature-based classifications, to include machine learning and deep learning methodologies6,7. DeepBarcoding proposed a deep neural network composed of convolutional layers and evaluated its classification performance on six types of COI datasets, demonstrating superior performance compared with five conventional machine learning classifiers6. BarcodeBERT was introduced as a transformer-based foundation model for species classification across large-scale and diverse DNA barcoding datasets, achieving excellent classification performance7. To date, deep learning–based analyses of DNA barcoding data have focused on classification tasks. However, DNA barcoding datasets used in existing studies suffer from severe class imbalance due to the difficulties associated with real-world data acquisition. While some species are represented by hundreds of samples, others have only one or two samples, resulting in a pronounced long-tail distribution. Such imbalance is a major factor contributing to overfitting and degraded generalization performance in deep learning models. Moreover, COI sequences exhibit limited intra-species diversity and narrow boundaries between related species, which further increase the risk of misclassification. Therefore, there is a need for research on synthetic data generation techniques that can expand species-specific data distributions while preserving the biological characteristics and variation structures of real COI sequences.
Deep learning technologies have been widely applied not only to species classification but also to various fields of biological data analysis and design8,9. In addition, with the introduction of various generative deep learning models, it has become possible to explore vast sequence spaces and directly generate novel sequences that do not exist in current databases (de novo design)10,11. Generative modeling approaches have emerged as a new paradigm for genomic data simulation in bioinformatics, as well as for applications drug discovery and protein design12,13. In the field of biological data generation, MB-GAN was proposed as a simulation approach for microbiome data using generative adversarial networks (GANs)14. In addition, high-quality artificial genomes have been generated from haplotype data using Wasserstein GANs (WGANs)15. Other studies have explored synthetic data generation and performance evaluation for genotype data incorporating SNP variation using WGANs, variational autoencoders (VAEs), and diffusion models16. Beyond numerical and discrete-valued data, DiscDiff was proposed as a generative model for promoter sequences composed of nucleotide characters. DiscDiff employed a latent diffusion model to generate discrete DNA sequences and subsequently refined the generated sequences using an Absorb–Escape post-processing algorithm17. In addition, a study proposed a graph-based deep generative neural network with a generative–adversarial module to denoise high-dimensional data and extract biologically meaningful latent features, enabling accurate classification of molecular subtypes of gastrointestinal cancers18. Despite extensive research on generative models across diverse types of biological data, studies targeting COI DNA barcoding sequences have not yet been conducted. Existing studies have utilized diverse datasets, evaluation metrics, and model architectures, thereby complicating direct performance comparisons and limiting rigorous validation of the effectiveness of recent models relative to traditional methods19.
Furthermore, COI sequences contain essential evolutionary constraints, including codon-level translational structures and nucleotide sequence continuity. Therefore, a comparative analysis is required to determine which architectural approach— local pattern learning approaches based on convolutional neural networks (CNNs) or sequential pattern learning approaches based on recurrent neural networks (RNNs)—is more effective in generating synthetic COI sequences that possess both biological validity and diversity. Accordingly, we conducted a benchmarking study to explore generative deep architectures optimized for COI barcode sequence generation, with the aim of overcoming data scarcity and class imbalance problems. We selected four generative architectures that encompass distinct generation mechanisms: autoregressive networks that learn sequential probabilistic dependencies, VAEs and GANs that approximate data distributions in latent space, and the recent Latent Diffusion Model, which generates high-quality data through iterative denoising processes. We constructed a total of six generative models incorporating gated recurrent unit (GRU) layers, Transformer blocks, and convolutional layers, and conducted comparative analyses against a traditional statistical baseline, the N-gram probabilistic model.
The main contributions of this study are as follows:
-
(1)
Through a comparative analysis of six generative models with distinct structural characteristics, we propose an optimal model capable of generating high-quality data while preserving the biological characteristics of COI sequences.
-
(2)
We propose a multidimensional evaluation framework for generative models that assesses biological plausibility, intra- and inter-species structural preservation, and the diversity of the generated sequences.
-
(3)
Using COI sequences of vertebrates and invertebrates collected from the BOLD (Barcode of Life Data Systems) database, we validate that the synthetic sequences generated in this study are placed in phylogenetically consistent positions relative to real sequences.
Methods
Data acquisition and preprocessing
We aim to generate new species-specific COI gene sequences using deep generative models. The COI gene, a protein-coding segment of mitochondrial DNA (mtDNA), is characterized by inherent biological, structural, and evolutionary constraints. Its sequences comprise both conserved and variable regions. The conserved regions are located at the N-terminus and C-terminus, exhibiting high conservation across diverse taxa. These conserved amino acid sequences facilitate the design of primers. Conversely, the central region of the COI gene encompasses variable segments with elevated mutation rates. These highly variable regions have been employed for species identification, population differentiation, and the assessment of evolutionary relationships.
We developed a preprocessing pipeline to ensure the functional, evolutionary, and molecular biological constraints associated with the COI gene at the data level. We utilized publicly accessible DNA barcode sequence datasets (Cypraeidae, Drosophila, Birds, Bats) obtained from http://dmb.iasi.cnr.it/supbarcodes.php6 These open-access datasets have been utilized for species classification tasks. Notably, these datasets exhibit high phylogenetic diversity alongside minimal sequence divergence among species, thereby presenting significant challenges for accurate identification. In addition, the four datasets differ in their data characteristics, such as the constituent taxa, the number of species, and the sequence length. By using these various datasets, we confirm the generalization performance of COI sequence generation models. The final training and testing datasets were constructed through preprocessing steps. The preprocessing procedure is detailed as follows (Supplementary Fig. S1).
-
1)
Character Normalization: We performed character normalization by converting IUPAC ambiguous nucleotide codes (Y, R, K, S, M, W, D, B, H, V) as well as gap characters introduced during sequence alignment (i.e., ‘-’ and ‘_’) into the character ‘N’. This step was employed to minimize uncertainty within the sequences and to prevent the model from learning erroneous pattern information.
-
2)
Verification of Minimum Barcode Sequence Length (< 300 bp Filter): The COI barcode sequences typically span between 600 and 658 base pairs. It is necessary to maintain both conserved and variable regions within the overall sequence length to generate reliable barcode sequences. Therefore, sequences shorter than 300 base pairs, which may lack critical barcoding information, were removed.
-
3)
Verification of the Number of Data per Species (≤ 3 Species Data Filter): To generate new barcode data that reflects the characteristics of each species, it is important to train the model on a sufficiently diverse dataset within each species. Training with only one or two sequences per species results in the generated outputs that closely replicate the training data. Therefore, we set a minimum data criterion per species of 3.
-
4)
Orientation Correction based on Open Reading Frame (ORF): Given that COI sequences represent protein-coding genes, the presence of internal stop codons and frameshifts mutations is biologically implausible. To evaluate sequence orientation, each sequence was analyzed in all three reading frames on both the forward and reverse-complement strands. Following translation in each reading frame and strand, we determined the orientation that corresponded to the minimal occurrence of internal stop codons and the maximal length of ORF. This step enabled the normalization of all COI sequences to a uniform orientation.
-
5)
Quality Control: To improve data quality, validation of COI sequences was performed based on established criteria. Sequences exhibiting one or more internal stop codons, an ambiguous nucleotide (N) ratio of 5% or higher, translated protein lengths of 100 amino acids or fewer, or redundant entries, were excluded from the dataset.
-
6)
Application of Multiple Alignment using Fast Fourier Transform (MAFFT) Algorithms: The MAFFT software was utilized to perform the alignment of unaligned and heterogeneous sequence data20. Following multiple sequence alignment, the location of the ATA/ATT start codon was identified to determine the starting point of the barcode region. From this defined location, the core barcode segment, approximately 600–658 base pairs in length, was consistently extracted. This process mitigated length discrepancies between full-length COI sequences and partial barcode sequences, ensuring the alignment of conserved, variable, and terminal regions in a structurally coherent manner. Consequently, generative models were able to reliably capture biologically meaningful patterns. This approach enhanced the biological validity of the COI sequences, facilitating the accurate representation of species-specific patterns in COI barcode sequences throughout the training process.
-
7)
Data Rebalancing: Following the previous steps, the quantity of data per species could differ; therefore, Step 2 was repeated to select the final data.
Ultimately, we utilized preprocessed data from invertebrate taxa—Cypraeidae and Drosophila—and vertebrate taxa—Birds and Bats. Cypraeidae comprises data for a total of 119 species, Drosophila for 16 species, and Birds and Bats for 54 species each; Supplementary Table S1 presents detailed information regarding the four datasets. The entire dataset was split 8:2 into training and test sets to perform model training and validation of species-specific COI sequence generation. For the synthetic data, sequences were generated to correspond in length to those within each dataset.
Conditional deep generative models
We compared and analyzed six generative models to explore the optimal generative deep learning model for simulating COI barcoding sequences. We constructed generative deep learning models designed to address two questions. Firstly, generative models can be generally categorized into RNN and CNN architectures. RNNs are proficient in capturing sequential information and patterns, whereas CNNs are more adept at recognizing localized features and patterns. Therefore, it is necessary to investigate which model architecture performs optimally for the characteristics of the data. Generative models were developed using GRU layers and convolutional layers, followed by a comparative evaluation of their performance. Secondly, previous studies on biological data generation have not demonstrated the application of the proposed models to diverse data types. Therefore, we analyzed the performance of applying the basic structure of the models employed in previous studies to COI sequence data with distinct biological characteristics. Considering these two factors, we constructed an autoregressive language model (ARLM), a variational autoencoder model (VAE), generative adversarial networks (GAN), and a latent diffusion model (LDM) (Fig. 1). In particular, for the Conv-based VAE, WGAN, and LDM, we adopted model architectures previously proposed for biological data generation to comparatively analyze the suitability of different generative architectures for datasets with varying characteristics. Additionally, we employed an N-gram probabilistic model as a baseline for comparison against the deep learning models.
For models based on GRU layers, start and end tokens were appended to both ends of each sequence, after which the sequence characters were encoded as integer labels (e.g., [START, END, A, C, G, T, N] = [0, 1, 2, 3, 4, 5]). This encoding was adopted to preserve sequential and positional information by defining the beginning and end of each input sequence. In contrast, convolution-based models were used with one-hot encoded representations of the nucleotide characters (A, C, G, T, N), which were processed as one-dimensional feature patterns.
The N-gram probabilistic model is a classical statistical approach that generates sequences based on the probabilities of local nucleotide patterns observed within species-level data21. It accumulates the frequencies of the next nucleotide conditioned on a context of length n-1. In other words, it estimates the probability distribution of the next nucleotide based on the frequency statistics of consecutive n-length subsequences (n-grams). While the N-gram method offers advantages such as simplicity, intuitive interpretation of species specificity, and rapid generation speed, it struggles to capture long-term dependencies and is limited in generating novel sequences that reflect species-level characteristics. To ensure the preservation of the reading frame in the COI data, we set n = 3.
The ARLM model is a sequential generative approach that predicts the next token conditioned on the tokens up to the previous time step22. Given the COI barcode sequence, the model predicts the subsequent token by comparing the input tokens up to position t with the target tokens up to position t + 1. ARLMs are characterized by their simple architecture, training stability, and robust performance even with small datasets23. We constructed two conditional ARLMs (Fig. 1(a): GRU-based ARLM and Fig. 1(b): Transformer-based ARLM). In the GRU-based ARLM, inputs that combine embedded nucleotide sequences and species embeddings are processed through three GRU layers (hidden dimension = 256, dropout = 0.3), followed by a fully connected layer to predict the probability distribution of the next nucleotide token. The GRU mechanism accumulates sequential dependencies, allowing the model to capture local patterns within the nucleotide sequences. For the Transformer-based ARLM, inputs formed by combining nucleotide token, positional, and species embeddings are processed through three Transformer decoder layers employing a pre-layer normalization structure (heads = 4, feedforward dimension = 512, dropout = 0.3), followed by a fully connected layer to predict the probability distribution of the next nucleotide token. The Transformer model is capable of capturing long-range dependencies within the sequences through its self-attention mechanism.
The VAE is a probabilistic generative model that approximates a multivariate normal distribution to represent the intrinsic characteristics of the training data. It consists of an encoder, which infers the mean and variance (\(\:\mu\:,\:{\sigma\:}^{2})\)—parameters of the latent vector distribution—from the input, and a decoder that generates new data from these latent vectors. By incorporating species embeddings during training, the model establishes a latent distribution conditioned on the species. Consequently, random sampling from this distribution facilitates the generation of diverse intraspecific data. We conducted a comparative analysis of two VAE model architectures in this study. First, the Chemical VAE was proposed as a model that represents discrete molecular structures in a continuous latent space and derives optimal molecular structures through optimization in that continuous representation24. Adopting the fundamental structure of the Chemical VAE, we constructed the Conv-based VAE with an encoder composed of three 1D convolutional layers (kernel sizes =9,11 and a decoder composed of three GRU layers (hidden dimension = 256, dropout = 0.3) (Fig. 1(c), Conv-based VAE). The one-hot encoded nucleotide sequences were encoded, concatenated with species embeddings, and used to sample latent variables z. The decoder then generated sequences from latent samples conditioned on species embeddings. The GRU-based VAE was constructed using GRU layers for both the encoder and decoder, each comprising three GRU layers (hidden dimension = 256, dropout = 0.3). The embedded nucleotide sequences were concatenated with species embeddings to form the latent representation, which was then used to generate nucleotide sequences (Fig. 1(d), GRU-based VAE). While convolutional architectures capture local patterns in sequence data, GRU layers are effective in preserving sequential order and modeling long-range dependencies.
The Wasserstein GAN is a probabilistic generative model that learns to approximate and minimize the Wasserstein (Earth-Mover) distance between the real and generated data through adversarial training between a generator and a critic. To improve training stability and mitigate mode collapse, we applied a gradient penalty term (Fig. 1(e), WGAN). The generator is conditioned on species labels and random noise to synthesize barcode sequences, while the critic evaluates real and generated sequences under the same species condition to calculate a Wasserstein score. Adversarial training allows the model to directly approximate the underlying COI distribution. Following previous methods on SNP generation using WGAN-GP15, we constructed a 1D convolutional generator–critic architecture. The generator concatenates noise and species embeddings, processes the input through a fully connected layer, and passes it through two convolutional blocks (Conv1D, BatchNorm, LeakyReLU(\(\:\alpha\:=0.01\)) to output nucleotide probabilities. The critic receives one-hot encoded sequences concatenated with species embeddings along the sequence dimension, processes them via three convolutional blocks, and projects the result to a scalar Wasserstein score.
The LDM is a generative network that encodes high-dimensional data into a low-dimensional continuous latent space and learns the diffusion process within that space25. Building upon the core architecture of DiscDiff, a diffusion-based model originally proposed for promoter DNA sequence generation17, we constructed a conditional LDM for COI barcode sequence generation (Fig. 1(f), LDM). Nucleotide token embeddings were concatenated with species embeddings and transformed into a continuous latent representation(\(\:{z}_{0}\in\:{\mathbb{R}}^{L\times\:256})\) using an encoder composed of one-dimensional convolutional layers. A diffusion process was then applied to the latent representation, progressively adding Gaussian noise over time steps t to obtain noisy latent variables \(\:{z}_{t}\). These noisy representations were denoised using a 1D U-Net to recover clean latent representations. The denoised latent variables were subsequently decoded into nucleotide sequences using a decoder consisting of three GRU layers (hidden dimension = 256, dropout = 0.3). For the diffusion process, a linear noise schedule was employed with \(\:{\beta\:}_{t}\in\:[{10}^{-4},0.02]\), and the total number of diffusion timesteps was set to 1,000.
For COI sequence generation, the GRU- and Transformer-based ARLMs and the GRU- and Conv-based VAEs employed temperature-based sampling. To generate data with a balance between accuracy and diversity, we applied a temperature value of 1.0 to all of these models. The WGAN and LDM estimated their generated outputs by selecting, at each position, the nucleotide with the highest predicted probability, whereas the N-gram generated sequences based on the most probable k-mers. All models generated 30 synthetic samples per species. During generation process, only sequences that did not overlap with the real data and had an N ratio below 0.05 were retained as synthetic data. These selected synthetic data were compared and analyzed against the real data. Supplementary Table S2 presents information on the number of parameters for each model, the computational complexity of the models during the generation process, and the time required to generate a single sequence.
Evaluation metrics for synthetic data
To assess the biological and statistical quality of synthetic COI data generated for each species by various generative models, we conducted evaluations based on the following three criteria.
-
(1)
Biological Plausibility of the Synthetic COI Sequences.
To evaluate whether each generative model generates biologically valid protein-coding sequences, we measured the GC content at the third codon position (GC3 content), the Jensen-Shannon divergence (JSD) of codon bias, and the average length of ORFs.
The GC3 content, defined as the proportion of G or C nucleotides at the third base of codons within COI sequences, does not influence the encoded protein but is subject to variance due to evolutionary diversity. Moreover, species-specific GC3 patterns arise from diverse biological factors, enabling an evaluation of how accurately synthetic sequences replicate these species-specific codon usage patterns. Consequently, a smaller difference in GC3 content (Δ) between the real and synthetic data indicates that the generative model effectively reproduces the species-specific nucleotide composition.
The Kullback-Leibler divergence (KLD) is a metric that measures the extent to which one probability distribution diverges from a reference distribution. The Jensen-Shannon Divergence (JSD) measures the average distance between two probability distributions by calculating the KLD between each distribution and their mean. Codon bias JSD represents a value calculated by using the JSD to measure the similarity between codon frequency distributions in real and synthetic data. Despite encoding identical amino acids, different species exhibit unique codon usage preferences. Consequently, a JSD value closer to 0 indicates that the codon usage patterns of the synthetic data are similar to those of the real data. This similarity indicates that the synthetic sequences are likely to be biologically compatible with natural translational processes.
Biologically normal COI sequences are characterized by a single extended ORF that initiates with a start codon and terminates with a stop codon. The average ORF length represents the average length of continuous coding regions without stop codons, thereby indicating the maintenance of a normal single reading frame. Consequently, a difference in average ORF length (Δ) between real and synthetic data close to 0 implies that the synthetic sequences accurately preserve the reading frame structure and stop codon patterns.
-
(2)
Phylogenetic & Population level Fidelity of the Synthetic COI Sequences.
To evaluate whether the species-specific synthetic COI sequences preserve inter-specific discrimination and intra-specific diversity, we calculated the mean intraspecific K2P distance, the mean K2P distance between real and synthetic sequences, and the barcode gap rate using the Kimura 2-Parameter (K2P) model. Through an integrative analysis of these metrics, we evaluated the extent to which the synthetic data reproduce the intra-species distance structure and inter-species separation tendency of the real data.
The K2P genetic distance model serves as a representative method for estimating evolutionary divergence between nucleotide sequences. It distinguishes between transitions (A↔G, C↔T) and transversions (A↔C, A↔T, G↔C, G↔T, etc.), thereby accounting for the different occurrence probabilities of these two substitution types. After aligning two sequences, the proportions of observed transitions and transversions are calculated and subsequently employed to estimate the expected number of substitutions per nucleotide site, referred to as genetic distance. In contrast to basic mismatch rate calculations, the K2P model accounts for the asymmetry between transitions and transversions observed in mtDNA; therefore, it is widely used for COI sequence analysis.
The mean intra-species K2P distance is an indicator that evaluates the extent to which synthetic data captures the within-species genetic diversity observed in the real data. A lower intra-specific K2P value indicates higher sequence similarity among individuals within the same species. We calculated the mean intra-specific K2P distances for both real and synthetic data and determined the difference between them (Δ). Thus, a Δ value approaching zero indicates that the generative model has effectively reproduced the patterns of intra-specific variation.
The mean real–synthetic K2P distance is the average K2P distance calculated between all real and synthetic sequences. It indicates whether the synthetic data are located within the actual genetic space; lower values identifies that the synthetic data are positioned closer to or within the real data distribution. When the intra-species K2P distances of both the real and synthetic data are similar, and the mean real–synthetic K2P distance is minimal, it indicates that the synthetic data not only lie within the real data space but also preserves a similar intra-species structure to real data.
A barcode gap indicates distinct species separation, occurring when the maximum intra-specific genetic distance is smaller than the minimum inter-specific genetic distance. The barcode gap rate represents the proportion of species exhibiting this gap; a higher rate suggests enhanced potential for species discrimination based on COI sequence. We calculated the barcode gap rates for both real and synthetic datasets and evaluated their difference (Δ). A Δ value close to zero indicates that the generative model has effectively preserved the inter-specific boundaries.
-
(3)
Biodiversity Representation of the Synthetic COI Sequences.
We evaluated the properties of synthetic data which preserve the statistical properties of the real data while maintaining intra-species diversity. For quantitative evaluation, the JSD-based k-mer distribution divergence, Self-BLEU (Bilingual Evaluation Understudy), and Nearest Neighbour Adversarial Accuracy (\(\:AA\)) were utilized.
The k-mer distribution reflects species-specific statistical characteristics, such as repetitive elements and GC/AT compositional patterns. We calculated frequency vectors for 3-mers, corresponding to the codon-length unit (3 nucleotides), from the COI sequences. To assess the similarity between the real and synthetic sequences, we calculated the JSD between their respective 3-mer frequency distributions. The JSD ranges from 0 to 1, with a lower value indicating greater similarity between the k-mer distributions of real and synthetic data. Specifically, a lower JSD indicates that the synthetic data more closely reproduces the local 3-mer pattern observed in the real data.
Self-BLEU is a metric that evaluates the similarity among generated sequences, where a lower value indicates higher diversity. This metric facilitates the evaluation of pattern similarity and redundancy within the synthetic data. A difference between the Self-BLEU scores (Δ) of real and synthetic data close to 0 implies that the synthetic data exhibits a diversity level comparable to that of the real data.
AA is a generative quality evaluation metric based on the 1-nearest neighbor distance that quantifies the overlap between real and synthetic data15. This metric evaluates whether the synthetic data demonstrates excessive similarity to the real data (overfitting) or excessive dissimilarity (underfitting). The metric was computed using 3-mer distributions extracted from both real and synthetic data. Values closer to 1 indicate that the synthetic data substantially diverges from the real data (underfitting), whereas values closer to 0 indicate that the synthetic data closely resembles the real data (overfitting). Therefore, an AA value near 0.5 denotes that the synthetic data effectively captures the characteristics of the real data while preserving diversity. Specifically, values above 0.5 imply a lack of realism in the synthetic data, whereas values below 0.5 indicate a propensity for the synthetic data to closely replicate the real data.
Visualization
We analyzed conserved and non-conserved regions within COI sequences using position-wise Shannon entropy profiles. Shannon entropy is a measure of uncertainty and randomness within a probability distribution. Here, it reflects the nucleotide distribution (A, T, C, G) at each position across the entire sequences. Conserved regions, characterized by patterns shared among species, correspond to low entropy values, whereas non-conserved regions or variant regions exhibit high entropy values. We validated the biological plausibility of the synthetic sequences by analyzing the Shannon entropy profiles between the real and synthetic data.
To evaluate the overall similarity between real and synthetic data, we utilized principal component analysis (PCA) and uniform manifold approximation and projection (UMAP)26. The sequences were transformed into 3-mer frequency vectors, followed by dimensionality reduction via PCA to extract global features. Subsequently, UMAP was applied to project these features into a two-dimensional embedding space. We visually evaluated the genetic consistency of the data by examining whether the real and synthetic data occupied a common genetic manifold.
Additionally, we evaluated the reproducibility of local base pattern distributions using a 3-mer abundance scatter plot. We performed a comparative analysis of 3-mer frequency distributions between real and synthetic data. Data points that closely align with the diagonal line (y = x) indicate a more accurate simulation of the real sequence characteristics. Conversely, substantial deviations from this diagonal indicate that the model generates unrealistic sequences. We also assessed the reproducibility of infrequent patterns by applying a log-scale to the frequency values.
Internal and external phylogenetic validation of generated data
We performed an internal phylogenetic consistency assessment using the real sequences from the four datasets as references. To qualitatively assess phylogenetic consistency between real and synthetic sequences, we reconstructed maximum-likelihood (ML) phylogenetic trees. For each dataset, real COI sequences and synthetic COI sequences generated by each model were concatenated, and multiple sequence alignment was performed using MAFFT20,27. The aligned sequences were used as input for maximum likelihood estimation in IQ-TREE 3, generating a tree file in Newick format28. Based on the resulting tree, we defined, for each taxon (species level for Bats, Cypraeidae, and Drosophila; group ID level for Birds), the smallest clade defined by the most recent common ancestor (MRCA) shared by the real sequences of that taxon as the MRCA-defined real clade. We then calculated the in-clade rate, defined as the proportion of synthetic sequences placed within the MRCA-defined real clade, to quantify the extent to which synthetic sequences were positioned within the taxon-specific phylogenetic structure of the real sequences. A higher in-clade rate indicated that a greater proportion of synthetic sequences was placed within the same MRCA-defined clade as the real sequences of the focal taxon. To additionally account for clade boundary specificity, we computed the non-focal real-tip count within the MRCA-defined real clade (i.e., the number of real tips belonging to taxa other than the focal taxon). A larger non-focal real-tip count indicated that the MRCA-defined real clade encompassed a broader phylogenetic range containing multiple taxa and therefore had lower taxon specificity. Accordingly, the two metrics were used to separately evaluate whether the synthetic sequences were placed within the appropriate taxonomic clade and whether that placement was taxon-specific. To determine whether the observed in-clade rate could be achieved by chance given the tree topology, on the same ML phylogenetic tree, we randomly permuted only the taxon labels of the synthetic sequences 1,000 times. Then, at each iteration, the in-clade rate was recomputed. The mean of the resulting distribution was then defined as the expected in-clade rate under random label assignment. In addition, we computed the ratio of the observed in-clade rate to the expected value (obs/expected) as an effect size to quantify how many times better than chance the synthetic sequences were placed. Finally, we used a weighted mean weighted by the number of synthetic sequences per taxon, and utilized three evaluation metrics: the weighted-mean in-clade rate, the weighted-mean obs/expected, and the proportion of taxa with an in-clade rate below 0.5. Here, 0.5 was used as an operational threshold to evaluate whether the majority of the synthetic sequences generated for a given taxon were placed within the MRCA-defined real clade. Regarding the random baseline, we also report the weighted-mean expected in-clade rate. Taxon-level summary statistics (including the in-clade rate and related metrics) are provided in the Supplementary Data.
For external validation using independently collected real-world data, COI barcode reference sequences of Chiroptera and Drosophilidae were downloaded from the BOLD (Barcode of Life Data Systems) data portal29. From the retrieved records, we retained only sequences with collection countries recorded as the Republic of Korea, Japan, or China, and selected entries annotated with the marker code COI-5P (BOLD’s designation for the standard 5′ region of the COI barcode). We further filtered records to those containing both a process identifier (processid) and nucleotide sequence information (nuc). Sequences were cleaned by removing whitespace and normalizing all characters to uppercase, and were exported in FASTA format. The filtered BOLD reference sequences were combined with synthetic sequences generated in this study (GRU-based ARLM outputs), and multiple sequence alignment (MSA) was performed using MAFFT20,27. Using the aligned sequences as input, maximum-likelihood phylogenetic trees were inferred with IQ-TREE 3, and branch support was evaluated with 1,000 ultrafast bootstrap replicates. The resulting trees were inspected to determine whether the synthetic sequences were placed in phylogenetically coherent positions relative to the BOLD reference sequences30. In addition, taxonomic composition and patterns of potential mixing were examined using Krona to generate interactive HTML-based visualizations31.
COI barcode–based species classification with synthetic data augmentation
Under conditions of per-species data scarcity, we evaluated the effectiveness of species classification with synthetic data augmentation. We performed species classification using k-mer features and random forest (RF) classifier. First, we computed the frequencies of 4-mer nucleotide patterns using a sliding-window approach with a stride of one nucleotide for each COI sequence. These frequencies were converted into a 256-dimensional feature vector, which was then normalized using the L2 norm to reduce the influence of differences in sequence length. Using these feature vectors, we performed per-species classification with a RF classifier. The RF is an ensemble model that trains multiple decision trees on bootstrap samples with random feature subsets and then aggregates the species predictions of the individual trees by majority voting to determine the final species classification32. We set the number of decision trees to 100 and the random seed to 42 to ensure computational efficiency and reproducibility. To simulate a scenario in which a limited number of barcode sequences are available per species, one real sequence from each species was used as the training reference data, while the remaining real sequences from the same species were evaluated one at a time as test data using a leave-one-real-out process. Therefore, the training set in each iteration consisted of one training reference data for every species, and under the synthetic data augmentation condition, 30 generated sequences per species were additionally included. Testing was performed exclusively on held-out real sequences, and synthetic sequences were not included in the test data. We compared and analyzed the performance of an RF classifier trained on real data alone against that of a classification model trained jointly with synthetic data, and we evaluated both accuracy and macro-averaged F1 to account for class imbalance.
Implementation details
All training and testing were performed using PyTorch framework. It was performed using four GeForce RTX 3090 Ti 16GB × 4 (Z-202410106770) provided by the Bio-Bigdata Analysis and Utilization of Biological Resources at Soonchunhyang University. To explore the optimized generative model architecture for COI sequence, all models were trained and validated using a common experimental protocol and consistent hyperparameter settings. This standardized experimental design enabled a fair comparison of the intrinsic performance of the different generative model architectures. Common configurations applied across all generative models encompassed a warm-up cosine learning rate decay and the Adam optimizer to improve training efficiency and model accuracy. The initial learning rate was established at 0.001, with training conducted over 100 epochs and a batch size of 16. The loss functions for each model are as follows: the GRU- and Transformer-based ARLMs utilized cross-entropy loss; the Conv- and GRU-based VAEs used a reconstruction loss integrating cross-entropy loss and KL divergence loss. WGAN is designed to minimize the difference between the real data distribution and the synthetic data distribution by leveraging the Wasserstein-1 distance. The critic outputs a real-valued score, and the generator is trained to maximize this score, thereby minimizing the Wasserstein distance. To enhance training stability, a gradient penalty coefficient was set to 10, and the update ratio between the critic and the generator was maintained at 5:1. LDM was optimized by defining the overall loss function as a weighted sum of the cross-entropy loss for reconstruction and the mean squared error (MSE) loss for noise prediction.
Results
Evaluating biological plausibility in deep generative DNA models
Table 1 presents the biological validity results of synthetic COI data generated by seven models across four datasets. For all three evaluation metrics—GC₃ content(Δ), codon bias JSD, and ORF mean length (Δ)—lower values indicate that the synthetic data more accurately replicate the actual biological structures.
Overall, the N-gram models showed low biological plausibility across all four datasets. While they partially replicated the statistical distribution of nucleotide sequences, they did not accurately capture species-specific codon usage patterns and exhibited significant deviations in ORF frame preservation. This indicates that traditional statistical methods are inadequate for capturing the structural constraints intrinsic to COI sequences. In contrast, the GRU-based ARLM consistently showed the smallest deviations across all three metrics in all datasets. This demonstrates that the GRU-based ARLM generates synthetic data with high protein translatability by reproducing codon structures and patterns similar to real data and stably preserving ORF frames. Therefore, the GRU-based ARLM was validated as the most effective model for generating biologically plausible synthetic COI sequences. Additionally, the GRU-based VAE ranked second in overall performance, demonstrating that GRU layers can effectively capture nucleotide continuity and preserve the codon structure of COI data across different data types (invertebrate and vertebrate). In contrast, although the Transformer-based ARLM showed relatively good performance in replicating GC₃ content, it exhibited inferior results in the codon bias JSD and ORF mean length metrics. While the Transformer architecture is effective for learning global patterns, it has limitations in replicating local and sequential patterns at the codon level. Convolution-based feature learning models, including the Conv-based VAE, WGAN, and LDM, exhibited low biological validity across all three metrics. In particular, WGAN and the Conv-based VAE did not preserve ORF frames, leading to poor translatability at the codon level. For LDM, codon bias deviation and ORF collapse were observed. These results indicate that distribution learning within the latent space does not sufficiently capture the intrinsic biological constraints of COI sequences. Furthermore, we confirmed that in the generation of COI data, learning the sequential dependencies of nucleotide sequences using GRU layers is more effective in preserving biological properties in synthetic COI data than focusing on local patterns.
Figure 2 shows the position-wise Shannon entropy profiles between real COI sequences and synthetic data generated by seven models across four datasets. The results are arranged from top to bottom for Cypraeidae, Drosophila, Bats, and Birds, respectively. The left-hand graphs show the position-wise Shannon entropy profiles, whereas the right-hand graphs represent the entropy deviation between the synthetic and real data. COI sequences comprise both functionally conserved regions and non-conserved (variable) regions. Therefore, we analyzed position-wise Shannon entropy to quantitatively evaluate how accurately each generative model replicates these biological conservation-variation patterns. We identified highly conserved regions with low variation (indicated by grey shading) by setting a threshold at the bottom 30% of values in the smoothed entropy distribution. When compared to the real data (black line), the synthetic data generated by both the GRU-based ARLM and GRU-based VAE exhibited entropy profiles similar to the real sequences, replicating the relative positions of conserved and variable regions. In particular, the GRU-based ARLM consistently maintained entropy deviations close to zero, demonstrating a superior capability to preserve nucleotide-level patterns. The Transformer-based ARLM exhibited global entropy profiles similar to the real data; however, it presented lower position-wise entropy values relative to the real sequences. Considering that high-quality synthetic data should maintain a balance between reflecting real characteristics and ensuring an adequate level of diversity, these results indicate that the Transformer-based ARLM exhibits an over-convergence to the real distribution in terms of entropy. In contrast, WGAN also exhibited entropy profiles similar to the real data; however, it exhibits significant entropy deviation, indicating high variability within the synthetic data. This indicates that while the relative patterns of the position-wise profiles were preserved, the entropy scale differs from the real data. In contrast, the N-gram, Conv-based VAE, and LDM exhibited overall entropy values higher than those of real data, characterized by linear or irregular profiles. These models maintained high entropy values even within the grey-shaded regions, indicating the generation of unnatural sequences with low biological plausibility. In addition, the comparison of datasets reveals that entropy deviations are generally larger in the Birds dataset (longest sequences) than in the Cypraeidae dataset (shortest sequences). Notably, the entropy deviation in the Birds dataset exhibits a significant increase beyond 500 bp, indicating a failure to accurately replicate the conserved terminal region near 600 bp. Within this region, the WGAN outperformed the GRU-based ARLM by replicating patterns closer to the real data. This indicates a potential limitation of GRU-based models in maintaining long-term dependencies as the sequence lengthens. In other words, while GRU-based models are effective in learning local nucleotide continuity, they encounter difficulties in accurately replicating the global structure of lengthy and complex sequences.
To validate the biological plausibility of the synthetic COI data, we performed a comparative analysis of codon structure and usage patterns, frame preservation length, and the position-wise profiles of conserved and variable regions. Among the seven models, the GRU-based ARLM most accurately reproduced the statistical characteristics of species-specific nucleotide patterns observed in the real data. The position-wise entropy profiles of the real and generated sequences were also highly similar. Therefore, we confirmed that the GRU-based ARLM learned not only the overall statistical distribution of nucleotide composition but also the species-specific sequence patterns of COI sequences.
Maintaining phylogenetic and population-level fidelity
Table 2 presents the species discrimination capabilities of synthetic COI data generated by seven models across four datasets. Generally, a K2P distance close to 0 indicates intraspecific genetic similarity, while a value of 0.05 or higher is considered as a threshold for interspecific distinction. Therefore, an intra-species K2P mean (Δ) close to 0 suggests that the synthetic data preserves intraspecific diversity similar to that of the real data. Similarly, a real–synthetic K2P mean near 0 indicates that the genetic structure of the synthetic data is highly similar to that of the real data. Finally, a barcode gap rate (Δ) near 0 indicates that the synthetic data accurately reflects the interspecific distance structure observed in the real data.
An analysis of the overall results showed that both the N-gram and LDM exhibited intra-species K2P mean (Δ) and real–synthetic K2P mean values significantly exceeding 1–2. This indicates that the synthetic data occupied a genetic space markedly distinct from that of the real data, exhibiting a divergent pattern of variation. Therefore, the intraspecific and interspecific distance structures in these models were collapsed, indicating a failure to generate synthetic data that preserve phylogenetic consistency. Additionally, the barcode gap rate (Δ) exhibited substantially negative values, confirming the collapse of species boundaries within the synthetic data. Conversely, the GRU-based ARLM consistently exhibited the lowest values across all three metrics for all four datasets, indicating superior performance in species discrimination. These results indicate that that the synthetic data generated by the GRU-based ARLM reside in a genetic space similar to that of the real data while effectively reproducing species-specific patterns. Although the barcode gap rate difference (Δ) was also negative, indicating that the interspecific genetic distances of the synthetic sequences were lower than those of the real sequences, the GRU-based ARLM exhibited the smallest reduction in interspecific distance compared with the other models. The GRU-based VAE also effectively captured genetic structures at both the intraspecific and interspecific levels. In contrast, while the Transformer-based ARLM preserved consistent intraspecific and interspecific distances, it exhibited reduced performance in maintaining species boundaries, as evidenced by significant deviations in the barcode gap rate (Δ). The WGAN and Conv-based VAE exhibited substantial deviations in K2P distances and significant negative values of the barcode gap rate (Δ), indicating difficulties in distinguishing species within the synthetic data. Across all generative models examined, the barcode gap rate (Δ) was negative, indicating that species discrimination boundaries in the synthetic data were less distinct compared to those in the real data. This result is likely due to the expansion or overlap of sequence distributions for each species during the generation process.
Figure 3 shows the PCA-UMAP comparison between the real data with synthetic data generated by seven models across four datasets. The results are arranged with datasets represented in rows (Cypraeidae, Drosophila, Bats, and Birds) and models in columns. Overall, the synthetic data generated by the GRU-based ARLM and the GRU-based VAE most effectively replicated the cluster distributions and the interspecies cluster distances observed in the real data. These models reproduced the intra-species cluster compactness and relative inter-species arrangement trained in the real data. However, as confirmed by the barcode gap analysis, the inter-species boundaries of the synthetic data were generally weaker than those of the real data. This fidelity in distribution aligns with the low values of intra-species K2P mean (Δ) and barcode gap rates (Δ) reported in Table 3. While synthetic data from the Transformer-based ARLM and WGAN closely aligned with the global distribution of the real data, they exhibited increased scattering around clusters and denser aggregation within particular clusters compared to GRU-based models. This indicates potential instability in preserving patterns of intraspecific variation and maintaining clear interspecific boundaries. In contrast, synthetic data generated by N-gram, Conv-based VAE, and LDM were broadly scattered around the clusters of the real data. In particular, the distribution of data generated by the LDM markedly diverges from that of the real data, indicating that the synthetic data exhibited characteristics that are non-biological in nature. Furthermore, the negative values of the barcode gap rate (Δ) presented in Table 3, corroborated by the PCA-UMAP analysis, indicate that species-specific distributions in the synthetic data were more expanded than those in the real data, leading to partial overlaps between adjacent species distributions. COI barcode data are characterized by high inter-species similarity. Consequently, when new sequences were generated based on the statistical nucleotide distributions and patterns learned from the real data, intra-species diversity broadened while inter-species distances conversely decreased.
Modeling biodiversity through synthetic sequence generation
Table 3 presents the biodiversity of synthetic COI data generated by seven models across four datasets. Ideally, generative models should generate novel data that reproduce the statistical and biological attributes of the real data, rather than merely replicating the training data. To validate this, we utilized three metrics: JSD-kmer, Self-BLEU (Δ), and AA. For both JSD-kmer and Self-BLEU (Δ), lower values indicate that the synthetic data accurately reflect the structural characteristics and diversity inherent in the real data. For AA, a value close to 0.5 signifies that the synthetic data maintains appropriate diversity and adheres to the structural distribution of the real data, without exhibiting excessive self-replication.
The GRU-based ARLM and GRU-based VAE consistently exhibited low JSD-kmer and Self-BLEU (Δ) values near 0 across all datasets, effectively replicating 3-mer nucleotide patterns and sequence variation structures similar to the real data. Additionally, with AA scores ranging between 0.5 and 0.7, the synthetic data generated by these models maintained intra-specific diversity while reducing data redundancy. Therefore, we confirmed that GRU-based models achieved a balanced reproduction of nucleotide composition diversity, sequence variation, and inter-cluster overlap, thereby confirming the comprehensive preservation of both ecological and genetic diversity. In contrast, the N-gram, Transformer-based ARLM, and WGAN exhibited local pattern distributions (JSD-kmer) similar to the real data. However, their AA values ranged between 0.9 and 1.0, implying that the generated sequences inhabited a markedly different genetic space and failed to reproduce the variational structure of the real data. In other words, although these models captured nucleotide-level frequencies, they did not sufficiently reflect the fine-grained structural properties underlying natural sequences. The Conv-based VAE and LDM models exhibited substantially higher JSD-kmer values, demonstrating their inability to learn the local compositional patterns of real sequences. Moreover, their AA value of 1 suggested that these models generated non-biological artifacts rather than biologically plausible sequences, further confirming their failure to reproduce the intrinsic characteristics of the real data.
Figure 4 shows log-scaled scatter plots comparing the 3-mer frequencies between the real and synthetic datasets. From top to bottom, the results correspond to Cypraeidae, Drosophila, Bats, and Birds, and from left to right the results of the seven models are shown in order. When the points are uniformly distributed along the diagonal, it indicates that the model successfully reflected the 3-mer distributions of the real data, ranging from highly frequent patterns (upper-right region) to rare patterns (lower-left region). Overall, across all datasets, the N-gram, GRU-based ARLM, and GRU-based VAE models exhibited high correlations with R-squared values above 0.98, showing that their generated 3-mer distributions closely matched those of the real data. For the GRU-based ARLM and GRU-based VAE, points were distributed around the diagonal, indicating that these models reproduce the overall real sequence distribution rather than engaging in simple frequency replication. In contrast, since the N-gram model learns the 3-mer occurrence probabilities, its statistical distribution appeared highly similar to that of the real data. However, when considered alongside the results presented in Table 4, it becomes evident that the N-gram model fails to reflect the biological characteristics of the real sequences and performs only a frequency-level replication. The Transformer-based ARLM and WGAN models exhibited high correlations with the real data in terms of overall 3-mer distributions (R-squared values ≈ 0.96–0.99). However, both models showed increased dispersion in the scatter plots when generating rare structures (lower-left region). For the Conv-based VAE, points were skewed toward the upper right, confirming poor performance in reproducing rare nucleotide patterns that are observed in the real sequences. The LDM exhibited the lowest R-squared values among the models, with the majority of points distributed below the diagonal. This indicates a distributional distortion where certain 3-mer patterns were excessively generated in the synthetic data. Furthermore, among the four datasets, the scatter plots for Cypraeidae exhibited the most uniform distributions along the diagonal, suggesting that diverse 3-mer structures were successfully reflected. In contrast, the scatter plots for Birds showed a stronger concentration of points in the upper-right region. These results indicate that as sequence length increases, the fidelity of generating rare patterns tends to decrease.
Results of internal and external validation of generated data
We performed an internal validation of whether the real and synthetic sequences are accurately contained within the phylogenetic structure of the same taxon, integrating all four datasets. For comparative analysis of the representative model architectures, we evaluated the synthetic sequences generated by the GRU-based ARLM, Transformer-based ARLM, GRU-based VAE, and LDM. Supplementary Table S3 presents the results of the phylogenetic consistency analysis between the real and synthetic sequences generated by the four models. In these metrics, an in-clade rate closer to 1 indicates higher phylogenetic fidelity, and the expected in-clade rate represents the baseline probability that a synthetic sequence with a randomly assigned taxon label would be placed within the corresponding clade by chance, given the tree topology. We assessed the effect size, obtained by dividing the observed in-clade rate by this baseline, to determine how many times better than chance the sequences were placed, and we also examined the proportion of failed taxa. Overall, the GRU-based ARLM outperformed the other three models. It achieved an in-clade rate of 0.792, indicating that approximately 80% of the synthetic sequences were placed within the corresponding phylogenetic clades. This placement rate was 22.6 times higher than that expected under random label assignment. With a rate < 0.5 of only 11.9%, most taxa exhibited consistent phylogenetic fidelity. The Transformer-based ARLM showed correct phylogenetic placement 5.5 times better than chance, but with a rate < 0.5 of 88.9%—failing for the majority of taxa—indicating that it achieved only partial placement for a subset of taxa. The GRU-based VAE and LDM showed results at the random level. Their in-clade rates were identical to the expected values, and with a rate < 0.5 of approximately 98%, correct clade placement failed for almost all taxa. Therefore, the synthetic data from these two models fail to accurately reproduce taxon-specific characteristics. Taxonomic composition and patterns of potential mixing were additionally examined using Krona-based interactive visualizations (Supplementary Data S1).
Based on the internal validation, we performed external validation against BOLD using the synthetic data from the GRU-based ARLM, which exhibited the highest phylogenetic fidelity. For the Chiroptera external reference set downloaded from BOLD (Supplementary Data S2A), alignment of the BOLD sequences with the GRU-based ARLM synthetic sequences comprised 2,780 sequences and 2,933 nucleotide sites. The alignment contained 1,648 invariant sites (56.19%), and 898 parsimony-informative sites. IQ-TREE 3 analyses were performed with ModelFinder-based model selection and maximum-likelihood estimation (MLE); the best-fitting model under the Bayesian Information Criterion (BIC) was GTR + F+R6. The final ML tree had a log-likelihood of − 79,788.8898 (s.e. 3,752.4036) and a total sum of branch lengths of 43.9630 (Supplementary Data S3A). For the Drosophilidae BOLD reference set (Supplementary Data S2B), the combined alignment comprised 3,672 sequences and 2,316 nucleotide sites, with 1,388 invariant sites (59.93%) and 691 parsimony-informative sites. Using the same IQ-TREE 3 workflow, the best-fitting model under BIC was GTR + F+I+R9. The final ML tree had a log-likelihood of − 101,183.1110 (s.e. 5,706.3479) and a total sum of branch lengths of 48.1559 (Supplementary Data S3B). Taxonomic composition and patterns of potential mixing were additionally examined using Krona-based interactive visualizations (Supplementary Data S4).
Effect of synthetic data augmentation on coi barcode–based species classification
We performed species classification with the use of synthetic data under conditions of per-species data scarcity. Using the synthetic data from the GRU-based ARLM, which showed the best results in the preceding statistical analyses, we performed species classification with the RF classifier. In Table 4, both classification accuracy and the macro-averaged F1 score improved across all four datasets when trained jointly with synthetic data. Under a data-scarce condition with only a single sequence per species, it is difficult for the RF classifier to accurately form the per-species decision boundaries. Therefore, when synthetic data that reflect the real per-species nucleotide patterns and frequencies are additionally used for training, species classification improves. In particular, the Birds dataset exhibited the greatest benefit from synthetic data augmentation, with classification accuracy increasing by 27.2%p. For the Bats dataset, the margin of improvement was limited because real data alone already yielded high accuracy, yet a performance gain was still observed. In addition, when synthetic data were additionally used for training, classification performance improved across all species for Bats and Drosophila. In contrast, classification performance declined for some species in the Cypraeidae and Birds. In particular, the Cypraeidae dataset contains many closely related species; therefore, the addition of synthetic data broadened the species-specific data distributions, resulting in increased overlap and less distinct decision boundaries among closely related species. Nevertheless, overall, the number of species with improved performance exceeded the number with degraded performance, confirming the beneficial effect of synthetic data on species classification.
Discussion
We performed species-specific COI sequence generation using generative models to address data scarcity and class imbalance in species-level COI datasets. To explore generative models optimized for COI data, we constructed six deep generative models with distinct architectures—GRU-based ARLM, Transformer-based ARLM, Conv-based VAE, GRU-based VAE, WGAN, and LDM—and conducted a comparative evaluation across four datasets (Cypraeidae, Drosophila, Bats, and Birds). These datasets differ in sequence length, number of species, and sequence complexity, enabling assessment of the models’ biological generalization capabilities. We evaluated the generated synthetic data focusing on biological plausibility, intra- and inter-species discriminability, and biological diversity.
Overall, the GRU-based models were effective in statistically reproducing the species-specific patterns and structural characteristics of COI sequences across all datasets. The position-wise Shannon entropy results showed that the GRU-based ARLM and the GRU-based VAE generated synthetic data by reproducing the nucleotide distributions and patterns of both conserved and non-conserved regions similar to the real data. The intra-species mean K2P and real–synthetic mean K2P distances confirmed that intra-species diversity in the synthetic data from the GRU-based models was similar to that of the real data. However, all evaluated models showed negative barcode gap rate differences (Δ) across all datasets. When interpreted together with the PCA and UMAP visualizations, these results suggest that the broadening of the synthetic data distributions reduced interspecific discriminability, particularly given the inherently high similarity among COI sequences from different species. These results were evaluated under a limited number of per-species samples, suggesting that it will be necessary to strengthen inter-species boundaries in the future by continuously obtaining more diverse per-species data. Evaluations using JSD-kmer, Self-BLEU, and AA metrics confirmed that synthetic sequences maintained intra-species diversity similar to real data while capturing nucleotide patterns and sequence variation structures. For the Transformer-based ARLM, synthetic sequences reflected overall k-mer distributions and Shannon entropy patterns similar to real data but showed limited inter-species discriminability and failed to capture key characteristics of the real data. This suggests that although Transformer architecture learns global patterns effectively, it is less effective at capturing codon-level constraints and subtle intra-specific variations of COI sequences. In contrast, convolution-based models, including Conv-based VAE, WGAN, and LDM, showed limited capability in reproducing rare patterns and codon-level structures. Conv-based VAE and LDM exhibited high entropy, k-mer JSD, and AA values close to 1, indicating generation of unnatural sequences that do not reflect real data characteristics. Therefore, for COI sequence modeling, capturing nucleotide order and sequential dependency patterns is more critical than learning local patterns.
Finally, COI sequence generation performance ranked as follows: GRU-based ARLM > GRU-based VAE > Transformer-based ARLM ≈ WGAN > Conv-based VAE > LDM. Models such as WGAN, Conv-based VAE, and LDM, previously effective for SMILES, microbiome, haplotype, genotype, and promoter data, showed poor performance for COI sequence generation, highlighting the importance of domain-specific model design. In particular, Transformer and LDM, which have recently demonstrated good performance in sequence analysis, are effective at learning global patterns but generally require large-scale training datasets. However, the COI datasets used in this study contained only a limited number of sequences per species and consisted of relatively short sequences, in which local-level patterns and positional information are important. Therefore, the Transformer-based ARLM did not accurately reproduce local codon patterns and showed a tendency to converge excessively toward the distribution of the training data. The LDM produced biologically unnatural sequences because discrete nucleotide patterns were lost during compression into and reconstruction from the continuous latent space. Furthermore, the results of the statistical N-gram method demonstrated that simply reproducing nucleotide-pattern frequencies was insufficient to capture the species-specific characteristics of COI sequences. Overall, we confirmed that the GRU-based generative model reliably preserved the continuity of nucleotide patterns and the reading frame of COI sequences through its recurrent architecture, while maintaining robust performance even when trained on relatively small datasets.
Finally, we evaluated the practical applicability of the generated COI sequences. First, phylogenetic consistency between the real and synthetic sequences was assessed. In the integration analysis of the four datasets, the synthetic sequences generated by the GRU-based ARLM achieved a high in-clade rate of approximately 80%, supporting the phylogenetic fidelity of the generated sequences. In addition, alignment and phylogenetic tree estimation using external reference sequences from the BOLD COI-5P database showed that generated sequences exhibited phylogenetic alignment patterns consistent with real genetic information. Furthermore, under an extremely data-scarce condition in which only one real sequence was available per species across the four datasets, we performed species classification using the species-specific synthetic sequences generated by the GRU-based ARLM, which showed the best overall performance in the statistical evaluations. The RF-based classification results showed that incorporating the synthetic sequences into the training data improved classification performance across all four datasets. In particular, the most pronounced effect with synthetic data was observed in the Birds dataset, where species classification accuracy increased by 27.2%p. These results indicate that the synthetic sequences generated by the GRU-based ARLM not only reproduced statistical patterns but also captured species-specific characteristics, thereby contributing to improved species identification performance.
Conclusion
DNA barcoding sequences are widely used as biomarkers for species identification and biodiversity research. Recently, machine learning– and deep learning–based approaches have been increasingly applied to COI data analysis. However, COI data present inherent limitations, characterized by high intra-specific similarity and significant data imbalances across species. In addition, public COI databases often contain extremely limited numbers of sequences per species or high levels of sequence redundancy, making reliable analysis challenging. To address the scarcity of usable data, synthetic data generation methods have been introduced. Traditional methods primarily focused on statistical properties such as nucleotide frequency. However, these approaches have limitations in reflecting the biological characteristics of COI sequences. Generative model–based approaches have recently been introduced to generate high-quality synthetic data that effectively capture these biological characteristics.
By comparatively analyzing species-specific COI sequence generation performance across generative models with diverse architectures, the GRU-based ARLM and GRU-based VAE generated diverse synthetic sequences with minimized redundancy while preserving intra-species diversity, inter-species discriminative structures, and codon-level patterns of real COI data. These findings indicate that such models can serve as a novel simulation approach to mitigate data scarcity, overcoming the limitations of existing statistical simulation methods. In particular, the GRU-based ARLM achieved good generation results with a small number of parameters, indicating that it is a method that can be used effectively in resource-constrained settings. However, Transformer and LDM, which have recently demonstrated good performance across various biological sequence analysis tasks, are expected to achieve effective performance if their model architectures and training protocols are tuned to the characteristics and size of the dataset. In addition, we used small-scale four datasets with different data characteristics. We confirmed the generalization performance of generative deep models to analyze these datasets integratively. However, the datasets used contain a limited sample of taxa, and the model’s results may be affected by the composition of the taxa used for training and the number of samples per species. In future study, we plan to advance the COI sequence generation model by applying publicly available large-scale biological datasets encompassing a broader range of taxa. Therefore, the proposed method can be applied to various biological fields where acquiring real data is challenging, including eDNA-based biodiversity prediction and the simulation of rare or endangered species. Future research aims to improve the accuracy and biological fidelity of synthetic COI data by incorporating a broader range of taxa and strengthening biologically informed constraints in generative model design.
Data availability
The datasets analysed during the current study are publicly available from the SupBarcodes repository (http://dmb.iasi.cnr.it/supbarcodes.php The processed datasets generated during the current study are available from the corresponding author on reasonable request.
Code availability
The source code, configuration files, and evaluation scripts used in this study are publicly available on GitHub at https://github.com/devchoii75-boop/COI-Barcode-Generative-Models The version of the code corresponding to this manuscript has been permanently archived in Zenodo and is available at https://doi.org/10.5281/zenodo.21303833
References
Hebert, P. D., Cywinska, A., Ball, S. L. & deWaard, J. R. Biological identifications through DNA barcodes. Proc Biol Sci 270, 313–321, doi:https://doi.org/10.1098/rspb.2002.2218 (2003).
Hajibabaei, M., Singer, G. A., Hebert, P. D. & Hickey, D. A. DNA barcoding: how it complements taxonomy, molecular phylogenetics and population genetics. TRENDS in Genetics 23, 167–172 (2007).
Siti-Azizah, M. N. in 3rd Syiah Kuala University Annual International Conference 2013. (Syiah Kuala University).
Hebert, P. D., Stoeckle, M. Y., Zemlak, T. S. & Francis, C. M. Identification of Birds through DNA Barcodes. PLoS Biol 2, e312, doi:https://doi.org/10.1371/journal.pbio.0020312 (2004).
Ward, R. D., Zemlak, T. S., Innes, B. H., Last, P. R. & Hebert, P. D. DNA barcoding Australia’s fish species. Philos Trans R Soc Lond B Biol Sci 360, 1847–1857, doi:https://doi.org/10.1098/rstb.2005.1716 (2005).
Yang, C.-H., Wu, K.-C., Chuang, L.-Y. & Chang, H.-W. DeepBarcoding: deep learning for species classification using DNA barcoding. IEEE/ACM Transactions on Computational Biology and Bioinformatics 19, 2158–2165 (2021).
Arias, P. M. et al. BarcodeBERT: Transformers for biodiversity analysis. arXiv preprint arXiv:2311.02401 (2023).
Taccaliti, E. & Aguilar–Ruiz, J. S. Improving classification on imbalanced genomic data via KDE–based synthetic sampling. BioData Mining 18, 60 (2025).
Gómez-Martínez, V., Chushig-Muzo, D., Veierød, M. B., Granja, C. & Soguero-Ruiz, C. Ensemble feature selection and tabular data augmentation with generative adversarial networks to enhance cutaneous melanoma identification and interpretability. BioData Mining 17, 46 (2024).
Zhu, Y. et al. Generative ai for controllable protein sequence design: A survey. arXiv preprint arXiv:2402.10516 (2024).
Xia, J., Zhou, J., Chen, S., Ling, T. & Li, S. Z. in Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. 10733–10741.
Lan, L. et al. Generative adversarial networks and its applications in biomedical informatics. Frontiers in public health 8, 164 (2020).
Alvi, R. et al. Generative Artificial Intelligence in Bioinformatics: A Systematic Review of Models, Applications, and Methodological Advances. arXiv preprint arXiv:2511.03354 (2025).
Rong, R. et al. (2021).
Yelmen, B. et al. Deep convolutional and conditional neural networks for large-scale genomic data generation. PLOS Computational Biology 19, e1011584 (2023).
Xie, S. et al. Deep Generative Models for Discrete Genotype Simulation. bioRxiv, 2025.2008. 2008.669289 (2025).
Li, Z. et al. Discdiff: Latent diffusion model for dna sequence generation. arXiv preprint arXiv:2402.06079 (2024).
Xu, L. et al. A generative deep neural network for pan-digestive tract cancer survival analysis. BioData Mining 18, 9 (2025).
Zhou, J. et al. Novobench: Benchmarking deep learning-based\emph {De Novo} sequencing methods in proteomics. Advances in Neural Information Processing Systems 37, 104776–104791 (2024).
Katoh, K., Misawa, K., Kuma, K. i. & Miyata, T. MAFFT: a novel method for rapid multiple sequence alignment based on fast Fourier transform. Nucleic Acids Research 30, 3059–3066, doi:https://doi.org/10.1093/nar/gkf436 (2002).
Brown, P. F., Della Pietra, V. J., Desouza, P. V., Lai, J. C. & Mercer, R. L. Class-based n-gram models of natural language. Computational linguistics 18, 467–480 (1992).
Chen, X., Mishra, N., Rohaninejad, M. & Abbeel, P. in International conference on machine learning. 864–872 (PMLR).
Dou, L. et al. Unisar: A unified structure-aware autoregressive language model for text-to-sql. arXiv preprint arXiv:2203.07781 (2022).
Gómez-Bombarelli, R. et al. Automatic chemical design using a data-driven continuous representation of molecules. ACS central science 4, 268–276 (2018).
Rombach, R., Blattmann, A., Lorenz, D., Esser, P. & Ommer, B. in Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 10684–10695.
McInnes, L., Healy, J. & Melville, J. Umap: Uniform manifold approximation and projection for dimension reduction. arXiv preprint arXiv:1802.03426 (2018).
Katoh, K. & Standley, D. M. MAFFT multiple sequence alignment software version 7: improvements in performance and usability. Mol Biol Evol 30, 772–780, doi:https://doi.org/10.1093/molbev/mst010 (2013).
Wong, T. et al. IQ-TREE 3: Phylogenomic Inference Software using Complex Evolutionary Models. (2025).
Ratnasingham, S. & Hebert, P. D. bold: The Barcode of Life Data System (http://www.barcodinglife.org Mol Ecol Notes 7, 355–364, doi:https://doi.org/10.1111/j.1471-8286.2007.01678.x (2007).
Letunic, I. & Bork, P. Interactive Tree of Life (iTOL) v6: recent updates to the phylogenetic tree display and annotation tool. Nucleic Acids Research 52, W78–W82, doi:https://doi.org/10.1093/nar/gkae268 (2024).
Ondov, B. D., Bergman, N. H. & Phillippy, A. M. Interactive metagenomic visualization in a Web browser. BMC Bioinformatics 12, 385, doi:https://doi.org/10.1186/1471-2105-12-385 (2011).
Breiman, L. Random forests. Machine learning 45, 5–32 (2001).
Funding
This research was supported by Basic Science Research Program through the National Research Foundation of Korea(NRF) funded by the Ministry of Education(RS-2021-NR060121). This research was supported by Korea Basic Science Institute(National research Facilities and Equipment Center) grant funded by the Ministry of Education.(RS-2022-NF000922).
Author information
Authors and Affiliations
Contributions
CM and DS contributed equally to this work. CM and DS developed the methodology, conceived the experiments and wrote the manuscript. JJ, CH, HS, HL, and KL performed data curation and reviewed the manuscript. JP and HH validated the results from biological perspective. YL supervised this work. All authors discussed the results and contributed to the fnal version of the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary Information
Below is the link to the electronic supplementary material.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/
About this article
Cite this article
Moon, CI., Song, D.K., Park, J.E. et al. Benchmarking generative models for COI DNA barcoding. Sci Rep 16, 29339 (2026). https://doi.org/10.1038/s41598-026-63888-z
Received:
Accepted:
Published:
Version of record:
DOI: https://doi.org/10.1038/s41598-026-63888-z
Facts Only
* Six generative models incorporating GRU layers, Transformer blocks, and convolutional layers were implemented for generating species-specific COI sequences across Cypraeidae, Drosophila, Bats, and Birds.
* Preprocessing involved character normalization (ambiguous codes to 'N'), filtering sequences shorter than 300 bp, filtering data to require $\le 3$ species per dataset, and ORF orientation correction based on the Open Reading Frame (ORF).
* Data was sourced from public DNA barcode sequence datasets for these four groups.
* Evaluation metrics included GC₃ content ($\Delta$), codon bias JSD, ORF mean length ($\Delta$), intra-species K2P mean differences ($\Delta$), real–synthetic K2P mean differences ($\Delta$), and barcode gap rate differences ($\Delta$).
* The GRU-based autoregressive language model achieved the best performance in sequence generation.
* Biological plausibility was assessed by measuring GC₃ content, codon bias JSD, and ORF mean length differences between real and synthetic data.
* Phylogenetic fidelity was assessed using intra-species K2P distances and barcode gap rates.
* Diversity was evaluated using JSD-based k-mer distribution divergence, Self-BLEU, and Nearest Neighbour Adversarial Accuracy (AA).
* Internal phylogenetic consistency was assessed by reconstructing Maximum-Likelihood phylogenetic trees for real and synthetic sequences.
* External validation involved aligning synthetic sequences with BOLD reference sequences from Chiroptera and Drosophilidae using MAFFT and IQ-TREE 3.
Executive Summary
Full Take
The shift toward generative modeling in bioinformatics, specifically targeting sequence data like COI, signals a recognition that traditional classification methods struggle with the inherent complexity of molecular evolution when faced with class imbalance and data scarcity. The finding that sequential dependency learning via GRU layers outperformed local feature learning (CNNs) or distribution approximation methods (VAEs/GANs/LDMs) in preserving codon-level structures suggests that capturing long-range evolutionary context is a more critical constraint for biological validity than merely mimicking local statistical patterns. This challenges the general trend in deep learning toward pattern recognition, suggesting that for highly constrained systems like molecular sequences, architectural choices must prioritize sequential integrity.
The analysis of entropy profiles reveals a tension between global structure and local detail. The superiority of the GRU-based ARLM in replicating position-wise Shannon entropy suggests that preserving Markovian dependencies (sequential order) is fundamentally linked to biological plausibility for COI evolution. Conversely, the Transformer's success in global entropy might indicate an over-convergence to the overall data distribution at the expense of fine-grained structural fidelity. This sets up a critical tension: does maximizing statistical fit (global pattern preservation) outweigh maintaining local, biologically mandated constraints (codon structure and ORF integrity)?
The process of synthesizing phylogenetic placement based on synthetic sequences further complicates this. When models fail to align synthetic data within established clade structures—as suggested by the necessity of calculating in-clade rates against random permutations—it implies that generating plausible sequences is insufficient; generating *contextually correct* sequences requires embedding explicit evolutionary topology into the generation process, not just training on sequence statistics. This raises the implication that future generative bioinformatics research must integrate phylogenetic constraints directly into the loss functions to move beyond pattern imitation toward true biological simulation.
Bridge Questions: If the optimal model architecture depends so strongly on preserving sequential order, how can we design loss functions that quantitatively enforce evolutionary constraints (like K2P or clade separation) during generation, rather than relying solely on downstream evaluation metrics? What is the necessary minimum level of structural fidelity required in synthetic sequences before they can be considered viable substitutes for real data in species classification pipelines? What alternative methods exist to integrate established phylogenetic topologies more natively into deep generative sequence modeling?
