TL;DR
This paper introduces STARFLOW, a framework that uses vision-language models (VLMs) to automatically generate structured workflows from hand-drawn sketches or diagrams. By curating a diverse dataset and finetuning VLMs, they demonstrate significantly improved workflow generation accuracy, outperforming even large, general-purpose models.
What Problem Does This Paper Address?
Building and managing workflows, which are essential for automating business processes, can be complex and time-consuming. Current low-code platforms and visual programming tools, while more accessible than traditional coding, still require users to have a deep understanding of system logic and data dependencies. The challenge lies in translating informal visual inputs like sketches into precise, executable workflow definitions. This is difficult due to the inherent ambiguity of free-form drawings, variations in diagramming styles, and the complexity of inferring execution logic from visual elements. STARFLOW aims to bridge this gap by making workflow creation more intuitive and accessible.
Methods
STARFLOW leverages vision-language models (VLMs) to tackle the sketch-to-workflow generation problem. The core of their approach involves:
- Finetuning VLMs: They finetune existing open-weight VLMs on their curated dataset. This domain-specific training is crucial for adapting general-purpose models to the nuances of workflow diagram interpretation.
- Diverse Dataset Curation: They created a comprehensive dataset comprising synthetic workflows, manually annotated diagrams, and real-world samples. This diversity is key to robust training and evaluation.
- Structured Output: The models generate workflows in a structured JSON format, which precisely defines triggers, actions, and flow logic.
- Evaluation Metrics: They developed and utilized metrics like Flow Similarity (FlowSim) and TreeBLEU, which go beyond simple text matching to assess the structural and logical fidelity of the generated workflows.
Datasets
The authors introduced a new, diverse dataset for training and evaluating workflow generation models. This dataset includes:
- Synthetic Workflows: Programmatically generated workflows with variations in diagram styles.
- Manually Annotated Workflows: Hand-drawn sketches on paper, whiteboards, or blackboards.
- Digital Workflows: Digitally created diagrams.
- User Interface Samples: Screenshots from actual workflow visualization platforms.
This dataset is crucial for training models to handle the wide variety of visual representations encountered in real-world workflow diagrams.
Key Insights and Ideas
- Finetuning is Key: The most significant insight is that finetuning general-purpose VLMs on a domain-specific dataset like STARFLOW dramatically improves performance on structured workflow generation, often surpassing larger, non-finetuned proprietary models.
- Data Diversity Matters: The performance gains are attributed to the diverse dataset, which exposes models to various diagram styles, sources, and complexities, leading to better generalization.
- Ambiguity is the Core Challenge: The paper highlights how the inherent ambiguity of sketches, variations in diagramming conventions, and the difficulty of inferring execution logic are the primary hurdles that finetuning helps overcome.
- Structured Evaluation is Crucial: Developing metrics like FlowSim and TreeBLEU that capture structural and logical similarity is essential for accurately assessing workflow generation quality, going beyond simple text-based evaluations.
Key Results
- Finetuned Models Excel: Finetuned open-weight models achieved significantly higher scores across all evaluation metrics (FlowSim, TreeBLEU, Trigger Match, Component Match) compared to their base versions and even proprietary models. For instance, finetuned Qwen-2.5-VL-7B and Llama 3.2 11B achieved FlowSim scores in the low 90s, outperforming GPT-40 and Gemini.
- Proprietary Models Perform Well: While finetuned models showed the best performance, proprietary models like GPT-40 and Gemini also demonstrated strong capabilities, especially on more structured inputs.
- Dataset Source Impacts Performance: Models generally performed better on synthetic and user interface samples, while manual and whiteboard samples posed greater challenges due to the need to interpret handwritten text and less standardized layouts.
- Image Orientation and Resolution: The impact of image orientation and resolution was studied, showing varying performance trends across different models, with some models benefiting from specific resolutions or orientations.
Limitations and Future Work
The authors acknowledge several limitations:
- Dataset Coverage: The current dataset, while diverse, may not fully cover all real-world workflow styles and enterprise-specific notations, potentially affecting generalization to unseen diagram conventions.
- Evaluation Metrics: Current metrics primarily assess structural similarity and do not fully capture whether a generated workflow executes correctly or fulfills user intent. Hallucinated components are also not explicitly measured.
- Grounding to Real-time Information: Models struggle to ground generation to real-time information, leading to potential creation of invalid or unused components.
- Sensitivity to Noisy Inputs: The approach is sensitive to noisy inputs like messy handwriting or ambiguous component names.
- Computational Cost: Finetuning large VLMs is computationally expensive.
Future work directions include:
- Execution-based Evaluation: Incorporating simulation or sandboxed execution environments for semantic validation.
- Agentic Workflow Generation: Developing agents that can interactively query documentation, perform component lookups, and self-correct.
- Expanding Dataset Coverage: Including more heterogeneous, real-world samples.
- Improving Grounding: Using retrieval-augmented generation or tool-assisted methods.
- Addressing Noisy Inputs: Developing more robust visual parsing with semantic priors.
Summary updated