Introducing multiplex, a workbench for building and comparing LLM-driven mutant generators
Introduction
Comparing two techniques for generating mutants with a large language model (LLM) should be easy. At their core, an LLM-driven approach for creating mutants is a program that sends prompts to a model. However, in practice, each technique ships inside its own prototype, which fixes the programming language, the build tool, and the model provider. This means that a researcher who wants a fair comparison often has to re-implement the technique in a shared environment. Of course, these steps take time and raise questions about whether the new implementation still captures the original idea. In (Maton et al. 2026) multiplex, a modular framework that separates the parts of an LLM mutation experiment so that techniques can be swapped, configured, and compared. Read the rest of this post to see how the framework is organized and what experiments we ran with it!
Key Contributions
Interchangeable Modules: The
multiplextool divides an LLM mutation experiment into separate modules for method extraction, mutant generation, model access, and mutant execution and evaluation, along with language definitions. A researcher can replace one module without disturbing the others, which is what makes a controlled comparison possible.Configuration as the Experiment: A single YAML file records the project under test, the mutant generation approach, the model and endpoint, and the system prompts, and cloud models read the API token from a named environment variable so that configurations can be shared safely.
uv run multiplexturns such a file into a reproducible run, and the file itself documents the experiment.Techniques as Reusable Modules: We provide modules for hazard-guided generation (i.e., m-hazop and m-stpa), for the earlier
LLMorpheusandMutahunterstrategies (i.e., m-llmorpheus and m-mutahunter), and for an unguided baseline (i.e., m-unguided). Comparisons therefore happen inside one version of one tool rather than across separate prototypes.Multi-Language Execution and Transparent Outputs: Method extraction uses TreeSitter for Java and Python, and the execution module can drive
Maven,Defects4J, orPytest. Every stage is archived in the output directory, including the original method, each generated mutant, intermediate artifacts such as control flow diagrams and unsafe control actions, and the test outcomes that decided whether a mutant survived, and a summary CSV records which tests killed it. A flag also emits a Marv-compatible file for interactive mutant review.
Empirical Results
The paper demonstrates the framework with experiments in two languages:
The same method, five different mutants: For the println method in
Defects4J’sCsvversion 5, each technique produces a distinct mutant. m-stpa drops thenullcheck, m-hazop applies theMoreguide word and repeats anappendinside a loop, m-unguided replaces the whole method body, m-llmorpheus changes the variable used in the condition, and m-mutahunter appends a corrupted string. This contrast shows why a shared harness matters.A Java study at scale: The framework ran a comparison of five LLM techniques and the rule-based tool
Majorover 279Defects4Jbugs. The hazard-guided approaches generated large, unique method-level mutants that complemented the other techniques. The full analysis appears in a companion paper and in my post on that paper’s empirical study.A first Python study: Applying m-hazop, m-stpa, and m-unguided to 10 functions from the
PySnooperproject with the localgpt-oss:20Bmodel produced 434 mutants. Across the 215 competent mutants, which are those that did not cause errors, the mutation scores were 0.72, 0.53, and 0.80, respectively, showing that the same framework supports a study in a second programming language.
Future Work
The paper introduces multiplex as a workbench that should keep growing. A core goal is a plugin and template system so that researchers can add modules without forking the repository, together with configuration options that let them create their own modules independently. The authors also plan an open-source record of mutant generation modules that researchers can draw on and contribute to. Finally, because working at the method or function level may not suit every programming paradigm, the framework should let users configure the code structures that a study mutates.
Mutation testing is a long-standing theme of my research, and this framework is the infrastructure behind my recent work on hazard-guided mutants. If you want to prototype or compare an LLM-based mutant generation technique, the multiplex repository and the video demonstration are a good place to start, and the study’s replication package shows a complete configuration. For the design details, please read (Maton et al. 2026)