Aiming at the problems of different time scales, inconsistent characteristic distribution, and information redundancy of vibration signals, a rolling bearing fault diagnosis method with a multi-scale multi-task attention convolutional neural network (MSTACNN) was proposed. Firstly, a multi-scale convolutional neural network was constructed in the parameter sharing unit, and multi-scale common features containing information shared between different tasks in vibration signals were extracted. Secondly, the multi-task learning mechanism was employed to simultaneously accomplish three tasks: fault type, fault size, and operation conditions. Thus, the inefficiency of single-task learning was solved. Then, the attention mechanism was used to enhance the feature expression and the influence of useless information was eliminated. Finally, an adaptive loss weight algorithm was designed to dynamically adjust the loss weight and the learning progress of three tasks, the goal of simultaneously identifying bearing fault type, fault size, and operating conditions was achieved. The effectiveness of the proposed method was verified in the dataset of Western Reserve University and the University of Paderborn, respectively. The recognition accuracy of fault types achieved 99. 95% and 98. 41% in different datasets. The experimental results show that the proposed method shows high recognition accuracy, good convergence speed and stability, which proves that the proposed method has strong feature extraction learning ability and generalization performance. © 2024 Editorial Department of Electric Machines and Control. All rights reserved.