On Extracting Specialized Code Abilities from Large Language Models: A Feasibility Study
Not on the map. Why?
Abstract (arXiv)
Recent advances in large language models (LLMs) significantly boost their usage in software engineering. However, training a well-performing LLM demands a substantial workforce for data collection and annotation. Moreover, training datasets may be proprietary or partially open, and the process often requires a costly GPU cluster. The intellectual property value of commercial LLMs makes them attractive targets for imitation attacks, but creating an imitation model with comparable parameters still incurs high costs. This motivates us to explore a practical and novel direction: slicing commercial black-box LLMs using medium-sized backbone models. In this paper, we explore the feasibility of launching imitation attacks on LLMs to extract their specialized code abilities, such as"code synthesis" and "code translation." We systematically investigate the effectiveness of launching code ability extraction attacks under different code-related tasks with multiple query schemes, including zero-shot, in-context, and Chain-of-Thought. We also design response checks to refine the outputs, leading to an effective imitation training process. Our results show promising outcomes, demonstrating that with a reasonable number of queries, attackers can train a medium-sized backbone model to replicate specialized code behaviors similar to the target LLMs. We summarize our findings and insights to help researchers better understand the threats posed by imitation attacks, including revealing a practical attack surface for generating adversarial code examples against LLMs.
Key facts. Cited by 13 papers in the map (data through 7 Oct 2026). First posted on arXiv 6 Mar 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 2; 2024: 5; 2025: 4; 2026: 2.
13 papers.
Sort:
By area:
- 2025Large Language Model Agent: A Survey on Methodology, Applications and Challengescited by 194
- 2023Split and Merge: Aligning Position Biases in LLM-based Evaluatorscited by 71
- 2023Towards Better Chain-of-Thought Prompting Strategies: A Surveycited by 62
- 2024SelfDefend: LLMs Can Defend Themselves against Jailbreaking in a Practical Mannercited by 57
- 2024Large Model Based Agents: State-of-the-Art, Cooperation Paradigms, Security and Privacy, and Future Trendscited by 26
- 2024LLMs Can Defend Themselves Against Jailbreaking in a Practical Manner: A Vision Papercited by 9
- 2024"Yes, My LoRD." Guiding Language Model Extraction with Locality Reinforced Distillationcited by 5
- 2025TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Frameworkcited by 1
- 2026AI Security in the Foundation Model Era: A Comprehensive Survey from a Unified Perspectivecited by 1
- 2024Stealing the Invisible: Unveiling Pre-Trained CNN Models through Adversarial Examples and Timing Side-Channelscited by 0
- 2025Simple and Effective Baselines for Code Summarisation Evaluationcited by 0
- 2025Rethinking and Exploring String-Based Malware Family Classification in the Era of LLMs and RAGcited by 0
1 more
- 2026JudgeStealer: Extracting LLM Judging Capabilities across Evaluation Protocols27 Aug 2026
- 2026AI Security in the Foundation Model Era: A Comprehensive Survey from a Unified Perspective25 Mar 2026
- 2025TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Framework20 Oct 2025
- 2025Rethinking and Exploring String-Based Malware Family Classification in the Era of LLMs and RAG5 Jul 2025
- 2025Simple and Effective Baselines for Code Summarisation Evaluation26 May 2025
- 2025Large Language Model Agent: A Survey on Methodology, Applications and Challenges27 Mar 2025
- 2024Large Model Based Agents: State-of-the-Art, Cooperation Paradigms, Security and Privacy, and Future Trends22 Sep 2024
- 2024"Yes, My LoRD." Guiding Language Model Extraction with Locality Reinforced Distillation4 Sep 2024
- 2024SelfDefend: LLMs Can Defend Themselves against Jailbreaking in a Practical Manner8 Jun 2024
- 2024LLMs Can Defend Themselves Against Jailbreaking in a Practical Manner: A Vision Paper24 Feb 2024
- 2024Stealing the Invisible: Unveiling Pre-Trained CNN Models through Adversarial Examples and Timing Side-Channels19 Feb 2024
- 2023Towards Better Chain-of-Thought Prompting Strategies: A Survey8 Oct 2023
1 more
- 2026AI Security in the Foundation Model Era: A Comprehensive Survey from a Unified Perspective25 Mar 2026
- 2024SelfDefend: LLMs Can Defend Themselves against Jailbreaking in a Practical Manner8 Jun 2024
- 2024LLMs Can Defend Themselves Against Jailbreaking in a Practical Manner: A Vision Paper24 Feb 2024
- 2023Split and Merge: Aligning Position Biases in LLM-based Evaluatorscited by 71
- 2024Large Model Based Agents: State-of-the-Art, Cooperation Paradigms, Security and Privacy, and Future Trendscited by 26
- 2024"Yes, My LoRD." Guiding Language Model Extraction with Locality Reinforced Distillationcited by 5
- 2025TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Frameworkcited by 1
- 2024Stealing the Invisible: Unveiling Pre-Trained CNN Models through Adversarial Examples and Timing Side-Channelscited by 0
- 2025Simple and Effective Baselines for Code Summarisation Evaluationcited by 0
- 2025Rethinking and Exploring String-Based Malware Family Classification in the Era of LLMs and RAGcited by 0
- 2026JudgeStealer: Extracting LLM Judging Capabilities across Evaluation Protocolscited by 0
- 2026JudgeStealer: Extracting LLM Judging Capabilities across Evaluation Protocols27 Aug 2026
- 2025TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Framework20 Oct 2025
- 2025Rethinking and Exploring String-Based Malware Family Classification in the Era of LLMs and RAG5 Jul 2025
- 2025Simple and Effective Baselines for Code Summarisation Evaluation26 May 2025
- 2024Large Model Based Agents: State-of-the-Art, Cooperation Paradigms, Security and Privacy, and Future Trends22 Sep 2024
- 2024"Yes, My LoRD." Guiding Language Model Extraction with Locality Reinforced Distillation4 Sep 2024
- 2024Stealing the Invisible: Unveiling Pre-Trained CNN Models through Adversarial Examples and Timing Side-Channels19 Feb 2024
- 2023Split and Merge: Aligning Position Biases in LLM-based Evaluators29 Sep 2023
Similar, not cited
Close in wording, no citation either way
- 2023Towards Understanding the Capability of Large Language Models on Code Clone Detection: A Survey
- 2025Trust Me, I Know This Function: Hijacking LLM Static Analysis using Bias
- 2025When Code Crosses Borders: A Security-Centric Study of LLM-based Code Translation ↗
- 2025ImpossibleBench: Measuring LLMs' Propensity of Exploiting Test Cases
- 2025A Systematic Study of Code Obfuscation Against LLM-based Vulnerability Detection
- 2025Evaluating the Generalization Capabilities of Large Language Models on Code Reasoning
- 2024Code-Switching Red-Teaming: LLM Evaluation for Safety and Multilingual Understanding
- 2026Are you Synthesizing or Recalling? Evaluating LLMs on Algorithmic Code Retrieval