LLM API calls are becoming a ubiquitous program construct, yet they create a boundary that no existing program analysis can cross: runtime values enter a natural-language prompt, undergo opaque processing inside the LLM, and re-emerge as code, SQL, JSON, or text that the program consumes. Every analysis that tracks data across function boundaries, including taint analysis, program slicing, dependency analysis, and change-impact analysis, relies on dataflow summaries of callee behavior. LLM calls have no such summaries, breaking all of these analyses at what we call the NL/PL boundary. We present the first information flow method to bridge this boundary. Grounded in quantitative information flow theory, our taxonomy defines 24 labels along two orthogonal dimensions: information preservation level (from lexically preserved to fully blocked) and output modality (natural language, structured format, executable artifact). We label 9,083 placeholder-output pairs from 4,154 real-world Python files and validate reliability with Cohen's $κ= 0.82$ and near-complete coverage (0.01\% unclassifiable). We demonstrate the taxonomy's utility on two downstream applications: (1)~a two-stage taint propagation pipeline combining taxonomy-based filtering with LLM verification achieves $F_1 = 0.923$ on 353 expert-annotated pairs, with cross-language validation on six real-world OpenClaw prompt injection cases further confirming effectiveness; (2)~taxonomy-informed backward slicing reduces slice size by a mean of 15\% in files containing non-propagating placeholders. Per-label analysis reveals that four blocked labels account for nearly all non-propagating cases, providing actionable filtering criteria for tool builders.


翻译:LLM API调用正成为普遍存在的程序构造,但它们创建了一个现有程序分析无法跨越的边界:运行时值进入自然语言提示,在LLM内部经过不透明处理,然后重新以程序消费的代码、SQL、JSON或文本形式出现。每个跨函数边界跟踪数据的分析(包括污点分析、程序切片、依赖分析和变更影响分析)都依赖被调用行为的数据流摘要。LLM调用缺乏此类摘要,使得所有这些分析在我们所称的"自然语言/编程语言边界"处失效。我们提出了首个跨越这一边界的信息流方法。基于量化信息流理论,我们的分类法沿两个正交维度定义了24个标签:信息保留程度(从词汇保留到完全阻断)和输出模态(自然语言、结构化格式、可执行产物)。我们从4154个真实世界Python文件中标注了9083对占位符-输出对,并通过Cohen's κ=0.82和近乎完全的覆盖率(0.01%无法分类)验证了可靠性。我们在两个下游应用中展示了该分类法的实用性:(1)一个结合分类法过滤与LLM验证的两阶段污点传播管道,在353个专家标注对上达到F1=0.923,对六个真实世界OpenClaw提示注入案例的跨语言验证进一步确认了有效性;(2)基于分类法的后向切片将包含非传播占位符的文件的切片大小平均缩减15%。逐标签分析表明,四个阻断标签几乎涵盖了所有非传播情况,为工具构建者提供了可行的过滤标准。

0
下载
关闭预览

相关内容

LLM/智能体作为数据分析师:综述
专知会员服务
38+阅读 · 2025年9月30日
利用多个大型语言模型:关于LLM集成的调研
专知会员服务
35+阅读 · 2025年2月27日
《大型语言模型代码生成》综述
专知会员服务
70+阅读 · 2024年6月4日
自然语言生成资源列表
专知
17+阅读 · 2020年1月4日
自然语言处理NLP之旅(NLP文章/代码集锦)
自然语言处理精品资料
人工智能前沿讲习班
14+阅读 · 2019年3月13日
自然语言处理常见数据集、论文最全整理分享
深度学习与NLP
11+阅读 · 2019年1月26日
自然语言处理(NLP)数据集整理
论智
20+阅读 · 2018年4月8日
从语言学到深度学习NLP,一文概述自然语言处理
人工智能学家
13+阅读 · 2018年1月28日
Natural 自然语言处理(NLP)「全解析」
人工智能学家
14+阅读 · 2017年9月23日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
1+阅读 · 49分钟前
定向能反无人机系统最新发展动态
专知会员服务
3+阅读 · 今天13:50
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
2+阅读 · 今天13:33
相关资讯
自然语言生成资源列表
专知
17+阅读 · 2020年1月4日
自然语言处理NLP之旅(NLP文章/代码集锦)
自然语言处理精品资料
人工智能前沿讲习班
14+阅读 · 2019年3月13日
自然语言处理常见数据集、论文最全整理分享
深度学习与NLP
11+阅读 · 2019年1月26日
自然语言处理(NLP)数据集整理
论智
20+阅读 · 2018年4月8日
从语言学到深度学习NLP,一文概述自然语言处理
人工智能学家
13+阅读 · 2018年1月28日
Natural 自然语言处理(NLP)「全解析」
人工智能学家
14+阅读 · 2017年9月23日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员