Automated front-end engineering drastically reduces development cycles and minimizes manual coding overhead. While Generative AI has shown promise in translating designs to code, current solutions often produce monolithic scripts, failing to natively support modern ecosystems like React, Vue, or Angular. Furthermore, the generated code frequently suffers from poor modularity, making it difficult to maintain. To bridge this gap, we introduce Modular Layout Synthesis (MLS), a hierarchical framework that merges visual understanding with structural normalization. Initially, a visual-semantic encoder maps the screen capture into a serialized tree topology, capturing the essential layout hierarchy. Instead of simple parsing, we apply heuristic deduplication and pattern recognition to isolate reusable blocks, creating a framework-agnostic schema. Finally, a constraint-based generation protocol guides the LLM to synthesize production-ready code with strict typing and component props. Evaluations show that MLS significantly outperforms existing baselines, ensuring superior code reusability and structural integrity across multiple frameworks


翻译:自动化前端工程能大幅缩短开发周期并减少手动编码开销。尽管生成式人工智能在将设计转换为代码方面展现出潜力,但现有方案通常生成单一化脚本,无法原生支持如React、Vue或Angular等现代生态系统。此外,生成代码常存在模块化程度低的问题,导致维护困难。为弥补这一缺陷,我们提出模块化布局合成(MLS)——一种融合视觉理解与结构规范化的层次化框架。该框架首先通过视觉语义编码器将屏幕截图映射为序列化的树状拓扑结构,以捕捉核心布局层次。我们采用启发式去重与模式识别技术替代简单解析,从而隔离可复用区块并创建框架无关的范式。最后,基于约束的生成协议引导大语言模型合成具备严格类型与组件属性的生产级代码。评估结果表明,MLS在多个框架中显著超越现有基线,确保了卓越的代码可复用性与结构完整性。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
AI生成代码缺陷综述
专知会员服务
16+阅读 · 2025年12月8日
【CVPR2025】基于组合表示移植的图像编辑方法
专知会员服务
8+阅读 · 2025年4月5日
【AAAI2025】TimeDP:通过领域提示学习生成多领域时间序列
【NeurIPS2024】IPO: 面向视觉-语言模型的可解释提示优化
专知会员服务
22+阅读 · 2024年10月23日
使用 Keras Tuner 调节超参数
TensorFlow
15+阅读 · 2020年2月6日
如何使用自然语言工具包(NLTK)在Python3中执行情感分析
Python程序员
21+阅读 · 2019年10月28日
LibRec 每周算法:LDA主题模型
LibRec智能推荐
29+阅读 · 2017年12月4日
Spark机器学习:矩阵及推荐算法
LibRec智能推荐
16+阅读 · 2017年8月3日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员