mlsanityData to 7 Oct 2026

SWaRL: Safeguard Code Watermarking via Reinforcement Learning

arXiv 2601.02602 ↗First posted 5 Jan 2026cs.CR cs.LGcited by 0

Not on the map. Why?

Abstract (arXiv)

We present SWaRL, a robust and fidelity-preserving watermarking framework designed to protect the intellectual property of code LLMs by embedding unique and verifiable signatures in the generated program. Existing watermarking approaches either rely on handcrafted code transformations or manipulate token generation probabilities at inference time, making them vulnerable to removal attacks or prone to breaking functional correctness. To address these challenges, SWaRL employs a reinforcement learning-based co-training framework that uses compiler feedback for functional correctness and a jointly trained confidential verifier as a reward signal to maintain watermark detectability. Furthermore, SWaRL employs low-rank adaptation (LoRA) during fine-tuning, enabling efficient integration of watermarking behavior and transferability across model updates. Extensive experiments show that SWaRL achieves strong watermark detection accuracy compared to prior methods while fully maintaining watermarked code functionality. Moreover, SWaRL exhibits strong resilience against refactoring and adversarial transformation attacks, which maintains reliable attribution without substantial computational overhead.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 24 of its 28 references that are in the map. First posted on arXiv 5 Jan 2026.

Builds on

24 of 28 references.

References · 24

  1. 2022Training language models to follow instructions with human feedbackcited by 15,712
  2. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  4. 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
  5. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  6. 2024Qwen2.5 Technical Reportcited by 4,713
  7. 2021Program Synthesis with Large Language Modelscited by 3,509
  8. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  9. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  10. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  11. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  12. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
12 more
  1. 2023A Watermark for Large Language Modelscited by 667
  2. 2023Robust Distortion-free Watermarks for Language Modelscited by 279
  3. 2022Few-shot training LLMs for project-specific code-summarizationcited by 128
  4. 2024OpenCoder: The Open Cookbook for Top-Tier Code Large Language Modelscited by 127
  5. 2023The Science of Detecting LLM-Generated Textscited by 126
  6. 2023Who Wrote this Code? Watermarking for Code Generationcited by 116
  7. 2022Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproductioncited by 110
  8. 2021Leveraging Automated Unit Tests for Unsupervised Code Translationcited by 82
  9. 2023What Makes Good In-context Demonstrations for Code Intelligence Tasks with LLMs?cited by 47
  10. 2023LLM for Test Script Generation and Migration: Challenges, Capabilities, and Opportunitiescited by 19
  11. 2023Towards Code Watermarking with Dual-Channel Transformationscited by 9
  12. 2024Efficient and Universal Watermarking for LLM-Generated Code Detectioncited by 5

Built on by

Not cited yet.