arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2503.10310cs.SEcs.LG
收藏

捕获基于机器学习系统的语义流

Capturing Semantic Flow of ML-based Systems

KAIST(韩国科学技术院);Chalmers University(查尔姆斯理工大学)

Shin Yoo, Robert Feldt, Somin Kim, Naryeong Kim

AI总结:

本文提出语义流及语义流图,通过结合控制流与 DNN、LLM 智能体执行中的内部状态,捕获 ML 系统隐藏决策,以支撑传统动态分析迁移。

摘要:

基于机器学习(ML)的系统是集成了深度神经网络(DNN)或大型语言模型(LLM)等机器学习组件的软件系统。尽管此类系统实现了高性能计算机视觉、自然语言处理和代码生成等先进功能,但其内部行为在测试等传统动态分析面前仍基本不透明:现有分析通常只关注从外部可观察到的内容,例如输入相似性或类别标签变化。我们提出语义流这一概念,旨在捕获基于 ML 系统的内部行为,并为改造传统动态分析技术以适用于此类系统提供平台。语义流将控制流思想与基于 ML 系统执行过程中获得的内部状态相结合,例如 DNN 中特定层的激活值,或 LLM 智能体在特定推理步骤中 LLM 响应的嵌入。由此产生的表示被概括为语义流图,能够捕获在基于 ML 系统的传统控制流中未显式表示的内部决策。我们提出语义流思想,介绍分别使用 DNN 和 LLM 智能体的两个示例,并最后概述其性质,以及如何利用它改造现有动态分析技术,使其用于基于 ML 的软件系统。

英文摘要:

ML-based systems are software systems that incorporates machine learning components such as Deep Neural Networks (DNNs) or Large Language Models (LLMs). While such systems enable advanced features such as high performance computer vision, natural language processing, and code generation, their internal behaviour remain largely opaque to traditional dynamic analysis such as testing: existing analysis typically concern only what is observable from the outside, such as input similarity or class label changes. We propose semantic flow, a concept designed to capture the internal behaviour of ML-based system and to provide a platform for traditional dynamic analysis techniques to be adapted to. Semantic flow combines the idea of control flow with internal states taken from executions of ML-based systems, such as activation values of a specific layer in a DNN, or embeddings of LLM responses at a specific inference step of LLM agents. The resulting representation, summarised as semantic flow graphs, can capture internal decisions that are not explicitly represented in the traditional control flow of ML-based systems. We propose the idea of semantic flow, introduce two examples using a DNN and an LLM agent, and finally sketch its properties and how it can be used to adapt existing dynamic analysis techniques for use in ML-based software systems.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑