Comparison of Vision Transformer and ResNet under Federated Learning in Human Action Recognition
Abstract
This study investigates the adaptability of ResNet50 and Vision Transformer (ViT) in Federated Learning (FL) versus centralized training for human action recognition, addressing data privacy and distributed data silos in real-world applications. Employing the Kaggle dataset (about 12,000 images across 15 actions), the thesis standardized preprocessing (bilinear resizing, flip/rotation augmentation, ImageNet normalization) and conducted controlled experiments. Centralized training utilized full-batch gradient descent, while FL simulated non-independent and identically distributed (non-IID) data partitioning with Federated Averaging (FedAvg) aggregation. The results indicate that ViTs achieved 87.30% accuracy in FL, surpassing Residual Network (ResNet) by 8.01%. The train-validation gap was significantly reduced (1.67% vs. 11.35%), revealing improved generalization. Overfitting was limited through phased aggregation, which also enabled late-stage convergence exceeding. ViT’s global attention proved more adaptable to heterogeneous data distributions, and FL’s distributed optimization enhanced model resilience. These results highlight the complementary strengths of ViT and FL, especially for privacy-sensitive applications like healthcare, where preserving data sovereignty is essential.
References
- Sun Z., et al. (2023). Human Action Recognition From Various Data Modalities: A Review, IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(3), 3200-3225.
- Poppe, R. (2010). A survey on vision-based human action recognition. Image and Vision Computing, 28(6), 976–990.
- Santry D.J. (2024). Convolutional Neural Networks, Demystifying Deep Learning: An Introduction to the Mathematics of Neural Networks, 111-131.
- Zhang, L., et al. (2024). Vision Transformers: From Semantic Segmentation to Dense Prediction. Int J Comput Vis 132, 6142–6162.
- Arnab, A. et al. (2021). ViViT: A Video Vision Transformer. Proceedings of the IEEE/CVF International Conference on Computer Vision, 6836–6846.
- Ludwig, H., Baracaldo, N. (2022). Introduction to Federated Learning. Ludwig, H., Baracaldo, N. (eds) Federated Learning. Springer, Cham.
- Kairouz, P., McMahan, H. B., et al. (2021). Advances and open problems in federated learning.
- He, K., Zhang, X., Ren, S. (2016). Deep residual learning for image recognition. Proceedings of the IEEE conference on computer vision and pattern recognition, 770–778.
- Dosovitskiy, A., et al. (2021). An image is worth 16x16 words: Transformers for image recognition at scale. International Conference on Learning Representations (ICLR).
- McMahan, H. B., et al. (2017). Communication-efficient learning of deep networks from decentralized data. Proceedings of the 20th International Conference on Artificial Intelligence and Statistics (AISTATS), 54.
- Rei A., Sayaka S., Hitoshi K. (2023) Enhanced Security with Encrypted Vision Transformer in Federated Learning, 2023 IEEE 12th Global Conference on Consumer Electronics (GCCE), 819-822.
- Kaggle, (2022) Human Action Recognition (HAR) Dataset. Retrieved from https: //www.kaggle.com/datasets/meetnagadia/human-action-recognition-har-dataset.