Children Age Group Detection based on Human-Computer Interaction and Time Series Analysis

This article proposes a novel Children-Computer Interaction (CCI) approach for the task of age group detection. This approach focuses on the automatic analysis of the time series generated from the interaction of the children with mobile devices. In particular, we extract a set of 25 time series related to spatial, pressure, and kinematic information of the children interaction while colouring a tree through a pen stylus tablet, a specific test from the large-scale public ChildCIdb database. A complete analysis of the proposed approach is carried out using different time series selection techniques to choose the most discriminative ones for the age group detection task: i) a statistical analysis, and ii) an automatic algorithm called Sequential Forward Search (SFS). In addition, different classification algorithms such as Dynamic Time Warping Barycenter Averaging (DBA) and Hidden Markov Models (HMM) are studied. Accuracy results over 85% are achieved, outperforming previous approaches in the literature and in more challenging age group conditions. Finally, the approach presented in this study can benefit many children-related applications, for example, towards an age-appropriate environment with the technology.


I. INTRODUCTION
C HILDREN's exposure to mobile devices has increased dramatically in recent decades due to technological innovation [1].They are growing up in environments overloaded with multiple digital technologies such as smartphones, tablets, and smart TVs, among others.In addition, parents often let their children use mobile devices to keep them calm in public places, after school homework or household chores, and at bedtime before going to sleep [2].As a result, the average daily usage of mobile devices in children aged 0-8 years has increased over 11 times from 2011 to 2020 [3].
Recent studies in the literature highlight how the correct use of mobile devices can positively affect children's development and learning (e.g., through educational games or creative applications [4]).For example, Huber et al. conducted a study in [5] in which children learned to solve the popular game "Tower of Hanoi" using a touchscreen device and subsequently apply this learning with a physical replica of the game.The results concluded that, for certain activities, children are quite capable of transferring learning from touchscreen devices to real-life problems.Language enhancement through mobile interaction games was also studied in [6].In that work, children aged 4 years old played with an interactive word-learning application on a mobile device.The experiments concluded that children who played with the application gained a receptive and expressive understanding of the target words.With respect to selfregulation development, an interesting study was presented in [7].The authors reported that when children from 2 to 3 years old played with an educational app for an appropriate amount of time, their self-regulation scores were higher than, for example, after exposure to watching cartoons on TV.
However, intensive and unsupervised exposure to digital devices in childhood can also be associated with adverse effects on growth (e.g., learning, self-regulation, well-being, socialemotional skills, sleep, media addiction, etc.).For example, Bozzola et al. stated in [8] that excessive touchscreen use can affect children's correct development due to the lack of real experiences that challenge their thinking and problem-solving skills.Another interesting work in this line was presented in [9].The authors analysed the correlation between tablet use and physical discomforts, such as headaches and neck and shoulder pain.The results revealed that poor posture while using tablets significantly reduces the flexion angles of the head and neck.As a result, correct posture is essential for children's well-being.The associations between children's socioemotional development and mobile media use were explored in [1].Results showed that children with social-emotional difficulties are more likely to be given mobile devices as a calming tool.Similar conclusions were obtained in [10], stating that one of the reasons for children having self-regulation difficulties (e.g., self-control, sleep, emotional regulation, and attention) is related to high media exposure at 2 years old.The effect of children mobile interaction on the sleep quality was also studied in [11].In that work, the authors showed how increased exposure to media devices in the bedroom during childhood can reduce sleep duration by forming long-lasting habits that lead to significant sleep deficits.Finally, Csibi et al. analysed in [12] the risk of smartphone addiction in different age groups and concluded that children and young adults are at the highest risk of addictive behavior.Smartphone addiction can negative affect children's mental health, well-being, and academic performance [13].All in all, the interaction of children with mobile devices can have both positive and negative effects, depending on the scenario considered.As a result, it seems critical to provide an age-appropriate environment for children (e.g., limiting exposure time to devices depending on the age, assisting children with specific touch input, preventing access to ageinappropriate applications or websites, etc.) in order to improve their development and creative skills, among others [4], [5].This is specially important as more and more children are exposed to mobile devices for longer time and at a younger age.

Age Group Detection
This study aims to advance in this research line by presenting a novel approach for the task of children age group detection based on the automatic analysis of time series (commonly known as local features [23]) generated from the interaction of the children with mobile devices.
The main contributions of the present work are: • An in-depth analysis of state-of-the-art approaches for the task of children age group detection through their interaction with mobile devices, remarking key public databases and results.• Proposal of a novel Children-Computer Interaction (CCI) approach for the task of age group detection.This approach focuses on the automatic analysis of the time series generated from the interaction of the children with mobile devices.In particular, our proposed approach extracts a set of 25 time series related to spatial, pressure, and kinematic information of the children interaction while colouring a tree through a pen stylus on a tablet device.Fig. 1 shows the graphical architecture of the proposed approach.[15] a dataset comprising smartphone touch interaction data from 30 adults and 89 children aged 3-6 years old.In that work, the authors achieved 86.5% accuracy in detecting children from adults using a set of features extracted from touch spatial coordinates x and y.Vera-Rodriguez et al. also considered this database in their experimental protocol [20].They presented a set of neuromotor-skill features to detect children from adults.Results showed the discriminative ability of the proposed system with correct classification rates over  96%.An interesting article in this line was presented by Li et al. [17].The study aimed to investigate the different screentouch patterns between children and adult users.Experiments were carried out using 17 children (3 to 11 years) and 14 adults (22 to 60 years), achieving 97% accuracy for childadult detection using only a single finger and 8 consecutive swipes on the touch screen.
A different approach was presented by Nguyen et al. in [18].In that work, the authors tried to predict if a child or an adult is using a smartphone based on behavioral differences extracted from the touchscreen and built-in sensors (accelerometer and gyroscope).An accuracy over 99% was achieved after 5 seconds of sensor reading or 8 consecutive touch gestures.Similar conclusions were obtained by Davarci et al. in [16], where rates over 92% were achieved in detecting children from adults based only on accelerometer data.
The user interaction with mobile devices is not only studied with the finger as input but also using a stylus [24], [25].In line with the task of children and adults detection, Kim et al.
proposed in [14] a sketch recognition system able to assess children's developmental skills from their sketches created with a stylus on a tablet.In total, 20 children (3 to 8 years) and 4 adults participated in the study.Two main significant differences between children and adults were found: i) the stroke lengths of adults' sketches were larger, and ii) adults took less time to draw sketches.
Focusing on the stylus scenarios, only a few recent studies go one step further in the task of children age group detection, trying to detect the children's age group rather than just differentiating them from adults.Tolosana et al. released in [21] a public database called ChildCIdb, including over 400 children aged 18 months to 8 years interacting with mobile devices (stylus and finger).The authors grouped the children into 3 age groups without overlap: 1 to 3 years, 3 to 6 years, and 6 to 8 years.Accurate results were obtained between different children age groups (over 90% accuracy) by analysing only one task in which children had to colour a tree using a stylus.It is important to highlight that the children age group approach was based on a set of 148 global features, not time series analysis as in this study.Ruiz-Garcia et al. obtained similar conclusions in [22], where authors also considered ChildCIdb as an experimental database.They analysed the correlation between children's chronological age and their motor and cognitive development while interacting with all the tests included in ChildCIdb.Children were grouped into the same three age groups considered in [21].Good results above 93% accuracy were achieved in the age group detection task by combining three different ChildCIdb tests (i.e., Drag and Drop, Spiral Test, and Drawing Test), using both stylus and finger as input.
In the present article, we propose a novel children age group detection based on the automatic analysis of time series, different compared with previous approaches in the literature (based on global features).In addition, and as we have seen along this section, most studies in the literature focus on detecting children from adults or grouping children in wide age groups.We go deeper by performing a more complex task: detecting the age group of the children based on their  [21] the first version of this database (ChildCIdb v1 2 ).ChildCIdb is an ongoing CCI database collected in collaboration with the school GSD Las Suertes in Madrid (Spain).This database is planned to be extended yearly to enable longitudinal studies.The first version contains children interaction using both finger and stylus.In total, it comprises 438 children aged from 18 months to 8 years, grouped in 7 different educational levels according to the Spanish education system.In particular, 6 different tests are considered in ChildCIdb, grouped in 2 main blocks: i) touch, and ii) stylus.All tests were designed considering many of the cognitive and neuromuscular aspects highlighted in the state of the art, e.g., the evolution of children's gestures with age.In addition, tests were discussed and approved by neurologists, child psychologists, and educators of the GSD school.The database also considers other children's interesting information such as grades at school, previous experience using mobile devices, attention deficit/hyperactivity disorder (ADHD), prematurity (under 37 weeks gestation), and birthday, among other things.In the present study we focus on the analysis of the time series generated in Test 6 (Drawing Test) of ChildCIdb, in which children have to colour a tree using a pen stylus as good as they can and a maximum time of 2 minutes.We select this test as children have a high degree of freedom to show their motor and cognitive development skills.
In this study, we consider an extension of the current Child-CIdb v1 database, including two more acquisition sessions in time.The first one was captured in May 2021 and 376 children participated in the acquisition, adding new young children (18 months).In addition, children who participated in the first version of the database were also acquired again but this time they belong to the next educational level as one year passed since the first acquisition.Children who moved to a higher educational level than the last considered in ChildCIdb (over  Total acceleration magnitude: a n 8-14 First-order derivate of features 1-7:

IV. AGE GROUP DETECTION: PROPOSED APPROACH
This section describes our proposed approach for the task of children age group detection based on the automatic analysis of the time series generated while children colouring a tree, i.e., the Drawing Test of the ChildCIdb database.Fig. 1 provides a graphical representation of the proposed approach.We describe next the details of each module.Sec IV-A shows the time series extracted from the Drawing Test.Sec IV-B provides the main details of the classification algorithms and metrics studied.Finally, Sec IV-C describes the time series selection techniques considered in this study.
x y z θ v p a x 0 y 0 z 0 θ 0 v 0 p 0 a 0 x 00 y 00 v r α α 0 sin cos r 5 r 7 i t 0

A. Time Series Extraction
Each time a child performs the Drawing Test, a set of 6 time series is captured by the tablet device containing the following information: x and y spatial coordinates, whether the child is colouring inside the tree or not, the pressure performed on the screen using the stylus, timestamp, and type of action performed (pen-down or pen-up).Taking this as a starting point, we extract a set of 25 total time series related to velocity, acceleration, pressure, and stylus position, among others.In particular, 21 time series are based on previous studies on handwriting and signature biometric recognition [26], and the remaining 4 presented in this work are related to stylus pressure and position information.Table IV shows the final set of time series considered in this study.

B. Classifiers and Metrics
1) Metrics: we consider 2 metrics to measure the results achieved in the task of children age group detection: • Accuracy (%): this metric measures the overall accuracy of the classification system by taking into account only whether the predicted age group of a child is the same as the real one (label).• Age Group Distance (AGD): this metric measures the absolute distance between the real age group of a child (label) and the predicted one.2) Classification Algorithms: in total, 2 different classifiers are studied as part of our experimental framework.The optimal configuration parameters for each of them depend on the time series selection technique used (Sec.IV-C).

C. Time Series Selection Techniques
The following time series selection techniques are studied to choose the most discriminative time series from the 25 total time series considered in the present study: • Statistical Analysis: a different statistical analysis of the time series has been conducted according to the classification algorithm used.Focusing on DBA, for each prototype extracted for each time serie, we first calculate the DTW distance with respect to the rest of prototypes of the same time serie but from different age groups in order to see the discriminative power of that time serie with respect to all the age groups (inter-class variability).A similar analysis is carried out for HMM models but using AGD.• Sequential Forward Search (SFS): this is a widely used feature selection algorithm that automatically selects an optimal feature subset (time series subset in this case) from the original set using a specific optimisation criteria (AGD in this study).In particular, SFS offers a suboptimal solution because it doesn't take into account all possible combinations, but it does consider correlations between features.The specific implementation considered in this study is publicly available in Scikit-Learn 4 .

A. Experimental Protocol
The experimental protocol considered has been designed to detect the age group of the children based on their educational level through the analysis of their interactions with mobile devices.In particular, 7 age groups are considered according to the Spanish education system as we can see in Table II Average AGD Fig. 3: Statistical Analysis + HMM: Results achieved using different HMM parameters.We highlight in brown the configuration with the best performance.
is used to train the different age group detection systems, while the validation subset is used to test their performance.Finally, the final evaluation dataset is used to test the age group detection systems under realistic conditions, considering children unseen during the development stage.All experiments are run on a machine with an Intel i7-9700 processor and 32GB of RAM.

B. Experimental Results
1) Time Series Selection: this section analyses which are the most discriminative and robust time series for each classification algorithm considered, using both SFS and statistical analysis selection techniques.For this purpose, we only consider the training and validation datasets.The following 4 cases are studied: • Statistical Analysis for DBA: we create 7 prototypes (one for each age group) for each time serie using DBA.
Then, for each time serie, we calculate the DTW distance between the 7 age groups using the corresponding prototypes (inter-class variability).The higher the average DTW distance is, the higher the discriminative power of that time serie will be to detect different age groups.We select those time series whose average DTW distance is above the 70th percentile (see Fig. 2).• Statistical Analysis for HMM: first, we create a single HMM model and consider different HMM parameter configurations using all the time series.The HMM parameters with the best performance (lowest average AGD) in the validation dataset are N=32 and M=16 (see Fig. 3).Then, we generate a new HMM model for each time serie, and finally, we calculate the average AGD for the task of children age group detection.The lower the average AGD is, the higher the discriminative power of that time serie will be.We select those time series whose average AGD is in the 70th percentile (see Fig. 4).• SFS Algorithm for DBA: first, SFS selects the time serie with the highest discriminative power (lowest AGD).Then, SFS selects the time series that obtains the lowest AGD by performing combinations of 2. This procedure is performed successively until the result on the validation x y z θ v p a x 0 y 0 z 0 θ 0 v 0 p 0 a 0 x 00 y 00 v r α α 0 sin cos r 5 r 7 i t 0.0 0.5  dataset gets worse.Fig. 5 provides a graphical representation of the development stage.The best performance of the system is achieved with 8 time series (v r , i, θ, x ′ , y ′′ , θ ′ , a, α ′ ).• SFS Algorithm for HMM: the same procedure described before is applied to HMM.The HMM parameters with the best performance in the validation dataset are N=64 and M=8.The best performance of the system (Fig. 5) is achieved with 9 time series (t, r 7 , z, x ′′ , z ′ , x, y, θ ′ , p ′ ).2) Results: this section analyses the performance achieved on the final evaluation dataset for the task of children's age group detection, considering the optimal configurations described in the previous section.Table V shows the results achieved in terms of accuracy (%) and average AGD (distance measured in age groups).For completeness, we show in Fig. 6 the average AGD obtained for each age group and classification algorithm considered.
Focusing first on DBA, it seems that using prototypes for representing each age group of children is not an accurate approach.On the one hand, the time series selection technique used (i.e., Statistical Analysis or SFS) does not greatly affect the results obtained.In terms of accuracy (%), the best result achieved is 33.19%.On the other hand, focusing on the average AGD, although the DBA system is not able to detect correctly the age group, the distance between the label and the predicted class is not so bad (average AGD of 0.99 age groups for the SFS approach, i.e., average distance lower than one group).This aspect can be better observed in Fig. 6.It seems that the higher average AGD values happen with the intermediate groups (4 to 6).We believe this can be produced due to at these educational levels children face a developmental stage full of multiple educational changes and learning phases.In particular, children in group 3 have just moved from nursery school to pre-school and those in group 6 are about to move from pre-school to primary education.This generates challenges in classification.
Analysing the HMM system, we can see in Table V that different results are achieved depending on the time series selection technique.The SFS approach outperforms the statistical analysis in terms of accuracy (85.39% vs. 75.22%)and average AGD (0.17 vs. 0.31).Again, as can be seen in Fig. 6, the intermediate groups are also the most challenging ones for the HMM models.Nevertheless, HMM models obtain a very low average AGD, with less than 0.2 age groups.Hence, HMM seems to be an accurate statistical approach to model the children patterns in the time domain by exploiting the correlation of the chosen time series.
3) Comparison with the State-of-the-Art: Finally, we compare the results obtained with the state of the art.It is important to remark that, as indicated in Table I of the article, a direct comparison with previous studies in the literature is not feasible as different tasks, databases, and experimental protocols are usually considered.Nevertheless, and although the tasks considered in previous studies are simpler (e.g., detecting children from adults), we include them for a better understanding of the results achieved with our proposed approach.For example, in [20] the authors obtained an accuracy of 93% on the task of detecting children from adults using an automatic detection system based on finger touch interaction.Similar results were achieved by Vatavu et al. in [15], over 80%, using a feature set extracted from the interaction of adults and children on mobile devices.
It is also interesting to compare the results achieved in the present work with our previous approach [21] focusing on the same Drawing Test, although a simpler task was considered.Concretely, we considered 3 age groups (i.e., 1-3 years, 3-6 years, and 6-8 years) instead of the 7 age groups considered in the present article (i.e., one for each educational level as indicated in Table II).In [21], we presented an approach based on 148 global features.We achieved results above 90% accuracy on the children age group detection task.This approach based on global features presented a less discriminative way of detecting the age group associated with a child than the approach proposed in the present article based on the analysis of the complete realization process of the Drawing Test through the time signals.The present approach (local features or time series) captures more detailed patterns of children's interaction, allowing us to consider a more challenging scenario in which to detect each educational level of children (7 possible groups).For completeness, we include in Table VI a comparison between the results obtained using the proposed approach (local features) and the previous one presented in [21] (global features) focusing on the same task, i.e., detection of the 7 possible age groups of children.To obtain the results using the global features approach, we consider the best configuration obtained in [21].Therefore, comparing the results obtained in the present work (accuracy results over 85% and average AGD of 0.17 age groups) with the results achieved by using the global features approach (30.09% accuracy and average AGD of 1.62 age groups), we can conclude that the automatic analysis of the time series (local features) generated while colouring the tree provides much more discriminative information of the children age group compared with approach based on the global features considered in [21].
Finally, the results achieved in this study prove the high potential of combining CCI and automatic analysis of time series for the task of children age group detection.This

VI. CONCLUSION AND FUTURE WORK
This study proposes a novel Children-Computer Interaction (CCI) approach for the task of children age group detection in order to benefit many children-related applications, for example, towards an age-appropriate environment with the technology.In particular, we have focused on the automatic analysis of the time series generated from the interaction of children with mobile devices.We have focused on a specific test of ChildCIdb, Drawing Test, where children have to colour a tree over a pen stylus tablet.After that, we extract 25 total time series related to spatial, pressure, and kinematic information.
Our proposed approach has been studied using two different time series selection techniques to choose the most discriminative ones: i) a statistical analysis, and ii) an automatic feature selection algorithm called Sequential Forward Search (SFS).In addition, two classification algorithms have been considered for the task of children age group detection: i) DTW Barycenter Averaging (DBA), and ii) Hidden Markov Models (HMM).
Analysing the results obtained, our proposed HMM + SFS approach has achieved better accuracy results for the task of children age group detection (7 possible groups) compared to previous studies in the literature, which focused on global features by considering simpler tasks such as detecting children from adults or group children in only 3 age groups.In particular, the proposed approach achieves an average AGD lower than 0.2 age groups and accuracy over 85%.These results prove the high potential of combining an innovative approach based on CCI and automatic analysis of time series (local features) for the task of children age group detection.Future works will be oriented to: i) a longitudinal analysis of the children, studying the motor and cognitive evolution of them through the interaction with the tests of ChildCIdb, ii) consider the ChildCIdb database in other areas of e-Health and e-Learning, for example in terms of privacy [31], [32], and iii) analyse the relationship of children's metadata (grades, ADHD, prematurity, etc.) to their interaction with mobile devices.

Fig. 1 :
Fig. 1: Architecture of the proposed approach to detect the children's age group through the interaction of the children with mobile devices and the automatic analysis of the time series generated.Blue dashed arrows represent the different configurations studied in this article in terms of Time Series and Classification.First, children perform the input stage by colouring a tree on a tablet device using a stylus as an acquisition tool (Drawing Test).Next, time series extraction and selection are performed.Finally, to predict the children's age group, two different classifiers are tested independently, DBA and HMM.

Fig. 2 :
Fig.2: Statistical Analysis + DBA: Average DTW distance calculated for each time serie considered.The green line refers to the 70th percentile of DTW distance.We highlight in dark blue the selected time series.

Fig. 4 :
Fig.4: Statistical Analysis + HMM: Average AGD achieved for each time serie considered.The green line refers to the 70th percentile of average AGD.We highlight in brown the selected time series.

Fig. 5 :
Fig. 5: SFS Algorithm for DBA and HMM: Average AGD achieved for DBA and HMM during the execution of SFS in the development stage (training + validation).

Fig. 6 :
Fig. 6: Average AGD achieved for each of the age groups, classification algorithms, and time series selection techniques in the final evaluation dataset of ChildCIdb.

TABLE I :
Comparison of studies focused on the age detection of children through their interaction with mobile devices.AGD performance refers to the Age Group Distance presented in this study (see Sec. IV-B).

TABLE II :
Relationship between children's age range and their educational level group according to the Spanish system.

TABLE III :
Description of the number of children who participated in each group and acquisition in the ChildCIdb database.There is no age overlap between the different groups.
III. DATABASE: CHILDCIDBThe experimental work of this study considers the public ChildCIdb database.Tolosana et al. presented in

TABLE IV :
Set of time series considered in this work.
Table III describes the total number of samples collected for each age group.Finally, for completeness, a set of 70 adults aged 25-65 years with fully developed motor and cognitive skills was also captured.This set is not considered in the present work but could be used in future research.
a ′′ n 15-16 Second-order derivate of features 1-2: x ′′ n , y ′′ n 17 Ratio of the minimum over the maximum speed over a 5-samples windows: v r n 18-19 Angle of consecutive samples and first-order difference: α n , α ′ . ChildCIdb is divided into development (80% of the children) and evaluation (20% remaining children) datasets, where children in each age group are equally distributed in number and gender to allow an objective comparison of the results obtained.In addition, the development dataset is divided in 2 different subsets: training (80%) and validation (20%) datasets.During the development stage, the children considered in the evaluation dataset are excluded.Only the training subset 4 https://scikit-learn.org/stable/

TABLE V :
Results achieved in terms of accuracy (%) and average AGD over the final evaluation set for the Drawing Test of ChildCIdb.We highlight in bold the configuration that provides the best results.

TABLE VI :
Results of the global and local features approaches in terms of accuracy (%) and average AGD over the final evaluation set for the Drawing Test of ChildCIdb.We highlight in bold the approach that provides the best results.
can benefit many children-related applications, for example, towards an age-appropriate environment with the technology.