arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.12295cs.CR
收藏

基于联邦学习和嵌入的NLP分类的LLM隐私保护型提示注入检测

Privacy-Preserving Prompt Injection Detection for LLMs Using Federated Learning and Embedding-Based NLP Classification

Wayamba University of Sri Lanka(斯里兰卡瓦亚姆巴大学)

Hasini Jayathilaka

AI总结:

针对LLM提示注入攻击检测需集中数据导致隐私风险的问题,提出基于联邦学习和嵌入分类的隐私保护检测框架,通过联邦逻辑回归模型实现与集中式相当的检测性能且无需暴露原始数据。

摘要:

提示注入攻击是大型语言模型(LLMs)面临的新兴威胁,恶意用户可通过精心设计的输入操纵输出。现有检测方法常需集中提示数据,存在重大隐私风险。本文提出基于联邦学习和嵌入分类的隐私保护型提示注入检测框架:将良性与对抗性提示的精选数据集编码为句子嵌入,用于训练集中式和联邦式逻辑回归模型;联邦方法仅在客户端间共享模型参数以保护隐私,同时检测性能与集中式训练相当。结果表明,无需暴露原始数据即可实现有效检测,是LLM联邦安全的首批探索之一。尽管数据集规模有限,但该框架为构建安全且隐私感知的LLM系统提供了方向。

英文摘要:

Prompt injection attacks are an emerging threat to large language models (LLMs), enabling malicious users to manipulate outputs through carefully designed inputs. Existing detection approaches often require centralizing prompt data, creating significant privacy risks. This paper proposes a privacy-preserving prompt injection detection framework based on federated learning and embedding-based classification. A curated dataset of benign and adversarial prompts was encoded with sentence embedding and used to train both centralized and federated logistic regression models. The federated approach preserved privacy by sharing only model parameters across clients, while achieving detection performance comparable to centralized training. Results demonstrate that effective prompt injection detection is feasible without exposing raw data, making this one of the first explorations of federated security for LLMs. Although the dataset is limited in scale, the findings establish a strong proof-of-concept and highlight new directions for building secure and privacy-aware LLM systems.

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

↑