A Multi-Layered AI Pipeline for BPMN Generation from Natural Language

Alexandru Rancea, Ionut Anghel, Tudor Cioara, Ovidiu Anchidin, Ancuta NemesarXiv 2026 · arXiv

TL;DR

This paper introduces a multi-layered AI pipeline that transforms messy, unstructured natural language descriptions into formal BPMN 2.0 process models. By combining fine-tuned transformer models for entity recognition with LLM-based reasoning for complex relationship extraction, the system achieves over 90% accuracy in mapping process flows, effectively overcoming the "adjacency constraint" that plagues traditional NLP approaches.

What Problem Does This Paper Address?

Business Process Model and Notation (BPMN) is the gold standard for visualizing organizational workflows, but creating these models is a manual, labor-intensive task prone to human error and inconsistent interpretations.

The primary technical challenge in automating this is linguistic ambiguity. Specifically, traditional NLP often suffers from the "adjacency constraint"—the assumption that related entities appear close to each other in text. In complex business processes, a condition mentioned in the first paragraph might trigger an action described three sentences later. Capturing these non-linear, non-adjacent control-flow relationships (like gateways and parallel paths) while ensuring the resulting diagram is syntactically valid and deadlock-free is the core hurdle this research clears.

Methods

The authors propose a three-layer architecture that separates textual processing from structural logic:

  1. Entity Identification Layer: To handle the "he/she/it" problem, the pipeline first uses FastCoref (based on the Longformer architecture) for coreference resolution, replacing pronouns with explicit actors (e.g., "The manager"). A fine-tuned RoBERTa model then performs token classification using a BIO (Beginning-Inside-Outside) tagging scheme to identify BPMN primitives like Activities, Actors, and Gateways.
  2. Relation Extraction Layer: This layer identifies how entities connect. Instead of simple sequence matching, it uses a sliding window to generate candidate pairs and feeds them into an LLM inference engine. Managed via the DSPy framework, the system employs a "dynamic few-shot" strategy. It programmatically selects the most relevant training examples to guide the LLM in distinguishing between SEQUENCE, TRUE_BRANCH, FALSE_BRANCH, CONDITION_SPECIFICATION, and PARALLEL relations.
  3. Validation Layer: To ensure the output isn't just a collection of boxes but a valid model, this layer applies structural constraints (e.g., ensuring branches originate from gateways). It uses the PM4Py library to convert extracted relations into a "Process Tree," which guarantees the final BPMN XML is free of deadlocks. Finally, the model is instantiated into a semantic ontology (OWL), allowing the process to be queried as a knowledge graph.
The multi-layered architectural overview, showing the flow from raw text to a validated BPMN model and ontology.

Datasets

The researchers primarily utilized the Process Extraction from Text (PET) benchmarking dataset, which contains 45 annotated documents covering domains like recruitment and claims handling. Because the PET dataset is relatively small, they augmented it with 20 additional process descriptions—some hand-crafted and others generated using Google Gemini—to improve class balance and linguistic variety.

Key Insights and Ideas

  • The "Coreference" Multiplier: One of the most significant findings was that simply adding a coreference resolution step improved entity recognition accuracy from 90.1% to 93.6%, and boosted the F1-score by a massive 12.7%. Resolving pronouns is not a "nice-to-have"; it’s foundational for actor-activity association.
  • LLMs as Classifiers, Not Just Generators: Rather than asking an LLM to "generate a whole BPMN diagram" (which often leads to structural hallucinations), the authors used the LLM as a high-level reasoning engine to classify specific relationship pairs.
  • Optimization via DSPy: Moving from zero-shot LLM prompts to an optimized few-shot pipeline (using the BootstrapFewShot optimizer) resulted in a 14.7% performance gain, proving that "In-Context Learning" is essential for handling complex branching logic.
  • Ontology for Persistence: By populating an OWL ontology, the system moves beyond static diagrams. The resulting "knowledge structures" allow for future semantic querying and the detection of recurring patterns across different company processes.

Key Results

  • Relation Extraction: The LLM-based engine achieved an overall accuracy of 90.7% and a weighted F1-score of 0.91.
  • Entity Recognition: The fine-tuned RoBERTa model reached 93.6% accuracy after coreference resolution.
  • Real-World Validation: The system was tested on a complex healthcare scenario (a heart disease patient care path) and a standardized logistics process (Camunda Goods Dispatch). In both cases, the pipeline successfully identified all participating actors and the core process topology, even when the resulting graph structure differed slightly from human-designed reference models.

Limitations and Future Work

While the results are promising, the authors note several areas for improvement:

  • Scope of Primitives: The current pipeline focuses on activities, actors, and gateways. It does not yet support the full spectrum of BPMN 2.0, such as specific event types (timer, message) or complex message flows between different pools.
  • Linguistic Edge Cases: Deeply nested conditions and domain-specific jargon still pose challenges that can lead to oversimplification in the generated models.
  • Future Directions: The team plans to integrate Retrieval-Augmented Generation (RAG) using their generated ontologies to provide even more context-aware inference and to explore learning-based validation mechanisms to automatically correct structural inconsistencies in real-time.

Summary updated

Abstract

The automated transformation of unstructured natural language process descriptions into Business Process Model and Notation (BPMN) diagrams remains a challenging task, due to linguistic ambiguity and the difficulty to detect non-adjacent control-flow relationships. This paper proposes a solution for generating BPMN models from natural language descriptions through a multi-layered pipeline that integrates transformer-based architectures, Large Language Models and ontology population. The proposed method starts with natural language descriptions and separates textual processing, control-flow relation extraction, and structural validation into dedicated components. Entity extraction is performed using a fine-tuned RoBERTa-based transformer model while a control-flow engine captures non-adjacent relationships through LLM-based inference. To improve generalization under limited available data, the approach uses a dynamic few-shot strategy with con- trolled template input construction, enabling improved generalization under limited data availability. Additionally, an ontology population mechanism is introduced to represent the generated process models as semantic knowledge structures. For evaluation purposes we have used from the literature and industry reference processes. Additionally, we have validated the proposed method on a real-world heart disease patients transitional care process, capturing practical constraints and multi-actor collaboration, and serving as an expert-defined benchmark scenario. Experimental results demonstrate strong performance in the relation extraction task, achieving an accuracy of 90.7%, as well as maintaining structural alignment between the generated and reference BPMN models across multiple evaluation scenarios scenarios.
BibTeX
@misc{rancea2026multi,
  author = {Alexandru Rancea and Ionut Anghel and Tudor Cioara and Ovidiu Anchidin and Ancuta Nemes},
  title = {{A Multi-Layered AI Pipeline for BPMN Generation from Natural Language}},
  year = {2026},
  eprint = {2611.18157},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.18157},
}
Figure