-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
670 lines (612 loc) · 25.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
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="Interaction2Code: Benchmarking MLLM-based Interactive Webpage Code Generation from Interactive Prototyping">
<meta name="keywords" content="Main, Web, GPT-4">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Interaction2Code</title>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-PYVRSFMDRL"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-PYVRSFMDRL');
</script>
<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/icon.png">
<!-- <style>
pre {
white-space: pre-wrap;
word-wrap: break-word;
}
table {
width: 50%; /* 设置表格宽度 */
border-collapse: collapse; /* 合并表格边框 */
}
th, td {
border: 1px solid black; /* 设置边框样式 */
padding: 8px; /* 设置单元格内边距 */
text-align: center; /* 设置文本对齐方式 */
}
th {
background-color: #f2f2f2; /* 设置表头背景颜色 */
}
</style> -->
<style>
table {
width: 100%;
border-collapse: collapse;
font-family: Arial, sans-serif;
}
th {
background-color: #f5f5f5;
text-align: left;
padding: 8px;
border-bottom: 2px solid #ddd;
}
td {
padding: 8px;
border-bottom: 1px solid #ddd;
}
tr:nth-child(even) {
background-color: #f9f9f9;
}
.model-name {
font-weight: 500;
}
.score {
text-align: right;
}
.date {
background-color: #333;
color: white;
padding: 2px 6px;
border-radius: 4px;
font-size: 0.9em;
}
.check {
color: #28a745;
}
.tabs {
margin-bottom: 20px;
}
.tab {
padding: 8px 16px;
border: none;
background: none;
cursor: pointer;
}
.tab.active {
border-bottom: 2px solid #0366d6;
color: #0366d6;
}
</style>
<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>
</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">Interaction2Code: Benchmarking MLLM-based Interactive Webpage Code Generation from Interactive Prototyping
</h1>
<div class="is-size-5 publication-authors">
<span class="author-block">
<a href="https://whalexiao.github.io/
">Jingyu Xiao</a><sup>1</sup>,</span>
<span class="author-block">
<a href="https://yxwan123.github.io/
">Yuxuan Wan</a><sup>1</sup>,</span>
<span class="author-block">
<a href="https://yintonghuo.github.io/
">Yintong Huo</a><sup>2</sup>,
</span>
<span class="author-block">
Zixin Wang<sup>1</sup>,
</span>
<span class="author-block">
Xinyi Xu</a><sup>1</sup>,
</span>
<span class="author-block">
<a href="https://jarviswang94.github.io/
">Wenxuan Wang</a><sup>1</sup>,
</span>
<span class="author-block">
Zhiyao Xu</a><sup>3</sup>,
</span>
<span class="author-block">
Yuhang Wang</a><sup>4</sup>,
</span>
<span class="author-block">
<a href="https://www.cse.cuhk.edu.hk/lyu/home
">Michael R.Lyu</a><sup>1</sup>
</span>
</div>
<div class="is-size-5 publication-authors">
<span class="author-block"><sup>1</sup>The Chinese University of Hong Kong,</span><br />
<span class="author-block"><sup>2</sup>Singapore Management University,</span><br />
<span class="author-block"><sup>3</sup>Tsinghua Shenzhen International Graduate School,</span><br />
<span class="author-block"><sup>4</sup>Southwest University</span>
</div>
<div class="column has-text-centered">
<div class="publication-links">
<!-- PDF Link. -->
<!-- <span class="link-block">
<a href="https://arxiv.org/pdf/2011.12948" 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/2411.03292" 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>
<span class="link-block">
<a href="https://github.com/WebPAI/Interaction2Code"
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>
<span class="link-block">
<a href="https://huggingface.co/datasets/whale99/Interaction2Code"
class="external-link button is-normal is-rounded is-dark">
<!-- <span class="icon">
<i class="fab fa-file-pdf"></i>
</span> -->
<span>😁 Data</span>
</a>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<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>
Multimodal Large Language Models (MLLMs) have demonstrated remarkable performance on the design-to-code task, i.e., generating UI code from UI mock-ups. However, existing benchmarks only contain static web pages for evaluation and ignore the dynamic interaction, limiting the practicality, usability and user engagement of the generated webpages.
To bridge these gaps, we present the first systematic investigation of MLLMs in generating interactive webpages. Specifically, we formulate the Interaction-to-Code task and establish the Interaction2Code benchmark, encompassing <b>127</b> unique webpages and <b>374</b> distinct interactions across <b>15</b> webpage types and <b>31</b> interaction categories. Through comprehensive experiments utilizing state-of-the-art (SOTA) MLLMs, evaluated via both automatic metrics and human assessments, we identify four critical limitations of MLLM on Interaction-to-Code task: (1) inadequate generation of interaction compared with full page, (2) prone to ten types of failure, (3) poor performance on visually subtle interactions, and (4) insufficient undestanding on interaction when limited to single-modality visual descriptions. To address these limitations, we propose four enhancement strategies: Interactive Element Highlighting, Failureaware Prompting (FAP), Visual Saliency Enhancement, and Visual-Textual Descriptions Combination, all aiming at improving MLLMs’ performance on the Interaction-toCode task. The Interaction2Code benchmark and code are available in https://github. com/WebPAI/Interaction2Code.
</p>
</div>
</div>
</div>
<!--/ Abstract. -->
</div>
</section>
<section class="section">
<div class="container is-max-desktop">
<div class="columns is-centered has-text-centered">
<div class="column is-four-fifths">
<h2 class="title is-3">Dataset Examples</h2>
<div class="content has-text-justified">
<p>We show the comparison between UI2Code benchmark and our Interaction2Code benchmark. UI2Code benchmark only contains the static webpage, whereas Interaction2Code contains interactive webpage, which is represented by interactive prototyping.</p>
<img src="./static/images/benchmark.png" class="example-image" alt="Example image."/>
</div>
</div>
</div>
</section>
<section class="section">
<div class="container is-max-desktop">
<!-- Overall -->
<br />
<div style="text-align:center">
<h2 class="title is-3">Overall Architecture</h2>
</div>
<div class="content has-text-justified">
<!-- <br><br/> -->
<p></p>
<!-- <p>
After training the main model through a warm-up, we use the proposed risk hedging process to only select confident samples to train SplitNet.
With SplitNet, we obtain clean probability and split confidence, and with this information, we train the main model through SSL.
Loss distribution generated by the main model is used in risk hedging.
The main model and SplitNet can be alternately improved through this iterative process.
</p> -->
</div>
<div class="columns is-centered">
<img style='height: auto; width: 90%; object-fit: contain' src="static/images/overview.png"
alt="overview_image">
</div>
</secton>
<section class="section">
<div class="container is-max-desktop">
<!-- Overall -->
<br />
<div style="text-align:center">
<h2 class="title is-3">Leaderboard</h2>
</div>
<div class="content has-text-justified">
<table border="2">
<!-- <caption>Performance of different MLLMs under different prompts on \task task.</caption> -->
<thead>
<!-- <tr>
<th rowspan="2">Model</th>
<th rowspan="2">Prompt</th>
<th colspan="5">Interaction Part</th>
</tr> -->
<tr>
<th>Model</th>
<th>Prompt</th>
<th>CLIP</th>
<th>SSIM</th>
<th>Text</th>
<th>Position</th>
<th>Implement Rate</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="4">Qwen2.5-vl-3B-instruct</td>
<td>Direct</td>
<td>0.2100</td>
<td>0.1531</td>
<td>0.0415</td>
<td>0.2090</td>
<td>0.3449</td>
</tr>
<tr>
<td>CoT</td>
<td>0.1219</td>
<td>0.0894</td>
<td>0.0352</td>
<td>0.1212</td>
<td>0.1979</td>
</tr>
<tr>
<td>Mark</td>
<td>0.1706</td>
<td>0.1188</td>
<td>0.0514</td>
<td>0.1706</td>
<td>0.2647</td>
</tr>
<tr>
<td>Average</td>
<td>0.1675</td>
<td>0.1204</td>
<td>0.0427</td>
<td>0.1669</td>
<td>0.2692</td>
</tr>
<tr>
<td rowspan="4">Qwen2.5-vl-7B-instruct</td>
<td>Direct</td>
<td>0.3230</td>
<td>0.2177</td>
<td>0.0952</td>
<td>0.2529</td>
<td>0.4786</td>
</tr>
<tr>
<td>CoT</td>
<td>0.2806</td>
<td>0.1981</td>
<td>0.0744</td>
<td>0.2259</td>
<td>0.4305</td>
</tr>
<tr>
<td>Mark</td>
<td>0.3541</td>
<td>0.2468</td>
<td>0.1348</td>
<td>0.2798</td>
<td>0.5267</td>
</tr>
<tr>
<td>Average</td>
<td>0.3192</td>
<td>0.2209</td>
<td>0.1015</td>
<td>0.2529</td>
<td>0.4786</td>
</tr>
<tr>
<td rowspan="4">Qwen2.5-vl-72B-instruct</td>
<td>Direct</td>
<td>0.4624</td>
<td>0.3207</td>
<td>0.2450</td>
<td>0.3950</td>
<td>0.6524</td>
</tr>
<tr>
<td>CoT</td>
<td>0.5090</td>
<td>0.3692</td>
<td>0.2376</td>
<td>0.4385</td>
<td>0.7380</td>
</tr>
<tr>
<td>Mark</td>
<td>0.4992</td>
<td>0.3621</td>
<td>0.2995</td>
<td>0.4541</td>
<td>0.7112</td>
</tr>
<tr>
<td>Average</td>
<td>0.4902</td>
<td>0.3507</td>
<td>0.2607</td>
<td>0.4292</td>
<td>0.7005</td>
</tr>
<tr>
<td rowspan="4">Gemini-1.5-flash</td>
<td>Direct</td>
<td>0.4737</td>
<td>0.3616</td>
<td>0.2809</td>
<td>0.4320</td>
<td>0.6738</td>
</tr>
<tr>
<td>CoT</td>
<td>0.5093</td>
<td>0.3854</td>
<td>0.3217</td>
<td>0.4511</td>
<td>0.7112</td>
</tr>
<tr>
<td>Mark</td>
<td>0.5194</td>
<td>0.3898</td>
<td>0.3454</td>
<td>0.4612</td>
<td>0.7326</td>
</tr>
<tr>
<td>Average</td>
<td>0.5008</td>
<td>0.3789</td>
<td>0.3160</td>
<td>0.4481</td>
<td>0.7059</td>
</tr>
<tr>
<td rowspan="4">GPT-4o-20240806</td>
<td>Direct</td>
<td>0.5605</td>
<td>0.4149</td>
<td>0.3590</td>
<td>0.4888</td>
<td>0.7754</td>
</tr>
<tr>
<td>CoT</td>
<td>0.5234</td>
<td>0.4013</td>
<td>0.3663</td>
<td>0.4668</td>
<td>0.7273</td>
</tr>
<tr>
<td>Mark</td>
<td>0.5955</td>
<td>0.4488</td>
<td>0.4474</td>
<td>0.5225</td>
<td>0.8128</td>
</tr>
<tr>
<td>Average</td>
<td>0.5598</td>
<td><b>0.4217</b></td>
<td>0.3909</td>
<td>0.4927</td>
<td>0.7718</td>
</tr>
<tr>
<td rowspan="4">Claude-3.5-Sonnet-20240620</td>
<td>Direct</td>
<td>0.5674</td>
<td>0.4209</td>
<td>0.3833</td>
<td>0.5123</td>
<td>0.7914</td>
</tr>
<tr>
<td>CoT</td>
<td>0.5606</td>
<td>0.4005</td>
<td>0.3662</td>
<td>0.5085</td>
<td>0.7727</td>
</tr>
<tr>
<td>Mark</td>
<td>0.5944</td>
<td>0.4282</td>
<td>0.4319</td>
<td>0.5149</td>
<td>0.7968</td>
</tr>
<tr>
<td>Average</td>
<td><b>0.5742</b></td>
<td>0.4165</td>
<td><b>0.3938</b></td>
<td><b>0.5119</b></td>
<td><b>0.7870</br></td>
</tr>
</tbody>
</table>
</div>
</secton>
<section class="section">
<div class="container is-max-desktop">
<!-- Overall -->
<br />
<div style="text-align:center">
<h2 class="title is-3">Human Evaluation</h2>
</div>
<div class="content has-text-justified">
<!-- <br><br/> -->
<p></p>
</div>
<div class="columns is-centered">
<img style='height: auto; width: 90%; object-fit: contain' src="static/images/human_eval.png"
alt="human_eval">
</div>
</secton>
<section class="section">
<div class="container is-max-desktop">
<!-- Overall -->
<br />
<div style="text-align:center">
<h2 class="title is-3">Failure Type Description</h2>
</div></br>
<div style="text-align:left">
<h2 class="title is-5">Failure on Interactive Elements</h2>
</div></br>
<div class="content has-text-justified">
<!-- <br><br/> -->
<p>
(a) <b>Interactive element missing</b>: MLLMs do not generate interactive elements. As shown in Figure (a), there is a chat button in the upper right corner of the reference web page. When clicked, a chat window pops up. However, there is no such button in the generated web page, and users cannot perform any operation.
</br>
(b) <b>No interaction</b>: There is no interaction in the generated webpage. As shown in Figure (b), clicking button M in the original webpage will switch to the information of size "M". However, clicking "M" button in the generated, there is no change of the size information. It should be noted here that sometimes the lack of interaction does not result in the unavailability of functions. For example, suppose a web page contains a menu bar that can display detailed information after clicking. If MLLM does not achieve the click effect, but has displayed the detailed menu information, it does not affect the functionality of the web page.
</br>
(c) <b>Wrong interactive element</b>: MLLMs implement the interactive function on the wrong element. As shown in Figure (c), in the original webpage, after clicking "I'm donating on behalf of a company or organisation", two input boxes will appear. However, in the generated webpage, the input box will only appear after clicking "I' like to add 0.00 to my donation to cover any fees."
</br>
(d) <b>Wrong type of interactive element</b>: The types of interactive elements generated by MLLM are wrong. As shown in Figure (d), the element for adjusting the price in the original web page is of input type, while the element for adjusting the price in the generated web page is of progress type.
</br>
(e) <b>Wrong position of interactive element</b>: The interactive elements generated by MLLM are positioned incorrectly. As shown in Figure (e), the button in the original webpage is in the upper right corner of the image, while the generated button is below the image.</p>
</div>
<div class="columns is-centered">
<img style='height: auto; width: 90%; object-fit: contain' src="static/images/failure_type1.png"
alt="failure_type1">
</div>
<div style="text-align:left">
<h2 class="title is-5">Failure on Interactive Effects</h2>
</div></br>
<div class="content has-text-justified">
<!-- <br><br/> -->
<p>
(f) <b>Wrong position after interaction</b>: The interactive effects generated by MLLM are in the wrong position. As shown in Figure (f), after clicking the dialogue button, the pop-up window is displayed in the lower left corner of the reference webpage, but appears in the middle of the generated webpage.
</br>
(g) <b>Wrong type of interaction effects</b>: As shown in Figure (g), in the reference webpage, the element that appears after clicking select is of option type, but in the generated web page, the element that appears is of text type.
</br>
(h) <b>Effect on wrong elemen</b>t: MLLMs achieve the effect of interaction on the wrong elements. As shown in Figure (h), in the reference webpage, after clicking the "dark" button, the background color of the web page turns black. However, in the generated web page, after clicking the "dark" button, the block turns black and the background does not change.
</br>
(i) <b>Partial Implementation</b>: MLLMs only implement a part of the interactive functionality. As shown in Figure (i), in the reference webpage, after clicking the select button, the button will become selected, and will return to its original state when clicked again. However, in the generated web page, the button can only be selected but not unselected.
</br>
(j) <b>Wrong function</b>: MLLM implements the wrong function. As shown in Figure (j), in the original webpage, clicking the button will cause a date selection box to appear, but in the generated webpage, clicking the button will generate a date display box.
<p>
</div>
<div class="columns is-centered">
<img style='height: auto; width: 90%; object-fit: contain' src="static/images/failure_type2.png"
alt="failure_type2">
</div>
</secton>
<section class="section">
<div class="container is-max-desktop">
<!-- Overall -->
<br />
<div style="text-align:center">
<h2 class="title is-3">Failure Distribution</h2>
</div>
<div class="content has-text-justified">
<p></p>
</div>
<div class="columns is-centered">
<img style='height: auto; width: 90%; object-fit: contain' src="static/images/failure_dis1.png"
alt="failure_dis1">
</div>
<div class="columns is-centered">
<img style='height: auto; width: 90%; object-fit: contain' src="static/images/failure_dis2.png"
alt="failure_dis2">
</div>
<div class="columns is-centered">
<img style='height: auto; width: 90%; object-fit: contain' src="static/images/failure_dis3.png"
alt="failure_dis3">
</div>
</secton>
<section class="section" id="BibTeX">
<div class="container is-max-desktop content">
<h2 class="title">BibTeX</h2>
<pre><code>
@article{xiao2024interaction2code,
title={Interaction2Code: Benchmarking MLLM-based Interactive Webpage Code Generation from Interactive Prototyping},
author={Jingyu Xiao and Yuxuan Wan and Yintong Huo and Zixin Wang and Xinyi Xu and Wenxuan Wang and Zhiyao Xu and Yuhang Wang and Michael R. Lyu},
journal={arXiv preprint arXiv:2411.03292},
year={2025}
}
</code></pre>
</div>
</section>
<footer class="footer">
<div class="container">
<div class="content has-text-centered">
<!-- <a class="icon-link" href="./static/videos/nerfies_paper.pdf">
<i class="fas fa-file-pdf"></i>
</a> -->
<a class="icon-link" href="https://github.com/Brian-Lei-XIA" class="external-link" disabled>
<i class="fab fa-github"></i>
</a>
</div>
<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 means you are free to borrow the <a href="https://github.com/nerfies/nerfies.github.io">source
code</a> of this website,
we just ask that you link back to this page in the footer.
Please remember to remove the analytics code included in the header of the website which
you do not want on your website.
</p>
</div>
</div>
</div>
</div>
</footer>
</body>
<script>
function changeContent() {
const dropdown = document.getElementById("dropdown");
const selected = dropdown.value;
const sections = ["baseline", "morse-code", "caesar", "unicode", "selfcipher-en", "selfcipher-zh"];
sections.forEach((section) => {
document.getElementById(section).style.display = (section === selected) ? "block" : "none";
});
}
</script>
</html>