Resource-aware test-time adaptation for mobile face anti-spoofing under SWAP constraints
DOI:
https://doi.org/10.31649/1681-7893-2026-51-1-79-89Keywords:
face anti-spoofing, mobile biometrics, resource-aware test-time adaptation, domain shift, SWAP optimizationAbstract
Face anti-spoofing (FAS) models for mobile authentication face a difficult deployment gap: they must remain robust under domain shift (camera, illumination, attack medium) while balancing biometric accuracy against strict speed, model-weight, and power-consumption limits (SWAP). Existing test-time methods improve cross-domain accuracy but ignore on-device resource limits and, more critically, can catastrophically degrade when source and target domains differ substantially. We propose a resource-aware test-time adaptation (RA-TTA) framework that updates only normalization affine parameters, a compact classifier head, and class prototypes, and only when (a) drift is detected against calibrated source statistics, (b) pseudo-labels pass a confidence-and-augmentation reliability gate, and (c) a token-bucket budget controller permits adaptation under hard speed and power caps. Evaluated on OULU-NPU and Replay-Attack datasets with a deliberately challenging single-source 1 M-parameter MobileNetV3-Small backbone, RA-TTA delivers a 25% relative ACER reduction (4.83% vs 6.47%) on intra-domain data where adaptation safely fires, while preserving source-model behaviour under extreme cross-domain shift (43.70% on OULU to Replay-Attack, identical to No-TTA) where Tent collapses by 5.7% ACER. A drift-threshold sensitivity sweep validates the calibration heuristic. The runtime profile is deployment-class – 1.6 ms/3.04 mJ per frame on Samsung Galaxy S25, 3.83 ms/3.95 mJ on Galaxy A56, and 5.94 ms/6.27 mJ on entry-level Galaxy A17, with a 3.84 MB ONNX footprint – but cross-domain ACER at this scale is below production thresholds for security-critical face authentication. The contribution is the safety mechanism, not state of the art accuracy. Reaching production accuracy on the same backbone requires multi-source training, which is orthogonal to the adaptation-safety question this paper addresses.
References
Zhang, Z., Yan, J., Liu, S., Lei, Z., Yi, D., & Li, S.Z. (2012). A face antispoofing database with diverse attacks. In Proc. 5th IAPR Int. Conf. on Biometrics (ICB) (pp. 26–31). https://doi.org/10.1109/ICB.2012.6199754
Chingovska, I., Anjos, A., & Marcel, S. (2012). On the effectiveness of local binary patterns in face anti-spoofing. In Proc. Int. Conf. of the Biometrics Special Interest Group (BIOSIG) (pp. 1–7). https://publications.idiap.ch/index.php/publications/show/2447
Boulkenafet, Z., Komulainen, J., Li, L., Feng, X., & Hadid, A. (2017). OULU-NPU: A mobile face presentation attack database with real-world variations. In Proc. 12th IEEE Int. Conf. on Automatic Face & Gesture Recognition (FG) (pp. 612–618). https://doi.org/10.1109/FG.2017.77
Liu, Y., Jourabloo, A., & Liu, X. (2018). Learning deep models for face anti-spoofing: Binary or auxiliary supervision. In Proc. IEEE/CVF Conf. on Computer Vision and Pattern Recognition (CVPR) (pp. 389–398). https://doi.org/10.1109/CVPR.2018.00048
Wang, D., Shelhamer, E., Liu, S., Olshausen, B., & Darrell, T. (2021). Tent: Fully test-time adaptation by entropy minimization. In Proc. Int. Conf. on Learning Representations (ICLR). https://doi.org/10.48550/arXiv.2006.10726
Zhou, Q., Zhang, K.-Y., Yao, T., Lu, X., Ding, S., & Ma, L. (2024). Test-time domain generalization for face anti-spoofing. In Proc. IEEE/CVF Conf. on Computer Vision and Pattern Recognition (CVPR) (pp. 175–187). https://doi.org/10.48550/arXiv.2403.19334
Le, B.M., & Woo, S.S. (2024). Gradient alignment for cross-domain face anti-spoofing. In Proc. IEEE/CVF Conf. on Computer Vision and Pattern Recognition (CVPR). URL: https://doi.org/10.48550/arXiv.2402.18817
Liu, S., Wang, Q., & Yuen, P.C. (2024). Bottom-up domain prompt tuning for generalized face anti-spoofing. In Proc. European Conf. on Computer Vision (ECCV). URL: https://doi.org/10.1007/978-3-031-72897-6_10
Ge, X., Liu, X., Yu, Z., Shi, J., Qi, C., Li, J., & Kälviäinen, H. (2024). DiffFAS: Face anti-spoofing via generative diffusion models. In Proc. European Conf. on Computer Vision (ECCV). URL: https://doi.org/10.48550/arXiv.2409.08572
Stets, O., Konovalenko, I., Bomba, A., Shmanko, O., & Humen, Y. (2025). Mobile face anti-spoofing through privileged multi-teacher distillation under SWAP constraints. In Proc. 2nd Int. Workshop on Advanced Applied Information Technologies (AdvAIT-2025), Khmelnytskyi, Ukraine / Žilina, Slovakia, December 2025. https://ceur-ws.org/Vol-4163/short4.pdf
Stets O., Konovalenko I. SWAP metrics optimization in mobile face anti-spoofing systems using knowledge distillation // Scientific Journal of TNTU, Ternopil. 2025. Vol 118. No 2. P. 100–108. https://doi.org/10.33108/visnyk_tntu2025.02.100
Cao, J., & Ma, C. (2025). Towards generalized face anti-spoofing from a frequency shortcut view. In Proc. IEEE/CVF Winter Conf. on Applications of Computer Vision (WACV). https://doi.org/10.1109/WACV61041.2025.00107
Lin, X., Liu, A., Yu, Z., Cai, R., Wang, S., Yu, Y., Wan, J., Lei, Z., Cao, X., & Kot, A. (2025). Reliable and balanced transfer learning for generalized multimodal face anti-spoofing. IEEE Transactions on Pattern Analysis and Machine Intelligence, 47(9), 7608–7625. https://doi.org/10.1109/TPAMI.2025.3573785
Yang, X., Zhang, Q., Xu, Y., Ma, H., Zou, Z., & Sun, H. (2025). Applying semantic anchor in face anti-spoofing detection for unified physical–digital attacks. In Proc. IEEE/CVF Int. Conf. on Computer Vision Workshops (ICCVW). https://doi.ieeecomputersociety.org/10.1109/ICCVW69036.2025.00338
Wang, Q., Fink, O., Van Gool, L., & Dai, D. (2022). Continual test-time domain adaptation. In Proc. IEEE/CVF Conf. on Computer Vision and Pattern Recognition (CVPR) (pp. 7201–7211). https://doi.org/10.1109/CVPR52688.2022.00706
Niu, S., Wu, J., Zhang, Y., Chen, Y., Zheng, S., Zhao, P., & Tan, M. (2022). Efficient test-time model adaptation without forgetting. In Proc. Int. Conf. on Machine Learning (ICML) (Vol. 162, pp. 16888–16905). https://doi.org/10.48550/arXiv.2204.02610
Niu, S., Wu, J., Zhang, Y., Wen, Z., Chen, Y., Zhao, P., & Tan, M. (2023). Towards stable test-time adaptation in dynamic wild world. In Proc. Int. Conf. on Learning Representations (ICLR). https://doi.org/10.48550/arXiv.2302.12400
Gong, T., Kim, Y., Shin, J., & Lee, S.-J. (2023). SoTTA: Robust test-time adaptation on noisy data streams. In Proc. Advances in Neural Information Processing Systems (NeurIPS). https://doi.org/10.48550/arXiv.2310.10074
Zhao, B., Chen, C., & Xia, S.-T. (2023). DELTA: Degradation-free fully test-time adaptation. In Proc. Int. Conf. on Learning Representations (ICLR). https://doi.org/10.48550/arXiv.2301.13018
Song, J., Lee, J., Kweon, I.S., & Choi, S. (2023). EcoTTA: Memory-efficient continual test-time adaptation via self-distilled regularization. In Proc. IEEE/CVF Conf. on Computer Vision and Pattern Recognition (CVPR). https://doi.org/10.48550/arXiv.2303.01904
Hong, J., Lyu, L., Zhou, J., & Spranger, M. (2023). MECTA: Memory-economic continual test-time model adaptation. In Proc. Int. Conf. on Learning Representations (ICLR). https://openreview.net/forum?id=N92hjSf5NNh
Cai, R., Cui, Y., Yu, Z., Lin, X., Chen, C., & Kot, A. (2025). Rehearsal-free and efficient continual learning for cross-domain face anti-spoofing. IEEE Transactions on Pattern Analysis and Machine Intelligence, 47(12), 11348–11365. https://doi.org/10.1109/TPAMI.2025.3601053
Jabbar, M.S., Siddique, T.H.M., Huang, K., & Khan, S. (2025). Knowledge distillation with predicted depth for robust and lightweight face presentation attack detection. Knowledge-Based Systems, 329, 114325. DOI: https://doi.org/10.1016/j.knosys.2025.114325
Iwasawa, Y., & Matsuo, Y. (2021). Test-time classifier adjustment module for model-agnostic domain generalization. In Proc. Advances in Neural Information Processing Systems (NeurIPS) (Vol. 34, pp. 2427–2440). https://openreview.net/forum?id=e_yvNqkJKAW
Stets, O., & Konovalenko, I. (2024). Face anti-spoofing systems optimal threshold selection criteria. In Proc. 2nd Int. Workshop on Computer Information Technologies in Industry 4.0 (CITI'2024), Ternopil, Ukraine, June 2024. CEUR Workshop Proceedings, Vol. 3742. URL: https://ceur-ws.org/Vol-3742/short2.pdf
Downloads
-
pdf
Downloads: 1
Published
How to Cite
Issue
Section
License
Автори, які публікуються у цьому журналі, погоджуються з наступними умовами:- Автори залишають за собою право на авторство своєї роботи та передають журналу право першої публікації цієї роботи на умовах ліцензії Creative Commons Attribution License, котра дозволяє іншим особам вільно розповсюджувати опубліковану роботу з обов'язковим посиланням на авторів оригінальної роботи та першу публікацію роботи у цьому журналі.
- Автори мають право укладати самостійні додаткові угоди щодо неексклюзивного розповсюдження роботи у тому вигляді, в якому вона була опублікована цим журналом (наприклад, розміщувати роботу в електронному сховищі установи або публікувати у складі монографії), за умови збереження посилання на першу публікацію роботи у цьому журналі.
- Політика журналу дозволяє і заохочує розміщення авторами в мережі Інтернет (наприклад, у сховищах установ або на особистих веб-сайтах) рукопису роботи, як до подання цього рукопису до редакції, так і під час його редакційного опрацювання, оскільки це сприяє виникненню продуктивної наукової дискусії та позитивно позначається на оперативності та динаміці цитування опублікованої роботи (див. The Effect of Open Access).