用语法树掩码让大模型更准地把自然语言转成正确SQL,提升网络服务编排效率。
Structure-Aware NL-to-SQL for SFC Provisioning via AST-Masking Empowered Language Models
- 通过语法树掩码动态加权关键语法成分,引导模型学习结构化知识。
- FLAN-T5执行准确率达99.6%,Gemma提升超60个百分点至72.0%。
- 适合需要可解释、高效网络服务编排的系统设计与运维人员。
高效的服务功能链(SFC)编排需在动态且低延迟的网络中实现精准调度。强化学习虽具适应性,但常忽略结构化领域知识,限制泛化能力与可解释性。大语言模型(LLMs)可通过将自然语言(NL)规范转化为可执行的结构化查询语言(SQL)来弥补这一空白。然而,传统微调方法易导致语法不一致,生成低效查询。为此,本文提出抽象语法树(AST)掩码技术,利用SQL AST为关键组件赋权,实现无推理开销的语法感知微调。实验表明,该方法显著提升多模型的SQL生成准确性:FLAN-T5达到99.6%的执行准确率(EA),Gemma则从7.5%跃升至72.0%的绝对提升。结果验证了结构感知微调在确保语法正确性与查询效率方面的有效性,支持可解释的SFC编排。
原文摘要 · Abstract (English)
Effective Service Function Chain (SFC) provisioning requires precise orchestration in dynamic and latency-sensitive networks. Reinforcement Learning (RL) improves adaptability but often ignores structured domain knowledge, which limits generalization and interpretability. Large Language Models (LLMs) address this gap by translating natural language (NL) specifications into executable Structured Query Language (SQL) commands for specification-driven SFC management. Conventional fine-tuning, however, can cause syntactic inconsistencies and produce inefficient queries. To overcome this, we introduce Abstract Syntax Tree (AST)-Masking, a structure-aware fine-tuning method that uses SQL ASTs to assign weights to key components and enforce syntax-aware learning without adding inference overhead. Experiments show that AST-Masking significantly improves SQL generation accuracy across multiple language models. FLAN-T5 reaches an Execution Accuracy (EA) of 99.6%, while Gemma achieves the largest absolute gain from 7.5% to 72.0%. These results confirm the effectiveness of structure-aware fine-tuning in ensuring syntactically correct and efficient SQL generation for interpretable SFC orchestration.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。