Design and Evaluation of a Machine Learning-Guided Intervention Strategy for Managing Dental Anxiety and Pain in Children
Abstract
The present study aimed to develop and evaluate a machine learning-guided strategy for allocating non-pharmacological interventions and to compare its clinical outcomes with a fixed standard intervention for managing dental anxiety and pain in children. The study was conducted in two phases. In the first phase, data from 300 children aged 6–12 years, including demographic characteristics, dental history, baseline anxiety, expected pain, and responses to non-pharmacological interventions, were collected. Four algorithms, including logistic regression, support vector machine, random forest, and XGBoost, were trained and evaluated. In the second phase, 80 independent children were randomly assigned to an algorithm-guided intervention group or a control group. In the experimental group, the intervention type was selected according to the output of the machine learning model, whereas the control group received fixed visual-auditory distraction. Dental anxiety was assessed using the CFSS-DS, experienced pain using the Wong-Baker FACES Pain Rating Scale, and heart rate at different stages of treatment. The first-phase results showed that XGBoost had the best predictive performance, with an accuracy of 0.91 and an ROC-AUC of 0.95. In the second phase, the algorithm-guided group showed greater reductions in dental anxiety and experienced pain than the fixed-intervention control group. Children in the algorithm-guided group also demonstrated lower heart-rate responses, better behavioral cooperation, and greater parental satisfaction. These findings support the comparative clinical performance of algorithm-guided intervention allocation versus a fixed visual-auditory distraction strategy. Because the control condition used a single fixed intervention and individual counterfactual treatment effects were not estimated, the results should not be interpreted as isolating the causal effect of personalization itself.
Introduction
Visiting a dentist and undergoing therapeutic procedures can be an experience accompanied by fear, anxiety, and pain for many children, and these reactions are considered major challenges in providing pediatric dental care [1,2]. The results of a recent systematic review and meta-analysis showed that the pooled prevalence of dental fear and anxiety in children aged 2 to 6 years is approximately 30%, and a history of dental caries and lack of previous experience visiting a dentist may increase the likelihood of its occurrence [1]. In addition to causing psychological distress, dental anxiety can lead to avoidance of treatment, reduced child cooperation, increased difficulty in performing therapeutic procedures, and the development of a negative attitude toward oral and dental care [1,2]. Pain is also an important outcome in pediatric dental anxiety. Recent systematic reviews of non-pharmacological behavior-management interventions have evaluated both anxiety and pain and indicate that intervention effects vary across studies and modalities [2,3]. Kaur et al., in a systematic review and meta-analysis of 76 randomized trials involving 6,723 participants, found that non-pharmacological behavior-management interventions can reduce pain in children, although effects on anxiety and pain were heterogeneous across studies [3]. In Iran, attention to the assessment of dental anxiety in children has also increased, and Enshaei et al. examined the Iranian version of the Children's Experiences of Dental Anxiety Measure in 275 children and adolescents aged 9 to 16 years and reported favorable internal consistency and test-retest reliability for this instrument [4]. The availability of valid Persian instruments for measuring dental anxiety makes it possible to identify children at risk of anxiety more accurately and to evaluate the effectiveness of behavioral interventions in the Iranian population [4]. Given the consequences of anxiety and pain, various methods are used to manage children's behavior in dentistry, including techniques such as tell-show-do, visual and auditory distraction, music, play, relaxation, and virtual reality [2,5]. Despite the widespread use of these methods, recent systematic reviews show that no single non-pharmacological intervention has a consistent and uniform superiority in all children and all treatment situations, and the effectiveness of interventions may vary according to age, baseline anxiety level, type of treatment, and individual characteristics of the child [2,3,5]. For example, the meta-analysis by Kaur et al. showed that although distraction techniques generally have an effect on pain reduction, virtual reality has not shown definitive superiority over traditional methods for all anxiety and pain outcomes [3].
Iranian clinical trials have also reported beneficial effects of virtual reality on pediatric dental anxiety and/or pain [6,7]. Bahrololoomi et al., in a crossover clinical trial in Iranian children aged 6 to 8 years, showed that the use of virtual reality during pulpotomy resulted in a significant reduction in anxiety and pain perception compared with the condition without virtual reality [7]. Mir Mohammadi et al. also reported in a study of Iranian children aged 6 to 12 years that the use of virtual reality animation during dental treatment requiring local anesthesia resulted in a significant reduction in anxiety and heart rate [6]. Despite the promising findings, a uniform intervention may not be optimal in every clinical context because non-pharmacological modalities differ in their average effects [3,5]. Children also differ in age, sex, dental history, baseline anxiety, pain expectations, and sensory and cognitive responses; recent predictive modeling shows that several of these characteristics are associated with dental anxiety and cooperative behavior [8]. These observations provide a rationale for investigating data-guided intervention allocation rather than assuming identical response patterns for all children. One of the technologies that makes such personalization possible is machine learning, which, as a subfield of artificial intelligence, uses data to identify patterns, classify individuals, predict outcomes, and support decision-making [9,10]. In dentistry, artificial intelligence and machine learning algorithms have in recent years been used in areas such as caries diagnosis, image analysis, prediction of childhood caries, tooth identification, and assistance with treatment planning [9,10]. The review conducted by the Iranian researchers Naeimi et al. also shows that machine learning can extract clinically useful information from large volumes of dental data, although challenges such as data quality, algorithmic bias, and model generalizability remain [9]. The use of artificial intelligence is also expanding in pediatric dentistry, but most early studies have focused on diagnosis, disease prediction, and image analysis [10]. Rokhshad et al., in a systematic review and meta-analysis of artificial intelligence applications in pediatric dentistry, showed that most studies focused on the diagnosis and prediction of early childhood caries, tooth identification, and dental abnormalities, and that the use of this technology for behavioral interventions remains a less developed area [10]. In contrast, the 2024 review by Acharya et al. emphasized that artificial intelligence and machine learning algorithms have potential capacity for behavior management, better interaction with the child, and the delivery of personalized education and interventions in pediatric dentistry [11].
One of the most important recent advances in this field is the direct use of machine learning to predict anxiety and cooperative behavior in children [8]. Helal and Sabbagh, using data from 952 children aged 6 to 11 years in 2026, showed that machine learning models were able to predict dental anxiety and cooperative behavior in children with high accuracy, and the logistic regression model achieved an accuracy of 0.92 for dental anxiety and 0.91 for cooperative behavior [8]. The random forest model was also able to predict the continuous anxiety score with a coefficient of determination of 0.97, and sensory and cognitive responses were identified among the important predictors of anxiety and cooperation [8]. These results show that children's clinical and behavioral information can be used with machine learning algorithms to identify children at greater risk of anxiety and to select a more appropriate management strategy [8]. The capacity of machine learning for intervention personalization is not limited to dentistry, and new evidence in the field of anxiety in children and adolescents also supports this approach [12]. Liu et al., in a large randomized trial involving 1,779 adolescents, used the Bayesian Causal Forest algorithm to examine individual differences in response to an anxiety-reduction intervention and showed that adolescents with higher baseline anxiety and stress benefited more from the intervention [12]. This finding demonstrates the importance of "heterogeneity of treatment effect"; that is, an intervention may not have the same effect for all individuals, and machine learning can help identify people who are likely to benefit most from a specific intervention [12]. Very recent evidence in pediatric dentistry also indicates a move toward artificial intelligence-based personalized interventions [13,14]. Tasgaonkar et al., in 2026, conducted a randomized trial in 80 children aged 6 to 12 years and compared an AI-based personalized video self-modeling intervention with a standard video, finding that both methods reduced fear and anxiety, but the personalized intervention group showed a greater reduction in heart rate [13]. However, for the main psychological outcome, namely the total CFSS-DS score, no significant superiority was observed for the personalized intervention, indicating that the available evidence is still insufficient for a definitive conclusion [13].
Ishitani et al. also produced a personalized picture book using artificial intelligence in two case reports in 2026, in which the appearance of the child, the dentist, and the actual stages of the dental visit were incorporated into the story, and the preliminary results supported the capacity of this method to reduce anxiety and increase cooperation [14]. Despite the appeal of this finding, the case-report design and the very limited number of participants prevent its generalization to the population of children and make more controlled studies necessary [14]. The totality of the available evidence shows that three research pathways have largely developed separately: first, studies on non-pharmacological methods for managing dental anxiety and pain; second, studies predicting children's anxiety and behavior using machine learning; and third, very recent studies on personalized content based on artificial intelligence [3,8,13]. However, studies that integrate these three components within a single framework, first predicting each child's need or response pattern based on individual characteristics using machine learning and then providing a personalized intervention for the simultaneous management of anxiety and pain, are still very limited [10,13]. This gap is particularly relevant in the Iranian context. Iranian clinical trials have reported beneficial effects of virtual reality on children's dental anxiety and pain [6,7], and an Iranian-led narrative review has discussed the growing role of artificial intelligence and machine learning in dentistry [9]. However, published evidence on machine learning-guided allocation of non-pharmacological interventions for dental anxiety and pain in Iranian children remains limited. From a clinical perspective, instead of selecting a fixed technique for all children, such an approach could incorporate individual information such as age, history of dental experience, severity of baseline anxiety, pain experience, behavioral characteristics, and cognitive and sensory responses into intervention decision-making and increase the likelihood of matching the child's needs with the type of intervention [8,11,12]. However, before machine learning models are incorporated into clinical decision-making, they must be evaluated in terms of accuracy, external validity, generalizability, bias, transparency, and performance in the target population, and they should not be considered ready-to-use clinical tools solely on the basis of algorithm performance in an initial dataset [8-10]. Therefore, given the considerable prevalence of dental anxiety in children, the reciprocal relationship between anxiety and pain, individual differences in responses to existing interventions, the rapid development of artificial intelligence and machine learning applications in pediatric dentistry, and the shortage of studies linking predictive models to intervention allocation, evaluation of a machine learning-guided intervention strategy has theoretical, technological, and clinical importance [1,3,8,10,12,13]. Accordingly, the present study examined whether an algorithm-guided strategy for selecting among predefined non-pharmacological interventions was associated with better anxiety- and pain-related outcomes than a fixed standard intervention in children.
Methods
The present research was a two-phase quantitative study. Phase 1 included the development, training, and evaluation of a machine learning model intended to guide allocation among predefined non-pharmacological interventions for dental anxiety and pain, and Phase 2 compared the clinical outcomes of algorithm-guided intervention allocation with a fixed standard intervention in a pretest-posttest trial with a control group. The use of machine learning algorithms to predict children's anxiety and behavior in the dental setting has received attention in recent studies and has enabled the use of demographic, clinical, behavioral, and cognitive information to predict children's responses [8]. Artificial intelligence-based personalized interventions in pediatric dental patients have also been examined in recent trials [13]. The study population consisted of children aged 6 to 12 years who attended pediatric dental centers and clinics in Isfahan during Iranian calendar year 1404 (2025–2026) and required restorative dental treatment. The age range of 6 to 12 years was selected on the basis of studies related to the use of machine learning in predicting dental anxiety in children and studies of artificial intelligence-based personalized interventions [8,13]. In the study by Helal and Sabbagh, machine learning models were also used in children aged 6 to 11 years to predict dental anxiety and cooperation [8]. In the first phase of the study, 300 eligible children were selected by convenience sampling. The inclusion criteria were age 6 to 12 years, need for restorative dental treatment, ability to communicate and respond to the study instruments, written parental consent and the child's assent to participate in the study, no reported severe psychiatric, neurological, or developmental disorders, and no physical disease affecting the response to pain. Use of sedative or analgesic medications before the visit, the presence of severe acute pain before the start of treatment, the need for emergency treatment, a history of severe sensitivity to visual or auditory stimuli, and the child's lack of cooperation in completing the assessment stages were considered exclusion criteria.
At the beginning of the first phase, demographic and clinical information for each child was recorded, including age, sex, history of dental visits, history of painful treatment experiences, number of previous visits, type of treatment required, history of local anesthetic injection, severity of baseline anxiety, severity of expected pain, history of uncooperative behavior in dentistry, and information on general health status. The selection of a set of demographic, clinical, and behavioral variables was based on evidence regarding the ability of these variables to predict children's anxiety and cooperation [8]. Sabbagh and Helal used demographic variables, medical and dental history, and behavioral indicators to develop models for predicting children's anxiety and cooperation and showed that sensory and cognitive responses were important variables in predicting anxiety and cooperation [8].
Before treatment began, children's dental anxiety was measured using the Children's Fear Survey Schedule-Dental Subscale (CFSS-DS). The child's expected pain before treatment and pain experienced after treatment were also assessed using the Wong-Baker FACES Pain Rating Scale. The combined use of validated anxiety/fear scales and pain measures in pediatric dental research has been reported in recent studies [15]. In addition, the child's heart rate was recorded before treatment, during the main dental procedure, and after treatment using a pulse oximeter so that an objective indicator of physiological arousal would be available alongside self-reported measures; similar multimodal assessment approaches have been used in recent pediatric dental studies [13,15].
To provide the data required for training the personalization model, children in the first phase were randomly assigned to one of four behavior-management conditions: standard visual-auditory distraction, virtual reality, breathing training and guided relaxation, and routine dental care. These interventions were selected on the basis of evidence regarding the effectiveness of non-pharmacological interventions in reducing dental anxiety and pain in children [2,3,5]. All children were kept under conditions that were as similar as possible in terms of type of treatment, environmental conditions, the dentist's communication style, and approximate duration of treatment, and only the type of intervention for managing anxiety and pain differed.
After treatment ended, anxiety and pain were reassessed and the amount of change in anxiety and pain scores was calculated for each child. A favorable response to the intervention was defined as a clinically meaningful reduction in anxiety and pain relative to baseline. The resulting data, including the child's baseline characteristics, the intervention actually received, and the observed change in anxiety and pain, were entered into the machine learning dataset. The model was then used to generate intervention recommendations on the basis of predicted favorable response within the available intervention framework. Because each child in Phase 1 received only one intervention, the resulting recommendations should be interpreted as algorithm-guided predictions based on observed treatment data rather than as direct estimates of each child's counterfactual treatment effect under every alternative intervention.
Design and Evaluation of the Machine Learning Model
Before model training, the data were examined for missing values, outliers, and inconsistencies. Missing values were replaced using an appropriate method according to the type of variable, and categorical variables were numerically coded. Continuous variables were standardized for algorithms that were sensitive to variable scale. This process was performed according to common principles of data preprocessing in machine learning-based prediction studies [8].
The data from the first phase were divided into a training set and an independent test set; 80% of the data were used for model training and tuning and 20% were used for the final evaluation of model performance. Five-fold cross-validation was used in the training set to reduce the risk of overfitting and to select optimal hyperparameters. Logistic regression, random forest, support vector machine, and XGBoost algorithms were trained and compared. More than one algorithm was used and compared because the performance of machine learning models depends on data structure and outcome type, and a single algorithm is not necessarily the best-performing algorithm in all datasets.
The models' performance in predicting response to the intervention was evaluated using accuracy, sensitivity, specificity, precision, recall, F1 score, and area under the receiver operating characteristic curve (ROC-AUC). Model calibration was also examined to assess the degree of agreement between predicted probabilities and actual outcomes. Recent studies predicting dental anxiety in children have also used indices such as accuracy and ROC-AUC to evaluate model performance [8]. In the study by Sabbagh and Helal, the logistic regression model was able to predict dental anxiety with an accuracy of 0.92 and an ROC-AUC of 0.98 [8].
To determine the relative importance of the variables, the feature-importance index and the SHAP method were used to identify which child characteristics contributed most to the model predictions. Model explainability methods were used to reduce the “black-box” nature of the algorithm and improve the clinical interpretability of the results. The final model was selected on the basis of predictive performance, calibration, and interpretability. The model output was used to generate an intervention recommendation within the predefined intervention set. This output represents a prediction-based allocation rule and should not be interpreted as an individualized causal treatment-effect estimate.
Phase Two: Comparative Evaluation of Algorithm-Guided Intervention Allocation
After the model was finalized, 80 new children who had not participated in the model-training phase were selected by convenience sampling in the second phase. This independent Phase 2 sample was used to evaluate clinical performance in new children from the same general clinical setting. After the inclusion and exclusion criteria were reviewed and informed parental consent was obtained, participants were randomly allocated to the algorithm-guided intervention and control groups, with 40 children in each group. The two-group design and random allocation were similar to those used in recent trials of artificial intelligence-based personalized interventions in pediatric dentistry [13].
Initially, baseline information and individual characteristics of the children in both groups were recorded, and their anxiety and expected pain scores were measured. Information from children in the experimental group was entered into the machine learning model, which generated a recommended non-pharmacological management option from the predefined intervention set on the basis of each child's characteristics. Consequently, the intervention used in the experimental group was not identical for all children but was determined according to the model output. For example, virtual reality could be recommended for one child and visual-auditory distraction or guided relaxation for another, according to the model-predicted probability of a favorable response.
Children in the control group received a fixed behavior-management method consisting of conventional visual-auditory distraction, and their intervention was not selected by the machine learning model. The active control was used to compare algorithm-guided allocation with a commonly used fixed anxiety-management strategy rather than with no intervention. Importantly, because the control arm received only visual-auditory distraction rather than the same intervention set under a different allocation rule, the comparison does not isolate the effect of personalization from possible differences among intervention modalities. In both groups, anxiety was measured before the intervention and after treatment, expected pain was measured before treatment, and experienced pain was assessed immediately after treatment. Heart rate was recorded before treatment, during the dental procedure, and after treatment. Whenever possible, the posttest assessor was unaware of group allocation to reduce assessment bias. The use of a blinded assessor has also received attention in recent studies of personalized interventions in pediatric dentistry [13].
The primary anxiety outcome was the change in dental anxiety from pretest to posttest. Experienced pain immediately after treatment was considered the second primary outcome, with pre-treatment expected pain treated as a baseline covariate rather than as an identical repeated measure of experienced pain. Changes in heart rate, the child's level of cooperation, and parental satisfaction with the intervention were assessed as secondary outcomes.
The data from the second phase were analyzed using SPSS version 26 and Python. Mean, standard deviation, frequency, and percentage were used to describe the data. After examining normality, homogeneity of variances, and other statistical assumptions, analysis of covariance was used to compare post-treatment anxiety and experienced pain between groups while controlling for baseline anxiety and pre-treatment expected pain, respectively. Multivariate analysis of covariance was used when the dependent outcomes were considered jointly. Repeated-measures analysis of variance or a linear mixed model was used to compare heart-rate changes across different stages. The significance level was set at 0.05, and effect sizes were reported to indicate the magnitude of between-group differences.
Measurement Instruments
Children's Fear Survey Schedule-Dental Subscale: This scale was developed by Cuthbert and Melamed to measure fear and anxiety related to dental situations in children and is considered one of the widely used instruments in pediatric dentistry [16]. The questionnaire contains 15 items, and each item is scored on a five-point scale from 1, meaning "not afraid at all," to 5, meaning "very afraid." Therefore, the total score ranges from 15 to 75, and a higher score indicates greater dental fear and anxiety. This instrument has also been used in recent pediatric dental studies involving AI-based intervention or multimodal assessment [13,15].
Wong-Baker FACES Pain Rating Scale: This instrument is a pictorial self-report scale for measuring pain intensity in children and presents a series of faces ranging from "no pain" to "the most pain." The child selects the face that most closely resembles the level of pain experienced, and the pain score is recorded on a scale from 0 to 10. Use of the Wong-Baker FACES Pain Rating Scale in pediatric dental research has been reported in recent studies [15]. In the present study, this instrument was completed immediately after the therapeutic procedure, and a higher score indicated greater pain.
Heart rate: To objectively assess physiological arousal associated with anxiety, the child's heart rate was measured using a digital pulse oximeter at three times: before treatment began, during the main treatment stage, and after treatment ended. Physiological measures such as heart rate can complement self-reported anxiety, fear, and pain measures in pediatric dental research [13,15].
All stages of the study were conducted after approval by the responsible institutional ethics committee. The children's information was stored in coded form, and only authorized members of the research team had access to identifying data. Given the use of children's data in the machine learning model, principles of confidentiality, data minimization, separation of identifying information from analytical data, and restricted access to the dataset were observed. Written informed consent was obtained from parents or legal guardians, and assent was obtained from participating children. Parents were informed that the algorithm output would be used only to select one of the predefined non-pharmacological interventions and would not replace the dentist's clinical decision-making and supervision, because privacy, algorithmic bias, and preservation of clinical oversight are important considerations in AI-assisted behavior management [11].
Results
In the first phase of the study, data from 300 children aged 6 to 12 years were analyzed. The mean age of the children was 9.14 years with a standard deviation of 1.73; 156 (52%) were boys and 144 (48%) were girls. The mean dental anxiety score at the initial assessment was 41.86 with a standard deviation of 8.32, and the mean expected pain was 5.28 with a standard deviation of 2.01. Of all children, 75 were assigned to the visual-auditory distraction group, 75 to the virtual reality group, 75 to the guided relaxation group, and 75 to the routine care group. After data cleaning, 240 cases, equivalent to 80% of the data, were used for model training and validation, and 60 cases, equivalent to 20%, were used for independent testing. Four algorithms—logistic regression, random forest, support vector machine, and XGBoost—were trained to predict a favorable response to the intervention. The results of the models' performance in the test set are presented in Table 1.
Algorithm | Accuracy | Sensitivity | Specificity | F1 | ROC-AUC |
|---|---|---|---|---|---|
Logistic Regression | 0.81 | 0.79 | 0.83 | 0.80 | 0.87 |
Support Vector Machine | 0.84 | 0.82 | 0.85 | 0.83 | 0.89 |
Random Forest | 0.88 | 0.87 | 0.89 | 0.87 | 0.93 |
XGBoost | 0.91 | 0.90 | 0.92 | 0.90 | 0.95 |
As shown in Table 1, XGBoost, with an accuracy of 0.91, sensitivity of 0.90, specificity of 0.92, and an area under the curve of 0.95, had the best predictive performance among the evaluated algorithms. It was therefore selected as the final predictive model used to guide intervention allocation in Phase 2. Feature-importance analysis showed that baseline dental anxiety score (mean absolute SHAP value 0.28), history of painful dental experience (0.21), expected pain (0.18), history of child cooperation (0.15), age (0.10), and number of previous dental visits (0.08) contributed most to model predictions. Child sex and type of tooth treated made smaller contributions. Among the 60 children in the test set, the model correctly classified 55 and misclassified 5. The calibration test showed no significant difference between predicted probabilities and observed outcomes (P=0.47), indicating favorable calibration in this internal test sample. These metrics describe prediction of observed response and should not be interpreted as validation of individualized causal treatment effects.
Phase 2 Results: Algorithm-Guided versus Fixed Intervention
In the second phase, 80 children independent of the first-phase sample entered the study and were randomly assigned to the algorithm-guided intervention group and the fixed-intervention control group; each group included 40 children. The mean age of the intervention group was 9.25 years with a standard deviation of 1.68, and the mean age of the control group was 9.38 years with a standard deviation of 1.72. The intervention group included 21 boys and 19 girls, and the control group included 20 boys and 20 girls. Initial tests showed that the two groups did not differ significantly in age, sex, baseline anxiety score, expected pain, or history of dental visits. In the algorithm-guided group, XGBoost recommended one of the predefined interventions based on each child's characteristics: virtual reality was selected for 16 children, visual-auditory distraction for 10 children, and guided relaxation for 14 children. Table 2 summarizes anxiety and pain-related scores in the two groups.
Variable | Group | Baseline | Outcome |
|---|---|---|---|
Dental Anxiety | Algorithm-guided | 42.15±7.68 | 27.60±5.94 |
Fixed control | 41.73±7.41 | 36.85±6.72 | |
Pain-related measure | Algorithm-guided | 5.40±1.87 | 2.75±1.53 |
Fixed control | 5.28±1.93 | 4.33±1.79 |
According to Table 2, mean dental anxiety in the algorithm-guided group decreased from 42.15 before treatment to 27.60 after treatment, whereas in the control group it decreased from 41.73 to 36.85. For the pain-related measure, the pre-treatment values represent expected pain, whereas the post-treatment values represent experienced pain. Mean expected pain was 5.40 in the algorithm-guided group and 5.28 in the control group; mean experienced pain after treatment was 2.75 and 4.33, respectively. These values should therefore not be interpreted as repeated measurements of an identical pain construct.
Before conducting the analysis of covariance, the statistical assumptions were examined. The results of the Shapiro-Wilk test were not significant for the anxiety and pain variables, and the assumption of normality was considered acceptable. Levene's test for dental anxiety (P=0.29, F=1.12) was also not significant, supporting homogeneity of variances. The interaction between the pretest and group membership was not significant, indicating that the assumption of homogeneity of regression slopes was met. Multivariate analysis of covariance was used to examine the overall between-group difference in anxiety and pain-related outcomes. Wilks' lambda indicated a significant between-group difference after adjustment for baseline measures. Thus, the algorithm-guided group showed better combined anxiety- and pain-related outcomes than the fixed visual-auditory distraction group. This analysis supports a between-group difference but, given the control design, does not by itself isolate the causal contribution of personalization. The univariate analyses of covariance are presented in Table 3.
Dependent Variable | Sum of Squares | Degrees of Freedom | Mean Square | F | Significance Level | Effect Size |
|---|---|---|---|---|---|---|
Dental Anxiety | 1638.35 | 1 | 1638.35 | 58.72 | <0.001 | 0.43 |
Experienced Pain | 47.86 | 1 | 47.86 | 26.49 | <0.001 | 0.26 |
Table 3 shows that, after adjustment for baseline anxiety, post-treatment dental anxiety was significantly lower in the algorithm-guided group than in the control group. The reported effect size indicates a substantial between-group difference in post-treatment anxiety. Likewise, after adjustment for pre-treatment expected pain, experienced pain after treatment was significantly lower in the algorithm-guided group. These findings demonstrate better outcomes for the algorithm-guided strategy than for the fixed visual-auditory distraction control, but they should not be interpreted as separating the effect of the allocation algorithm from the effects of the intervention modalities themselves.
To examine physiological changes, mean heart rate was compared at three stages: before treatment, during treatment, and after treatment. The results are presented in Table 4.
Stage | Algorithm-guided | Fixed control |
|---|---|---|
Before Treatment | 93.65 ± 8.27 | 94.10 ± 8.56 |
During Treatment | 98.23 ± 8.94 | 107.48 ± 10.32 |
After Treatment | 89.70 ± 7.81 | 98.35 ± 9.07 |
The repeated-measures analysis showed a significant time-by-group interaction for heart rate. Although heart rate increased during treatment in both groups, the increase was smaller in the algorithm-guided group, and after treatment heart rate in this group returned toward baseline more rapidly. This pattern is consistent with better short-term physiological control in the algorithm-guided group relative to the fixed-intervention control.
Children in the algorithm-guided group showed more positive behavior and greater cooperation during treatment than children in the control group. The reported statistical test indicated a significant between-group difference in behavioral cooperation. Accordingly, algorithm-guided intervention allocation was associated with greater cooperation during dental treatment.
Parental satisfaction was higher in the algorithm-guided group than in the control group, and the reported between-group difference was statistically significant. Thus, algorithm-guided intervention allocation was associated with higher parental acceptance in this sample. In most children in the intervention group, the model-recommended intervention was accompanied by a favorable clinical response, whereas a smaller number showed a lower-than-expected response. This observation provides preliminary evidence of the clinical feasibility of using the model output in a new sample, but it does not constitute external validation or proof of individualized causal treatment effects.
Overall, Phase 1 showed that XGBoost had the best predictive performance among the algorithms examined. In Phase 2, the algorithm-guided intervention group had better anxiety, experienced-pain, heart-rate, behavioral-cooperation, and parental-satisfaction outcomes than the group receiving fixed visual-auditory distraction. These results demonstrate comparative superiority of the algorithm-guided strategy over the specific fixed control used in this study. However, because the control arm did not receive the same intervention set under a different allocation rule, the findings do not isolate the causal effect of machine learning-based personalization itself.
Discussion
The present study developed a machine learning-guided intervention-allocation strategy and compared its clinical outcomes with a fixed visual-auditory distraction strategy for managing dental anxiety and pain in children. The results are considered in two parts: predictive performance of the machine learning model and comparative clinical outcomes in Phase 2. This predictive component is consistent with the results of Sabbagh and Helal, who, using data from 952 children aged 6 to 11 years, showed that machine learning algorithms can predict dental anxiety and cooperative behavior with high accuracy and that their logistic regression model achieved an accuracy of 0.92 for dental anxiety [8]. They also showed that sensory and cognitive variables contributed importantly to prediction of anxiety and cooperative behavior [8]. To explain the favorable performance of the machine learning model, it can be stated that dental anxiety and pain are multifactorial phenomena, and the probability that a child will respond to a behavior-management method does not depend only on a single variable such as age or anxiety severity; rather, it results from the interaction of a set of individual, cognitive, and behavioral characteristics and previous experiences. Machine learning algorithms can identify patterns among these variables that may not be readily apparent with traditional statistical methods and the separate examination of each factor. The superiority of XGBoost in the present study may also be due to this algorithm's ability to model nonlinear relationships and interactions among multiple variables. On the other hand, the greater importance of baseline anxiety and a history of painful experience indicates that the child's emotional history in encounters with dentistry is one of the fundamental components for selecting an appropriate intervention. However, high performance in the study sample alone is not sufficient for clinical application of the model, and the model must also be validated in independent populations and different dental centers; the study by Sabbagh and Helal likewise emphasized the need for further validation of models predicting children's anxiety before widespread clinical use [8].
The first clinical finding was a larger reduction in dental anxiety in the algorithm-guided group than in the fixed-intervention control group; mean anxiety decreased from 42.15 to 27.60 in the algorithm-guided group and from 41.73 to 36.85 in the control group. This between-group pattern is consistent with the broader concept that treatment response may vary across individuals. Liu et al., in a randomized trial involving 1,779 adolescents, showed that the effect of an anxiety-reduction intervention was not uniform and that individuals with higher baseline anxiety and stress benefited more; machine learning was used to characterize heterogeneity of treatment effect [12]. The present study is directionally consistent with the rationale for incorporating individual characteristics into intervention allocation, although it did not directly estimate individual causal treatment effects.
The observed between-group difference in anxiety is not entirely consistent with the results of Tasgaonkar et al. In 2026, they compared an AI-based personalized video self-modeling intervention with a standard video intervention in a randomized trial of 80 children aged 6 to 12 years. Although dental anxiety and fear decreased significantly in both groups, the between-group difference in total CFSS-DS score was not significant [13], while the personalized intervention produced a greater reduction in heart rate [13]. One possible explanation is the different intervention structure: their personalization primarily concerned video content, whereas the present study used an algorithm to allocate children among several predefined modalities. Nevertheless, because the present control group received only one fixed modality, the current design cannot determine whether the observed advantage arose from personalization itself or from differences among the intervention modalities. Direct comparison using the same intervention set under alternative allocation rules would be required to establish that point.
To explain the effect of the personalized intervention on anxiety, it can be stated that children differ in the sources that generate anxiety and in the way they respond to coping strategies. For a child whose greatest anxiety results from seeing dental instruments and environmental stimuli, an immersive method such as virtual reality may be more effective, whereas for a child whose anxiety is more closely associated with physiological arousal and the expectation of pain, guided relaxation may be more appropriate. Therefore, using the same method for all children may overlook some individual differences. The network review by Kong et al., which examined 61 studies and 6,113 children, also showed that different non-pharmacological interventions do not perform equally in terms of their effects on anxiety and heart rate; for example, music ranked higher for reducing anxiety and hypnosis ranked higher for reducing heart rate [5]. This difference in the performance of different interventions supports the rationale for selecting interventions on the basis of the child's characteristics, although that review did not directly evaluate a personalized algorithm [5].
The second main clinical finding was lower experienced dental pain in the algorithm-guided group after adjustment for pre-treatment expected pain. In the Iranian study by Bahrololoomi et al., virtual reality during pulpotomy in children aged 6 to 8 years significantly reduced pain according to the Wong-Baker scale compared with a condition without virtual reality [7]. Recent reviews have also shown that non-pharmacological behavior-management methods can reduce children's pain during dental treatment [3]. The present result therefore supports better pain-related outcomes for the algorithm-guided strategy relative to the fixed control used here, without establishing that personalization itself was the causal mechanism.
Pain perception is influenced by anxiety, expectation of pain, attention, previous experience, and perceived control in addition to the physical stimulus itself. A possible interpretation is that allocating different non-pharmacological strategies according to child characteristics may alter attention or emotional regulation during treatment. However, this mechanistic explanation remains hypothesis-generating in the present study because the design did not experimentally separate the allocation rule from the effects of the intervention modalities. The findings of Bahrololoomi et al., who reported simultaneous reductions in anxiety and pain with virtual reality, support the close relationship between these outcomes [7].
Heart-rate changes also differed between groups, with a smaller increase during treatment and a faster post-treatment decline in the algorithm-guided group. This result is consistent with Tasgaonkar et al., in which an AI-based personalized intervention produced a larger reduction in heart rate than a standard video intervention [13]. In the present study, the finding supports better short-term physiological outcomes for algorithm-guided allocation relative to the fixed control, but it should not be interpreted as isolating the specific causal contribution of personalization.
However, the finding related to heart rate is not consistent with the results of all previous studies. For example, in the study of Iranian children by Bahrololoomi et al., despite significant reductions in anxiety and pain in the virtual reality condition, no significant difference in heart rate was observed between the intervention and control conditions [7]. This inconsistency may be due to differences in the type of intervention, sample size, age of the children, type of treatment procedure, and method of recording the physiological indicator. In addition, heart rate is influenced by multiple factors unrelated to anxiety, including physical activity, physical condition, and environmental stimuli, and for this reason it is better interpreted alongside self-report and behavioral instruments [7,13].
Behavioral cooperation was positive or very positive in 82.5% of children in the algorithm-guided group compared with 60% in the fixed-control group, and the reported between-group difference was significant. This finding is consistent with Sabbagh and Helal, who showed that cooperative behavior can be predicted from individual and clinical characteristics using machine learning models [8]. The present result supports an association between algorithm-guided allocation and greater cooperation in this sample, but it does not establish that personalization itself caused the behavioral difference.
From an explanatory perspective, improved behavioral cooperation can be regarded as an outcome related to reduced anxiety and pain. A child who feels less threat and pain is likely to feel less need for behaviors such as crying, avoidance, resistance, or discontinuing cooperation and will have a greater capacity to attend to the dentist's instructions. However, cooperative behavior is not solely a result of reduced anxiety, and the child's temperamental characteristics, previous experiences, relationship with the clinician, and parental behavior can also influence it. For this reason, the importance of the machine learning model lies in its ability to consider a set of the child's characteristics simultaneously in predicting the response, rather than relying on a single factor [8].
The proportion of parents reporting high or very high satisfaction was 87.5% in the algorithm-guided group and 67.5% in the fixed-control group. Higher parental satisfaction may reflect lower observed anxiety and pain or better cooperation, but it may also be influenced by the novelty of technology and expectations regarding intelligent interventions. Accordingly, parental satisfaction should be interpreted as a secondary acceptability outcome, and future studies should assess usability, technology acceptance, and child and parent satisfaction separately using validated instruments.
In 34 of the 40 children in the experimental group (85%), the model-recommended intervention was accompanied by a favorable clinical response. This provides preliminary evidence that the prediction-based allocation rule was clinically feasible in the independent Phase 2 sample. However, this observation should not be equated with external validation or with proof that the recommended intervention was the optimal counterfactual treatment for each child. The remaining 15% of children with a lower-than-expected response further supports the need to retain clinical judgment and to evaluate additional predictors such as temperament, parent-child interaction, precise dental procedure, and momentary emotional state.
Overall, the results showed that the machine learning model predicted favorable responses with promising performance in the study dataset and that the algorithm-guided intervention group had better clinical outcomes than the fixed visual-auditory distraction control group. Accordingly, the model may be considered a preliminary decision-support approach to be used alongside pediatric dental judgment rather than as an independently validated treatment-selection system. The results should be interpreted in light of the relatively limited development and test samples, data collection from one or a limited number of centers, possible model overfitting, absence of geographically external validation, reliance on some self-report indicators, possible novelty effects on parental satisfaction, and the absence of follow-up. In addition, the control design does not isolate the effect of personalization because the comparison group received a single fixed intervention rather than the same intervention set under a different allocation rule, and the Phase 1 design did not directly estimate individual counterfactual treatment effects. A further limitation is the absence of an externally validated minimum clinically important difference for the combined favorable-response definition. Future studies should use larger multicenter samples, prospective external validation, prespecified and fully reported response thresholds, and designs that compare algorithm-guided allocation with random or clinician-guided allocation across the same intervention set. Comparison of different algorithms, model explainability, calibration, confidence intervals for predictive performance, and evaluation of algorithmic bias are also warranted. Final intervention decisions should remain under the supervision of the pediatric dentist.
Ethics Approval and Consent to Participate
The study was conducted after approval by the responsible institutional ethics committee. Written informed consent was obtained from parents or legal guardians, and assent was obtained from participating children.
Generative AI and AI-Assisted Technologies Statement
Generative AI was used solely for English-language translation and editorial refinement of the manuscript. It was not used to generate study data, perform statistical analyses, or determine scientific conclusions. The author reviewed the final manuscript and takes full responsibility for its content.
References
- Sun IG, Chu CH, Lo ECM, Duangthip D. Global prevalence of early childhood dental fear and anxiety: a systematic review and meta-analysis. J Dent. 2024;142:104841. doi:10.1016/j.jdent.2024.104841.
- Almarzouq SSFS, Chua H, Yiu CKY, Lam PPY. Effectiveness of nonpharmacological behavioural interventions in managing dental fear and anxiety among children: a systematic review and meta-analysis. Healthcare (Basel). 2024;12(5):537. doi:10.3390/healthcare12050537.
- Kaur K, Saini RS, Binduhayyim RIH, Mosaddad SA, Heboyan A. Analyzing nonpharmacological behavior management in children with dental anxiety: a systematic review and meta-analysis. Health Sci Rep. 2025;8(8):e71176. doi:10.1002/hsr2.71176.
- Enshaei Z, Sadeghi Kaji K, Saied-Moallemi Z. Development and validation of the Iranian version of the Children's Experiences of Dental Anxiety Measure (CEDAM). Clin Exp Dent Res. 2024;10(1):e830. doi:10.1002/cre2.830.
- Kong X, Song N, Chen L, Li Y. Non-pharmacological interventions for reducing dental anxiety in pediatric dentistry: a network meta-analysis. BMC Oral Health. 2024;24:1151. doi:10.1186/s12903-024-04919-x.
- Mir Mohammadi MR, Shokrizadeh Arani L, Taghdisi Kashani A, Amiri S, Nickfarjam AM. Evaluating the effectiveness of virtual reality in reducing dental anxiety in children aged 6-12: a randomized clinical trial. Int J Paediatr Dent. 2025;35(6):1124-1132. doi:10.1111/ipd.70002.
- Bahrololoomi Z, Zein Al-Din J, Maghsoudi N, Sajedi S. Efficacy of virtual reality distraction in reduction of pain and anxiety of pediatric dental patients in an Iranian population: a split-mouth randomized crossover clinical trial. Int J Dent. 2024;2024:1290410. doi:10.1155/2024/1290410.
- Helal NM, Sabbagh H. Predicting dental anxiety and cooperative behavior in children using machine learning: a cross-sectional predictive modeling study. Dent J (Basel). 2026;14(3):170. doi:10.3390/dj14030170.
- Naeimi SM, Darvish S, Nazemi Salman B, Luchian I. Artificial intelligence in adult and pediatric dentistry: a narrative review. Bioengineering (Basel). 2024;11(5):431. doi:10.3390/bioengineering11050431.
- Rokhshad R, Zhang P, Mohammad-Rahimi H, Shobeiri P, Schwendicke F. Current applications of artificial intelligence for pediatric dentistry: a systematic review and meta-analysis. Pediatr Dent. 2024;46(1):27-35. PMID:38449036.
- Acharya S, Godhi BS, Saxena V, Assiry AA, Alessa NA, Dawasaz AA, et al. Role of artificial intelligence in behavior management of pediatric dental patients-a mini review. J Clin Pediatr Dent. 2024;48(3):24-30. doi:10.22514/jocpd.2024.055.
- Liu J, Hu J, Qi Y, Wu X, Gan Y. Personalized stress optimization intervention to reduce adolescents' anxiety: a randomized controlled trial leveraging machine learning. J Anxiety Disord. 2025;110:102964. doi:10.1016/j.janxdis.2024.102964.
- Tasgaonkar A, Rathi N, Tasgaonkar M, Agrawal P, Tapkir A, Mehta V. A randomised controlled trial comparing effectiveness of audio-visual aid and AI-personalised video self-modelling interventions to reduce dental fear and anxiety in paediatric patients. Eur Arch Paediatr Dent. 2026 Jun 23. doi:10.1007/s40368-026-01241-8. Online ahead of print.
- Ishitani H, Tanaka Y, Ono Y. Effect of personalized AI-generated picture books on anxiety during first dental visits in young children: two case reports. Case Rep Dent. 2026;2026:9947164. doi:10.1155/crid/9947164.
- Bocklage C, Selden R, Tumsuden O, Nanney E, Graves C, et al. A software-based observational coding approach for evaluating paediatric dental pain, anxiety, and fear. Int J Paediatr Dent. 2025;35(2):241-258. doi:10.1111/ipd.13227.
- Cuthbert MI, Melamed BG. A screening device: children at risk for dental fears and management problems. ASDC J Dent Child. 1982;49(6):432-436. PMID:6960031.