Background: Carpal tunnel syndrome (CTS) is a medical condition caused by compression of the median nerve in the carpal tunnel due to aging or overuse of the hand. The symptoms include numbness of the fingers and atrophy of the thenar muscle. Thenar atrophy recovers slowly postoperatively; therefore, early diagnosis and surgery are important. While physical examinations and nerve conduction studies are used to diagnose CTS, problems with the diagnostic ability and equipment, respectively, exist. Despite research on a CTS-screening app that uses a tablet and machine learning, problems with the usage rate of tablets and data collection for machine learning remain.
Objective: To make data collection for machine learning easier and more available, we developed a screening app for CTS using a smartphone and an anomaly detection algorithm, aiming to examine our system as a useful screening tool for CTS.
Methods: In total, 36 participants were recruited, comprising 36 hands with CTS and 27 hands without CTS. Participants controlled the character in our app using their thumbs. We recorded the position of the thumbs and time; generated screening models that classified CTS and non-CTS using anomaly detection and an autoencoder; and calculated the sensitivity, specificity, and area under the curve (AUC).
Results: Participants with and without CTS were classified with 94% sensitivity, 67% specificity, and an AUC of 0.86. When dividing the data by direction, the model with data in the same direction as the thumb opposition had the highest AUC of 0.99, 92% sensitivity, and 100% specificity.
Conclusions: Our app could reveal the difficulty of thumb opposition for patients with CTS and screen for CTS with high sensitivity and specificity. The app is highly accessible because of the use of smartphones and can be easily enhanced by anomaly detection.
Carpal tunnel syndrome (CTS) is a medical condition caused by compression of the median nerve in the carpal tunnel due to aging or hand overuse . Patients with CTS develop numbness from the thumb to the ring finger and, in severe cases, thenar muscle atrophy [ ]. Because the symptoms impair thumb motions, CTS can impede everyday movements, such as holding a pen or chopsticks and handling buttons on clothes [ , ]. The prevalence of CTS is approximately 2% to 14%, and it affects more women than men [ , ]. Since most patients with CTS are aged 40 years or older [ , ] and the number of older people is increasing worldwide, the number of patients with CTS is expected to increase. Nonsurgical therapy, such as a wrist brace [ ] or steroid injection into the carpal tunnel [ ], is typically prescribed, but surgery is often necessary for severe symptoms [ ]. Patients often delay seeking medical attention until the numbness worsens and thenar atrophy develops. The symptoms in severe cases recover slowly postoperatively [ , ]; therefore, early diagnosis of CTS and surgery before the symptoms worsen is important.
Physical findings, such as the Tinel sign or Phalen test, may be used; however, their sensitivity and specificity are not high [, ]. Although a nerve conduction study (NCS) is considered useful for diagnosing CTS [ , ], the equipment is expensive and the process can be painful and long (up to an hour). In addition, a skilled technician must perform the detailed NCS [ ]. Due to impaired access to NCSs, diagnosis is largely performed subjectively by doctors in clinics and small hospitals in which there are neither hand surgeons nor specialized equipment, contributing to delayed diagnosis.
In recent years, cameras and sensors in mobile devices have become smaller and more sophisticated and can now measure the state of the user. Various studies have been conducted on the use of mobile devices to acquire physical information and diagnose diseases [- ]. Fujita et al [ ] developed an app for screening CTS with an accuracy of 83% using a tablet and support vector machine, utilizing a machine learning technique. However, as patients with CTS are mainly aged 40 years and older and the rate of use of tablets in this age group is not high [ , ], the system may be difficult to introduce. Furthermore, the machine learning for the binary classification used in the aforementioned app needs 2 data sets, both from healthy controls and from patients. Large data sets are needed to enhance machine learning; however, these are difficult to collect due to the low prevalence of CTS.
To address these concerns, we developed a screening app for CTS using a smartphone and an anomaly detection algorithm  because the usage rate of smartphones is higher than that of tablets [ , ] and anomaly detection algorithms need only easily collected data sets of healthy controls. We aimed to examine whether our system was a useful screening tool for CTS.
This study was approved by the Institutional Review Board of Tokyo Medical and Dental University. Written informed consent was provided by all participants.
We recruited 21 preoperative patients (36 hands) with CTS at the Tokyo Medical and Dental University Hospital as the CTS group and 15 healthy volunteers (27 hands) at an osteopathic clinic as the non-CTS group from July 2018 to May 2019. Experienced hand surgeons diagnosed CTS based on symptoms, physical findings such as the Tinel sign and Phalen test, x-ray images of the hands, and NCSs measured by Neuropack X1 (Nihon Kohden). Patients were classified based on the Bland classification . Patients with a history of other hand injury or surgery, recurrence after release surgery of the carpal tunnel, positive imaging findings indicative of first carpometacarpal or thumb metacarpophalangeal osteoarthritis (which could affect thumb motion), or suspicion of a disease of the cervical spine were excluded. In the non-CTS group, volunteers were excluded if they had a history of wrist, hand, or finger disease, injury, or surgery; finger numbness; thumb pain; or positive physical findings of CTS.
We used a Huawei P10 Lite (Huawei Technologies) phone and developed the app using Unity software (Unity Technologies). We also created a finger guide, which was attached to the back of the smartphone to fix the position of the fingers other than the thumb (). The guide consisted of a component created with a 3D printer and 3 binding bands. The length of the binding band could be adjusted to adapt to the participant’s finger thickness.
In this app, the player controlled a rabbit character with their thumb and collected vegetables (carrots, radishes, or eggplants) that appeared on the screen (screen A in). When vegetables were hidden by the thumb, broad markers that indicated the direction of the vegetable were also displayed. The vegetables appeared sequentially in 12 directions along a circle with a 2-cm radius in a random order (screens B and C in ). The vegetables appeared alternatively in one of 12 directions and at the center, and the user collected them in each direction and in the center in turn ( ). If a vegetable was not collected within 5 seconds, it disappeared and then reappeared at another place. In the practice phase, vegetables appeared randomly in 4 directions. Subsequently, in the measurement phase, the game ended after 2 sequences of vegetable appearances in 12 directions. The participants played the game in the app twice. The position of the thumb and the time were recorded, and the average time, average velocity, and maximum velocity of the thumb movement for the 12 directions were calculated.
We used 2-tailed Student t tests to compare the age of participants, average time, average velocity, and maximum velocity of the thumb movement for the 12 directions between the non-CTS and CTS groups. Chi-square tests were used to compare sex, playing side of the hand, and hand dominance between the non-CTS and CTS groups. A P value below .05 was considered to indicate statistical significance.
To generate a screening model that classified participants as CTS and non-CTS, we analyzed data sets using anomaly detection and an autoencoder (AE) [, ]. Anomaly detection is the process of identifying data that differ from the norm in a data set. It has the advantage that it can be learned from normal group data only. The AE is a type of neural network with a 3-layer structure consisting of input, hidden, and output layers ( ). The transformation of the input layer to the hidden layer is the encoder, and the attempted reconstruction of the hidden layer to the output layer constitutes the decoder. The AE performs unsupervised learning and is trained to reconstruct the input patterns. By reducing the number of units in a hidden layer compared with the number of units in the input layer, it enables dimensional compression.
First, we calculated the distance to the center of the screen from the coordinate data and converted this into a value from 0 to 1. In our proposed model, the first lap was only played as practice for the participants to get used to the app, and only the second-lap data were used for the analysis. Next, a grayscale image was generated by arranging the pixel values with the vertical axis set as each direction and the horizontal axis set as time (). The horizontal axis consisted of 5 seconds, which is equal to 50 frames because the sampling rate was 10 Hz. Hence, the pixel count of the grayscale image was 600 pixels (12 directions × 50 frames). Finally, we validated the classification of non-CTS and CTS using the AE. For the AE, the 600 pixels of the grayscale image were used as the input layer, the intermediate layer was fixed at 10 dimensions, and the output layer was set to 600 dimensions ( ).
We used the data from 12 hands in the non-CTS group for the training of the AE and validated them with the data from the 36 hands in the CTS group and 15 hands in the non-CTS group that were not used for the training. The reconstruction error of the AE was calculated using the mean square error of the difference between the input and output. By training the AE on non-CTS data only, we could detect patients with CTS because the reconstruction error was smaller for non-CTS data and larger for CTS data. We generated a receiver operating characteristic (ROC) curve by adjusting the cutoff value of the mean square error and calculated the area under the curve (AUC). The optimal cutoff value was set at the point where the Youden index was at its maximum in the ROC curve. Furthermore, to investigate which directional movements contribute to the diagnosis of CTS, we also generated modified screening models that classified CTS and non-CTS using data from only 4 consecutive directions of the 12 directions and calculated the AUC in the same way as above.
The characteristics of the participants are summarized in. There was no significant difference between the groups in terms of age, sex, or side of the playing hand.
|Age (years), mean (SD)||63.5 (17.6)||64.3 (12.2)||.87|
|Sex (female), n||12||16||.63|
|Hand dominance (right), n||15||21||>.99|
|Side (right), n||15||17||.69|
|Bland classification, n||N/A|
aCTS: carpal tunnel syndrome.
bN/A: not applicable.
shows the average time taken to collect vegetables and the average and maximum velocities in each direction. Compared with healthy people, the patients took significantly longer to collect the vegetable in directions 6 to 9, and both the average and maximum velocities of the patients were significantly slower in all directions.
The results of the screening model are shown in. The participants with and without CTS were classified with 94% sensitivity and 67% specificity. The ROC curve of the classification model is shown in ; the AUC was 0.86.
|True label||Predicted label, n|
aCTS: carpal tunnel syndrome.
The results of the modified screening models are shown in. The model using data from directions 8 to 11 had the highest AUC of 0.99 and could classify patients as CTS and non-CTS with 92% sensitivity and 100% specificity.
|Directiona||Sensitivity, %||Specificity, %||AUCb|
aDirections are based on screens B and C of.
bAUC: area under the curve.
In this study, we developed a smartphone app with a high ability to screen for CTS. The app could diagnose CTS with 94% sensitivity and 67% specificity and was almost equal to a tablet app in a previous study, which diagnosed CTS with 93% sensitivity and 73% specificity . The result was also as good as physical examinations; the Tinel sign showed 23% to 60% sensitivity and 64% to 87% specificity, and the Phalen test showed 51% to 91% sensitivity and 33% to 86% specificity in previous studies [ , ]. As we could obtain the same diagnostic ability as physical examinations without a direct medical examination, the app would be useful for screening for CTS in telemedicine in the circumstances of COVID-19.
In the modified screening models, the model using data from directions 8 to 11 had the highest AUC of 0.99 and could diagnose CTS with 92% sensitivity and 100% specificity; this was better than the screening model that used data in all directions. This result suggests that thumb movement from directions 8 to 11 is different between the CTS and non-CTS groups, contributing to the diagnosis of CTS. Reaching directions 8 to 11 requires a movement similar to thumb opposition, as in screen B of, a movement that is impaired in people with CTS [ ]. This difficulty with thumb opposition was apparent when using our system.
We used a similar app as in the previous study  but with 2 novel aspects. First, our system used a smartphone instead of a tablet. The usage rate of smartphones in Japan is approximately 80% in people aged 40 years or older, higher than that of tablets (40%) [ ]. Since we intend to use this app as a screening tool for CTS, it should be accessible to many people. Therefore, it is important to use common equipment. Smartphones have been used in many medical studies because of their utility and universality [ ]. Second, our system used anomaly detection algorithms (instead of a binary classification), which have been studied extensively in the detection of system failures in infrastructure and factories, malware detection, and computer vision [ ]. Anomaly detection algorithms are also used in medicine, such as medical images [ , ], electrocardiograms [ ], and remote medicine [ , ]. Although classification techniques are the most common approaches to anomaly detection, data sets often lack sufficient labeled anomalies. In such cases, unsupervised anomaly detection using statistical and machine learning is more promising. The binary classification used in the previous study requires 2 data sets, one from healthy people and one from patients. In contrast, anomaly detection algorithms require only data sets of healthy people. In general, large data sets are required to enhance machine learning. If our app is used widely, it will be easier to collect data sets from healthy people than patients with CTS. Thus, our system can be enhanced easily in the future.
This study has some limitations. First, the varied sizes of the participants’ hands were not considered. Healthy people with small hands who struggled to reach each direction may have been misdiagnosed with CTS. Second, because smartphone sizes vary, the level of difficulty depends on the model. Therefore, it is desirable to adjust the size of the circle in the game before playing according to the size of each player's fingers and the smartphone. Third, we used an inexpensive finger guide on the back of the smartphone to fix the hand. If special equipment is required, few people will be able to use our system. It would be better to use readily available equipment, such as fall prevention devices for smartphones, instead. Fourth, while we obtained good results in this study, there is still room for further improvement in machine learning. In order to take advantage of anomaly detection, it is desirable to collect more samples. Finally, our system diagnosed only the presence of CTS. In future work, we will improve our system by collecting more data sets to enable estimation of the severity of CTS.
We developed an app for screening patients with CTS that revealed the difficulty of thumb opposition for patients with CTS and could screen for CTS with high sensitivity and specificity. The app can be used by many people because it is smartphone based, and the machine learning is easy to enhance using anomaly detection. In future work, we will enhance our system by collecting more data sets to enable estimation of the severity of CTS.
This research was supported by JST AIP-PRISM JPMJCR18Y2 and JST PRESTO JPMJPR17J4. The authors thank the staff and patients at Sajima Osteopathic Hospital.
Conflicts of Interest
- Bongers F, Schellevis F, van den Bosch WJHM, van der Zee J. Carpal tunnel syndrome in general practice (1987 and 2001): incidence and the role of occupational and non-occupational factors. Br J Gen Pract 2007 Jan;57(534):36-39 [FREE Full text] [Medline]
- Padua L, Coraci D, Erra C, Pazzaglia C, Paolasso I, Loreti C, et al. Carpal tunnel syndrome: clinical features, diagnosis, and management. Lancet Neurol 2016 Nov;15(12):1273-1284. [CrossRef] [Medline]
- Kuroiwa T, Fujita K, Nimura A, Miyamoto T, Sasaki T, Okawa A. A new method of measuring the thumb pronation and palmar abduction angles during opposition movement using a three-axis gyroscope. J Orthop Surg Res 2018 Nov 16;13(1):288 [FREE Full text] [CrossRef] [Medline]
- Wipperman J, Goerl K. Carpal Tunnel Syndrome: Diagnosis and Management. Am Fam Physician 2016 Dec 15;94(12):993-999 [FREE Full text] [Medline]
- Atroshi I, Gummesson C, Johnsson R, Ornstein E, Ranstam J, Rosén I. Prevalence of carpal tunnel syndrome in a general population. JAMA 1999 Jul 14;282(2):153-158. [CrossRef] [Medline]
- Bland JDP, Rudolfer SM. Clinical surveillance of carpal tunnel syndrome in two areas of the United Kingdom, 1991-2001. J Neurol Neurosurg Psychiatry 2003 Dec;74(12):1674-1679 [FREE Full text] [CrossRef] [Medline]
- Burke DT, Burke MM, Stewart GW, Cambré A. Splinting for carpal tunnel syndrome: in search of the optimal angle. Arch Phys Med Rehabil 1994 Nov;75(11):1241-1244. [CrossRef] [Medline]
- Marshall S, Tardif G, Ashworth N. Local corticosteroid injection for carpal tunnel syndrome. Cochrane Database Syst Rev 2007 Apr 18;2:CD001554. [CrossRef] [Medline]
- Wintman BI, Winters SC, Gelberman RH, Katz JN. Carpal tunnel release. Correlations with preoperative symptomatology. Clin Orthop Relat Res 1996 May;326:135-145. [Medline]
- Gong HS, Oh JH, Bin SW, Kim WS, Chung MS, Baek GH. Clinical features influencing the patient-based outcome after carpal tunnel release. J Hand Surg Am 2008 Nov;33(9):1512-1517. [CrossRef] [Medline]
- D'Arcy CA, McGee S. The rational clinical examination. Does this patient have carpal tunnel syndrome? JAMA 2000 Jun 21;283(23):3110-3117. [CrossRef] [Medline]
- MacDermid JC, Wessel J. Clinical diagnosis of carpal tunnel syndrome: a systematic review. J Hand Ther 2004;17(2):309-319. [CrossRef] [Medline]
- Basiri K, Katirji B. Practical approach to electrodiagnosis of the carpal tunnel syndrome: A review. Adv Biomed Res 2015;4:50 [FREE Full text] [CrossRef] [Medline]
- Fowler JR, Cipolli W, Hanson T. A Comparison of Three Diagnostic Tests for Carpal Tunnel Syndrome Using Latent Class Analysis. J Bone Joint Surg Am 2015 Dec 02;97(23):1958-1961. [CrossRef] [Medline]
- Sonoo M, Menkes DL, Bland JD, Burke D. Nerve conduction studies and EMG in carpal tunnel syndrome: Do they add value? Clin Neurophysiol Pract 2018;3:78-88 [FREE Full text] [CrossRef] [Medline]
- Ienaga N, Fujita K, Koyama T, Sasaki T, Sugiura Y, Saito H. Development and User Evaluation of a Smartphone-Based System to Assess Range of Motion of Wrist Joint. J Hand Surg Glob Online 2020 Nov;2(6):339-342 [FREE Full text] [CrossRef] [Medline]
- Asselborn T, Gargot T, Kidziński Ł, Johal W, Cohen D, Jolly C, et al. Automated human-level diagnosis of dysgraphia using a consumer tablet. NPJ Digit Med 2018;1:42 [FREE Full text] [CrossRef] [Medline]
- Masaki K, Tateno H, Nomura A, Muto T, Suzuki S, Satake K, et al. A randomized controlled trial of a smoking cessation smartphone application with a carbon monoxide checker. NPJ Digit Med 2020;3:35 [FREE Full text] [CrossRef] [Medline]
- Fujita K, Watanabe T, Kuroiwa T, Sasaki T, Nimura A, Sugiura Y. A Tablet-Based App for Carpal Tunnel Syndrome Screening: Diagnostic Case-Control Study. JMIR Mhealth Uhealth 2019 Sep 13;7(9):e14172 [FREE Full text] [CrossRef] [Medline]
- Ministry of Internal Affairs and Communications. Inspection report about time of using media and activity for information in 2020 [Japanese]. Japan Ministry of Internal Affairs and Communications. URL: https://www.soumu.go.jp/main_content/000708016.pdf [accessed 2020-12-11]
- Mobile fact sheet. Pew Research Center. 2019 Jun 12. URL: https://www.pewresearch.org/internet/fact-sheet/mobile/ [accessed 2020-12-11]
- Chandola V, Banerjee A, Kumar V. Anomaly detection. ACM Comput Surv 2009 Jul;41(3):1-58. [CrossRef]
- Bland JD. A neurophysiological grading scale for carpal tunnel syndrome. Muscle Nerve 2000 Aug;23(8):1280-1283. [CrossRef] [Medline]
- Chalapathy R, Chawla S. Deep Learning for Anomaly Detection: A Survey. ArXiv. Preprint posted online January 23, 2019 2021 [FREE Full text]
- Wei Q, Ren Y, Hou R, Shi B, Lo JY, Carin L. Anomaly detection for medical images based on a one-class classification. 2018 Presented at: SPIE Medical Imaging 2018: Computer-Aided Diagnosis; Feb 10-15, 2018; Houston, TX. [CrossRef]
- Schlegl T, Seeböck P, Waldstein SM, Langs G, Schmidt-Erfurth U. f-AnoGAN: Fast unsupervised anomaly detection with generative adversarial networks. Med Image Anal 2019 May;54:30-44. [CrossRef] [Medline]
- Zhang CK, Chen YY, Yin A, Wang X. Anomaly detection in ECG based on trend symbolic aggregate approximation. Math Biosci Eng 2019 Mar 12;16(4):2154-2167 [FREE Full text] [CrossRef] [Medline]
- Adler DA, Ben-Zeev D, Tseng VW, Kane JM, Brian R, Campbell AT, et al. Predicting Early Warning Signs of Psychotic Relapse From Passive Sensing Data: An Approach Using Encoder-Decoder Neural Networks. JMIR Mhealth Uhealth 2020 Aug 31;8(8):e19962 [FREE Full text] [CrossRef] [Medline]
- Jalali N, Sahu KS, Oetomo A, Morita PP. Understanding User Behavior Through the Use of Unsupervised Anomaly Detection: Proof of Concept Using Internet of Things Smart Home Thermostat Data for Improving Public Health Surveillance. JMIR Mhealth Uhealth 2020 Nov 13;8(11):e21209 [FREE Full text] [CrossRef] [Medline]
|AUC: area under the curve|
|CTS: carpal tunnel syndrome|
|NCS: nerve conduction study|
|ROC: receiver operating characteristic|
Edited by G Eysenbach; submitted 11.12.20; peer-reviewed by S Kriventsov, A Oetomo, N Jalali; comments to author 05.01.21; revised version received 15.02.21; accepted 27.02.21; published 14.03.21Copyright
©Takafumi Koyama, Shusuke Sato, Madoka Toriumi, Takuro Watanabe, Akimoto Nimura, Atsushi Okawa, Yuta Sugiura, Koji Fujita. Originally published in JMIR mHealth and uHealth (http://mhealth.jmir.org), 14.03.2021.
This is an open-access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work, first published in JMIR mHealth and uHealth, is properly cited. The complete bibliographic information, a link to the original publication on http://mhealth.jmir.org/, as well as this copyright and license information must be included.