---
title: 'InVirtuoGen: Fragment-Based Drug Design'
url: https://www.emergentmind.com/topics/invirtuogen
type: topic
---

# InVirtuoGen: Fragment-Based Drug Design

InVirtuoGen is a discrete flow generative model for fragmented SMILES for de novo and fragment-constrained generation, and target-property/lead optimization of small molecules. It learns to transform a uniform source over all possible tokens into the data distribution, rather than relying on a completion-style objective in which only selected positions are predicted at each denoising step. The model is positioned as a fragment-based drug discovery system spanning early hit finding, fragment-constrained design, and multi-objective optimization; reported results include a stronger quality-diversity pareto frontier than prior fragment-based models in de novo generation, competitive performance on fragment-constrained tasks, a new state-of-the-art on the Practical Molecular Optimization benchmark measured by top-10 AUC across tasks, and higher docking scores in lead optimization than previous baselines [2509.26405].

## 1. Scope and task formulation

InVirtuoGen is designed for small-molecule generation and optimization with a particular emphasis on fragment-based workflows. The model supports three task families: de novo molecule generation, fragment-constrained design with user-specified substructures, and target property- and lead-optimization using structure- and property-based objectives [2509.26405].

The system operates on fragmented SMILES rather than on complete molecular strings or purely graph-based objects. This design choice places fragment manipulation at the center of the generative process. A stated rationale in the source material is that fragment-level editing aligns with medicinal chemistry practice, because fragmented SMILES and attachment-aware recombination permit explicit handling of substructures during both generation and optimization [2509.26405].

The paper contrasts this scope with completion-based paradigms. Rather than starting from a partially specified sequence and filling in missing tokens, InVirtuoGen treats generation as iterative refinement of a full token sequence. This suggests a shift from local completion to global sequence revision, with the intended consequence that fragment interactions can be adjusted holistically throughout sampling [2509.26405].

## 2. Molecular representation and model architecture

Molecules are encoded as fragmented SMILES with explicit attachment point markers, written as `[i*]`, where `i` enumerates broken bonds, and fragments are separated by spaces. Fragment order is randomized to avoid bias, and tokenization is atomic-level with a vocabulary of 204 tokens. Rotary positional embeddings are used. The backbone is a Diffusion Transformer with 36 layers, 12 heads, and hidden dimension 768 for the main model, with downsized variants used in some experiments [2509.26405].

Pretraining data are reported as ZINC and UniChem, comprising approximately \(10^9\) molecules. The model factorizes sequence length from content through
\[
p_\theta(\mathbf{x}) = p(n)\, p_\theta(\mathbf{x} \mid n),
\]
where \(p(n)\) is the empirical sequence length distribution from ZINC250k [2509.26405].

This architecture has two notable implications within the reported framework. First, explicit attachment markers make fragment boundaries and recombination sites first-class objects in the representation. Second, the transformer backbone permits bidirectional attention over the full fragmented sequence, which the paper identifies as advantageous relative to order-constrained autoregressive generation and masked completion [2509.26405].

## 3. Uniform-source discrete flow formulation

The central mathematical object in InVirtuoGen is a uniform-source discrete flow. The model is trained to map random token sequences to realistic molecules, with the source typically taken to be uniform over all possible tokens. Given a source sample \(X_0\) and a target data sample \(X_1\), the interpolation is defined as
\[
p_t(x^i \mid x_0, x_1) = (1-t)\,\delta_{x_0}(x^i) + t\,\delta_{x_1}(x^i), \quad t \in [0,1].
\]
This formulation specifies a trajectory in discrete token space from source to data [2509.26405].

The training loss is
\[
\mathcal{L}(\theta) = -\mathbb{E}_{t \sim U(0,1), (X_0, X_1), X_t} \frac{1}{1-t^2} \sum_i \log p_{1|T}(X_1^i \mid X_t),
\]
where \(p_{1|T}\) is the model-predicted token distribution at time \(t\) over all sequence positions. The source material emphasizes that, unlike masked models, this loss accounts for predictions on all sequence positions at every denoising step. It also states that the factor \(1/(1-t^2)\) induces stronger emphasis near the end of the trajectory [2509.26405].

Sampling is described through parallel token updates at every step:
\[
X^i_{t+h} \sim \hat{p}_t^i(X_t).
\]
Softmax temperature \(T\), which is annealed, and Gumbel noise scale \(r\), which is damped, are used to tune the tradeoff between diversity and quality during generation [2509.26405].

## 4. Refinement as a generation paradigm

A defining feature of InVirtuoGen is its refinement-based generation paradigm. At every denoising step, all sequence positions are updated in parallel based on predicted distributions, and token values are not fixed at any point; any position can change at any step. The paper presents this as the main contrast with completion-based methods, including autoregressive models and masked diffusion systems such as GenMol [2509.26405].

In the completion view, token prediction follows either a left-to-right order or a mask-filling schedule, and once a token is filled it is fixed and cannot be changed. In the refinement view used by InVirtuoGen, the number of sampling steps is a hyperparameter and is decoupled from sequence length. The source material explicitly characterizes this as a shift “from completion to refinement,” with stronger bidirectional dependency modeling through self-attention and without arbitrary sequence-order constraints [2509.26405].

The paper further argues that this refinement mechanism better matches holistic molecular editing. Because the model can revise all fragments jointly across steps, it can coordinate changes across attachment points, fragment identities, and sequence-wide context rather than committing early to irreversible token choices. A plausible implication is that this global revisability is especially relevant in fragment-based design, where local edits can have nonlocal consequences for compatibility among fragments [2509.26405].

## 5. Hybrid optimization for properties and lead design

For target-property and lead-optimization, InVirtuoGen combines a genetic algorithm with a Proximal Property Optimization fine-tuning strategy adapted to discrete flows. The genetic algorithm maintains a diverse vocabulary of high-scoring molecules using Tanimoto dissimilarity, performs crossover by recombining fragments between parents, and applies mutation operators. Initial states are offspring formed via recombination or mutation in fragmented SMILES space [2509.26405].

The reinforcement-learning component adapts PPO to the discrete-flow setting. The reported procedure optimizes sequence-wise rewards while approximating log-probabilities over entire sequences via Monte Carlo estimation over noised states. Reward shaping and normalization are applied, and the framework includes adaptive sequence length selection through a custom “peak-seeker” bandit intended to accelerate convergence to high-reward molecule lengths [2509.26405].

The rationale given in the source material is division of labor between exploration and exploitation. The genetic algorithm provides efficient exploration and diversity maintenance, while PPO supplies gradient-driven optimization within the learned generative model. Because the discrete flow accepts and revises full sequences as input, the optimization stage can operate on complete fragmented candidates rather than on strictly incremental completions [2509.26405].

## 6. Empirical results, benchmarks, and limitations

The reported empirical program covers de novo generation, fragment-constrained generation, target property optimization, and docking-based lead optimization. In de novo generation, the evaluation uses validity, uniqueness, diversity based on Tanimoto distance over Morgan fingerprints, and a quality criterion defined as valid and unique molecules with QED \(\ge 0.6\) and SA \(\le 4\). InVirtuoGen is reported to achieve a new pareto frontier in the quality-diversity trade-off relative to GenMol and SAFE-GPT. Higher granularity, corresponding to smaller step size \(h\), improves both quality and diversity. Sampling speed is reported as 1000 samples in approximately 20 seconds, compared with 33 seconds for GenMol on comparable hardware [2509.26405].

Fragment-constrained generation is evaluated on five benchmark tasks: motif extension, linker design, scaffold morphing, superstructure generation, and scaffold decoration. The reported outcome is competitive or superior quality, diversity, and uniqueness, with lower validity attributed to the forced overwriting required by fragment constraints, which is described as less compatible with the model’s refinement philosophy [2509.26405].

On the Practical Molecular Optimization benchmark, the setup uses 10K oracle calls over 23 optimization tasks, and the principal metric is top-10 AUC. The paper reports a new state-of-the-art. With prescreening, the reported Sum(AUC) is 18.993 for InVirtuoGen, compared with 18.362 for GenMol and 16.928 for f-RAG. Without prescreening, the reported value is 16.676, compared with 16.213 for Genetic GFN and 14.7–14.2 for other baselines. Ablations are said to show that both the genetic algorithm and PPO components are essential for best performance [2509.26405].

Lead optimization is evaluated on five protein targets, starting from seed molecules and imposing QED, SA, and Tanimoto similarity constraints with \(\delta = 0.4\) and \(0.6\). The reported result is consistently state-of-the-art or competitive docking scores, with clear superiority in stricter similarity regimes, and further improved docking when the similarity constraint is relaxed [2509.26405].

| Setting | Evaluation setup | Reported outcome |
|---|---|---|
| De novo generation | Validity, uniqueness, diversity, quality | Stronger quality-diversity pareto frontier than GenMol and SAFE-GPT |
| Fragment-constrained generation | Five benchmark tasks | Competitive or superior quality/diversity/uniqueness; lower validity |
| PMO benchmark | 10K oracle calls, 23 tasks, top-10 AUC | New state-of-the-art |
| Lead optimization | 5 protein targets, QED/SA/similarity constraints | Higher or competitive docking scores |

## 7. Reproducibility and place within drug discovery workflows

The paper frames InVirtuoGen as a versatile generative foundation for drug discovery, extending from early hit finding to multi-objective lead optimization. This characterization follows from the combination of de novo generation, fragment-constrained design, and optimization under property and docking objectives within a single framework [2509.26405].

An explicit open-science component accompanies the method. The authors report releasing pretrained checkpoints and code, with results described as fully reproducible. The repository identified in the source material is `https://github.com/invirtuolabs/InVirtuoGen_results` [2509.26405].

Within the reported landscape of molecular generative modeling, InVirtuoGen’s distinguishing claim is not merely benchmark performance but a redefinition of the generative process itself: sequence-wide refinement from a uniform token source, rather than completion from a partially specified molecule. The paper presents this reformulation as the conceptual basis for its performance in de novo generation, fragment-aware design, and multi-objective optimization [2509.26405].

Source: https://www.emergentmind.com/topics/invirtuogen