Skip to main content
Diagnostic Pathology logoLink to Diagnostic Pathology
. 2026 Feb 4;21:25. doi: 10.1186/s13000-026-01763-1

Quantification of interstitial fibrosis in digitized kidney biopsies using deep neural networks

Neda Soleimani 1, Zahra Hajizadeh 1, Maryam Mohammadi 2, Sahand Mohammadzadeh 1,✉
PMCID: PMC12958591  PMID: 41639733

Abstract

Introduction

Interstitial fibrosis in kidney biopsy is an established marker of disease prognosis and chronicity. Conventional manual grading by pathologists is subjective and variable. Computational methods may reduce this variability.

Methods

We developed a deep learning framework using a ResNet-50 architecture with transfer learning to classify interstitial fibrosis on trichrome-stained renal biopsy images. A total of 2000 biopsies were screened; 162 were excluded due to poor slide quality, leaving 1838 cases (1154 native, 684 transplant). A single expert nephropathologist provided ground-truth fibrosis scores, categorized as < 5% (minimal), 5–25% (mild), 26–50% (moderate), and > 50% (severe).

Results

The model achieved an overall accuracy of 73% (95% CI: 65–81%) with substantial agreement with the pathologist (κ = 0.68). Stratified analysis showed 78% accuracy for native kidneys and 67% for transplant biopsies.

Conclusion

Our CNN-based framework shows promise for standardizing fibrosis assessment in kidney biopsies. However, the absence of external validation remains a key limitation, and further multi-center studies are required.

Keywords: Digital pathology, Artificial intelligence, Renal fibrosis

Introduction

Renal biopsy is an integral part of clinical work-up for patients with a variety of kidney diseases because it provides diagnostic and prognostic information that guides treatment [1]. The renal survival rate tends to be better with histologic evaluation by renal biopsy than without renal biopsy. Thus, an accurate and robust diagnosis is essential for the proper management of patients with kidney disease [2].

Because of the variety of stains commonly used, renal biopsy is unique compared to other surgical pathology specimens. Morphologic assessment relies on the quality of the preparations, the pathologists’ expertise in detecting the individual structures and associated changes, and quantitative or semiquantitative metrics used to capture the extent of tissue damage [3].

Interstitial fibrosis and tubular atrophy (IFTA) represents a hallmark histopathologic change commonly observed in chronic kidney injury [4]. For this reason, the assessment of interstitial fibrosis is widely used in the evaluation of kidney biopsies [5]. Chronic changes in the kidney cortex, such as IFTA and GS, have been shown to have a significant bearing on predicting prognosis and guiding treatment, independent of disease category, and standardized grading [6, 7].

In order to evaluate the extent of fibrosis in the glomerulus or tubular interstitum, fibrous tissue stains such as Trichrome, Sirius red, or Ladewig stains are indispensable [8]. Visual assessment using trichrome-stained slides is the standard practice [9]. Trichrome staining is quite practical for both clinical management of individual patients and for research studies, as it is widely available and inexpensive [10, 11].

Although the trained eyes of expert pathologists are able to gauge the severity of disease and to detect nuances of histopathology with remarkable accuracy, such expertise is not available in all locations, especially at a global level [12, 13].

IFTA assessment can be variable between pathologists because it is determined on the basis of a visual estimation of overall percent renal cortical area involvement [14] and Estimating IFTA visually is challenging because its histologic features are heterogeneous and the morphological spectrum is broad, making consistent quantification difficult [15]. So, IFTA assessment can suffer from suboptimal inter-pathologist reliability [16].

Artificial intelligence is playing an increasingly important role in many fields of medicine, assisting physicians in most steps of patient management [17, 18].

Deep learning models, specifically convolutional neural networks (CNNs), have proven to be capable of segmenting and detecting relevant biological structures in histopathological slides [19].

Just like a biological neuron has dendrites to receive signals, a cell body to process them, and an axon to send signals out to other neurons, the artificial neuron has a number of input channels, a processing stage, and one output that can fan out to multiple other artificial neurons [20]. In this way, the increased depth of the data can be used to build better models and guidelines for the treatment of kidney diseases [21]. This in turn enables the extent of features such as IFTA to be reported as continuous variables rather than traditional categorical variables, which may show improved clinical utility [22, 23].

Material and method

Study design

A cross-sectional study was performed on renal biopsy between 2019 and 2023 to compare fibrosis percentages manually and digitally. The research cases were from Faghihi Hospital in Shiraz, which is a referral center for kidney pathology.

Sample selection

Initially, 2000 biopsies were screened; 162 were excluded due to poor slide quality or artifacts. The final cohort included 1838 biopsies (1154 native, 684 transplanted). The only criteria for inclusion was the availability of pathological slides and good preparation. Because IFTA is a highly complex image structure with a large spectrum of morphologies, we restricted the types of cases used in this study to those with well-established areas of fibrosis.

Imaging

Trichrome-stained slides of kidney biopsy were imaged at x40 and x100 magnifications using an Olympus CX23 microscope and a manually focused mobile camera, resulting in a resolution of 0.25 μm/pixel. For x40 magnifications, images were generated with a special consideration to cover the entirety of the sample. This usually results in a minimum of 1 image and a maximum of 2 images to fully capture the full length of the core. For x100, about 3 to 5 images per magnification were taken sequentially from one end of the sample to the other, with almost no overlapping regions between images.

Fibrosis grading

In all cases, tissue sections were prepared at 2 μm thickness. The percentage of fibrosis in Masson Trichrome-stained slides was determined by expert nephropathologists by using scoring systems that have been created by international and national working groups (such as the Banff classification or the Renal Pathology Society Working Group). The score was provided as a percentage of cortical regions with IFTA (0% to 100%), which was then converted to a semiquantitative grade: <5% (none or minimal), 5% to 25% (mild), 26% to 50% (moderate), and > 50% (severe).

Deep-learning framework

We used ResNet-50 pretrained on ImageNet with transfer learning. Histology images were resized to 224 × 224 pixels and normalized. The dataset was divided into training and validation sets. Data augmentation (rotation, flipping, brightness adjustment) was applied, and dropout plus early stopping were used to minimize overfitting. The Adam optimizer was used with an adaptive learning rate. The final layer was modified for four-class fibrosis prediction. The model was trained for multiple epochs, and the best version was stored based on validation accuracy.

Additionally, we clarified that the dataset (n = 1838) was collected at Faghih Hospital, Shiraz, Iran (2020–2024) and included patients with variability in age, sex, and disease stage. Transfer learning was employed to adapt a pretrained model to our task, which reduces the need for large datasets and training time. The model was implemented in Python using TensorFlow/Keras in Google Colab.

Result

The baseline characteristics are representative of a population of patients attended to at a nephrology service at a teaching hospital (Table 1).

Table 1.

Characteristics of study population

Characteristic Value
Number of cases 1883
Native Kidney biopsy 1154 (63%)
Transplanted Kidney biopsy 684 (37%)

Initially, 2000 kidney biopsies were screened; 162 were excluded due to poor slide quality or artifacts. The final cohort included 1838 biopsies. Photos were prepared from their trichrome slides and used for AI training, with data augmentation applied to balance class distribution.

The photos were first examined by a nephropathologist and classified into 4 groups based on Banff classification (Table 2). Performance metrics with 95% confidence intervals had overall accuracy of 73% (95% CI: 65–81%) (Table 3). Stratified analysis showed 78% accuracy for native kidneys and 67% for transplant biopsies. Cohen’s kappa coefficient (κ = 0.68) indicated substantial agreement beyond chance, and McNemar’s test showed no significant systematic bias (p = 0.12). Performance metrics stratified by biopsy type are shown in Table 4 and the result of AI diagnosis in different grade group is shown in Fig. 1.

Table 2.

Number of cases in each group

grade Number of cases
1 799
2 400
3 274
4 365
Total 1838

Table 3.

The result of AI diagnosis in different grade groups (with 95% CIs)

Description Minimal (95% CI) Mild (95% CI) Moderate (95% CI) Severe (95% CI)
Precision 0.89 ± 0.18  0.72 ± 0.20  0.67 ± 0.23  0.78 ± 0.22 
(0.83–0.95) (0.65–0.79) (0.60–0.74) (0.71–0.85)
Recall/sensitivity 0.70 ± 0.22  0.76 ± 0.17  0.63 ± 0.26  0.86 ± 0.18 
(0.63–0.77) (0.70–0.82) (0.56–0.70) (0.80–0.92)
Specificity 0.96 ± 0.05  0.80 ± 0.15  0.90 ± 0.07  0.94 ± 0.06 
(0.94–0.98) (0.75–0.85) (0.86–0.94) (0.91–0.97)

Table 4.

Performance by biopsy type

Group Accuracy (95% CI) Precision (95% CI) Recall (95% CI)
Native (n = 1154) 78% (72–84%) 0.81 ± 0.16  0.79 ± 0.18 
(0.75–0.87) (0.73–0.85)
Transplant (n = 684) 67% (60–74%) 0.70 ± 0.19  0.68 ± 0.21 
(0.63–0.77) (0.61–0.75)

Fig. 1.

Fig. 1

The result of AI diagnosis in different grade group

Discussion

The purpose is to further enhance reproducibility and accuracy in the IFTA grading of renal biopsies by applying neural network learning. Renal biopsy remains a cornerstone in the diagnosis, prognosis, and treatment of kidney diseases. By providing detailed histological information, it allows accurate assessment of pathologic features, and its digitization enables the application of computer-based technologies for quantitative analysis [7]. A major strength of the present study is that standard trichrome-stained biopsy slides were analyzed directly, without additional pre-processing, allowing comparison between machine learning (ML) outputs and the clinical pathology reports on the exact same specimens. This direct applicability demonstrates the potential of artificial intelligence (AI) in nephropathology, although in this work our findings are restricted to interstitial fibrosis. The developed framework, however, can be extended to other complex renal diseases and clinical correlations [4].

In this study, convolutional neural network (CNN) models were trained for the detection of interstitial fibrosis and tubular atrophy (IFTA). Interestingly, smaller CNN architectures combined with low-resolution image analysis yielded superior results [8]. This outcome reflects the diagnostic approach typically used by pathologists, who rely on lower magnification to estimate fibrosis rather than focusing on small foci at high power [2]. The field of view and magnification thus emerge as key parameters that must be tailored to the task at hand. For example, while high-resolution images are critical for nuclei localization, low-resolution inputs provide the broader contextual information needed for reliable IFTA grading [9].

Our model achieved an overall accuracy of 73%, which is consistent with prior studies. Lai et al. (2022) reported 82% accuracy with an end-to-end deep learning model, while Ginley et al. achieved a Dice score of 0.74 for fibrosis segmentation [15]. The modestly lower accuracy in our study may reflect cohort heterogeneity and the absence of whole-slide imaging. Importantly, stratified analysis demonstrated higher performance in native kidneys (78%) compared with allografts (67%), likely due to the more complex pathology and scarring patterns observed in transplant biopsies. These findings align with Mariani et al. (2018), who highlighted similar challenges in transplant evaluations [14].

The CNN developed here demonstrated the ability to approximate nephropathologist-level grading of renal fibrosis [13]. This was achieved using a dataset of 1,838 trichrome-stained images, enhanced by transfer learning and data augmentation strategies. Transfer learning facilitated efficient training on a relatively small dataset, while augmentation increased model robustness by introducing variability [19]. Furthermore, the CNN architecture’s convolutional, pooling, and fully connected layers enabled the extraction of multi-level features critical for classification. Although this study focused on IFTA detection, the framework can be readily adapted for other nephropathological tasks, including glomerulosclerosis quantification and immunohistochemical evaluation of inflammatory infiltrates [11].

One of the main advantages of this approach is the reduction in dependence on expert observers and labor-intensive morphometric analysis [10]. By embedding CNN-based models into software or mobile applications, clinical predictions could be generated rapidly from digital histology slides [13]. This would allow general pathologists, even in resource-limited settings, to generate reliable fibrosis assessments and support clinical decision-making. Such democratization of nephropathology could improve patient care where specialized expertise is scarce [9].

Despite these strengths, several challenges remain. As highlighted by Farris and Alpers [10], the lack of consensus in defining and quantifying IFTA leads to variability in human assessments. Some definitions consider the percentage of abnormal tissue, while others emphasize the proportion of fibrous tissue within the interstitium [17]. International scoring systems, such as the Banff classification and Renal Pathology Society guidelines, attempt to standardize grading, but reproducibility remains suboptimal. Advanced computational methods, including ML applied to digital histology, may provide a more consistent and objective alternative [14].

Limitations

Because in the preparation of photos for artificial intelligence training, kidney biopsy slides with trichrome staining were used, if the cut thickness, staining technique, and other human factors involved in this stage did not provide the desired quality, it justifies some of the different estimations between pathologists and artificial intelligence.

One of the limitations of this design is the non-use of whole slide imaging (WSI) technology, which has sometimes caused a part of the sample to be removed, and to minimize this problem, more than one photo has been taken of different parts of a sample.

If the primary data classification does not have sufficient precision and accuracy, machine learning will be affected and cause an incorrect estimation of fibrosis degree in a kidney biopsy.

It should be noted that some normal fibrosis can be seen around the vessels and also in subcapsular area, and artificial intelligence is not able to separate this fibrosis from pathological fibrosis.

Ground truth labels relied on a single nephropathologist’s visual estimation, potentially introducing observer bias. Future studies should incorporate multi-rater consensus to mitigate this limitation.

Our classification model does not provide regional visualizations (e.g., heatmaps) due to the lack of pixel-level annotations and the use of field-specific images rather than whole-slide scans. Future work will incorporate segmentation capabilities when annotated datasets become available.

Conclusion

Our findings suggest that CNN-based models can approximate pathologist grading patterns and may serve as a supplementary tool for fibrosis assessment. Our classification model achieved 73% accuracy in fibrosis assessment, showing potential for more repeatable results compared to manual grading. These advancements could enhance the clinical utility and interpretability of AI-assisted fibrosis grading in renal pathology. However, the absence of external validation remains a key limitation, and further multi-center studies are required.

Acknowledgements

The authors thank the staff of the Department of Pathology, Shiraz University of Medical Sciences, for their technical assistance and support.

Authors’ contributions

N.S., M.M., and S.M. developed the study concept and design and wrote the draft manuscript. N.S. and Z.H. collected and analyzed the data. S.M. and Z.H. reviewed the pathology slides. N.S., M.M., and S.M. interpreted the results and finalized the manuscript. All authors read and approved the final version of the paper.

Funding

This research did not receive funding.

Data availability

The datasets generated and analyzed during the current study are available from the corresponding author on reasonable request.

Declarations

Ethics approval and consent to participate

This study was approved by the Ethics Committee of Shiraz University of Medical Sciences (IR.SUMS.MED.REC.1402.038). All procedures were conducted in accordance with the ethical guidelines and the Declaration of Helsinki. Informed consent was obtained from all subjects or, if subjects were under 18, from a parent and/or legal guardian.

Consent for publication

Not applicable.

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

References

  • 1.Zheng Y, Cassol CA, Jung S, Veerapaneni D, Chitalia VC, Ren KY, Bellur SS, Boor P, Barisoni LM, Waikar SS, Betke M. Deep-learning–driven quantification of interstitial fibrosis in digitized kidney biopsies. Am J Pathol. 2021;191(8):1442–53. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Uchino E, Suzuki K, Sato N, Kojima R, Tamada Y, Hiragi S, Yokoi H, Yugami N, Minamiguchi S, Haga H, Yanagita M. Classification of glomerular pathological findings using deep learning and nephrologist–AI collective intelligence approach. Int J Med Informatics. 2020;141:104231. [DOI] [PubMed] [Google Scholar]
  • 3.Jayapandian CP, Chen Y, Janowczyk AR, Palmer MB, Cassol CA, Sekulic M, Hodgin JB, Zee J, Hewitt SM, O’Toole J, Toro P. Development and evaluation of deep learning–based segmentation of histologic structures in the kidney cortex with multiple histologic stains. Kidney Int. 2021;99(1):86–101. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Hermsen M, Volk V, Bräsen JH, Geijs DJ, Gwinner W, Kers J, Linmans J, Schaadt NS, Schmitz J, Steenbergen EJ, Swiderska-Chadaj Z. Quantitative assessment of inflammatory infiltrates in kidney transplant biopsies using multiplex tyramide signal amplification and deep learning. Lab Invest. 2021;101(8):970–82. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Farris AB*, Adams CD*, Brousaides N, Della Pelle, Patricia A*, Collins A, Bernard*; Moradi Ellie‡, Smith R, Neal*; Grimm PC‡, Colvin RB *. Morphometric and Visual Evaluation of Fibrosis in Renal Biopsies. J Am Soc Nephrol. 2011;22(1):176–186. | 10.1681/ASN.2009091005. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Street JM, Souza AC, Alvarez-Prats A, Horino T, Hu X, Yuen PS, Star RA. Automated quantification of renal fibrosis with Sirius red and polarization contrast microscopy. Physiological Rep. 2014;2(7):e12088. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Yiu WH, Lin M, Tang SC. Toll-like receptor activation: from renal inflammation to fibrosis. Kidney Int Supplements. 2014;4(1):20–5. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Amann K, Haas CS. What you should know about the work-up of a renal biopsy. Nephrol Dialysis Transplantation. 2006;21(5):1157–61. [DOI] [PubMed] [Google Scholar]
  • 9.Farris AB, Adams CD, Brousaides N, Della Pelle PA, Collins AB, Moradi E, Smith RN, Grimm PC, Colvin RB. Morphometric and visual evaluation of fibrosis in renal biopsies. J Am Soc Nephrol. 2011;22(1):176–86. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Farris AB, Alpers CE. What is the best way to measure renal fibrosis? A pathologist’s perspective. Kidney Int Supplements. 2014;4(1):9–15. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Ginley B, Jen KY, Han SS, Rodrigues L, Jain S, Fogo AB, Zuckerman J, Walavalkar V, Miecznikowski JC, Wen Y, Yen F. Automated computational detection of interstitial fibrosis, tubular atrophy, and glomerulosclerosis. J Am Soc Nephrol. 2021;32(4):837–50. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Mariani LH, Martini S, Barisoni L, Canetta PA, Troost JP, Hodgin JB, Palmer M, Rosenberg AZ, Lemley KV, Chien HP, Zee J. Interstitial fibrosis scored on whole-slide digital imaging of kidney biopsies is a predictor of outcome in proteinuric glomerulopathies. Nephrol Dialysis Transplantation. 2018;33(2):310–8. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Roufosse C, Simmonds N, Clahsen-van Groningen M, Haas M, Henriksen KJ, Horsfield C, Loupy A, Mengel M, Perkowska-Ptasińska A, Rabant M, Racusen LC. A 2018 reference guide to the Banff classification of renal allograft pathology. Transplantation. 2018;102(11):1795–814. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Kolachalama VB, Singh P, Lin CQ, Mun D, Belghasem ME, Henderson JM, Francis JM, Salant DJ, Chitalia VC. Association of pathological fibrosis with renal survival using deep neural networks. Kidney Int Rep. 2018;3(2):464–75. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Yi Z, Salem F, Menon MC, Keung K, Xi C, Hultin S, Al Rasheed MR, Li L, Su F, Sun Z, Wei C. Deep learning identified pathological abnormalities predictive of graft loss in kidney transplant biopsies. Kidney Int. 2022;101(2):288–98. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Hermsen M, de Bel T, Den Boer M, Steenbergen EJ, Kers J, Florquin S, Roelofs JJ, Stegall MD, Alexander MP, Smith BH, Smeets B. Deep learning–based histopathologic assessment of kidney tissue. J Am Soc Nephrol. 2019;30(10):1968–79. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Osareh A, Shadgar B, Markham R. A computational-intelligence-based approach for detection of exudates in diabetic retinopathy images. IEEE Trans Inf Technol Biomed. 2009;13(4):535–45. [DOI] [PubMed] [Google Scholar]
  • 18.Niel O, Bastard P. Artificial intelligence in nephrology: core concepts, clinical applications, and perspectives. Am J Kidney Dis. 2019;74(6):803–10. [DOI] [PubMed] [Google Scholar]
  • 19.Barisoni L, Lafata KJ, Hewitt SM, Madabhushi A, Balis UG. Digital pathology and computational image analysis in nephropathology. Nat Rev Nephrol. 2020;16(11):669–85. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Hodgin JB, Mariani LH. Automated quantification of chronic changes in the kidney biopsy: another step in the right direction. J Am Soc Nephrol. 2021;32(4):767–8. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Farris AB, Vizcarra J, Amgad M, Cooper LA, Gutman D, Hogan J. Image analysis pipeline for renal allograft evaluation and fibrosis quantification. Kidney Int Rep. 2021;6(7):1878–87. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Liu ZY, Lin CH, Wang HS, Wen MC, Lin WC, Huang SC, Tu KH, Kuo CF, Chen TD. End-to-end interstitial fibrosis assessment of kidney biopsies with a machine learning-based model. Nephrol Dialysis Transplantation. 2022;37(11):2093–101. [DOI] [PubMed] [Google Scholar]
  • 23.Lai Y, Liu X, Wu Y, Zhou D, Wang C, Niu D, Han W, Zhou X, Chen J, Zheng W. Interstitial fibrosis and tubular atrophy measurement via hierarchical extractions of kidney and atrophy regions with deep learning method. Measurement. 2022;202:111885. [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

The datasets generated and analyzed during the current study are available from the corresponding author on reasonable request.


Articles from Diagnostic Pathology are provided here courtesy of BMC

RESOURCES