Intro
Endometriosis is a debilitating, chronic disease, estimated to affect 11% of reproductive-age women [ 1 ]. While it is primarily characterized by the presence of endometrial-like tissue outside the uterus, it is a complex disease, involving multiple anatomical systems and sites [ 2 , 3 ]. Diagnosis of endometriosis is difficult, with delays of up to 12 years reported [ 2 ]. Vague, nonspecific symptoms with multiple differential diagnoses contribute to this challenge. Misdiagnosis is common, with one study reporting 63% of affected women were told there was nothing wrong by at least one physician before ultimately receiving a diagnosis of endometriosis [ 4 ]. Additionally, the gold standard of diagnosis requires laparoscopic surgery—an invasive and potentially costly procedure [ 3 , 5 ]. Long diagnostic delays can significantly impact the quality of life for affected women, leading to higher incidence of depression, reduced social activity, and increased healthcare costs [ 5 ]. Thus, earlier diagnosis and treatment are essential to improving the quality of life for these patients, especially by minimizing pain and treating infertility.
Pain is potentially an indicator of multiple health problems, not just endometriosis. Pelvic pain affects 80–98% of women with endometriosis [ 4 , 6 ]; however, this common pain type manifests in several other disorders, including uterine fibroids, ovarian cysts, pelvic adhesions, and infectious diseases [ 7 – 12 ]. In some cases, chronic pelvic pain cannot be attributed to any clinical pathology, even after diagnostic laparoscopy [ 13 ]. Women with endometriosis often experience multiple types of pain, including dysmenorrhea (painful menstrual cramps), dyspareunia (pain with intercourse), chronic pelvic pain, dysuria (pain with urination), and dyschezia (pain with bowel movements) [ 14 , 15 ]. Endometriosis-associated pain manifests in complex types, patterns, and intensities.
Identifying additional clinical indications of endometriosis holds promise for facilitating a shift from surgical diagnosis to less-invasive methods, decreasing the diagnostic delay without increasing the incidence of misdiagnosis [ 3 ]. Some previous studies examining pain in endometriosis have focused on types of pain [ 2 , 16 , 17 ]; in contrast, others have investigated possible relationships between anatomical locations of pain and the location of endometrial lesions although results were inconclusive [ 18 , 19 ]. The dataset used in this study was previously analyzed with traditional statistical analysis techniques. The data contained meaningful associations; however, the granularity of the 155 anatomical pain sites made it difficult to interpret these preliminary results. Thus, further investigation with more advanced data science methods was warranted.
The objective for this study was to apply advanced data mining and artificial intelligence (AI) methods to delve deeper into the relationships between pain-related features, subfertility, and gynecological diagnoses, including endometriosis. We sought to demonstrate the capability of AI to perform analyses and discover associations that are more difficult to conduct using traditional statistical methods. This preliminary model was created to show the potential for AI to help expedite endometriosis diagnosis, using clinical factors in unsupervised clustering and Bayesian networks.
Results
Postoperative diagnoses included: endometriosis (n = 190; 40.2%), normal pelvis (n = 122; 25.8%), uterine fibroids (n = 59; 12.5%), benign ovarian cysts (n = 52; 11.0%), and other gynecological pathologies (n = 50; 10.6% [pelvic adhesions (n = 37), congenital Müllerian anomalies (n = 10) and neoplasm (n = 3)]) [ 1 ]. S1 Fig illustrates the distribution of VAS pain scores for each pain type.
Collecting the pain data at a very granular level and then clustering pain locations based on participant responses enabled the grouping of pain locations. The elbow method determined 15 clusters with a threshold of 0.6375 as the maximum distance separating the sites within each cluster was optimal for this data ( S2 Fig ). A polar dendrogram visualizes the clustering in S3 Fig . This data-driven approach generated clusters that nonuniformly divided the anatomical landscape. The clusters could be categorized in several ways, including singular (cluster 1—front of neck), discontinuous (cluster 12—front of both arms), encapsulated (cluster 2—urethra), asymmetrical (cluster 8—sternum and arm) or anteroposterior (clusters 3 and 4—abdomen and back) (see Fig 1 ).
Colors on the anatomical map denote clustered locations of self-reported pain. The anatomical map used in the ENDO study was modified from the International Pelvic Pain Society.
The underlying anatomy could explain some of the apparent symmetry and asymmetry. For example, while cluster 7 (breasts) was symmetrical, clusters 6 and 9 (right and left epigastrium) were asymmetrical. This could be explained by the underlying anatomy of the abdomen, as the liver and gallbladder lie on the right side and the head of the pancreas and spleen on the left side. Clusters 5 (right hypochondrium and arm) and 8 (sternum and arm) were both non-contiguous and asymmetrical. Cluster 14 encompassed multiple non-contiguous sites, including the lower limbs, inner thighs, upper back, and waist. The elbow chart indicated this cluster included the least informative sites, as splitting this cluster would not result in much information gain. S2 Table describes the clusters.
The final Bayesian network, represented in Fig 2 , included 18 nodes after pruning noninformative variables. For endometriosis diagnosis, the sensitivity of the network was 0.814 [95% CI 0.807, 0.821], the specificity was 0.421 [95% CI 0.413, 0.430], and the precision was 0.490 [95% CI 0.487, 0.493]. In the univariable analysis, the presence of any symptom, including chronic pelvic pain, subfertility, and dyspareunia, increased the RR of endometriosis (p-value < 0.001) ( Table 1 ).
Nodes correspond to pain-related features, subfertility, and diagnosis while the lines represent conditional dependencies between the features. Pain types are outlined in blue, while pain locations are outlined in pink. The color of the node indicates the proximity to the diagnosis node, including 1st, 2nd, 3rd, and 4th degree connections. The net has been moralized.
This table demonstrates univariable analysis with the Bayesian network. The numbers represent mean estimates of the relative risk (RR) of the specified diagnosis, i.e., endometriosis, uterine fibroids, benign ovarian cysts, other gynecological pathology, or a normal pelvis, given the presence of a single symptom with 95% confidence intervals shown in parentheses. Darker red denotes increased RR, while the darker blue denotes decreased RR. For the definition of RR, see S4 Fig .
As shown in Table 2 , the combination of multiple symptoms increased the RR of endometriosis while decreasing the RR of other diagnoses. However, the absence of subfertility decreased the RR of endometriosis and increased the RR of other diagnoses, most notably benign ovarian cysts.
This table demonstrates multivariable analysis with the Bayesian network. The numbers represent mean estimates of the relative risk (RR) of the specified diagnosis, i.e., endometriosis, uterine fibroids, benign ovarian cysts, other gynecological pathology, or a normal pelvis, given a combination of symptoms (presence or absence of a single or multiple symptoms) with 95% confidence intervals shown in parentheses. Darker red denotes increased RR, while the darker blue denotes decreased RR. For the definition of RR, see S5 Fig .
A web application to explore and query the Bayesian network is deployed to a public server: amber-kiser.shinyapps.io/ENDO-pain-app. We developed and deployed the application using the R package shiny, version 1.7.1 [ 37 ]. The S7 – S10 Figs contain screenshots and instructions for how to access the application.
The first sensitivity analysis allowed us to compare the performance of our Bayesian network against a more traditional statistical method, Fisher’s exact test, used in previous studies of endometriosis [ 23 ]. Fisher’s exact test identified nine clinical features significantly associated with endometriosis, including dysmenorrhea, dyspareunia, chronic pelvic pain, subfertility, ovulation pain, pain in epigastrium (Cluster 6), dyschezia, pain in sternum (Cluster 8), and pain in subscapular region (Cluster 11). S3 Table provides the full results from Fisher’s exact test and Boschloo’s exact test for pairwise comparisons.
In the second sensitivity analysis, we performed an inverted analysis, where the diagnoses and symptoms were reversed, to further demonstrate the advantages of using a Bayesian network. We found that the RR of subfertility was highest with a diagnosis of endometriosis. The RR of subfertility was most decreased when a normal pelvis was present; however, having a diagnosis of benign ovarian cysts or uterine fibroids decreased the RR of subfertility. The results are illustrated in the forest plot in S6 Fig .
In our final sensitivity analysis, we evaluated the ability of the net to discriminate between rASRM stage and endometriosis typology. Results are presented in S4 and S5 Tables. The RRs for early-stage endometriosis were statistically different from the RRs for late-stage endometriosis in 8 out of 17 cases. The RRs for superficial endometriosis were statistically different from the RR for DIE or endometriomas in 16 out of 17 cases. This demonstrates the potential for discrimination between stages or typology. However, more data from each category would be required to develop a network for this purpose.
Conclusions
Clustering anatomical pain sites and developing a Bayesian network, a form of AI, to study pain-related features of endometriosis demonstrated that combining specific pain locations with pain types may be useful for the diagnosis of endometriosis. We demonstrated that differing combinations of pain-related features resulted in differing RRs among women with endometriosis, benign ovarian cysts, uterine fibroids, other gynecological pathology, and a normal pelvis. These results suggest the use of AI can provide novel insights. We built a prototype web application to demonstrate the potential of the Bayesian network to assist in diagnosis after external validation. A recent qualitative study of endometriosis-related pain suggested that looking beyond cyclical pain to other pain experiences may lead to faster diagnosis and more effective treatment [ 15 ]. Our Bayesian network, incorporating a variety of pain-related features of endometriosis, advances this goal.
Materials|Methods
Data were previously collected from January 24, 2007, until August 7, 2009, as part of the ENDO (Endometriosis, Natural History, Diagnosis, and Outcomes) Study conducted in Salt Lake City, Utah, and San Francisco, California and described previously [ 1 ]. Institutional review board approval (Institutional Review Board, University of Utah) and written informed consent from all participants was obtained. The operative cohort included 473 women undergoing laparoscopy or laparotomy for various surgical indications, including pelvic pain (44%), pelvic mass (16%), irregular menses (13%), fibroids (10%), tubal ligation (10%) and infertility (7%). To prevent recall bias, women who had a prior surgical diagnosis of endometriosis were excluded. Women were also excluded if they were: pregnant, currently breastfeeding for 6 months or more, given injectable hormones within the past 2 years, or diagnosed with cancer other than non-melanoma skin cancer.
Surgeons completed a standardized operative report immediately after surgery to capture gynecologic and pelvic pathology. Endometriosis was diagnosed using the clinical gold standard of surgically visualized disease [ 5 , 20 , 21 ] while its severity was based upon the revised American Society for Reproductive Medicine’s (rASRM) staging criteria [ 20 ]. We used the standardized operative form to assess endometriosis typology: superficial endometriosis, ovarian endometriomas, and deep infiltrating endometriosis [ 22 ].
Prior to surgery, participants answered in-depth survey questions regarding their pain experiences. Women were asked whether they experienced pain lasting greater than 6 months that was either cyclic (i.e., painful menstrual cramps not relieved by over-the-counter medications) or chronic (i.e., pain located in or near the bladder or vaginal canal not associated with menses). They rated different sources of pain on an 11-point visual analog scale (VAS) with 0 denoting no pain to 10 denoting the most severe pain imaginable using a standardized questionnaire [ 23 ]. To evaluate subfertility, participants indicated if they had ever tried to get pregnant for more than 6 months or sought treatment for infertility. We discretized the responses to create the clinical features represented in S1 Table . We determined the most appropriate pain threshold to dichotomize the data by identifying the pain threshold that maximized the specificity of the Bayesian network. Participants answered all questions, resulting in no missing data. Additionally, prior to surgery, participants indicated on a computerized anatomical map where they felt pain regularly. The VAS and anatomical map were adapted from the Pelvic Pain Assessment Form created by the International Pelvic Pain Society [ 24 , 25 ].
The anatomical pain map comprised 155 total sites (60 front / 60 back / 35 perineal). We performed neighbor-joining (NJ) clustering to aggregate similar pain sites [ 26 ]. The NJ algorithm is an agglomerative, or bottom-up, clustering method that groups similar data points based on a given distance metric. We used the Jaccard distance metric to quantify similarities between sites [ 27 ]. We employed the commonly used “elbow” method to determine the appropriate number of clusters by plotting the number of clusters against a given threshold (the maximum distance separating the sites within each cluster) [ 28 ]. To perform NJ clustering, we used the R package DECIPHER, version 2.22.0 [ 29 ]. The neighbor-joining algorithm produced an unrooted, non-ultrametric tree. We used the threshold determined by the elbow method to create the clusters. To reduce extraneous variables, grouped anatomical locations where fewer than 5% of participants (N<25) indicated they felt pain were removed from further analysis.
Bayesian networks, a form of AI, are directed graphs that model conditional dependencies between variables [ 30 , 31 ]. Each node in the network represents a variable with an attached conditional probability table, while each edge in the network represents a conditional dependency between nodes. Using these conditional dependencies and Bayesian inference, a query of the network can return the probability of an event conditioned upon the presence or absence of other variables in the network. Bayesian networks can model multiple dependencies between variables, account for non-additive risk propagation, and serve as a form of explainable AI [ 32 ].
We developed a Bayesian network using diagnoses and symptoms, including pain types (generated from the survey questions), pain locations (generated from the clustering), and subfertility. The structure of the network was learned from the data, using a hill-climbing algorithm, which iteratively improved the Bayesian Information Criterion (BIC) score until a local maxima was reached [ 33 ]. The conditional probability tables were learned from the data using Bayesian posterior estimation. We developed the network using the R package, bnlearn, version 4.7 [ 34 ]. For visualization as an undirected graph, the network was moralized. To moralize a network, an undirected edge was added between the parents of each node, after which all directional arrows were dropped [ 35 ].
We evaluated the performance of the network to predict diagnoses using sensitivity, specificity, and precision. The network was bootstrapped, and out-of-bag samples were used to calculate the performance metrics. We calculated the mean and 95% confidence intervals for the performance metrics after 1000 iterations of bootstrapping.
We evaluated the relative risk (RR) of a postoperative diagnosis, given the presence of a single symptom by querying the Bayesian network. To demonstrate the potential of the Bayesian network to model relationships between variables, we queried the network for the RR of a postoperative diagnosis, given multiple symptoms. The network was bootstrapped for 1000 iterations to obtain the mean and 95% confidence intervals for each RR. We calculated the RR using the R package, gRain, version 1.3.6 [ 35 ].
To compare the Bayesian network analysis with traditional statistical analysis, we evaluated the significance of pain-related features as they related to the postoperative diagnoses using Fisher’s exact test. We adjusted the p-values to control for the false discovery rate. We used Boschloo’s exact test to evaluate pairwise comparisons for any significant associations [ 36 ].
To further demonstrate the advantages of the Bayesian network, we performed an inverted analysis. We queried the net for the RR of subfertility given different diagnoses, defined as the risk of subfertility when a diagnosis is present compared to the risk of subfertility when no pathology is present.
We evaluated the ability of the Bayesian network to discriminate between rASRM stages, categorized as early-stage endometriosis (rASRM stages I and II) or late-stage endometriosis (rASRM stages III and IV), as well as endometriosis typology, categorized as superficial or deep infiltrating (DIE) and endometriomas [ 22 ]. We queried the net for the RR of a postoperative diagnosis as previously described. We used the independent samples t-test to evaluate if the RR between each stage or typology were significantly different. We adjusted the p-values to control for the false discovery rate.
Supplementary Material
These questions were used to determine the presence of specific clinical features in participants of the ENDO study. (Buck Louis GM, Hediger ML, Peterson CM, et al. Incidence of endometriosis by study population and diagnostic method: the ENDO study. Fertil Steril. 2011;96(2):360–365).
(PDF)
Clusters were grouped as described in the methods. Location lists the anatomical sites included in each cluster. Asterisks in the Custer ID column denote clusters with N<25 participants.
(PDF)
This table presents a univariate analysis done with traditional statistical techniques. Significant differences were assessed using Fisher’s Exact Test. P-value adjusted for the false discovery rate. Pairwise comparisons for any significant associations were evaluated with Boschloo’s Exact Test. a,b,c,d,e,f Significantly different pairwise values p-value < 0.05.
(PDF)
For the definition of relative risk (RR), see S4 Fig . Mean estimates with 95% confidence intervals are shown in parentheses. Significant differences were assessed using the independent samples t-test. P-value adjusted for the false discovery rate. * p-value < 0.05; *** p-value < 0.001.
(PDF)
For the definition of relative risk (RR), see S4 Fig . Mean estimates with 95% confidence intervals are shown in parentheses. Significant differences were assessed using the independent samples t-test. P-value adjusted for the false discovery rate. * p-value < 0.05; *** p-value < 0.001.
(PDF)
The distribution of VAS pain scores for each pain type. We determined a pain threshold of 1 was most appropriate for dichotomization of pain scores (see S1 Table ).
(TIF)
The elbow method requires identifying the point in the chart where a sharp bend, or “elbow,” occurs. This is determined to be the optimal number of clusters that are informative. The threshold represents the maximum distance separating sites within each cluster. In this chart, an elbow can be identified at 15 clusters, corresponding to a threshold of 0.6375.
(TIF)
The neighbor-joining algorithm produced an unrooted tree. For visualization as a dendrogram, this tree has been rooted at the midpoint.
(TIF)
(A) When evaluating the relative risk given a single pain-related feature, relative risk is defined as the absolute risk of having a diagnosis given the presence of a pain type or location compared to the absolute risk of having a diagnosis given the absence of a pain type or location. (B) For example, the relative risk of endometriosis when dyspareunia is present is calculated from the absolute risk of endometriosis when dyspareunia is present divided by the absolute risk of endometriosis when dyspareunia is absent.
(TIF)
(A) When evaluating the relative risk in the presence or absence of multiple pain-related features, relative risk is defined as the absolute risk of having a diagnosis given the presence or absence of a pain type or location compared to the absolute risk of having a diagnosis given the opposite condition(s). (B) For example, the relative risk of endometriosis when pain in the epigastrium and dyspareunia are present and subfertility is absent is calculated from the absolute risk of endometriosis when pain in the epigastrium and dyspareunia are present and subfertility is absent divided by the absolute risk of endometriosis when pain in the epigastrium and dyspareunia are absent and subfertility is present.
(TIF)
Relative risk of subfertility given a specific diagnosis. This forest plot illustrates the relative risk of subfertility, defined as the absolute risk of subfertility when a specific diagnosis is present compared to the absolute risk of subfertility when a specific diagnosis is absent. Error bars represent the 95% confidence intervals. Values to the right of the dotted line indicate an increased relative risk, whereas values to the left indicate a decreased relative risk.
(TIF)
The Bayes Net Explorer app visualizes the calculated Bayesian network and allows users to run any combination of queries, accessible at amber-kiser.shinyapps.io/ENDO-pain-app.
(TIF)
The probability and relative risk of postoperative diagnoses are returned, given the presence of ovulation pain.
(TIF)
The probability and relative risk of postoperative diagnoses are returned, given the presence of ovulation pain and absence of subfertility.
(TIF)
The probability and relative risk of subfertility is returned, given the presence of an endometriosis diagnosis, dyspareunia, and chronic pelvic pain.
(TIF)
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.