Anúncio

NexTalk

Automatize a primeira resposta. Mantenha o toque humano.

Chat ao vivo com agentes de IA no seu modelo e na sua chave de API, com passagem para a sua equipe.

Começar grátis

SEEK: Agentic Knowledge Graph Retrieval for Secure Code Generation

arXiv AI Papersen

1mês

Idade

Publicado
Coletado

Large Language Models (LLMs) can generate functionally correct code while introducing exploitable security weaknesses, particularly when developers specify functionality without explicit security requirements. Recent state-of-the-art approaches mitigate this problem using external security knowledge, but largely rely on flat similarity-based retrieval over independent artifacts, making it difficult to infer the relevant vulnerability space and retrieve targeted knowledge when direct matches are unavailable. We propose SEEK, an agentic Graph RAG framework for secure code generation that constructs a security knowledge graph using the Common Weakness Enumeration (CWE) taxonomy as its structural backbone and injects it with curated real-world CVE vulnerability-fix instances. At inference time, a Planner Agent predicts potential CWE weaknesses associated with the developer query, which guide Graph Scoping to restrict retrieval to relevant regions of the CWE taxonomy before deterministic multi-faceted candidate ranking. A Selection Agent subsequently validates the predicted weaknesses and retrieved candidates prior to code generation. Across five open-source LLMs, we evaluate SEEK in an out-of-distribution setting on CodeGuard+ and CyberSecEval, spanning C, C++, and Python. SEEK achieves the highest SecurePass@1 of 77.45% on CodeGuard+ and the highest aggregate ICD pass rate of 79.45% on CyberSecEval, surpassing prior approaches. Moreover, SEEK achieves 85.2% SecurePass@1 across 13 unseen CWE types with no directly linked vulnerability-fix instances, demonstrating strong generalizability, while maintaining acceptable inference latency costs.

Autores

Varun Gadey, Markus Tohn, Lichao Wu, Ahmad-Reza Sadeghi, Alexandra Dmitrienko

Categorias

  • cs.CR
  • cs.LG
Leia o artigo completo em arxiv.org

O overfeed.news indexa e aponta. Publicamos um trecho curto — o artigo completo fica em arXiv AI Papers.

Entre para seguir esta fonte
arXiv AI Papers

Distilling Model-Inherent Reasoning Circuit for Large Language Models

Knowledge Distillation (KD) is widely adopted to compress Large Language Models (LLMs) by aligning the output distributions of teacher model and student model. However, output matching alone does not explicitly characterize the internal computations reflecting the teacher's reasoning capability, and directly aligning the representations of paired Transformer components risks disrupting the student's intrinsic reasoning pattern. To address these limitations, we propose model-inherent Reasoning Circuit Distillation (RCD). RCD characterizes model-inherent reasoning patterns as critical circuits formed by Transformer edges, with a separate circuit identified for each model using Edge Attribution Patching with Integrated Gradients. Subsequently, to transfer the teacher's reasoning capability, RCD aligns the predictive effects of both circuits by matching the logit variations induced by circuit attenuation. Theoretically, we establish guarantees for recovering the ground-truth reasoning circuits and show that the empirical RCD loss controls the population discrepancy in predictive effects between the ground-truth circuits of the teacher model and the student model. Experiments on mathematical reasoning and code generation show that RCD consistently outperforms state-of-the-art KD methods.

en
arXiv AI Papers

PQCImplement-Bench: Evaluating LLMs on Implementing NIST Post-Quantum Standards in Production Cryptographic Libraries

A large-scale quantum computer would break the public-key cryptography that protects today's communications, and NIST has standardized ML-KEM, ML-DSA, and SLH-DSA (FIPS 203-205) as replacements that cryptographic libraries must implement. It remains unexplored whether coding agents can turn such a standard into a working and conforming patch for an existing library. This paper presents PQCImplement-Bench, a benchmark comprising 15 tasks derived from 14 pull requests across nine repositories and seven programming languages, each pairing a pre-change repository snapshot with a reviewed specification of requirements and interfaces. The benchmark grades patches with two independent test oracles that separate correctness within the repository from conformance to the standard. One oracle consists of relevant repository tests, and the other consists of NIST validation vectors for each standard. We evaluate three models, GPT-6.1-Sol, Kimi K3.1 Pro, and GLM-5.3-FlashX in OpenHands. Given only the problem statement, GPT-6.1-Sol reaches a mean pass rate of 29.0% on the validation vectors and 18.9% on repository tests. With the interface specification added, the pass rate for GPT-6.1-Sol rises to 100%, while Kimi K3.1 Pro reaches 55.8% and GLM-5.3-FlashX 6.7%. On the repository tests, the three models reach mean pass rates of 93.7%, 52.4%, and 0.0%. We release the dataset and evaluation framework for future research.

en

Mixing Expertise with Confidence: A Mixture of Experts Framework for Robust Multi-Modal Continual Learning

The Mixture of Experts (MoE) framework is widely used in continual learning to mitigate catastrophic forgetting. MoEs typically combine a small inter-task shared parameter space with largely independent expert parameters. However, as the number of tasks increases, the shared space becomes a bottleneck, reintroducing forgetting, while fully independent experts require explicit task ID predictors (e.g., routers), adding complexity. In this work, we eliminate the inter-task shared parameter space and the need for a task ID predictor by enabling expert communication and allowing knowledge to be shared dynamically, akin to human collaboration. We bridge the inter-expert knowledge sharing by leveraging the open-set learning capabilities of a multimodal foundation model (e.g., CLIP), thereby providing "expert priors" that bolster each expert's task-specific representations. Guided by these priors, experts learn calibrated inter-task posteriors. Additionally, multivariate Gaussians over the learned posteriors promote complementary specialization among experts. We propose new evaluation benchmarks that simulate realistic continual learning scenarios, and our prior-conditioned strategy consistently outperforms existing methods across diverse settings without relying on reference datasets or replay memory.

en

Domain-Adapted Stable Diffusion for Mask-Guided Residential Landscape Inpainting: A Small-Data Case Study

Text-guided diffusion models can generate convincing outdoor scenes, but redesigning the garden in a photograph of a real home requires two things that general-purpose models do not provide by default: familiarity with landscaping vocabulary (decking, stone pathways, hedging, raised planters) and strict preservation of everything outside the region being redesigned. We study a simple recipe that targets both. We briefly fine-tune the U-Net of Stable Diffusion 2 on 433 captioned landscaping images, keeping the autoencoder and text encoder frozen, and use the resulting checkpoint for mask-guided latent editing in which only a user-painted ground region is regenerated. We analyze 46 edits of 10 residential photographs produced in 11 exploratory sessions with recorded seeds and sampler settings. Because no ground-truth redesigns exist, we use reference-free measurements: the pipeline leaves pixels outside the estimated edit region unchanged (median PSNR 56.3 dB, mean SSIM 0.998); the edit boundary carries no more edge energy than the original photograph (seam ratio 0.94 vs. 0.96); different seeds give visibly different layouts; and the magnitude of change is consistent with the denoising strength, as expected from SDEdit-style editing. We also show observed failure cases, including an ignored negation and an overly literal rendering of a prompt phrase.

en
SEEK: Agentic Knowledge Graph Retrieval for Secure Code…