Mobile telecommunication networks are foundational to global infrastructure and increasingly support critical sectors such as manufacturing, transportation, and healthcare. The security and reliability of these networks are essential, yet depend heavily on accurate modeling of underlying protocols through state machines. While most prior work constructs such models manually from 3GPP specifications, this process is labor-intensive, error-prone, and difficult to maintain due to the complexity and frequent updates of the specifications. Recent efforts using natural language processing have shown promise, but remain limited in handling the scale and intricacy of cellular protocols. In this work, we propose SpecGPT, a novel framework that leverages large language models (LLMs) to automatically extract protocol state machines from 3GPP documents. SpecGPT segments technical specifications into meaningful paragraphs, applies domain-informed prompting with chain-of-thought reasoning, and employs ensemble methods to enhance output reliability. We evaluate SpecGPT on three representative 5G protocols (NAS, NGAP, and PFCP) using manually annotated ground truth, and show that it outperforms existing approaches, demonstrating the effectiveness of LLMs for protocol modeling at scale.
翻译:移动通信网络是全球基础设施的基石,并日益支撑制造业、交通运输和医疗保健等关键领域。这些网络的安全性与可靠性至关重要,但其高度依赖于通过状态机对底层协议进行精确建模。尽管现有研究大多从3GPP规范手动构建此类模型,但由于规范本身的复杂性及频繁更新,该过程不仅劳动密集、容易出错,且难以维护。近期基于自然语言处理的研究虽展现出潜力,但在处理蜂窝协议的规模与复杂性方面仍存在局限。本研究提出SpecGPT——一种利用大语言模型从3GPP文档自动提取协议状态机的新型框架。SpecGPT将技术规范分割为语义段落,采用融合领域知识的思维链提示策略,并运用集成方法提升输出可靠性。我们在三个代表性5G协议(NAS、NGAP与PFCP)上使用人工标注基准进行评估,结果表明SpecGPT优于现有方法,证明了大语言模型在大规模协议建模中的有效性。