구조화된 지시를 통한 차트-코드 생성의 개선된 반복적 정제
Improved Iterative Refinement for Chart-to-Code Generation via Structured Instruction
June 15, 2025
저자: Chengzhi Xu, Yuyang Wang, Lai Wei, Lichao Sun, Weiran Huang
cs.AI
초록
최근, 다중 모드 대형 언어 모델(MLLMs)은 강력한 시각 이해 능력으로 인해 점점 더 많은 연구 관심을 받고 있다. 다양한 시각 작업에서 인상적인 성과를 거두었지만, 차트-코드 생성 작업에서는 여전히 최적의 성능을 보이지 못하고 있다. 이 작업은 주어진 차트를 재현할 수 있는 실행 가능한 코드를 생성하도록 MLLMs에 요구하며, 정확한 시각 이해뿐만 아니라 시각적 요소를 구조화된 코드로 정확하게 번역하는 능력을 필요로 한다. 이 복잡한 작업을 직접 MLLMs에 요청하는 경우 종종 만족스럽지 못한 결과를 얻는다. 이러한 문제를 해결하기 위해, 우리는 구조화된 지침을 기반으로 한 반복적 개선 방법인 {ChartIR}을 제안한다. 먼저, 시각 이해와 코드 번역이라는 두 가지 작업을 구분한다. 시각 이해 구성 요소를 달성하기 위해, 우리는 설명과 차이라는 두 가지 유형의 구조화된 지침을 설계한다. 설명 지침은 참조 차트의 시각적 요소를 포착하고, 차이 지침은 참조 차트와 생성된 차트 간의 불일치를 특성화한다. 이러한 지침은 시각적 특징을 언어 표현으로 효과적으로 변환하여, 후속 코드 번역 과정을 용이하게 한다. 둘째, 전체 차트 생성 파이프라인을 초기 코드 생성과 반복적 개선이라는 두 단계로 분해하여 최종 출력의 점진적 개선을 가능하게 한다. 실험 결과는 우리의 방법이 오픈소스 모델 Qwen2-VL과 클로즈드소스 모델 GPT-4o 모두에서 다른 방법에 비해 우수한 성능을 달성함을 보여준다.
English
Recently, multimodal large language models (MLLMs) have attracted increasing
research attention due to their powerful visual understanding capabilities.
While they have achieved impressive results on various vision tasks, their
performance on chart-to-code generation remains suboptimal. This task requires
MLLMs to generate executable code that can reproduce a given chart, demanding
not only precise visual understanding but also accurate translation of visual
elements into structured code. Directly prompting MLLMs to perform this complex
task often yields unsatisfactory results. To address this challenge, we propose
{ChartIR}, an iterative refinement method based on structured instruction.
First, we distinguish two tasks: visual understanding and code translation. To
accomplish the visual understanding component, we design two types of
structured instructions: description and difference. The description
instruction captures the visual elements of the reference chart, while the
difference instruction characterizes the discrepancies between the reference
chart and the generated chart. These instructions effectively transform visual
features into language representations, thereby facilitating the subsequent
code translation process. Second, we decompose the overall chart generation
pipeline into two stages: initial code generation and iterative refinement,
enabling progressive enhancement of the final output. Experimental results show
that, compared to other method, our method achieves superior performance on
both the open-source model Qwen2-VL and the closed-source model GPT-4o.