DOI: https://doi.org/10.21203/rs.3.rs-2039632/v1
To improve the accuracy of similarity measures in case-based reasoning, in this paper, we propose a deep metric learning method based on a self-attention mechanism and a Siamese neural network to realize the weighted similarity measure between cases. The method maps the original case features to the new feature space through the Siamese neural network and then assigns the feature weights through the scoring function in the self-attention mechanism. Finally, a metric function is added to the contrastive loss to measure the case similarity. Experiments show that the accuracy of this method is better than other algorithms in the similarity measure and can improve the accuracy of case retrieval.