<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <issn pub-type="ppub">1613-0073</issn>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Aspect Prediction for Silent Vulnerability Fixes via Semantic Augmentation</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Dongshun He</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Linyi Han</string-name>
          <email>hanly2@tju.edu.cn</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Xiaowang Zhang</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Workshop</string-name>
        </contrib>
        <contrib contrib-type="editor">
          <string-name>Silent Vulnerability Fixes, Key Aspect Prediction, Semantic Augmentation, Large Language Model</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>College of Intelligence and Computing, Tianjin University</institution>
          ,
          <addr-line>Tianjin, 300350</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2025</year>
      </pub-date>
      <fpage>2</fpage>
      <lpage>6</lpage>
      <abstract>
        <p>Silent vulnerability fixes pose significant risks to downstream open-source software (OSS) users, as the lack of vulnerability details in fix patches leaves users unaware of potential threats. Previous work predicts the key aspects of vulnerability fixes using an encoder-decoder model to aid users in understanding these fixes. However, their approach overlooks the limited expressiveness of commit messages and the varied intents underlying code changes. In this poster, we propose a semantic-augmented method for key aspect prediction in silent vulnerability fixes. Firstly, we enrich commit semantics by incorporating information from multiple external sources. Then, we design a Chain-of-Thought (CoT) prompt to analyze code semantics at the hunk level and identify security-relevant changes. Finally, we design a task-specific embedding method to represent code difs and retrieve semantically similar commits, guiding large language models (LLMs) to predict the vulnerability type, root cause, impact, and attack vector. Experiments on our constructed dataset demonstrate that our method outperforms baselines in key aspect prediction across ROUGE-L and METEOR.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>CEUR</p>
      <p>ceur-ws.org</p>
      <p>Commit
Commit Message</p>
      <p>Code Diff
Commit</p>
      <p>Wikipedia</p>
      <p>Software background
Github RESTAPI</p>
      <p>Pul request
Regular expression</p>
      <p>Issue
Hunk1
incorporating information from multiple external sources. Then, we design a CoT prompt to analyze
code semantics at the hunk level, enabling the identification of security-relevant changes within
mixedpurpose commits. Finally, we design a task-specific embedding method to represent complex code
difs and retrieve semantically similar commits. These retrieved examples are combined with enriched
commit messages and code dif analysis to guide LLMs in predicting the vulnerability type, root cause,
impact, and attack vector.</p>
      <p>We construct a large-scale dataset comprising 10,912 vulnerability-fixing commits and their
corresponding key aspects, covering 3,575 open-source projects and 9,586 CVE records. This dataset is
available at https://doi.org/10.6084/m9.figshare.29693216.v1.</p>
      <p>Experimental results on our constructed dataset show that the proposed method outperforms baselines
in key aspect prediction, achieving higher scores on ROUGE-L and METEOR.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Approach</title>
      <p>Our task is to predict four key aspects of a vulnerability—its type, root cause, impact, and attack
vector—given a vulnerability-fixing commit that includes a commit message and code dif. In this
section, we present our semantic-augmented prediction framework, which consists of three components:
(1) enriching the semantics of commit messages using external sources, (2) analyzing code difs at
the hunk level via CoT prompting, and (3) retrieving semantically similar commits with task-specific
embedding method. The results from all three components are integrated to guide LLMs in predicting
the vulnerability aspects.The overall framework is illustrated in Figure 1.</p>
      <sec id="sec-2-1">
        <title>2.1. Semantic Enrichment of Commit Messages</title>
        <p>
          Commit messages in silent vulnerability fixes are often terse and uninformative, making it dificult to
infer the underlying security context. However, we observe that many such messages include references
to external resources, such as issue identifiers (e.g., “fix #248”). These references can be leveraged
to retrieve richer contextual information. We use regular expressions to extract issue numbers from
commit messages and query the corresponding GitHub issues using the GitHub REST API. In addition,
we obtain the content of the pull request (PR) associated with the commit, which often contains more
detailed descriptions of the code changes. To further enrich the semantic context, we retrieve the
software project’s Wikipedia page as a source of background knowledge. This is because key aspects
often contain software-specific features [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. Since not all commits are associated with PRs, issues, or
relevant Wikipedia pages, our method simply leverages the remaining available sources when part of
this external context is missing. As the issue, PR, and Wikipedia content can be lengthy, we employ
an LLM to summarize each source into a vulnerability-relevant abstract. These summaries are then
concatenated with the original commit message to form an enriched commit message.
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Hunk-Level Code Analysis via CoT</title>
        <p>Commits often include multiple code changes that serve diferent purposes, such as feature updates,
refactoring, or formatting, which may not be related to vulnerability fixes. To isolate the
securityrelevant portions of a commit, we analyze the code dif at the hunk level, treating each hunk as a
standalone semantic unit. We design a CoT prompting strategy to evaluate each hunk. For each hunk,
the CoT prompt guides the LLM through six sequential steps: identifying the commit’s overall intent,
summarizing the hunk’s behavior, evaluating its alignment with the commit’s purpose, assessing its
security implications, analyzing potential dependency risks, and determining whether the hunk is
related to a vulnerability fix. We apply this process to all hunks within a code dif. For those identified
as vulnerability-related, we collect their corresponding CoT analysis results and use an LLM to generate
an overall analysis of the security-relevant code changes. This enriched, hunk-filtered code dif analysis
is then provided to the final prediction stage alongside the enriched commit message.</p>
      </sec>
      <sec id="sec-2-3">
        <title>2.3. Task-Specific Retrieval of Vulnerability Fixes</title>
        <p>
          To better leverage the in-context learning capabilities of LLMs, we adopt a retrieval-augmented few-shot
prompting approach. For each commit, we retrieve top- similar vulnerability-fixing commits from the
training set as reference examples. We construct a vector database using the commits in the training set,
where each commit is represented by an embedding that captures its security-relevant code semantics.
Specifically, we use only the code hunks identified as vulnerability-related by the method described
in Section 2.2. Within each hunk, we exclude unchanged lines and retain only the added and deleted
lines, as these are the primary carriers of vulnerability semantics. To encode the added and deleted
lines, we employ the CodeT5+ 110m embedding model [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. Since the two types of lines originate from
diferent versions of the code, we embed them separately into two 256-dimensional vectors. These
vectors are then concatenated to form a 512-dimensional representation for each commit. The resulting
embeddings are stored in a vector database. During inference, we compute cosine similarity between
the test commit and all training samples to retrieve the top- most relevant examples.
        </p>
        <p>Finally, we combine the original commit with the enriched commit message, the overall code analysis,
and the retrieved similar commits. These components are concatenated to form the input prompt,
which is then fed into a LLM to generate the four key aspects.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Experiments</title>
      <p>
        We construct a large-scale dataset of vulnerability-fixing commits to evaluate the efectiveness of our
method. We first collect all CVE entries from the NVD up to April 9, 2025. Each entry includes a CVE ID,
a textual vulnerability description (TVD), and a set of external references. For OSS projects hosted on
GitHub, the URL of a vulnerability-fixing commit typically follows the format:
https://github.com/owner/repo/commit/commit_hash. Since only a small subset of CVE entries includes such URLs, we use
regular expressions to extract entries containing GitHub commit links and and then obtain the
corresponding patch files, from which we extract commit messages and code difs. We filter out commits
with code difs exceeding 2,000 tokens to keep the dataset balanced and representative of common
vulnerability fixes. Each CVE’s TVD contains information related to the key aspects of the vulnerability.
We use DeepSeek V3 [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] with prompts to extract four aspects from the TVD: vulnerability type, root
cause, attack vector, and impact. As TVDs may lack certain aspects, we additionally retrieve
corresponding TVDs from the IBM X-Force vulnerability database and apply the same extraction process.
Commits are discarded if any key aspect remains unavailable after both stages. As a result, we obtain
a dataset of 10,912 vulnerability-fixing commits and their corresponding key aspects, covering 3,575
open-source projects and 9,586 CVE entries. We randomly divide the dataset into 80% for training and
20% for testing.
      </p>
      <p>
        We compare our method against two baselines: the CodeBERT-based encoder-decoder model proposed
by Sun et al. [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], and DeepSeek V3 in both zero-shot and 8-shot settings. Our method also uses DeepSeek
V3 as the backbone LLM, but difers in how the input is structured and enhanced through semantic
augmentation and retrieval. We evaluate all methods using ROUGE-L and METEOR, which are widely
used metrics for text generation tasks. For few-shot settings, we retrieve 8 examples using the method
described in Section 2.3 and include them in the prompt.
      </p>
    </sec>
    <sec id="sec-4">
      <title>4. Limitations</title>
      <p>Our method requires several steps of interaction with LLMs, which increases computational cost. Future
work will focus on exploring optimization strategies to reduce resource consumption and improve
scalability. In addition, the evaluation is currently limited to ROUGE-L and METEOR, which measure
textual similarity rather than semantic correctness. Future studies will incorporate expert annotation
and domain-specific metrics to provide a more reliable assessment of practical utility.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusion</title>
      <p>In this poster, we propose a semantic-augmented framework for predicting key aspects of silent
vulnerability fixes, including the vulnerability type, root cause, impact, and attack vector. Our
approach enhances commit understanding through external knowledge, hunk-level code analysis, and
retrieval-based few-shot prompting. Experiments on a large-scale dataset demonstrate that our method
outperforms baselines across all key aspects.</p>
    </sec>
    <sec id="sec-6">
      <title>Declaration on Generative AI</title>
      <p>During the preparation of this work, we used ChatGPT in order to: Grammar and spelling check.
After using this tool, we reviewed and edited the content as needed and take full responsibility for the
publication’s content.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>National</given-names>
            <surname>Vulnerability</surname>
          </string-name>
          <article-title>Database (NVD)</article-title>
          ,
          <source>National vulnerability database</source>
          ,
          <year>2025</year>
          . URL: https://nvd. nist.gov/.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Wikipedia</surname>
          </string-name>
          , Coordinated vulnerability disclosure,
          <year>2025</year>
          . URL: https://en.wikipedia.org/wiki/ Coordinated_vulnerability_disclosure.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Pacheco</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Wan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Xia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Lo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. E.</given-names>
            <surname>Hassan</surname>
          </string-name>
          ,
          <article-title>Finding A needle in a haystack: Automated mining of silent vulnerability fixes</article-title>
          ,
          <source>in: 36th IEEE/ACM International Conference on Automated Software Engineering, ASE</source>
          <year>2021</year>
          , Melbourne, Australia,
          <source>November 15-19</source>
          ,
          <year>2021</year>
          , IEEE,
          <year>2021</year>
          , pp.
          <fpage>705</fpage>
          -
          <lpage>716</lpage>
          . URL: https://doi.org/10.1109/ASE51524.
          <year>2021</year>
          .
          <volume>9678720</volume>
          . doi:
          <volume>10</volume>
          .1109/ASE51524.
          <year>2021</year>
          .
          <volume>9678720</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. K.</given-names>
            <surname>Siow</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Wang</surname>
          </string-name>
          , S. Liu, Y. Liu,
          <article-title>SPI: automated identification of security patches via commits</article-title>
          ,
          <source>ACM Trans. Softw. Eng. Methodol</source>
          .
          <volume>31</volume>
          (
          <year>2022</year>
          )
          <volume>13</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>13</lpage>
          :
          <fpage>27</fpage>
          . URL: https://doi.org/10.1145/ 3468854. doi:
          <volume>10</volume>
          .1145/3468854.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>J.</given-names>
            <surname>Sun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Xing</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Lu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Xu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Zhu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Hoang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Zhao</surname>
          </string-name>
          ,
          <article-title>Silent vulnerable dependency alert prediction with vulnerability key aspect explanation</article-title>
          ,
          <source>in: 45th IEEE/ACM International Conference on Software Engineering, ICSE</source>
          <year>2023</year>
          , Melbourne, Australia, May
          <volume>14</volume>
          -20,
          <year>2023</year>
          , IEEE,
          <year>2023</year>
          , pp.
          <fpage>970</fpage>
          -
          <lpage>982</lpage>
          . URL: https://doi.org/10.1109/ICSE48619.
          <year>2023</year>
          .
          <volume>00089</volume>
          . doi:
          <volume>10</volume>
          .1109/ICSE48619.
          <year>2023</year>
          .
          <volume>00089</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>L.</given-names>
            <surname>Han</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Pan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Xing</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Sun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Yitagesu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Feng</surname>
          </string-name>
          ,
          <article-title>Do chase your tail! missing key aspects augmentation in textual vulnerability descriptions of long-tail software through feature inference</article-title>
          ,
          <source>IEEE Trans. Software Eng</source>
          .
          <volume>51</volume>
          (
          <year>2025</year>
          )
          <fpage>466</fpage>
          -
          <lpage>483</lpage>
          . URL: https://doi.org/10.1109/TSE.
          <year>2024</year>
          .
          <volume>3523284</volume>
          . doi:
          <volume>10</volume>
          .1109/TSE.
          <year>2024</year>
          .
          <volume>3523284</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Le</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. D.</given-names>
            <surname>Gotmare</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. D.</given-names>
            <surname>Bui</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. C. H.</given-names>
            <surname>Hoi</surname>
          </string-name>
          , Codet5+:
          <article-title>Open code large language models for code understanding and generation, arXiv preprint (</article-title>
          <year>2023</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>DeepSeek-AI</surname>
          </string-name>
          ,
          <article-title>Deepseek-</article-title>
          v3
          <source>technical report</source>
          ,
          <year>2024</year>
          . URL: https://arxiv.org/abs/2412.19437. arXiv:
          <volume>2412</volume>
          .
          <fpage>19437</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>