Introduction

The transition from Anatomical Pathology into Computational Pathology is on the horizon. This medical specialty has undergone two significant events: its establishment as a specific area of medical knowledge, based on macroscopic observations, and a shift in emphasis from gross to microscopic observation. Now, Anatomical Pathology is on the cusp of a third moment, the transition to Computational Pathology. This article will briefly examine the elements that propel pathology in this direction and the challenges that will be faced along the way. To illustrate these developments, we will examine the experience of the Brazilian PathoSpotter project, an initiative that has been dedicated to the development of Computational Pathology for the past seven years.

Moments in and models of Anatomical Pathology

Prelude to Anatomical Pathology as a medical specialty

The notion that diseases can be morphologically explained dates back to the beginnings of medicine. External alterations observed during the course of some diseases, and alterations observed in internal organs during the preparation of corpses for burial, may have established the basis of this conception. Thus, ceramic models with descriptions of lesions were produced in ancient Babylon between 1900—1600 BC, while more systematic descriptions of macroscopic findings supporting the differential diagnosis of diseases are found in the Ebers papyrus (1550 BC) and the Edwin Smith papyrus (1600 BC). B.C) (Leichty, et al. 1988a; Bryan 1930; Breasted 1930):

When thou meetest a tumour of the flesh in any part of the body of a person, and thou findest it like hide in his flesh; he is clammy; it goes-and-comes under thy finger except when the finger is kept still because the matter escapes through it, then thou sayest: It is a Tumour of the Flesh. I will treat the disease. I will try to heal it with Fire like the Cautery heals.' (Papiro de Ebers, cap. XXI, Diagnosis) (Bryan 1930)

“Instructions concerning bulging tumors on his breast.

Examinaton: If thou examinest a man having bulging tumors on his breast, (and) thou findest that [swellings] have spread over his breast ; if thou puttest thy hand upon his breast upon these tumors, (and) thou findest them very cool, there being no fever at all therein when thy hand touches him; they have no granulation, they form no fluid, they do not generate secretions of fluid, and they are bulging to thy hand, (conclusion follows in diagnosis).

Diagnosis: Thou shouldst say concerning him: " One having bulging tumors. An ailment with which I will contend."

Treatment: There is no treatment. (Papiro de Edwin Smith, caso 45) (Breasted 1930)

Clinical-pathological correlations intensified through experimental studies of vivisections carried out in ancient Greece by Herophilos (335 – 280 BC) and Erasistratos (304 – 250 BC), and later by Galen (129 – 201). Subsequently, a resurgence of interest in necropsy studies led to the descriptions of lesions by Bologna (1270), followed in Italy and elsewhere in Europe by new publications of autopsy findings, including case series and systematized studies by Antonio Benivieni (1443–1502), Vesalius (1514–1564), Theophilus Bonet (1620–1689), among others (Tweel and Taylor 2010). The seminal work that best represents how this work impacted medical knowledge is “De Sedibus et Causis Morborum per Anatomen Indagatis” (On the Seats and Causes of Diseases through Anatomical Investigation), by Giovanni Battista Morgagni (1682–1771). In his work, which consists of 70 letters to an unknown friend, Morgagni establishes anatomical-clinical correlations from 640 autopsies (Yonace and Morgagni 1980). In these letters, morphological findings are discussed in the context of the patient's clinical history and comparisons with human and animal studies. Morgagni's work established the concept that organ damage constituted the basis of disease, and marked the birth of Anatomical Pathology as a specific area of medical knowledge.

The microscope and cellular pathology

Microscopes, both simple and compound, were used in studies of insects in the sixteenth century. Microscopic examination of human and plant tissues began in the seventeenth century, including by Marcello Malpighi (1628–1694), considered the founder of histology (Engelhardt 2021; Singer 1914). The optical improvements introduced to the compound microscope between the eighteenth and nineteenth centuries stimulated its use as a complementary instrument in the study of disease. In the mid-nineteenth century, despite the effervescent application of new biochemical and physical knowledge to the study of pathology, microscopy emerged as the main resource for understanding pathological processes. This development resulted from the conception that diseases are the result of microscopic changes that occur on a cellular level. This conception of cellular pathology was elegantly presented by Rudolf Virchow (1821–1902) in a series of 20 lessons richly illustrated by drawings of microscopic structures (Virchow et al. 1858). The concept of cellular pathology broadened the scope of Anatomical pathology and increased its sensitivity in detecting and understanding disease. This advent also expanded the role of Anatomical pathology as an explanatory field of medicine and progressively intensified its integration into the medical decision-making system.

Computational Pathology – the third revolution?

Until the first half of the twentieth century, Anatomical Pathology played a predominantly explanatory role. The integration of basic medical and clinical knowledge has placed Anatomical pathology at the center of medical training and resulted in vast improvements in the quality of medical practice. This prominent position was maintained by pathology until the third post-Flexnerian wave that gained strength in the late decades of the twentieth century (Buja 2019). Coincidentally, from the mid-twentieth century onwards, developments in medical imaging made it possible to collect small tissue samples from all internal organs for diagnostic purposes. The need for microscopic analysis of these samples has expanded the integration of Anatomical pathology into decision-making approaches for therapeutic management and disease prognosis estimation (Fig. 1).

Fig. 1
figure 1

Three moments in Anatomical pathology: The foundation as an area of medical knowledge, marked by the publication of “De Sedibus et Causis Morborum per Anatomen Indagatis” by Morgagni in 1761. The second moment is represented by the conception of Cellular Pathology and the publication of Virchow's lectures in 1858. Computational Pathology represents a possible future in pathology. The two previous moments produced, and the third, in perspective, should produce important changes in the pathologist's environment, routine activities (macroscopic examination, microscopy and computational analysis), and object of study

The changing role from explanatory to operational of Anatomical pathology necessitated new requirements entailing more robust criteria for lesion characterization, consensus definition among specialists and estimations of interobserver and intraobserver agreement in establishing diagnoses. Indeed, a substantial part of pathology congresses are dedicated to tutorials on disease classification criteria and discussions on the validation of recently proposed disease classifications, and specific meetings are conducted to continuously update some disease classifications (Roufosse et al. 2018; Trimarchi et al. 2017; Bajema et al. 2018). Nowadays it is common to see pathologists’ workspaces ‘decorated’ with tables cropped from articles summarizing definitions from recent consensus meetings; classification protocols are also frequently accessed online (College of American Pathologists - Cancer Protocols and Checklists. n. d.). This constant search for a consensus-defined diagnosis aims to obtain precision and clarity in the reporting of anatomopathological examination findings, and allows for improved exchanges of information between specialists and better patient care. It also places the following demands on pathologists that have primed the transition of Anatomical pathology into Computational Pathology: (1) Some pathological disease classifications are highly labor-intensive, e.g. several categories require pathologists to reach a decision regarding the presence or absence of lesions, sometimes requiring the application of ordinal estimates. 2) Some lesions used as criteria for disease classification are only focally or subtly represented and may thusly be overlooked, and errors in diagnosis may occur due to the absence of detection of specific criteria. 3) The strength of inter observer agreement is frequently average or even poor for some lesions despite carefully elaborated classifications (Bellur, et al. 2019).

Importantly, the emergence of computational pathology is also being driven by a fascination with histological images by pathologists, as well as the emergence and cheapening of digital image capture systems. This has led to the creation of large collections of histological images ready for use in computational pathology projects.

Many countries have launched computational pathology initiatives in the last decade (Wiens et al. 2019; Colling et al. 2019). In 2019, a proposal from INOVA UK envisaged the creation of five centers of excellence in digital pathology in the United Kingdom, with artificial intelligence being applied to imaging. (Colling et al. 2019). A recent call for proposals from the National Institutes of Health (USA), entitled “Data Generation Projects for the NIH Bridge to Artificial Intelligence (Bridge2AI) Program (OT2),” aimed to support the building of large and diverse image datasets (National Institutes of Health, Data Generation Projects for the NIH Bridge to Artificial Intelligence. n.d.). In addition, roadmaps have been proposed for the development of computational pathology systems ranging from conception to certification (Colling et al. 2019). In Brazil, while some institutions and funding agencies have called for proposals in this area, government policies aimed at stimulating the adoption of computational pathology have yet to be established.

An initial step towards the transition to Computational Pathology has already been taken by various Anatomical pathology laboratories involving the progressive digitalization of physical slide collections and the use of digital tools in the analytical phase of diagnosis. In some laboratories, the pre-analytical phase of anatomopathological study progressively includes whole histological slide scanning (WSI), enabling remote access and examination using computers and/or tablets. The possibility of simultaneous access to the same slide by different pathologists allows for rapid exchanges of information among specialists, offering greater diagnostic precision. By applying appropriate data security protocols, anatomopathological collections will no longer be vulnerable to loss or damage (e.g., discoloration and artifacts produced during the retrieval process, etc.)

Digital workflows based on WSI or other digital histological image repositories are referred to as Digital Pathology. Digital Pathology also includes telepathology (the transmission of microscopic images) and digital histological image analysis performed by humans or computer systems (i.e., Computational Pathology). Computational Pathology includes the extraction or generation of quantitative data from digital images, either alone or in conjunction with other biological or omic data.

The PathoSpotter project

The PathoSpotter project arose from the need for a computer system capable of scanning histological image banks in order to find cases with similar structures or lesions given a specific histological image or region of interest. This method of identifying and classifying histological lesions would be useful to pathologists in their diagnostic routines, and benefit the training of pathologists as well as the conduct of scientific research. Considering that the Gonçalo Moniz Institute (IGM-FIOCRUZ) possessed a rich collection of histological images from renal biopsies, this was one of the most important conditions enabling development in the area of computational nephropathology. Reports have appeared in the literature on advances made in computational oncological pathology, such as the classification of breast, prostate, lung tumors, etc., and in the identification of metastatic infiltration of cancer cells into lymph nodes. Some studies have reported superior performance by computer systems in comparison to that of pathologists (Sheikh et al. 2020; Arvaniti et al. 2018; Hekler et al. 2019). One factor underlying the PathoSpotter project was the scarcity of reports involving computational pathology in the context of non-neoplastic disease. A major challenge in the computational modeling of non-neoplastic diseases is the complex interactions between cells and the extracellular matrix that lead to extensive tissue remodeling. A wide spectrum of representations are produced by a single lesion type due to alterations arising from these interactions. In contrast to the repetitive image patterns observed in neoplasms, non-neoplastic lesions are substantially diverse in appearance.

To initiate the PathoSpotter project, three of the most frequent glomerular lesions in renal pathology were chosen: glomerular hypercellularity, segmental glomerular sclerosis and membranous glomerulopathy (Fig. 2). Glomerular hypercellularity, which is present in several glomerulopathies, is considered a diagnostic marker and is used to determine activity in many kidney diseases. Segmental glomerular sclerosis is a scar on part of the glomerulus, representing the final stage of many glomerular lesions or the main feature of some glomerular diseases. It is therefore considered a marker for diagnosis or chronicity in kidney disease. Membranous glomerulopathy is characterized by a very specific morphological change: diffuse thickening of the glomerular capillary wall. The prevalence of membranous glomerulopathy is increasing in accordance with enhanced life expectancy (Fogo. n. d.).

Fig. 2
figure 2

Normal glomerulus (a) and lesions defined as the subject of study by the PathoSpotter project (b-d): b – glomerular hypercellularity, c – glomerular segmental sclerosis, d – membranous glomerulopathy. Hematoxylin–eosin stain, 200x

PathoSpotter has taken advantage of the availability of more than 130,000 images collected from 3,000 renal biopsies analyzed by IGM-FIOCRUZ. This collection contains images of renal biopsies performed on native kidneys of female and male patients, aged between 1 and 88 years, for the purpose of diagnosing nephropathies. The images, obtained over a span of 20 years using different digital capture systems, were captured from slides stained by different histochemical techniques used in nephropathological diagnosis, and are predominantly represented by snapshots of normal or injured glomeruli. A more detailed description of the collection has been reported in dos-Santos et al., 2019 (Dos-Santos et al. 2017).

From a collection of 811 images, 300 of normal glomeruli and 511 of glomeruli exhibiting hypercellularity, Barros et al. (2017) employed a classic machine learning approach to processing, segmentation, feature extraction, classification and validation, enabling the creation of an algorithm capable of distinguishing normal from hypercellular glomeruli with an accuracy of 88.3 ± 3.6% (Barros et al. 2017). Subsequently, Chagas et al., using the same image dataset, a convolutional neural network (CNN), and a support vector machine (SVM), two powerful machine learning approaches, created an architectural model capable of separating normal from hypercellular glomeruli with near-perfect accuracy (Chagas et al. 2020). Using the same approach applied to a dataset distributed in four classes: endocapillary hypercellularity, mesangial hypercellularity, mixed endocapillary and mesangial hypercellularity (both lesions present) and normal glomeruli, an average accuracy of 82% was achieved (Chagas et al. 2020). Because the location of hypercellularity among different regions of the glomerulus leads to different implications in terms of disease activity, the automatic classification of these four categories of glomerular injury represents a highly relevant contribution to the field (Fogo. n. d.). An interesting observation from this study is that six of the 811 images were misclassified by the CNN-SVM model. These images were then subjected to independent analysis by three pathologists whose analysis resulted in agreement in just two of the lesions represented. In fact, the six images depict complex glomerular lesions with increased cellularity due to cell proliferation and the influx of inflammatory cells, causing the disruption of glomerular compartments (Chagas et al. 2020). Preliminary data from automatic classification studies of segmental sclerosis and membranous glomerulopathy have also shown encouraging results. Using a combination of classical image processing and pattern recognition, an accuracy of 84.8% was achieved using images of H&E-stained sections to classify glomeruli with segmental sclerosis, compared to 81.3% for PAS-stained section images (Araújo et al. 2019). An investigation employing three deep learning-based architectures, ResNet-18, DenseNet, and Wide-ResNet, to separate normal glomeruli from membranous glomerulopathy, or glomeruli with other lesions, reported an average F1 score above 92% for each of the models (Chagas et al. n. d.).

All of these studies used images consisting of snapshots of renal biopsies, representing the glomerulus and other renal histological structures, such as tubules, the interstitium and blood vessels. Improved performance of these algorithms may be achieved if analysis is performed on the glomerulus alone, absent adjacent structures. Rahem et al. (2021) achieved a 0.94 F1-score using the Multibox Single Shot Detector network with Inception V2 to identify glomeruli in histological images (J. Moreira Cardozo Rehem, et al. n. d.). Further developments in segmenting glomeruli using WSI, as well as attempts to explain what the computer is using to classify histological structures (i.e., Explainable AI) are being currently undertaken by the PathoSpotter project.

Challenges in the transition to computational pathology

The point in which Anatomical pathology transitions to computational still seems distant. This may occur progressively, combining automation with pathologist supervision. Among the many challenges to making this a reality, several are highlighted below:

  1. 1)

    The lack of diverse, properly labeled and comprehensive image datasets consisting of diverse histological lesions;

  2. 2)

    Datasets must be in some way linked to clinical patient data to allow the validation of external algorithms, in addition to morphological validations performed by pathologists;

  3. 3)

    An appropriate definition of histological lesions with acceptable levels of agreement among specialists does not yet exist for most renal diseases;

  4. 4)

    Variations occurring in the pre-analytical stages of image production due to image processing and capture systems introduce inconsistencies;

  5. 5)

    Inadequate representation of lesion characteristics in infrequent diseases causes imbalance in image datasets;

  6. 6)

    Algorithms must meet regulatory standards for testing and use in clinical settings.

These questions are the focus of research by many groups, and a variety of interesting solutions are emerging, such as the use of generative adverse neural networks to expand the number of rare lesion images, systems to correct color quality in scanned images, computational staining (color attribution to histological section images), and the building of consortia for large-scale histological image dataset generation, including contributions from many parts of the world (National Institutes of Health, Data Generation Projects for the NIH Bridge to Artificial Intelligence (Bridge2AI)Program(OT2). n. d.; Rana et al. 2020; Rana et al. 2020; Chen et al. 2021).

The role of the Pathologist after the third revolution in Anatomical Pathology

The emergence of computational pathology in a fully developed digital pathology environment represents a very different scenario from that experienced today in Anatomical pathology laboratories. In this new reality, the colors imbued by hematoxylin–eosin and other histochemical stains will be computationally attributed to histological sections with just a few strokes of the computer’s keyboard. Biopsies will be analyzed by computer algorithms with differing levels of supervision by the pathologist. Time spent at the microscope—the pathologist's main activity today—will be much less, and happen less and less frequently. For this reason, we employ the term ‘revolution’ in this article. In contrast to Salto-Tellez et al., (2019) who consider the changes brought by artificial intelligence to pathology similar to those brought by immunohistochemistry (Salto-Tellez et al. 2019), we postulate that computational pathology will introduce radical changes in the way pathologists work and how Anatomical pathology laboratories are organized. The disruption that will occur parallels two other moments in the history of Anatomical pathology: (1) The first revolution, in which Giovanni Morgagnin’s work gave rise to Anatomical pathology as an area of medical knowledge, placed early pathologists in the necropsy environment and prompted them to carry out gross morphological analysis of surgical specimens when necessary; (2) the second revolution, following Virchow's Cell Pathology, transferred the pathologist's work environment to the laboratory, with microscopic analysis becoming routine. Recent advances in diagnostic systematization and the progressive immersion of the pathologist in therapeutic decision-making, together with the emergence of computational pathology, are leading the pathologist on a new and mostly unknown path. However, in this new role, it will be necessary for the pathologist to not lose the ability to critically analyze the morphological data produced by computational systems. Pathologists may also be required to fully understand how different data integration systems work and to possess the medical knowledge necessary to integrate data generated by different omics.

Conclusion

Computational pathology the third revolution in Anatomical pathology may substantially expand the pathologist's ability to offer definitive diagnostic information leading to more precise medical interventions.