mlsanityData to 14 Oct 2026

Detecting Contaminated Code-Generation Prompt Batches via Influence Functions

arXiv 2608.14303 ↗First posted 14 Aug 2026cs.LGcited by 1

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) are increasingly used for code generation, yet they remain vulnerable to prompts that elicit insecure implementations. Existing defenses typically rely on predefined threat models or known vulnerability patterns, limiting their effectiveness against novel attacks. We propose CodeSIFT, a threat-model-agnostic detection method that leverages influence functions to identify batches of prompts that induce anomalous model behavior. Rather than detecting specific vulnerabilities, CodeSIFT measures the parameter-space influence of generated code and uses a statistical test to determine whether a candidate prompt set deviates from a benign reference distribution. To evaluate our approach, we introduce two benchmark datasets covering a variety of vulnerabilities. We evaluate CodeSIFT on three open-weight code LLMs ranging from 3B to 7B parameters, achieving AUROC scores of up to 0.98 at moderate-to-high injection rates, while maintaining well-calibrated false positive rates and substantially outperforming static analysis baselines. These results suggest that influence-function-based detection is a promising direction for identifying malicious code-generation prompts without requiring prior knowledge of the underlying attack class.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 22 of its 30 references that are in the map. First posted on arXiv 14 Aug 2026.

Builds on

22 of 30 references.

References · 22

  1. 2024Qwen2 Technical Reportcited by 2,120
  2. 2017Understanding Black-box Predictions via Influence Functionscited by 1,741
  3. 2024Qwen2.5-Coder Technical Reportcited by 1,203
  4. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  5. 2015Optimizing Neural Networks with Kronecker-factored Approximate Curvaturecited by 796
  6. 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 431
  7. 2023Studying Large Language Model Generalization with Influence Functionscited by 326
  8. 2020Influence Functions in Deep Learning Are Fragilecited by 252
  9. 2022Do Users Write More Insecure Code with AI Assistants?cited by 192
  10. 2022If Influence Functions are the Answer, Then What is the Question?cited by 144
  11. 2023Purple Llama CyberSecEval: A Secure Coding Benchmark for Language Modelscited by 138
  12. 2024AI Agents Under Threat: A Survey of Key Security Challenges and Future Pathwayscited by 127
10 more
  1. 2024Granite Code Models: A Family of Open Foundation Models for Code Intelligencecited by 117
  2. 2024GradSafe: Detecting Jailbreak Prompts for LLMs via Safety-Critical Gradient Analysiscited by 96
  3. 2024CyberSecEval 2: A Wide-Ranging Cybersecurity Evaluation Suite for Large Language Modelscited by 89
  4. 2023Kronecker-Factored Approximate Curvature for Modern Neural Network Architecturescited by 49
  5. 2023ASDL: A Unified Interface for Gradient Preconditioning in PyTorchcited by 21
  6. 2025PIShield: Detecting Prompt Injection Attacks via Intrinsic LLM Featurescited by 20
  7. 2023Structured Inverse-Free Natural Gradient: Memory-Efficient & Numerically-Stable KFACcited by 9
  8. 2025Beyond the Mean: Fisher-Orthogonal Projection for Natural Gradient Descent in Large Batch Trainingcited by 5
  9. 2026Infusion: Shaping Model Behavior by Editing Training Data via Influence Functionscited by 5
  10. 2026Runtime-Orchestrated Second-Order Optimization for Scalable LLM Trainingcited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.