arXiv:2604.09442cs.CL2026-04被引 1

提出UIPress,用光学压缩技术高效生成代码,提速近10倍且质量更高。

UIPress: Bringing Optical Token Compression to UI-to-Code Generation

论文配图:UIPress: Bringing Optical Token Compression to UI-to-Code Generation
图 1 · 摘自论文原文
  • 在视觉编码器后加入轻量压缩模块,将6700个视觉标记压缩至256个
  • 在Design2Code上达到0.8127的CLIP分数,比未压缩基线高7.5%
  • 适合需要快速生成代码的开发者工具和低延迟应用

UI-to-Code生成需将单张截图转换为数千个结构化HTML/CSS标记,视觉标记效率至关重要。现有压缩方法或依赖无关任务启发式选择,或仅置零低注意力特征,无法真正缩短预填充延迟,也难以适应界面截图中信息密度不均的问题。光学(编码器侧学习)压缩在文档OCR中表现优异,但尚未应用于该任务。本文提出UIPress,一个插入Qwen3-VL-8B冻结ViT编码器与LLM解码器之间的轻量级学习压缩模块。UIPress结合深度可分离卷积、元素引导的空间重加权及Transformer精炼,将约6,700个视觉标记压缩至固定256个。配合解码器上的低秩适配(LoRA)弥补表征差距,整体仅增加约2170万参数(占80亿基模型的0.26%)。在相同基模型下与四个基线公平比较,在Design2Code上,256标记的UIPress达到0.8127的CLIP分数,比未压缩基线提升7.5%,比最强的推理时方法提升4.6%,同时实现9.1倍的首次令牌生成速度提升。据我们所知,UIPress是首个用于该任务的编码器侧学习压缩方法。

原文摘要 · Abstract (English)

UI-to-Code generation requires vision-language models (VLMs) to produce thousands of tokens of structured HTML/CSS from a single screenshot, making visual token efficiency critical. Existing compression methods either select tokens at inference time using task-agnostic heuristics, or zero out low-attention features without actually shortening the sequence -- neither truly reduces prefill latency or adapts to the non-uniform information density of UI screenshots. Meanwhile, optical (encoder-side learned) compression has shown strong results for document OCR, yet no prior work has adapted this paradigm to UI-to-Code generation. We propose UIPress, a lightweight learned compression module inserted between the frozen ViT encoder and the LLM decoder of Qwen3-VL-8B. UIPress combines depthwise-separable convolutions, element-guided spatial reweighting, and Transformer refinement to compress ${\sim}$6{,}700 visual tokens to a fixed budget of 256. Together with Low-Rank Adaptation (LoRA) on the decoder to bridge the representation gap, the entire system adds only ${\sim}$21.7M trainable parameters (0.26\% of the 8B base model). Under a fair comparison on the same base model against four baselines on Design2Code, UIPress at 256 tokens achieves a CLIP score of 0.8127, outperforming the uncompressed baseline by +7.5\% and the strongest inference-time method by +4.6\%, while delivering 9.1$\times$ time-to-first-token speedup. To the best of our knowledge, UIPress is the first encoder-side learned compression method for the UI-to-Code task.

UI生成视觉压缩代码生成轻量化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。