A new research paper describes a pipeline for rearranging flowcharts from machine-learning papers to fit different aspect ratios while aiming to preserve their structure. This matters because the same diagram may need to appear in a paper column, a presentation slide, a poster, or a portrait preview: a misrepresented connection can also distort the method the diagram explains.
The input is a raster image of a flowchart and a target aspect ratio. The pipeline has three stages: Parse, Style, and Layout. At each stage, a main agent’s work is checked by a critic. The critic combines deterministic constraint checks with visual feedback from a vision-language model, explicitly checking connections so that they are not silently lost.
The authors identify characteristic problems in other approaches: image-to-image models may stretch blocks and struggle with extreme aspect ratios; agentic text-to-image systems may invent content; and parse-then-render methods may misroute edges. The proposed pipeline outputs editable mxGraph XML for draw.io.
On a curated benchmark of 100 flowcharts across five aspect ratios, the paper reports 68.6% Content Fidelity. The cited results for prior approaches range from 11.2% to 41.4%. The work was evaluated with Gemini 3.1 Pro, and the results were also validated against human judgments. The original arXiv paper provides further details on the method and evaluation.