In response to the challenges of limited transformer fault data samples and insufficient fault characteristic representation, resulting in limited diagnostic accuracy. This study proposes a physics-informed guided transformer fault diagnosis (PIGTFD) method to achieve synergistic optimization of feature learning and fault diagnosis processes. Firstly, a feature extraction method based on multi-level contrast-enhanced autoencoder is developed to enable contrast-enhanced learning and multi-level feature refinement, thereby enhancing the characterization of fault data features. Secondly, a physics-informed guided classifier incorporating comparative learning loss, L2/L4 norm, and cross-entropy loss is constructed to collaboratively optimize feature extraction and classification. Additionally, a δ-Batch Normalization method is designed to enhance the model’s generalization robustness under data distribution shifts. The model’s validity is confirmed using dissolved gas data from a 110kV power transformer at a substation in Jiangsu Province. Experimental results demonstrate that PIGTFD outperforms other comparative methods, and the accuracy of fault identification is 91.05%.