Abstract:To address low accuracy in transformer fault diagnosis under small-sample conditions, we propose a method based on an improved prototypical network. First, a residual multi-layer perceptron extracts features from transformer oil chromatography data to obtain more discriminative representations. Second, we introduce a dual-layer attention-driven prototype construction mechanism: Task-conditioned attention dynamically adjusts support-set representations, and sample attention weights support samples to emphasize discriminative features. This yields more distinguishable class prototypes and addresses prototypical networks′ limitations in cross-task adaptability and intra-class discriminability. Finally, diagnosis is performed by measuring the Euclidean distance between samples and class prototypes. Experiments on the IEEE Dataport and IEC TC 10 Dataport datasets show significant improvements: On the IEEE Dataport dataset our method outperforms the prototypical network, matching network and relation network by 15.14%, 21.49% and 18.68%, respectively; on the IEC TC 10 Dataport the gains are 6.43%, 6.90% and 8.65%, respectively. The study provide new insights and references for transformer fault diagnosis under small-sample conditions.