ATGen: A Framework for Active Text Generation

Akim Tsvigun, Daniil Vasilev, Ivan Tsvigun, И. М. Лысенко, Talgat Bektleuov, Aleksandr Medvedev, Uliana Vinogradova, Nikita Severin, Mikhail Mozikov, А. А. Савченко, Ilya Makarov, Grigorev Rostislav, Ramil Kuleev, Fedor Zhdanov, Artem Shelmanov2025

Introduction

While modern Large Language Models (LLMs) demonstrate remarkable general-purpose capabilities, many specialized applications—such as those in the medical, legal, or technical domains—require fine-tuning to achieve necessary accuracy and stylistic alignment. However, the primary bottleneck in this process is the acquisition of high-quality annotated data. While using powerful proprietary models like GPT-4o to label data is a common workaround, the costs of querying these APIs at scale can be prohibitive.

Active Learning (AL) offers a solution by strategically selecting only the most informative data points for labeling, thereby reducing the total volume of data required. However, existing AL frameworks are largely optimized for simple classification tasks. Applying AL to Natural Language Generation (NLG) introduces unique challenges, specifically the need to continuously retrain and run inference on memory-intensive generative models within the annotation loop. To address this, we introduce ATGen, an open-source framework designed specifically for Active Text Generation.

The ATGen Framework

ATGen provides an end-to-end pipeline that bridges the gap between traditional Active Learning and the requirements of modern generative AI. The framework is built upon four technical pillars:

1. Generative AL Strategies

Unlike classification-based AL, which relies on simple margin sampling or entropy, ATGen implements state-of-the-art strategies tailored for text generation. These include HUDS (which combines uncertainty with metric learning), HADAS (hallucination-aware scoring), and Facility Location (a diversity-based selection method).

2. Compute-Efficient Loops

To make iterative retraining feasible on standard hardware, ATGen integrates Parameter-Efficient Fine-Tuning (PEFT) techniques, including LoRA, QLoRA, and DoRA. By only updating a small subset of parameters, the framework significantly reduces the computational overhead of the AL cycle. Furthermore, it leverages high-performance inference engines like vLLM, SGLang, and Unsloth to accelerate the data selection process.

3. Hybrid Annotation Support

ATGen supports a flexible annotation ecosystem. It features a built-in web GUI for human experts and seamless API integrations for automated labeling via proprietary or local open-source LLMs. This allows researchers to choose the most cost-effective labeling source for their specific domain.

4. Comprehensive Evaluation

The framework includes a robust benchmarking suite that supports traditional metrics (BLEU, ROUGE), embedding-based metrics (BERTScore), and LLM-as-a-judge frameworks (DeepEval) to provide a multi-faceted view of model performance.

Experimental Evaluation

The authors evaluated ATGen across four diverse NLG tasks to test its versatility:

  • TriviaQA: Open-domain question answering.
  • GSM8K: Mathematical reasoning.
  • RACE: Reading comprehension.
  • AESLC: Text summarization.

In these experiments, a Qwen3-1.7B model was used as the target for fine-tuning, while various AL strategies were compared against a baseline of random sampling.

Key Findings

Superior Data Efficiency

ATGen demonstrates that AL principles translate effectively to generative tasks. On the TriviaQA dataset, random sampling required over 12% of the total dataset to reach a specific performance threshold. In contrast, models using ATGen’s AL strategies achieved the same performance level using only 4% of the data—a 3x improvement in data efficiency.

Significant Cost Reductions

By reaching target quality levels with fewer labeled examples, ATGen drastically reduces the financial burden of data preparation. In fully automated regimes using proprietary LLMs for labeling, the framework reduced API costs by 2-4x. While AL requires more local compute for iterative retraining, this cost is often negligible compared to the high price of proprietary API calls.

The Human-in-the-Loop Advantage

An important insight from the study is that LLM-based annotators are not a perfect substitute for humans. When using DeepSeek-R1 as an automated oracle, the authors observed a drop in overall model quality compared to ground-truth labels. Errors made by the LLM annotator tended to accumulate over the AL process, suggesting that for high-stakes or specialized domains, human-in-the-loop annotation remains essential for maintaining data integrity.

Conclusion and Future Work

ATGen provides a powerful tool for researchers and developers looking to fine-tune generative models with limited budgets or data. By optimizing the AL loop for the specific demands of LLMs, it enables high performance with a fraction of the typical data requirements.

Future research will focus on the potential biases introduced by the AL process itself. Because AL strategically samples the data distribution rather than reflecting it naturally, it is crucial to understand how this affects the long-term fairness and robustness of the resulting models. Additionally, the authors aim to further optimize the computational efficiency of the retraining phase to support even larger model architectures.

Summary updated

BibTeX
@misc{tsvigun2025atgen,
  author = {Akim Tsvigun and Daniil Vasilev and Ivan Tsvigun and И. М. Лысенко and Talgat Bektleuov and Aleksandr Medvedev and Uliana Vinogradova and Nikita Severin and Mikhail Mozikov and А. А. Савченко and Ilya Makarov and Grigorev Rostislav and Ramil Kuleev and Fedor Zhdanov and Artem Shelmanov},
  title = {{ATGen: A Framework for Active Text Generation}},
  year = {2025},
  doi = {10.18653/v1/2025.acl-demo.63},
}
Figure