arXiv Machine Learning

The Range Shrinks, the Threat Remains: Re-evaluating LLM Package Hallucinations on the 2026 Frontier-Model Cohort

arXiv:2605. 17062v3 Announce Type: replace-cross Abstract: Spracklen et al.

arXiv AI
Aug 26

Names Can Hurt: Spotting Slopsquatting Risks Caused by Package Name Hallucinations in Local Coding LLMs

The paper introduces a two‑layer detector to prevent ‘slopsquatting’—the risk of local coding LLMs fabricating Python package names that adversaries can pre‑register on PyPI. The first layer checks PyPI for existence, while the second uses a Random Forest classifier on ten name‑and‑metadata features; an import reconciler resolves naming mismatches. Embedded in a LangGraph state machine, the system retries at escalating temperatures and falls back to stronger models, achieving hallucination‑free code in 76% of 300 curated prompts and recovering additional runs through intra‑ and cross‑model retries.

By Akash Raj, Sargam Sahu
arXiv AI
Sep 18

Closed-World Resolution Against Tool Hallucination in LLM Agents

The paper investigates a new failure mode of tool‑augmented large language model agents: calling non‑existent tools with arguments that do not match any declared schema. It introduces a five‑class taxonomy of tool hallucination, presents a training‑free closed‑world resolver that checks registry membership and signatures, and demonstrates that hallucinations persist across ten hosted models and various invocation surfaces, including the Model Context Protocol. The authors release a Hallucinated‑Tools Benchmark to enable comparison of resolver methods.

By Laxmipriya Ganesh Iyer
arXiv AI
Jun 11

Are Frontier LLMs Ready for Cybersecurity? Evidence for Vertical Foundation Models from Dual-Mode Vulnerability Benchmarks

arXiv:2605. 23243v2 Announce Type: replace-cross Abstract: We evaluate whether frontier LLMs are ready for cybersecurity through a dual-mode benchmark: white-box function-level vulnerability detection (VulnLLM-R, across C/Java/Python) and black-box web application security testing (five production-style applications with 118 ground-truth vulnerabilities across 20+ CWE families, which we will open-source).

By Vivek Dahiya, Sunny Nehra, Vipul Dholariya, Bhavik Shangari, Chandra Khatri
arXiv AI
Aug 25

Evaluating Inference-Time Defenses Against Package Hallucination in LLM-Generated Code

The paper investigates how large language models (LLMs) hallucinate nonexistent software packages during code generation and evaluates methods to mitigate this issue. It finds that current evaluation practices overestimate hallucination rates, especially for Python, and that Retrieval-Augmented Generation (RAG) and Self-Refine reduce hallucinations across multiple models and languages. The study also introduces Package Utility (PU) to measure whether defenses preserve useful recommendations and shows that Greedy decoding offers the best trade‑off between mitigation and utility, while adversarial prompts significantly increase hallucination rates, particularly in Ruby.

By Alberick Euraste Djire, Iyiola E. Olatunji, Melissa Tessa, Earl T. Barr, Jacques Klein, Tegawend\'e F. Bissyand\'e
arXiv Machine Learning
Sep 7

Harmless Yet Harmful: Neutral Prompting Attacks for Stealthy Hallucination Steering in Agent Skills

The paper introduces the Neutral Prompting Attack (NPA), a stealthy method that uses semantically benign instructions to increase the likelihood of large language models hallucinating non‑existent package names in coding agents. Unlike traditional dependency steering, NPA does not target a specific package but shifts the model’s output toward more speculative names. Experiments across multiple LLMs show that NPA raises hallucination rates, affects pip install success, alters the distribution of hallucinated packages, and bypasses existing static‑analysis, LLM‑based, and agent‑based defenses.

By Chia-Yi Hsu, Chia-Mu Yu, Chun-Ying Huang, Jun Sakuma
arXiv AI
1d ago

Automatic Detection of LLM-Generated Code: A Comparative Case Study of Contemporary Models Across Function and Class Granularities

The study evaluates how well large language models (LLMs) can be detected when they generate code, comparing GPT‑3.5, Claude 3 Haiku, Claude Haiku 4.5, and GPT‑OSS across function‑ and class‑level code. Using 14,485 functions and 11,913 classes from CodeSearchNet, the authors trained CatBoost classifiers with interpretable software metrics and found that granularity (function vs. class) has a far greater impact on detection than the specific model, with function‑level detection dominated by GPT‑3.5 and class‑level detection dominated by the newer models. SHAP analysis revealed that the Comment‑to‑Code Ratio is the only universal feature, yet its importance varies widely among models, explaining why detectors trained on one LLM often fail on others.

By Musfiqur Rahman, SayedHassan Khatoonabadi, Ahmad Abdellatif, Emad Shihab
arXiv Machine Learning
Sep 10

VEX-Bench: Benchmarking LLM Agents for Assessing Exploitability of Software Supply Chain Vulnerabilities

arXiv:2609.08040v1 Announce Type: cross Abstract: The software supply chain has become an increasingly exposed attack surface because of its reliance on intricate yet fragile dependencies. Existing d...

By Jiahao Shi, Edward Tsien, Yifeng Di, Hongjiao Zhang, Yuan Tang, Ronit Dey, Ilona Shishov, Gal Netanel, Zvi Grinberg, Vladimir Belousov, Bat-Zion Rotman, Ilan Pinto, Tianyi Zhang
arXiv AI
Oct 31

How Deterministic SAST and AI Security Agents Divide the Work: Coverage, Harness Policy and Cost in Snyk VulnBench 2.0

The study compares deterministic static application security testing (SAST) with AI-powered coding agents and security harnesses on the VulnBench 2.0 benchmark, which contains 108 curated vulnerabilities across 20 open‑source web applications. Nine productized configurations—including Snyk Code, Claude Code, Codex Security, and DeepSec—were evaluated under a blind protocol, with Snyk Code achieving 82.4% macro recall and Claude Code 79.3%. Together, the AI configurations identified 101 of the 108 vulnerabilities, surpassing any single tool, and also uncovered seven additional real vulnerabilities not present in the reference set, highlighting the complementary strengths of AI harnesses and deterministic SAST.

By Liran Tal, Chris Liu, Charlotte Fereday, Sebastian Roth, Brian Clark