## 1 Introduction
Additionally, unexpected environmental changes, sensor noise, and manufacturing variations can cause discrepancies between the theoretical model and the actual system, reducing the model's reliability. Second, real-world industrial processes are influenced by numerous external factors, such as aging components, human intervention, and varying operational conditions, which cannot always be incorporated into a predefined physical model. As a result, physical methods struggle to generalize across different operating scenarios and may fail to detect unforeseen faults that deviate from predefined fault patterns. In contrast to physical methods, data-driven methods do not require expert knowledge of system design and have the potential to yield superior performance when large amounts of data are available. Recently, with high-quality data readily available through distributed control systems, fault detection research has gained significant attention. In general, methods such as principal component analysis (PCA), independent component analysis (ICA), and partial least squares (PLS) have been proposed for application to industrial processes. Over the past decades, these methods have been successfully applied to a variety of industrial processes [16; 17; 18; 19]. Recently, improved methods have been proposed for application to complex processes. [PERSON] [20] proposed WDPCA, which adds a weighted difference normalization method to the conventional PCA. [PERSON] [21] introduced the k-ICA-PCA method, which combines ICA and PCA to classify the operating modes of a process. Other improvements to traditional methods, such as overlapping PCA, sub-PCA, and multiple PCA, have been proposed [22; 23; 24; 25; 26; 27; 28]. However, statistical methods require assumptions about data distribution. In addition, it is difficult to perform accurate fault detection due to the smearing effect of the fault variable. Compared to statistical methods, distance-based methods offer several advantages: (1) the model is simple and intuitive, making it easy to interpret; (2) they do not require prior assumptions about the data; (3) they require fewer computational resources, enabling real-time processing. Due to these advantages, the use of distance-based methods for fault detection is steadily increasing. [PERSON] [29] proposed a connectivity-based factor to solve the problem of performance degradation when faulty data have the density of healthy data. [PERSON] [30] introduced a method to detect faults using k-means clustering. [PERSON] [31] applied the grid method to conventional local outlier factor (LOF) to provide intuitive information about outliers. [PERSON] [32] applied auto-associative kernel regression (AAKR) for fault detection in thermal power plants. These methods use training data to set thresholds for fault detection. However, when faulty data are adjacent to healthy data, they may be misclassified as normal. Therefore, there is a need for a method that can assign appropriate weights to fault data based on their similarity to training data. In the field of natural language processing, the attention technique has gained significant focus; this technique increases the weight of the training data that are the most relevant to the given sample [33]. Attention is a method that gives higher weights to important words to dynamically reflect the relationships between words in a sentence. In this paper, inspired by the weighting scheme of attention, we aimed to assign higher weights to training data similar to the fault data when applying distance-based weighting in the data-driven method AAKR. To this end, we used shared nearest neighbor (SNN), which compares the similarity between fault and training data, and rescaled the distance metric based on the number of shared neighbors. The rescaled distances are applied in assigning weights within AAKR to calculate the estimated vector and detection index for fault detection. The advantages of the proposed method are as follows.