# LSTM Attention-Driven Similarity Learning for Effective Bug Localization
## 2 Related Work
[26] introduced DreamLoc, an attention-based relevance-matching model that increased accuracy by 6.4% and MAP by 7.4%. [PERSON] et al. [27] developed a two-step recommendation model using Naive Bayes classification, achieving a 70% accuracy in predicting buggy files. Several studies have also explored software change analysis and log-based techniques for bug localization. [PERSON] et al. [28] built a model that identifies fault-prone files by analyzing code changes in Eclipse projects, achieving an accuracy of 75% or higher. [PERSON] et al. [29] proposed BLIZZARD, an automated bug localization tool using query reconstruction, improving MAP and MRR by 19% and 20%, respectively. [PERSON] et al. [30] combined IR and word embeddings to establish correlations between bug reports and source files, improving MAP and MRR by 27.9% and 28.9%. [PERSON] et al. [31] applied deep belief networks to analyze abstract syntax trees (ASTs), achieving a recall of 15.1%. [PERSON] et al. [32] used LSTM-based deep learning models to estimate software effort, improving accuracy by 23.68%. [PERSON] et al. [33] leveraged semantic information in deep learning models, achieving a 13.4% increase in MAP. Cross-project and multimodal approaches have also been investigated. [PERSON] et al. [34] introduced TRANP-CNN for cross-project bug localization, achieving up to 61.3% improvement in the top-10 accuracy. [PERSON] et al. [35] developed NetML, which integrates multimodal information from bug reports and program spectra, improving MAP by 19.24%. [PERSON] et al. [36] analyzed the incremental evolution of software models, reducing execution time by 77.79%. [PERSON] et al. [37] reconstructed execution paths using logs from bug reports, improving MAP and MRR by 21% and 5%, respectively. While prior studies have contributed significantly to improving bug localization through various techniques such as IR, deep learning, query expansion, and hybrid approaches, the proposed model differs in several key aspects. Dissimilar to methods that rely solely on IR-based techniques or deep learning without leveraging similarity learning, the proposed approach integrates top-K code similarity learning with LSTM-Attention, ensuring that the most relevant source code files are selected before deep learning-based prediction. This integration enhances both retrieval effectiveness and ranking precision, which is not fully explored in existing methods. Furthermore, compared with word embedding-based query expansion approaches, the proposed model directly learns contextual relationships between bug reports and source code, leveraging attention mechanisms to focus on semantically important terms. Additionally, while crowdsourced knowledge-based models improve retrieval performance, they often require external datasets and manual curation, which limits their scalability. In contrast, the proposed approach operates directly on structured bug reports and source code data, making it more generalizable across different software projects. Dissimilar to cross-project bug localization methods, which depend on labeled datasets from other projects, the proposed model learns project-specific features dynamically using top-K similarity learning, making it more adaptable to diverse software repositories. This combination of code similarity retrieval and deep learning-based ranking represents a significant advancement in bug localization research, showing statistically significant improvements over baseline methods. We provide the comparison table for bug localization studies, as shown in Table 1.