Skip to main content
QUICK REVIEW

[Paper Review] Learning To Predict Vulnerabilities From Vulnerability-Fixes: A Machine Translation Approach

Aayush Garg, Renzo Degiovanni|arXiv (Cornell University)|Dec 21, 2020
Software Engineering ResearchComputer Science38 references5 citations
TL;DR

This paper proposes a machine translation-inspired encoder-decoder model that learns to predict software vulnerabilities by leveraging historical vulnerability fixes and their code context, automatically extracting latent features without manual feature engineering. Evaluated on Linux Kernel, OpenSSL, and Wireshark, the method achieves significantly higher performance—4.7 times better Matthews Correlation Coefficient (MCC)—than state-of-the-art techniques in realistic training settings.

ABSTRACT

Vulnerability prediction refers to the problem of identifying the system components that are most likely to be vulnerable based on the information gained from historical data. Typically, vulnerability prediction is performed using manually identified features that are potentially linked with vulnerable code. Unfortunately, recent studies have shown that existing approaches are ineffective when evaluated in realistic settings due to some unavoidable noise included in the historical data. To deal with this issue, we develop a prediction method using the encoder-decoder framework of machine translation that automatically learns the latent features (context, patterns, etc.) of code that are linked with vulnerabilities. The key idea of our approach is to learn from things we know, the past vulnerability fixes and their context. We evaluate our approach by comparing it with existing techniques on available releases of the three security-critical open source systems (Linux Kernel, OpenSSL, and Wireshark) with historical vulnerabilities that have been reported in the National Vulnerability Database (NVD). Our evaluation demonstrates that the prediction capability of our approach significantly outperforms the state-of-the-art vulnerability prediction techniques (Software Metrics, Imports, Function Calls, and Text Mining) in both recall and precision values (yielding 4.7 times higher MCC values) under realistic training setting.

Motivation & Objective

  • To address the limitations of existing vulnerability prediction techniques that rely on manually crafted features and are sensitive to noise in historical data.
  • To improve prediction performance in realistic settings where historical data contains unavoidable noise.
  • To develop an automated method that learns latent patterns from past vulnerability fixes and their surrounding code context.
  • To outperform state-of-the-art approaches such as Software Metrics, Imports, Function Calls, and Text Mining in both precision and recall.

Proposed method

  • The approach uses an encoder-decoder neural network architecture inspired by sequence-to-sequence models in machine translation.
  • The encoder processes the context of a vulnerability fix (e.g., surrounding code changes) to generate a contextual representation.
  • The decoder generates a prediction of whether a given code component is vulnerable, treating vulnerability prediction as a sequence generation task.
  • The model is trained end-to-end on historical vulnerability-fix pairs extracted from version control systems and NVD records.
  • The method automatically learns complex, latent features from code patterns and structural changes linked to vulnerabilities.
  • The framework is evaluated under realistic training conditions, simulating real-world deployment scenarios with noisy historical data.

Experimental results

Research questions

  • RQ1Can a machine translation-inspired model outperform traditional vulnerability prediction methods in realistic, noisy training environments?
  • RQ2To what extent can learning from past vulnerability fixes improve prediction accuracy compared to manually engineered features?
  • RQ3How does the proposed method perform in terms of precision, recall, and MCC compared to state-of-the-art techniques?
  • RQ4Can the model generalize across diverse, security-critical open-source systems like Linux Kernel, OpenSSL, and Wireshark?

Key findings

  • The proposed method achieved a 4.7 times higher Matthews Correlation Coefficient (MCC) than existing state-of-the-art techniques in realistic training settings.
  • The model demonstrated superior performance in both precision and recall across all three evaluated systems: Linux Kernel, OpenSSL, and Wireshark.
  • The approach significantly reduced reliance on manually crafted features, enabling automatic discovery of latent vulnerability patterns in code.
  • The encoder-decoder framework effectively captured contextual and structural patterns in code changes associated with vulnerabilities.
  • The model maintained high performance even when trained on noisy historical data, outperforming feature-based baselines under realistic conditions.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.