Your new experience awaits. Try the new design now and help us make it even better

ORIGINAL RESEARCH article

Front. Comput. Sci.

Sec. Computer Vision

An Improved Contrastive Learning Loss Function for Automated Clock-Drawing Test Grading with Implications for Cognitive Impairment Screening

Provisionally accepted
Liu  NingLiu Ning1Qian  SunQian Sun1*Xiaoyin  XuXiaoyin Xu2Haifeng  MouHaifeng Mou1Xinhai  LiaoXinhai Liao1Bokai  RongBokai Rong1Lingxing  WangLingxing Wang3
  • 1Zhejiang University of Science and Technology, Hangzhou, China
  • 2Zhejiang University, Hangzhou, China
  • 3First Affiliated Hospital of Fujian Medical University Department of Neurology, Fuzhou, China

The final, formatted version of the article will be published soon.

Contrastive learning has been attracting much interest in recent years for its ability to train without labeled data. An important factor in its success is the loss function, which guides the search for prominent features that separate the positive and negative classes. The triplet loss function is widely used in contrastive learning, in which the objective is to attract a pair of positive instances while pushing away a negative instance from the anchor instance, where one of the positive instances is often an augmented version of the anchor. To improve the performance of contrastive learning inautomated Clock-Drawing Test (CDT) grading, this paper proposes a more comprehensive triplet loss function that aims to not only keep the distance between the anchor and a positive instance small and the distance between the anchor and a negative instance large, but also keep the distance between the positive and negative instances large. Experimental results show that the improved loss function significantly improves the model's accuracy, precision, recall, and F1-score by 3%-5% on both CIFAR-10 and CDT datasets, providing a new method for improving the accuracy of automatic CDT scoring and early detection of cognitive impairments.

Keywords: Contrastive learning, Mild Cognitive Impairment, MoCo, SimCLR, Triplet loss

Received: 26 Aug 2025; Accepted: 09 Feb 2026.

Copyright: © 2026 Ning, Sun, Xu, Mou, Liao, Rong and Wang. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

* Correspondence: Qian Sun

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.