Code Vulnerability Detection via Nearest Neighbor Mechanism (2022.findings-emnlp)
Copied to clipboard
| Challenge: | Existing methods to learn code semantics from source code are difficult to identify. |
| Approach: | They propose a method which retrieves multiple neighbor samples and utilizes label information to provide help for model predictions. |
| Outcome: | Extensive experiments show that the proposed method can achieve obvious performance improvements compared to baseline models. |
Similar Papers
Contrastive Learning-Enhanced Nearest Neighbor Mechanism for Multi-Label Text Classification (2022.acl-short)
Copied to clipboard
| Challenge: | Existing methods for multi-label text classification neglect the knowledge from the existing similar instances when predicting labels of a specific text. |
| Approach: | They propose a k nearest neighbor mechanism which retrieves several neighbor instances and interpolates the model output with their labels. |
| Outcome: | Extensive experiments show that the proposed method can bring significant performance improvements to multiple MLTC models including state-of-the-art pretrained and non-pretrained ones. |
Joint Geometrical and Statistical Domain Adaptation for Cross-domain Code Vulnerability Detection (2023.emnlp-main)
Copied to clipboard
| Challenge: | Existing approaches to detect code vulnerability are limited by labeled training data on target domains. |
| Approach: | They propose a cross-domain code vulnerability detection framework called MNCRI . they propose mutual nearest neighbor contrastive learning to align the source and target domains . |
| Outcome: | The proposed framework outperforms state-of-the-art methods in cross-domain code vulnerability detection tasks. |
Tighter Clusters, Safer Code? Improving Vulnerability Detection with Enhanced Contrastive Loss (2025.naacl-srw)
Copied to clipboard
| Challenge: | a recent study shows that supervised contrastive learning (SCL) improves embedding separation but struggles with intra-class clustering . code vulnerability detection is a cornerstone of software security, especially as the world undergoes rapid digitization. |
| Approach: | They propose an extension of SCL with a distance-based regularization term that tightens intra-class clustering while maintaining inter-class separation. |
| Outcome: | The proposed method improves F1 score on CodeBERT and GraphCodeBERT with BCE, BCE + SCL, and BCE+ CESCL. |
Applying Contrastive Learning to Code Vulnerability Type Classification (2024.emnlp-main)
Copied to clipboard
| Challenge: | Recent approaches to classification of vulnerabilities ignore their relationships and treat each class in isolation, resulting in non-scalable code vector representations. |
| Approach: | They propose a hierarchical contrastive learning framework to bring vector representations of related CWEs closer together and use max-pooling to enable the model to handle longer vulnerability code inputs. |
| Outcome: | The proposed framework outperforms state-of-the-art methods by 2.97%-17.90% on accuracy and 0.98%-22.27% on weighted-F1 with even better performance on higher-quality datasets. |
CLeVeR: Multi-modal Contrastive Learning for Vulnerability Code Representation (2025.findings-acl)
Copied to clipboard
| Challenge: | Existing methods for detecting code capture the overall semantics of the code rather than its intrinsic vulnerability-specific semantics. |
| Approach: | They propose an approach that leverages contrastive learning to generate precise vulnerability code representations under the supervision of vulnerability descriptions. |
| Outcome: | The proposed approach outperforms state-of-the-art methods in vulnerability detection tasks by 11.85% and 13.61%. |
Generalization-Enhanced Code Vulnerability Detection via Multi-Task Instruction Fine-Tuning (2024.findings-acl)
Copied to clipboard
| Challenge: | Existing CodePre-trained models struggle to generalize due to superficial mapping from source code to labels instead of understanding the root causes of code vulnerabilities. |
| Approach: | They propose a framework that integrates multi-task learning with Large Language Models to effectively mine deep-seated vulnerability features. |
| Outcome: | The proposed framework surpasses seven state-of-the-art models in effectiveness, generalization, and robustness. |
Contrastive Code Representation Learning (2021.emnlp-main)
Copied to clipboard
| Challenge: | Recent work learns contextual representations of source code by reconstructing tokens from their context. |
| Approach: | They propose a contrastive pre-training task that learns code functionality, not form . they propose scalable compilers that can generate variants of a program . |
| Outcome: | The proposed task outperforms RoBERTa on an adversarial code clone detection benchmark by 39% AUROC. |
Expose Backdoors on the Way: A Feature-Based Efficient Defense against Textual Backdoor Attacks (2022.findings-emnlp)
Copied to clipboard
| Challenge: | Existing online backdoor defense methods for NLP models focus on anomalies at input or output level, causing fragility to adaptive attacks and high computational cost. |
| Approach: | They propose a feature-based online defense method to detect poisoned samples . they use a distance-based anomaly score to distinguish poisones from clean samples based on feature-level regularization . |
| Outcome: | The proposed method outperforms existing methods in sentiment analysis and offense detection tasks. |
Contrastive Data and Learning for Natural Language Processing (2022.naacl-tutorials)
Copied to clipboard
| Challenge: | Current NLP models heavily rely on effective representation learning algorithms. |
| Approach: | This tutorial introduces contrastive learning and provides an introduction to the techniques. |
| Outcome: | This tutorial provides an introduction to the fundamentals of contrastive learning approaches and the theory behind them. |
Addressing Leakage in Self-Supervised Contextualized Code Retrieval (2022.coling-1)
Copied to clipboard
| Challenge: | a recent study addresses the use of contextualized code retrieval to fill gaps in a partial input program. |
| Approach: | They propose a self-supervised approach to contextualized code retrieval . they propose mutual identifier masking, dedentation, and the selection of syntax-aligned targets . |
| Outcome: | The proposed approach improves retrieval substantially and yields state-of-the-art results for code clone and defect detection. |