{"title":"Graph Attention-Based Contextual Semantic Correlation Analysis for Software Fault Localization","authors":"Hongdou He, Xiaoming Ma, Huazhi Xu, Guyu Zhao","doi":"10.1002/smr.70103","DOIUrl":null,"url":null,"abstract":"<div>\n \n <p>Although the advanced spectrum-based fault localization techniques introduce graph models to measure the faulty suspiciousness of entities, they still lack effective leverage of the contextual semantics of program units, making it difficult to reveal the complex causal relationships of bugs. Therefore, this paper proposes the <b>C</b>ontextual <b>S</b>emantic Coupling <b>C</b>orrelation Analysis for the Software <b>F</b>ault <b>L</b>ocalization (CSCFL), employing semantic embedding and coupling correlation of contextual associations based on contextual embedding and graph attention mechanism. Based on the test coverage graph representation, the pre-trained self-attention embedding model encodes the entity embeddings considering context associations, fully mining the contextual information among program entities to obtain contextual feature representation. CSCFL introduces the graph attention network to learn the context semantic coupling correlation between entities. By analyzing the causal relationships and semantic collaborations that lead to faults, the context semantics analysis module automatically weights and aggregates the influence of contextual entities to generate more accurate fault feature representations, thereby improving localization effectiveness. The experimental results show that, with respect to Top-1, Top-3, and Top-5 metrics, the proposed method outperforms the baseline methods by <span></span><math>\n <semantics>\n <mrow>\n <mn>7</mn>\n <mo>.</mo>\n <mn>59</mn>\n <mo>%</mo>\n <mo>,</mo>\n <mspace></mspace>\n <mn>4</mn>\n <mo>.</mo>\n <mn>73</mn>\n <mo>%</mo>\n </mrow>\n <annotation>$$ 7.59\\%,\\kern0.3em 4.73\\% $$</annotation>\n </semantics></math>, and <span></span><math>\n <semantics>\n <mrow>\n <mn>1</mn>\n <mo>.</mo>\n <mn>41</mn>\n <mo>%</mo>\n </mrow>\n <annotation>$$ 1.41\\% $$</annotation>\n </semantics></math>, respectively, and outperforms cutting-edge LLM-based methods by <span></span><math>\n <semantics>\n <mrow>\n <mn>9</mn>\n <mo>.</mo>\n <mn>10</mn>\n <mo>%</mo>\n <mo>,</mo>\n <mspace></mspace>\n <mn>13</mn>\n <mo>.</mo>\n <mn>71</mn>\n <mo>%</mo>\n </mrow>\n <annotation>$$ 9.10\\%,\\kern0.3em 13.71\\% $$</annotation>\n </semantics></math>, and <span></span><math>\n <semantics>\n <mrow>\n <mn>20</mn>\n <mo>.</mo>\n <mn>67</mn>\n <mo>%</mo>\n </mrow>\n <annotation>$$ 20.67\\% $$</annotation>\n </semantics></math>.</p>\n </div>","PeriodicalId":48898,"journal":{"name":"Journal of Software-Evolution and Process","volume":"38 4","pages":""},"PeriodicalIF":1.6000,"publicationDate":"2026-04-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Software-Evolution and Process","FirstCategoryId":"94","ListUrlMain":"https://onlinelibrary.wiley.com/doi/10.1002/smr.70103","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
Although the advanced spectrum-based fault localization techniques introduce graph models to measure the faulty suspiciousness of entities, they still lack effective leverage of the contextual semantics of program units, making it difficult to reveal the complex causal relationships of bugs. Therefore, this paper proposes the Contextual Semantic Coupling Correlation Analysis for the Software Fault Localization (CSCFL), employing semantic embedding and coupling correlation of contextual associations based on contextual embedding and graph attention mechanism. Based on the test coverage graph representation, the pre-trained self-attention embedding model encodes the entity embeddings considering context associations, fully mining the contextual information among program entities to obtain contextual feature representation. CSCFL introduces the graph attention network to learn the context semantic coupling correlation between entities. By analyzing the causal relationships and semantic collaborations that lead to faults, the context semantics analysis module automatically weights and aggregates the influence of contextual entities to generate more accurate fault feature representations, thereby improving localization effectiveness. The experimental results show that, with respect to Top-1, Top-3, and Top-5 metrics, the proposed method outperforms the baseline methods by , and , respectively, and outperforms cutting-edge LLM-based methods by , and .