Section 2 of 6
2 Metrics
Rasmus Møller-Larsen, Adam Izdebski, Jan Olszewski, Pankhil Gawade, Michal Kmicikiewicz, Wojciech Zarzecki, and Ewa Szczurek · about 5 minutes
seqme offers metrics for measuring distribution- and property-based quality of sequence designs, i.e. the degree to which the sequences resemble a biological reference distribution and to which they satisfy pre-specified target properties. Depending on whether the metrics operate directly on raw sequences, on their learned embeddings, or on derived properties, we further categorize them into three classes: sequence-, embedding-, and property-based metrics, respectively. The implemented metrics are summarized in Table 1. Definitions and the biological domains where each metric can be applied are described in Supplementary Text, available as supplementary data at Bioinformatics Advances online.
| Metric | Description
Sequence | Novelty (↑) (D) | Fraction of sequences not in the reference set.
Uniqueness (↑) (D) | Fraction of unique sequences.
Diversity (↑) (D) | Normalized Levenshtein distances within or between sequences.
N-gram Jaccard Similarity (↑/↓) (D) | Jaccard similarity between sequences and reference set’s n-gram set.
Embedding | Fréchet Biological Distance (FBD) (Heusel et al. 2018) (↓) (D) | 2-Wasserstein distance between two multivariate Gaussian distributions fitted to the embeddings of the sequences and reference set.
Maximum Mean Discrepancy (MMD) (↓) (D) | MMD between sequences and references embeddings using a Gaussian radial basis function kernel (Jayasumana et al. 2024) or a rational quadratic kernel (Bińkowski et al. 2021).
Precision (Kynkäänniemi et al. 2019) (↑) (D) | Fraction of sequences that fall inside the support of the reference set.
Recall (Kynkäänniemi et al. 2019) (↑) (D) | Fraction of references that fall inside the support of the sequences.
Authenticity (AuthPct) (Alaa et al. 2022) (↑) (D) | Fraction of sequences whose nearest training neighbor is closer to some other training sample than to the sequence.
Fourier-based Kernel Entropy Approximation (FKEA) (Ospanov et al. 2024) (↑) (D) | Vendi and Rényi Kernel Entropy (RKE) score (Friedman and Dieng 2023) approximation via random Fourier features for diversity estimation.
Property | Property moment (ID) (↑/↓) (P) | Mean and standard deviation of a single property across the sequences.
Hit-rate (↑) (P) | Fraction of sequences satisfying a user-defined set of conditions.
Hypervolume (↑) (P) | Hypervolume of two or more properties derived from the sequences. Computed either as the hypervolume indicator (Zitzler and Thiele 1999) or the convex-hull.
Conformity score (Frey et al. 2024) (↑) (D) | Distributional similarity of the sequences properties and the references properties.
KL-divergence (↓) (D) | Kullback–Leibler divergence between sequences and references for a single property.
2.1 Sequence-based metrics
seqme includes the metrics novelty, diversity, and uniqueness, which are commonly used to detect failure modes. There is a tradeoff between maximizing these metrics and optimizing user-defined properties. A typical failure mode is overfitting to a small set of sequences that satisfy the target properties at the expense of novelty, diversity, and uniqueness. Conversely, a random baseline can trivially maximize novelty and diversity without actually optimizing the desired properties, since the sequence space in biological domains is huge. Thus, these metrics are necessary for a comprehensive evaluation of biological sequence design methods.
2.2 Embedding-based metrics
seqme implements the metric Fréchet Biological Distance (FBD) (Heusel et al. 2018), which is commonly used to evaluate the distributional similarity between biological sequences designed by a model and those in a reference dataset (Preuer et al. 2018, Stark et al. 2024, Faltings et al. 2026). However, FBD is sensitive to both the number of sequences and their distribution in the embedding space. Therefore, seqme also includes Maximum Mean Discrepancy (MMD), which provides more stable estimates (Jayasumana et al. 2024). In addition, the library implements reference-free metrics such as Vendi- and RKE-score (Friedman and Dieng 2023, Ospanov et al. 2024) to evaluate diversity in the embedding space. None of the aforementioned metrics can identify memorization, i.e. near-sequence copying in the embedding space. To address this, seqme includes the Authenticity metric (Alaa et al. 2022). Finally, the library also implements Improved Precision and Improved Recall (Kynkäänniemi et al. 2019) to evaluate fidelity and diversity in the embedding space.
2.3 Embedding models
Recall that embedding-based metrics rely on embedding models that map sequences to fixed-length vector representations. For protein embeddings, seqme includes ESM-2 (Lin et al. 2022), for peptides it contains ESM-2 finetuned on peptide sequences and Hyformer trained on peptides (Izdebski et al. 2025), for ncRNA and mRNA, it uses RNA-FM (Chen et al. 2022), for DNA it includes GENA-LM (Fishman et al. 2025) and for small molecules Hyformer trained on small molecules (Table 1, available as supplementary data at Bioinformatics Advances online). The library also supports the use of alternative embedding models.
Selecting an appropriate embedding model is a non-trivial task as the embeddings must capture the biological domain of interest. To assist with this, seqme provides functionality for visualizing the embedding space using PCA, t-SNE, and UMAP 2D projections. Furthermore, seqme offers diagnostic tools, such as the k-nearest neighbor feature-alignment score and Spearman alignment score (Rissom et al. 2025), to evaluate how well embedding models align with discrete or continuous sequence properties of interest. See Supplementary Text, available as supplementary data at Bioinformatics Advances online, for more details.
2.4 Property-based metrics
seqme implements, among others, the metrics Conformity Score (Frey et al. 2024) and Hit Rate. The latter is commonly used in drug discovery pipelines to quantify the fraction of sequences that satisfy desired properties. In addition, seqme includes the multi-objective optimization metric Hypervolume Indicator (Zitzler and Thiele 1999), which computes the hypervolume of two or more properties across a set of sequences.
2.5 Property models
Property-based metrics assume access to property models. seqme provides functionality to compute several physico-chemical properties of molecules, peptides, and proteins, as well as models predicting whether a peptide exhibits antimicrobial activity (Table 1, available as supplementary data at Bioinformatics Advances online). Furthermore, seqme integrates ESMFold (Lin et al. 2022) and ESM-IF1 (Hsu et al. 2022), which are structure-aware models that predict a protein’s three-dimensional structure from its sequence and, conversely, infer the sequence from a given structure, respectively. Finally, the library contains models to predict DNA promoter regions and splice sites.