In the field of industrial production, the precise and timely implementation of fault diagnosis methods is crucial for improving product quality, enhancing operational safety, reducing downtime, and minimizing losses. Recent studies have shown that most CNN-based fault diagnosis models are more suitable for handling Euclidean data such as images or videos but are not suitable for dealing with non-Euclidean sensor data. In practical industrial scenarios, chemical process data with imbalanced fault patterns may lead data-driven models to assign different attentions to fault patterns. The SMOTE algorithm is commonly used to generate new data, but it often tends to overfit when there are very few nearest neighbor samples. To address these issues, we designed an efficient fault diagnosis model named KRGAT. To fully utilize the spatial structural information on sensor data, we employed graph attention networks (GATs), which are well-suited for handling non-Euclidean data. Additionally, we introduced the top-k loss method to select hard samples, thereby increasing the weight of these samples. Furthermore, we improved DropMessage to enhance the model's accuracy and robustness. Experimental results demonstrate that our model outperforms the baseline model under both balanced and imbalanced conditions.