AskReference
ProcessAdvanced

How does V2W-BERT map CVEs to CWEs, and what role does the Reconstruction Decoder play?

V2W-BERT maps CVEs to CWEs by using a Siamese pair of BERT encoders to embed CVE and CWE descriptions into a shared space and treating the mapping as a link prediction problem. The Reconstruction Decoder takes the encoder's last hidden state, feeds it into a masked language model, and reconstructs masked tokens. By jointly optimizing link classification loss and reconstruction loss, it keeps link prediction from degrading the model's ability to preserve original textual context.

V2W-BERT is a transformer-based framework that formulates CVE-to-CWE mapping as link prediction. Its Siamese architecture uses two BERT encoders to embed CVE descriptions and CWE descriptions into a common semantic space. The link prediction component then establishes connections between a CVE and candidate CWEs, and this design works even when training examples are scarce or absent, making it effective for rare CWE classes. The Reconstruction Decoder receives the last hidden state from each BERT encoder after processing a CVE or CWE description. That hidden state is fed into a masked language head, which predicts masked tokens, and cross-entropy loss is used to minimize the gap between the original input and the reconstructed tokens. The LP and RD layers are trained concurrently by combining link classification loss with reconstruction loss, which lets V2W-BERT optimize link classification while preserving contextual integrity. V2W-BERT achieved up to 97% prediction accuracy for randomly partitioned data and up to 94% for temporally partitioned data in tests using vulnerability and weakness reports from MITRE and NVD.

Key points

  • V2W-BERT uses a Siamese network of BERT models to map CVEs to CWEs, framing the task as a link prediction problem.
  • The two BERT encoders embed CVE and CWE text into a shared semantic space so connections can be predicted between them.
  • The link prediction component links a CVE to available CWEs even with limited or nonexistent training instances, such as for rare CWE classes.
  • The Reconstruction Decoder feeds the BERT encoder's last hidden state into a masked language model and reconstructs masked tokens using cross-entropy loss.
  • Link prediction and the Reconstruction Decoder are trained jointly, combining link classification loss and reconstruction loss to maintain contextual integrity during updates.
  • V2W-BERT achieved up to 97% accuracy on randomly partitioned data and up to 94% on temporally partitioned data.
Source:AI for Cybersecurity_ Research and Practice· Generative AI for Advanced Cyber Defense· p. 153–157
Cover of AI for Cybersecurity_ Research and Practice

AI for Cybersecurity_ Research and Practice

Unknown

John Wiley & Sons, Inc.

View this ebook