mlsanityData to 26 Nov 2026

When Models Know but Can't Linearly Say: Relational Encoding Limits Linear Vulnerability Classification in Code LLMs

arXiv 2610.27257 ↗Submitted 19 Oct 2026cs.CR cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

Large language models can detect vulnerable code, yet the form of vulnerability encoding in their representations remains unclear. We analyze 8 code models spanning 6.7B-15B parameters on C programs using three datasets (DELTASECOMMITS, SVEN, and PRECISE-BUGS), comparing two diagnostic tasks on the same representations: identifying what patterns the code instantiates, and determining whether it is vulnerable. Models encode the first with high fidelity. Under the studied paired C-code datasets and linear-probing setup, vulnerability information is more accessible as a paired relational signal-whether code A is riskier than code B-than as a globally separable categorical label. This structural difference has implications for classification: the model reliably ranks which code is riskier but standard classifiers on isolated samples achieve limited accuracy because vulnerable and secure samples form overlapping distributions in representation space.

Key facts. No citing papers in the map yet (data through 26 Nov 2026). Builds on 31 of its 48 references that are in the map. Submitted 19 Oct 2026.

Builds on

31 of 48 references.

References · 31

  1. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,494
  2. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,872
  3. 2022Locating and Editing Factual Associations in GPTcited by 2,951
  4. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,243
  5. 2016Understanding intermediate layers using linear classifier probescited by 1,541
  6. 2019BERT Rediscovers the Classical NLP Pipelinecited by 1,106
  7. 2019Designing and Interpreting Probes with Control Taskscited by 736
  8. 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 603
  9. 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 287
  10. 2023Large Language Models for Code: Security Hardening and Adversarial Testingcited by 165
  11. 2024Vulnerability Detection with Code Language Models: How Far Are We?cited by 162
  12. 2023LLMs Cannot Reliably Identify and Reason About Security Vulnerabilities (Yet?): A Comprehensive Evaluation, Framework, and Benchmarkscited by 103
19 more
  1. 2023A Survey of Large Language Models for Code: Evolution, Benchmarking, and Future Trendscited by 75
  2. 2025CWEval: Outcome-driven Evaluation on Functionality and Security of LLM Code Generationcited by 71
  3. 2023Understanding the Effectiveness of Large Language Models in Detecting Security Vulnerabilitiescited by 65
  4. 2023Data Quality for Software Vulnerability Datasetscited by 55
  5. 2025LLMs in Software Security: A Survey of Vulnerability Detection Techniques and Insightscited by 51
  6. 2023ChatGPT for Vulnerability Detection, Classification, and Repair: How Far Are We?cited by 45
  7. 2024Constrained Decoding for Secure Code Generationcited by 42
  8. 2022Transformer-Based Language Models for Software Vulnerability Detectioncited by 41
  9. 2025Representation Bending for Large Language Model Safetycited by 31
  10. 2024SecCoder: Towards Generalizable and Robust Secure Code Generationcited by 18
  11. 2025KV Cache Steering for Controlling Frozen LLMscited by 18
  12. 2023Enhancing Large Language Models for Secure Code Generation: A Dataset-driven Study on Vulnerability Mitigationcited by 17
  13. 2023SecureFalcon: Are We There Yet in Automated Software Vulnerability Detection with LLMs?cited by 15
  14. 2025A Mixture of Linear Corrections Generates Secure Codecited by 10
  15. 2025A Systematic Literature Review on Detecting Software Vulnerabilities with Large Language Modelscited by 10
  16. 2025On LLMs' Internal Representation of Code Correctnesscited by 9
  17. 2026Weight Updates as Activation Shifts: A Principled Framework for Steeringcited by 9
  18. 2023PreciseBugCollector: Extensible, Executable and Precise Bug-fix Collectioncited by 4
  19. 2025Refactoring Detection in C++ Programs with RefactoringMiner++cited by 2

Built on by

Not cited yet.