Real-Time Application of Artificial Intelligence for Automatic Detection of High-Grade Squamous Intraepithelial Lesions During High-Resolution Anoscopy
Luis Barroso, Miguel Martins, Maria João Almeida, Joana Mota, Francisco Mendes, Ahsan Javed, Amine Alam, Nadia Fathallah, Pedro Diaz Donoso, Dolores Caffarena, Luciana La Rosa, Thiago Manzione, Sidney Nadal, Simão Faria, Manuel Fortunato, João Ferreira, Guilherme Macedo

TL;DR
This paper presents the first real-time use of AI during high-resolution anoscopy to detect high-grade anal lesions, showing promising results for improving cancer screening.
Contribution
The first real-time application of deep learning during high-resolution anoscopy for HSIL detection in clinical practice.
Findings
The AI model detected only histologically confirmed high-grade lesions during real-time HRA.
The model did not activate for areas without lesions or with only low-grade lesions.
This approach may improve lesion detection and differentiation during HRA.
Abstract
Background: High-resolution anoscopy (HRA) is the gold standard for anal cancer screening, but its interpretation is challenging and operator-dependent. Artificial intelligence (AI) may increase diagnostic yield, but most studies have focused on differentiating low-grade and high-grade squamous intraepithelial lesions (LSIL and HSIL, respectively) in still frames, with no clinical application reported. Methods: We describe the first real-time use of deep learning, demonstrated in three patients undergoing HRA for anal cancer screening, at a high-volume American referral center. When an area suggestive of HSIL appeared, a YOLO-based object detection model generated a bounding box. Results: The model detected only histologically confirmed HSIL and did not activate when no lesions or only LSIL were present. Conclusions: This report suggests that real-time AI-enhanced HRA is feasible and…
Genes, proteins, chemicals, diseases, species, mutations and cell lines named across the full text — each resolved to its canonical identifier and authoritative record.
Click any figure to enlarge with its caption.
Figure 1
Figure 2Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsCervical Cancer and HPV Research · Colorectal and Anal Carcinomas · AI in cancer detection
1. Introduction
The medical community is experiencing substantial advancements in artificial intelligence (AI), particularly in medical specialties that rely on image interpretation. AI models have been developed to address multiple challenges, ranging from lesion detection to the prediction of lesion histology [1].
In the anal cancer screening context, high-resolution anoscopy (HRA) is considered the gold standard for assessment of the anal canal, providing higher resolution and magnification for accurate diagnosis and treatment [2]. Detection and differentiation of HPV-induced lesions between low-grade and high-grade squamous intraepithelial lesions (LSIL and HSIL, respectively) is important as management differs. From a morphological perspective, LSIL often presents as faint or thin acetowhite staining, with a regular vascular pattern and preserved Lugol’s intake. HSIL presents as dense acetowhite, with an irregular vascular pattern and absent or partial intake of Lugol’s solution. From a clinical management perspective, LSIL often regresses and requires monitoring, whereas HSIL is precancerous and requires local treatment [3]. However, accurate detection and differentiation are challenging, given the variety of mucosal and vascular patterns, as well as the steep learning curve and high interobserver variability associated with HRA [4,5]. In the HRA case, the kappa coefficient between anoscopists can be as low as 0.076, highlighting the difficulty and the technical demands of the procedure [6].
These limitations are particularly concerning given the scale of the clinical need. Current estimates suggest that in the United States alone, nearly one million HRA would be required to screen at-risk populations, identifying more than 300,000 anal HSIL [7]. This demand is further amplified by the biologic nature of HPV-induced lesions, as HSIL tends to recur (approximately 50% within one year) [8], necessitating repeated procedures and increasing the projected annual volume to over 1.4 million HRA procedures.
Despite this growing clinical need, the number of trained HRA providers remains insufficient. This shortage is particularly explained by the technique’s steep learning curve, as limited experience has been associated with missed lesions [9]. According to IANS, a substantial number of HRA procedures is required to achieve a stable diagnostic accuracy plateau, as well as a minimum procedural volume to maintain this level of performance over time [10].
The development and implementation of AI models in HRA have the potential to significantly enhance the diagnostic yield of the technique (Figure 1), not only by helping to bridge the gap between demand and high-quality HRA availability, but also by improving accuracy and procedural efficiency, even in expert settings. By reducing interobserver variability and increasing detection rates without increasing the false-positive rate, AI could have a beneficial clinical impact as an adjunct to a physician’s decision-making. To date, published studies have primarily focused on LSIL vs. HSIL differentiation in still frames, with no reports of real-time clinical application [11,12,13,14]. This case series presents the first reported use of a deep learning model for real-time assessment of the anal canal, in the context of anal cancer screening.
2. Methods
HRAs were conducted at a high-volume American center (Wake Forest University Hospital, West Salem, NC, USA) as part of anal cancer screening. Patient selection was entirely at the discretion of the institution. In addition to standard equipment, the HRA room was equipped with a computer connected to the HRA device, allowing real-time assessment with AI-enhanced predictions.
The model was trained on a multicentric dataset following FAIR principles, representing the latest iteration in the evolution of our group’s AI development regarding HRA, including a multicentric/multidevice dataset of 192.000 frames [15]. Annotations were performed by consensus of two physicians, taking into account histopathology assessment as the gold standard. A supervised object detection approach was employed with the backbone architecture being a pre-trained YOLOS vision transformer (ViT) [16] from Hugging Face. The final detection head of the network was adapted to match the number of classes in our dataset. The model was assembled with the PyTorch 2.9.1 framework. The AI algorithm was activated at the beginning of each procedure and, when an area suggestive of a lesion was detected, the model generated a bounding box locating the lesion(s). When an area suggestive of HSIL was detected within the image, the model generated a bounding box labeled “HSIL Lesion”. The physician could pause and resume the prediction process at any time during the examination.
3. Clinical Cases
3.1. Case 1
A 53-year-old male patient with a medical history of congestive heart failure and diabetes mellitus was referred for HRA. A screening colonoscopy performed in July 2024 incidentally revealed anal LSIL. The patient was HIV-negative. A standard anoscopy conducted in October 2024 also demonstrated LSIL on biopsy. He was asymptomatic at presentation. During HRA, an acetowhite, Lugol-positive, verrucous, slightly elevated lesion was identified in the left lateral octant at the SCJ. Another acetowhite, Lugol-positive, flat lesion with a regular punctate pattern was noted in the right lateral octant at the SCJ. Both findings were compatible with LSIL. In addition, an acetowhite, Lugol-negative, flat lesion exhibiting a mosaic pattern, located in the anterior octant at the SCJ, was considered compatible with HSIL. During concurrent real-time assessment with the AI algorithm, only the anterior octant lesion was highlighted by a bounding box, indicating a prediction suggestive of HSIL (Figure 2). All three suspected lesions were biopsied. Histopathological analysis confirmed HSIL in the anterior octant, while the remaining lesions were LSIL. The patient was subsequently referred for HSIL treatment.
3.2. Case 2
A 38-year-old HIV-negative male patient presented for HRA. His past medical history included hypertension. Two months earlier, he had undergone a hemorrhoidectomy, during which an LSIL was incidentally identified on histopathological examination. He was asymptomatic at the time of evaluation. During HRA, cicatricial changes in the anal canal mucosa were noted, consistent with prior hemorrhoidectomy. In the right anterior octant at the SCJ, a flat, partially Lugol-positive lesion with regular micropapillae was observed, compatible with LSIL. Additionally, in the proximal perianal area of the left lateral octant, a distinct raised filiform lesion was noted, also consistent with LSIL. Concurrent real-time assessment by the AI algorithm did not generate any prediction suggestive of HSIL during the examination. All suspected lesions were biopsied, and histopathological analysis confirmed LSIL in all samples. The patient remains under clinical surveillance.
3.3. Case 3
A 40-year-old HIV-positive male presented for HRA. His HIV infection was well controlled. He had a history of HSIL detected during screening and had previously undergone electrocautery treatment in 2017. The patient was lost to follow-up but returned for evaluation and management of perianal condyloma. During HRA, no areas suggestive of HPV-induced lesions were identified. Concurrent real-time assessment with the AI algorithm did not generate any prediction suggestive of HSIL during the procedure. The patient remains under clinical surveillance. Table 1 summarizes lesion characteristics, real-time AI predictions, and corresponding histopathology diagnoses for all cases. In this summary table, “Yes” indicates that the AI algorithm generated a bounding-box prediction suggestive of HSIL, while “No” indicates the absence of an AI-generated HSIL alert.
Lesions identified during high-resolution anoscopy are shown with corresponding physician impressions, real-time AI predictions and final histopathologic diagnoses. HSIL, high-grade squamous intraepithelial lesion; LSIL, low-grade squamous intraepithelial lesion; N/A indicates not applicable since no biopsy was performed because no lesions were visualized; SCJ, squamocolumnar junction.
4. Discussion
As far as we know, these are the first reported cases worldwide of the clinical application of an AI model during HRA. While prior studies on AI model development for HRA have relied on retrospective analysis of still images, this deep learning model represents an incremental advancement that enables its integration into the live clinical workflow, as summarized in Table 2. It enabled successful real-time detection of HPV-induced precancerous lesions (HSIL), which were subsequently confirmed by histopathology. This approach may represent a significant step forward in improving anal cancer screening and its implementation, potentially enhancing diagnostic yield.
First, we should acknowledge that HRA, like any other medical procedure, should be performed by trained physicians, using the appropriate knowledge and equipment in accordance with the leges artis. The implementation of an AI model, as software as a medical device (SaMD), during HRA should enhance the physician’s work and never substitute their role or the role of tissue sampling in this context. Moreover, we cannot overlook the “black-box” nature of these algorithms, which prevents us from knowing exactly how the model generates its predictions. Explainable AI mechanisms, such as bounding boxes, are crucial for facilitating medical trustworthiness, but the final decision must always remain with the physician performing the procedure (“human in the loop”).
In HRA, where the multifocal nature of HPV carcinogenesis and the variability of superficial and vascular patterns of HPV-induced lesions make LSIL vs. HSIL detection and differentiation challenging, AI-enhanced HRA could increase diagnostic yield. On one hand, taking into consideration the steep learning curve and the high interobserver variability associated with the technique, this could increase the absolute number of detected HSIL per procedure. AI-enhanced HRA could therefore have a significant impact on reducing anal cancer incidence. On the other hand, considering that HPV-induced lesion differentiation is challenging even for expert physicians, the adjunct real-time guidance provided by AI could improve efficiency and support clinical decision-making regarding which lesions require treatment.
In this setting, the clinical value of an AI-assisted model relies not only on its ability to detect HSIL, but also on its behavior in the presence of non-HSIL lesions. In other words, when assessing the clinical importance of an AI model, it is important to consider not only its capacity to discriminate true positives but also true negatives. In this case, although the experience is limited, the model was activated in the presence of HSIL and did not activate in LSIL cases, reinforcing its potential clinical applicability.
Furthermore, when considering the mismatch between demand and availability, this type of AI-assisted model has the potential to bring a community setting closer to expert-level performance, where outcomes can be correlated with HRA volume and experience [9]. It may also contribute to the training and democratization of the technique across different clinical settings. Selection bias needs to be actively mitigated by training on datasets from multiple sites and devices, a process that has already been implemented in our group’s AI-enhanced HRA models, including the one currently applied in these cases. By enhancing generalizability, the multicenter/multidevice training approach may increase the technology readiness level (TRL) of such models, potentially improving the quality of anal cancer screening in high-risk populations.
Finally, one should consider that this clinical case report, while innovative, represents only a very limited experience with a small sample size and no external validation. Moreover, as these procedures were performed in a high-volume referral center, the results may not immediately reflect performance in a community or low-volume setting. True validation of the model must be conducted using a multicentric methodology with a larger number of cases. However, we believe this experience is worth sharing, given that this is the first report of real-time application of an AI model in such a demanding technique and serves as a proof of concept, demonstrating that it can operate effectively under real clinical conditions during live cases.
5. Conclusions
This is the first report of a real-time AI-enhanced HRA that suggests that the use of deep learning-based algorithms could generate accurate predictions and operate effectively not only in still frames but also during live procedures. This could reduce interobserver variability, shorten the technique’s learning curve and increase its adoption, particularly among less-experienced clinicians, while further enhancing expert diagnostic performance. Consequently, this could represent a significant step for anal cancer screening, enabling earlier and more effective treatments, although multicentric validation studies are still needed to confirm these findings.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Messmann H. Bisschops R. Antonelli G. Libânio D. Sinonquel P. Abdelrahim M. Ahmad O.F. Areia M. Bergman J. Bhandari P. Expected value of artificial intelligence in gastrointestinal endoscopy: European Society of Gastrointestinal Endoscopy (ESGE) Position Statement Endoscopy 2022541211123110.1055/a-1950-569436270318 · doi ↗ · pubmed ↗
- 2Stier E.A. Clarke M.A. Deshmukh A.A. Wentzensen N. Liu Y. Poynten I.M. Cavallari E.N. Fink V. Barroso L.F. Clifford G.M. International Anal Neoplasia Society’s consensus guidelines for anal cancer screening Int. J. Cancer 20241541694170210.1002/ijc.3485038297406 · doi ↗ · pubmed ↗
- 3Palefsky J.M. Lee J.Y. Jay N. Goldstone S.E. Darragh T.M. Dunlevy H.A. Rosa-Cunha I. Arons A. Pugliese J.C. Vena D. Treatment of Anal High-Grade Squamous Intraepithelial Lesions to Prevent Anal Cancer N. Engl. J. Med.20223862273228210.1056/NEJ Moa 220104835704479 PMC 9717677 · doi ↗ · pubmed ↗
- 4Richel O. Prins J.M. de Vries H.J. Screening for anal cancer precursors: What is the learning curve for high-resolution anoscopy?Aids 2014281376137710.1097/qad.000000000000022724932502 · doi ↗ · pubmed ↗
- 5Siegenbeek van Heukelom M.L. Marra E. Cairo I. Van Eeden A. Schim van der Loeff M.F. De Vries H.J.C. Prins J.M. Detection Rate of High-Grade Squamous Intraepithelial Lesions as a Quality Assurance Metric for High-Resolution Anoscopy in HIV-Positive Men Dis. Colon. Rectum 20186178078610.1097/DCR.000000000000103929771801 · doi ↗ · pubmed ↗
- 6Gimenez F. Costa-e-Silva I.T. Daumas A. Araújo J. Medeiros S.G. Ferreira L. The value of high-resolution anoscopy in the diagnosis of anal cancer precursor lesions in HIV-positive patients Arq. Gastroenterol.20114813614510.1590/s 0004-2803201100020001021709956 · doi ↗ · pubmed ↗
- 7Centre for Disease Prevention and Control HIV Surveillance Report WHO Geneva, Switzerland 2024
- 8Goldstone R.N. Goldstone A.B. Russ J. Goldstone S.E. Long-term follow-up of infrared coagulator ablation of anal high-grade dysplasia in men who have sex with men Dis. Colon Rectum 2011541284129210.1097/DCR.0b 013e 318227833 e 21904144 · doi ↗ · pubmed ↗
