-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
412 lines (377 loc) · 22.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="description"
content="Visually Descriptive Language Model (VDLM)">
<meta name="keywords" content="LLM, Multimodal, Vector Graphics">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Visually Descriptive Language Model for Vector Graphics Reasoning</title>
<link href="https://fonts.googleapis.com/css?family=Google+Sans|Noto+Sans|Castoro"
rel="stylesheet">
<link rel="stylesheet" href="./static/css/bulma.min.css">
<link rel="stylesheet" href="./static/css/bulma-carousel.min.css">
<link rel="stylesheet" href="./static/css/bulma-slider.min.css">
<link rel="stylesheet" href="./static/css/fontawesome.all.min.css">
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/jpswalsh/academicons@1/css/academicons.min.css">
<link rel="stylesheet" href="./static/css/index.css">
<link rel="icon" href="./static/images/favicon.svg">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script defer src="./static/js/fontawesome.all.min.js"></script>
<script src="./static/js/bulma-carousel.min.js"></script>
<script src="./static/js/bulma-slider.min.js"></script>
<script src="./static/js/index.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
var toggles = document.querySelectorAll('.toggle-section');
toggles.forEach(function(toggle) {
toggle.addEventListener('click', function() {
var content = document.getElementById(toggle.getAttribute('aria-controls'));
content.classList.toggle('is-active');
toggle.children[1].classList.toggle('fa-angle-down');
toggle.children[1].classList.toggle('fa-angle-up');
});
});
});
</script>
<style>
.collapse-content {
display: none;
margin-top: 10px;
}
.collapse-content.is-active {
display: block;
}
.toggle-section .icon.is-small {
transition: transform 0.3s ease;
}
.toggle-section .fa-angle-up {
transform: rotate(180deg);
}
</style>
</head>
<body>
<section class="hero">
<div class="hero-body">
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column has-text-centered">
<h1 class="title is-1 publication-title">
<img src="static/images/favicon_vdlm.png" alt="Icon" style="vertical-align: middle; height: 50px; margin-right: 10px; margin-bottom: 9px">
Visually Descriptive Language Model for Vector Graphics Reasoning </h1>
<div class="is-size-5 publication-authors">
<span class="author-block">
<a href="https://mikewangwzhl.github.io/">Zhenhailong Wang</a><sup>1</sup>,</span>
<span class="author-block">
<a href="https://stanford.edu/~joycj/">Joy Hsu</a><sup>2</sup>,</span>
<span class="author-block">
<a href="https://xwang.dev/">Xingyao Wang</a><sup>1</sup>,
</span>
<span class="author-block">
<a href="https://khhuang.me/">Kuan-Hao Huang</a><sup>1</sup>,
</span>
<span class="author-block">
<a href="https://limanling.github.io/">Manling Li</a><sup>2</sup>,
</span>
<span class="author-block">
<a href="https://jiajunwu.com/">Jiajun Wu</a><sup>2</sup>,
</span>
<span class="author-block">
<a href="https://blender.cs.illinois.edu/hengji.html">Heng Ji</a><sup>1</sup>
</span>
</div>
<div class="is-size-5 publication-authors">
<span class="author-block"><sup>1</sup>University of Illinois Urbana-Champaign,</span>
<span class="author-block"><sup>2</sup>Stanford University</span>
</div>
<div class="column has-text-centered">
<div class="publication-links">
<!-- PDF Link. -->
<!-- <span class="link-block">
<a href=""
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<i class="fas fa-file-pdf"></i>
</span>
<span>Paper</span>
</a>
</span> -->
<span class="link-block">
<a href="https://arxiv.org/abs/2404.06479"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<i class="ai ai-arxiv"></i>
</span>
<span>arXiv</span>
</a>
</span>
<!-- Video Link. -->
<!-- <span class="link-block">
<a href="https://github.com/MikeWangWZHL/VDLM/raw/main/static/videos/vdlm_teaser_vid.mp4"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<i class="fab fa-youtube"></i>
</span>
<span>Video</span>
</a>
</span> -->
<!-- Code Link. -->
<span class="link-block">
<a href="https://github.com/MikeWangWZHL/VDLM"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<i class="fab fa-github"></i>
</span>
<span>Code</span>
</a>
</span>
<!-- Model Link. -->
<span class="link-block">
<a href="https://huggingface.co/mikewang/PVD-160k-Mistral-7b"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<p style="font-size:18px">🤗</p>
</span>
<span>Model</span>
</a>
<!-- Dataset Link. -->
<span class="link-block">
<a href="https://huggingface.co/datasets/mikewang/PVD-160K"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<p style="font-size:18px">🤗</p>
</span>
<span>Dataset</span>
</a>
<!-- Demo link. -->
<span class="link-block">
<a href="https://github.com/MikeWangWZHL/VDLM/blob/main/demo.ipynb"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<p style="font-size:18px">🚀</p>
</span>
<span>Demo</span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="hero teaser">
<div class="container is-max-desktop">
<div class="hero-body">
<video id="teaser" autoplay muted controls playsinline loop height="100%">
<source src="./static/videos/vdlm_teaser_vid.mp4"
type="video/mp4">
</video>
<!-- <h2 class="subtitle has-text-centered">
<span class="dnerf">VDLM </span>
</h2> -->
</div>
</div>
</section>
<!-- Abstract -->
<section class="section">
<div class="container is-max-desktop">
<!-- Abstract. -->
<div class="columns is-centered has-text-centered">
<div class="column is-four-fifths">
<h2 class="title is-3">Abstract</h2>
<div class="content has-text-justified">
<p>
<b>Problem:</b> Current large multimodal models (LMMs) struggle to bridge the gap between low-level visual perception—focusing on shapes,
sizes and layouts—and high-level language reasoning involving semantics, events and logic. This limitation becomes evident in tasks requiring precise visual perception, such as comparing geometric properties or solving visual algorithmic reasoning problems. To study this failure mode, we focus on an important visual domain: vector graphics—images composed purely of 2D objects and shapes, which are prevalent in various LMM-based agent tasks in web, visual design, and OS environments.
</p>
<p>
<b>Key research questions:</b> (1) how can we enable precise visual perception in LMMs? and (2) how can we facilitate high-level reasoning based on such low-level perceptions?
</p>
<p>
<b>Method:</b> To accurately capture low-level visual details, we utilize Scalable Vector Graphics (SVG) for precise encoding of visual scenes. However, SVGs are not readily interpretable by LLMs or LMMs in a zero-shot manner. To address this challenge, we propose the <b>Visually Descriptive Language Model (VDLM)</b>, which introduces an intermediate textual representation called <b>Primal Visual Description (PVD)</b>. PVD translates SVGs into a text-based abstraction comprising primitive attributes (e.g., shape, position, measurement) along with their corresponding values. This abstraction is more structured and closer to natural language, allowing for direct interpretation by foundation models for zero-shot generalization to different reasoning tasks
</p>
<p>
<b>Performance:</b> Without any human-annotated data, empirical results demonstrate that VDLM leads to significant improvements in state-of-the-art LMMs, such as GPT-4o, across various low-level multimodal perception and reasoning tasks on vector graphics. VDLM also offers better interpretability due to its disentangled perception and reasoning processes.
</p>
</div>
<figure>
<img src="static/images/teaser.png" alt="VDLM overview." class="VDLM_overview_image"/>
<figcaption class="has-text-centered">
<b>Figure 1:</b> Comparison of existing monolithic LMM and VDLM. The example is from <a href="https://lil.nlp.cornell.edu/nlvr/">NLVR</a> dataset.
</figcaption>
</figure>
</div>
</div>
</div>
</section>
<section class="section">
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column is-full-width">
<h2 class="title is-3">Method</h2>
<video id="method" muted controls playsinline loop height="100%">
<source src="./static/videos/vdlm_method_vid_maze.mp4"
type="video/mp4">
</video>
<h2 class="subtitle has-text-centered">
VDLM-txt zero-shot inference example on 2×2 Maze Solving task with text-only LLM reasoner.
</h2>
<br>
<br>
<h3 class="title is-4">Encoding images into SVG to preserve low-level details</h3>
<div class="content has-text-justified">
<p>
We leverage a rule-based image-to-SVG parsing algorithm, <a href="https://github.com/visioncortex/vtracer">VTracer</a>, for converting any image into SVG without learning. This enables us to obtain an accurate initial perception of the input vector graphic images. However, we observe two key challenges when working with raw SVG representation. First, off-the-shelf foundation models, e.g., GPT-4, have limited zero-shot reasoning ability on SVG representation. Second, fine-tuning on task-specific ⟨SVG, question, answer⟩ pairs limits generalization to unseen tasks and domains. We discuss our approach for extracting intermediate representations below.
</p>
</div>
<!-- <h3 class="title is-4">Learning Alignment of SVG to Primal Visual Description with Language Models</h3> -->
<h3 class="title is-4">Learning an intermediate symbolic representation as a bridge</h3>
<div class="content has-text-justified">
<figure id="pvd_ontology_img">
<img src="static/images/pvd_ontology.png" alt="PVD ontology." class="pvd_ontology"/>
<figcaption><b>Figure 2:</b> Ontology of the PVD primitives.</figcaption>
</figure>
<p>
We propose <b>Primal Visual Description (PVD)</b>, a higher-level abstraction that transforms low-level SVG paths to more structured primitives required for reasoning. PVD is a text-based visual description that consists of a set of primitive geometry objects, e.g., circles, line segments. Each PVD element contains the primitives' attributes (e.g., color, shape, position, size) with corresponding predicted values (e.g., blue, circle, pixel coordinates of the center, length of the radius). See <a href="#pvd_ontology_img">Figure 2</a> for the ontology we defined. Notably, unlike raw SVG, PVD is directly interpretable by state-of-the-art LLMs and LMMs, enabling zero-shot reasoning on downstream tasks.
</p>
<figure id="svg_to_pvd_model_img">
<img src="static/images/svg-to-pvd-model.png" alt="SVG-to-PVD model." class="svg_to_pvd_model"/>
<figcaption><b>Figure 3:</b> An example of the input and output of the SVG-to-PVD model.
</figure>
<p>
Since SVG is text-based, we can effectively learn a SVG-to-PVD model by fine-tuning a pretrained language model (<a href="https://huggingface.co/mistralai/Mistral-7B-v0.1">Mistral-7B-v0.1</a>). To obtain the training data, we develop a data generator leveraging <a href="https://pillow.readthedocs.io/en/stable/reference/ImageDraw.html">PIL.ImageDraw</a> and <a href="https://github.com/visioncortex/vtracer">VTracer</a>, which creates a large-scale ⟨SVG, PVD⟩ paired dataset without any human annotation.
<!-- The <a href="https://huggingface.co/datasets/mikewang/PVD-160K">dataset</a> contains 160K instruction following instances on predicting PVD from SVG on randomly generated primitives. -->
See <a href="#svg_to_pvd_model_img">Figure 3</a> above on an input/output example.
During inference, as shown in the <a href="#method">Maze Solving example video</a>, we first decompose the input image into single SVG paths and then individually feed them into the SVG-to-PVD model.
</p>
</div>
<h3 class="title is-4">Zero-shot task generalization with off-the-shelf LLMs</h3>
<div class="content has-text-justified">
<p>
Given an unseen task, we first use our visual perception modules, as aformentioned, to generate a precise PVD perception of the input vector graphics.
We input the perception result into the prompt along with the task-specific instructions, and then feed it into an inference-only LLM or LMM reasoner.
We explore two variants of VDLM, namely <b>VDLM-txt</b> and <b>VDLM-mm</b>, depending on the type of reasoner applied. VDLM-txt leverages a text-only LLM as the reasoner and solely uses PVD to represent the visual information, whereas VDLM-mm leverages an multimodal LMM as the reasoner, which can additionally take the original image as visual input.
An example of the full input prompt and GPT-4 response of the 2×2 Maze Solving example can be viewed below.
</p>
</div>
<div class="collapsible-section">
<button class="button is-fullwidth toggle-section" aria-controls="mazeExample1">
<span>View Full Reasoning Results of the 2×2 Maze Solving Example from VDLM-txt with GPT-4</span>
<span class="icon is-small">
<i class="fas fa-angle-down" aria-hidden="true"></i>
</span>
</button>
<div id="mazeExample1" class="collapse-content">
<figure class="image">
<img src="static/images/maze_example_step1.png" alt="Maze Example Step 1" style="width: 100%;">
</figure>
<br>
<figure class="image">
<img src="static/images/maze_example_step2.png" alt="Maze Example Step 2" style="width: 100%;">
</figure>
<br>
<figure class="image">
<img src="static/images/maze_example_step3.png" alt="Maze Example Step 3" style="width: 100%;">
</figure>
</div>
</div>
</section>
<section class="section">
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column is-full-width">
<h2 class="title is-3">Performance</h2>
<h3 class="title is-4">Tasks</h3>
<div class="content has-text-justified">
<figure id="downstream_tasks_img">
<img src="static/images/downstream_tasks.png" alt="downstream tasks." class="downstream_tasks"/>
<figcaption><b>Figure 4:</b> Our full evaluation benchmark with a focus on <b>low-level visual reasoning</b> about vector graphics. We additionally include high-level reasoning tasks with rendered SVG images from VGBench-QA.
</figcaption>
</figure>
<p>
We construct an evaluation benchmark that comprises 9 tasks which cover important aspects of low-level visual perception and vision-language reasoning, including measurements, spatial relations, counting, logical reasoning, and complex reasoning problems. See <a href="#downstream_tasks_img">Figure 4</a> for the task examples. We additionally include a set of high-level tasks from VGBench to investigate the impact of VDLM on semantic-centric reasoning, which rarely require precise perception of the locations and measurements of the primitives.
</p>
<h3 class="title is-4">Results</h3>
<div class="content has-text-justified">
<figure id="results_img">
<img src="static/images/main_results.png" alt="results." class="results"/>
<figcaption><b>Figure 5:</b> Zero-shot accuracy on low-level visual reasoning tasks.</figcaption>
</figure>
<p>
VDLM-txt, even without access to the original image, outperforms strong LMMs such as <a href="https://openai.com/research/gpt-4v-system-card">GPT-4V</a>, highlighting the efficacy of the intermediate PVD representation for precise low-level perception and reasoning.
VDLM-mm significantly improves state-of-the-art LMMs, such as <a href="https://openai.com/index/gpt-4o-system-card/">GPT-4o</a>, on low-level reasoning tasks, while preserving their capabilities in high-level reasoning.
We observe that <a href="https://github.com/pipilurj/G-LLaVA">G-LLaVA</a>, a model demonstrating strong performance on geometric problems, such as MathVista, still struggles with understanding basic lines and angles, which are prerequisites for solving geometric math problems. This indicates that the QA performance on complex math problems does not necessarily reflect a faithful understanding of low-level visual concepts.
<!-- VDLM outperforms both open- and closed-source state-of-the-art Large Multimodal Models, including <a href="https://arxiv.org/abs/2310.03744">LLaVA-1.5</a> and <a href="https://openai.com/research/gpt-4v-system-card">GPT-4V</a>, demonstrating the effectiveness of its text-based, disentangled framework in achieving precise low-level perception and reasoning. -->
VDLM also outperforms previous visual programming methods, i.e., <a href="https://viper.cs.columbia.edu/">ViperGPT</a>, indicating that these models are limited by the capability of the vision-language processors, such as <a href="https://github.com/microsoft/GLIP">GLIP</a> and <a href="https://arxiv.org/abs/2301.12597">BLIP2</a>, especially in processing low-level primitives such as angles and shapes.
</p>
<h3 class="title is-4">Limitations</h3>
<p>
Although the PVD representation has already shown significant promise with a limited ontology and a fully synthesized training dataset, it is not
yet perfect when generalizing to diverse domains. In certain tasks, such as Shapeworld Spatial Reasoning, VDLM-mm brings negative impact to GPT-4o. The reason for this lies in the imperfect perception results from the SVG-to-PVD model. Future directions include building a more general PVD model that has a broader coverage of 2D concepts and can be extended to 3D and natural images. For detailed results and analysis, please refer to our <a href="https://arxiv.org/abs/2404.06479">paper</a>.
</p>
</div>
</section>
<section class="section">
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column is-full-width">
<h2 class="title is-3">Resources</h2>
<p>
💻 <b>Code:</b> <a href="https://github.com/MikeWangWZHL/VDLM">VDLM Code</a>
</p>
<p>
🍉 <b>Demo (Jupyter Notebook):</b> <a href="https://github.com/MikeWangWZHL/VDLM/blob/main/demo.ipynb">VDLM Demo</a>
</p>
<p>
🤗 <b>Pretrained SVG-to-PVD Model:</b> <a href="https://huggingface.co/mikewang/PVD-160k-Mistral-7b">PVD-160k-Mistral-7b</a>
</p>
<p>
🤗 <b>SVG-to-PVD Dataset:</b> <a href="https://huggingface.co/datasets/mikewang/PVD-160K">PVD-160K</a>
</p>
</div>
</section>
<section class="section" id="BibTeX">
<div class="container is-max-desktop content">
<h2 class="title">BibTeX</h2>
<pre><code>
@article{wang2024vdlm,
title={Visually Descriptive Language Model for Vector Graphics Reasoning},
author={Wang, Zhenhailong and Hsu, Joy and Wang, Xingyao and Huang, Kuan-Hao and Li, Manling and Wu, Jiajun and Ji, Heng},
journal={arXiv preprint arXiv:2404.06479},
year={2024}
}
</code></pre>
</div>
</section>
<footer class="footer">
<div class="container">
<!-- <div class="content has-text-centered">
<a class="icon-link"
href="">
<i class="fas fa-file-pdf"></i>
</a>
<a class="icon-link" href="https://github.com/mikewangwzhl" class="external-link" disabled>
<i class="fab fa-github"></i>
</a>
</div> -->
<div class="content has-text-centered">
<div class="columns is-centered">
<div class="column is-8">
<div class="content">
<!-- <p>
This website is licensed under a <a rel="license"
href="http://creativecommons.org/licenses/by-sa/4.0/">Creative
Commons Attribution-ShareAlike 4.0 International License</a>.
</p> -->
<p>
This website's template is borrowed from <a
href="https://github.com/nerfies/nerfies.github.io">nerfies</a>. We thank the authors for open-sourcing their code.
</p>
</div>
</div>
</div>
</div>
</footer>
</body>
</html>