Diagnostic Accuracy | AI vs. Non-Specialists Reading Fundus Photographs

The accuracy of a grading is high simply from always answering “none” when most of the photographs show no finding. This case study uses an AI system and non-specialist physicians reading fundus photographs in diabetes. I evaluated diagnostic accuracy with 3 measures, namely accuracy, balanced accuracy, and weighted kappa, and judged how far each finding could be entrusted to them.

The study setting, disease, variables, and numbers in this article were newly created by me to explain how the analysis was carried out. The numbers were calculated from a randomly generated dataset and do not reflect the content or circumstances of any actual client project.

432 photographs, 3 findings, and unbalanced proportions of grades

The study used 432 fundus photographs (1 per person) from people who visited the ophthalmology department of a single center for diabetes. Three findings, retinal hemorrhage, hard exudates, and neovascularization, were each graded on 3 levels: none, mild, and severe. The reference was the consensus grading of 3 retina specialists, and this was compared with the grading by an image-reading AI system and with the median grading of 6 non-specialist physicians.

In the reference grading, the 3 grades were reasonably spread for hemorrhage, but “none” accounted for 71.3% of the photographs for hard exudates and 87.0% for neovascularization (Table 1).

Table 1. Number of photographs at each grade in the reference grading (n=432)
Finding None Mild Severe
Retinal hemorrhage 184 (42.6) 139 (32.2) 109 (25.2)
Hard exudates 308 (71.3) 88 (20.4) 36 (8.3)
Neovascularization 376 (87.0) 34 (7.9) 22 (5.1)
Values are no. of photographs (%). The reference is the consensus grading of 3 retina specialists.

Not judging diagnostic accuracy by accuracy alone, and comparing differences with the same photographs paired

For neovascularization, answering “none” for every photograph gives an accuracy of 87.0%. I therefore decided to report, alongside accuracy, the balanced accuracy, which averages the proportions graded correctly at each grade, and the weighted kappa, which removes chance agreement and takes the order of the grades into account.

With 3 grades, the ordinary kappa, which counts grading “none” as “mild” and grading it as “severe” as equally wrong, throws information away. I used the weighted kappa, which counts errors more heavily the further apart the grades are, so that the findings could also be compared with one another.

Furthermore, the AI system and the non-specialist physicians graded the same 432 photographs, so both tend to miss on photographs that are hard to read. Instead of calculating separate confidence intervals and comparing them by eye, I resampled with the bootstrap (1,000 samples), keeping the gradings paired by photograph, and obtained the 95% confidence interval for the difference in each measure itself.

Before taking the median of the 6 as the grading of the non-specialist physicians, I checked how well the gradings of the 6 agreed (inter-rater) and whether the same person gave the same grading on reading again (intra-rater).

For neovascularization, the accuracy of the AI system was high, but it was not detecting the finding

Weighted kappa and 95% confidence intervals for the AI system and the non-specialist physicians for 3 findings: retinal hemorrhage, hard exudates, and neovascularization
Figure 1. Weighted kappa for each finding, one of the measures of diagnostic accuracy. Vertical lines are 95% confidence intervals from the bootstrap. Values closer to 1 indicate better agreement with the reference grading.
Table 2. Measures of accuracy for each finding, and reliability of the gradings by the non-specialist physicians
Finding and measure AI Non-specialist physicians (median of 6) Difference (AI − non-specialist physicians)
Retinal hemorrhage
Accuracy (%)* 87.0 (84.0 to 90.0) 77.3 (73.1 to 80.8) 9.7 (4.9 to 14.8)
Balanced accuracy (%)† 86.3 (83.0 to 89.4) 78.4 (74.8 to 81.8) 7.9 (3.2 to 12.9)
Weighted kappa‡ 0.89 (0.86 to 0.92) 0.82 (0.79 to 0.86) 0.07 (0.03 to 0.11)
Inter-rater intraclass correlation coefficient§ — 0.67 (0.63 to 0.70) —
Intra-rater weighted kappa¶ — 0.83 to 0.91 —
Hard exudates
Accuracy (%)* 84.5 (81.0 to 88.0) 76.2 (72.2 to 80.1) 8.3 (3.2 to 13.2)
Balanced accuracy (%)† 76.5 (70.2 to 82.5) 75.0 (69.6 to 79.9) 1.4 (-6.7 to 9.1)
Weighted kappa‡ 0.78 (0.72 to 0.84) 0.73 (0.68 to 0.78) 0.05 (-0.02 to 0.12)
Inter-rater intraclass correlation coefficient§ — 0.59 (0.55 to 0.63) —
Intra-rater weighted kappa¶ — 0.80 to 0.81 —
Neovascularization
Accuracy (%)* 87.0 (84.0 to 89.8) 74.8 (70.6 to 78.7) 12.3 (7.4 to 17.1)
Balanced accuracy (%)† 40.8 (35.3 to 47.5) 75.9 (68.3 to 82.3) -35.1 (-44.6 to -24.6)
Weighted kappa‡ 0.42 (0.25 to 0.56) 0.61 (0.52 to 0.69) -0.19 (-0.35 to -0.03)
Inter-rater intraclass correlation coefficient§ — 0.52 (0.48 to 0.56) —
Intra-rater weighted kappa¶ — 0.71 to 0.81 —
Values in parentheses are 95% confidence intervals. The confidence intervals for the measures of accuracy are from 1,000 bootstrap samples with the photograph as the unit. Differences were calculated with the gradings of the same photograph paired.
* The accuracy from always answering the most common grade (“none”) is 42.6% for retinal hemorrhage, 71.3% for hard exudates, and 87.0% for neovascularization.
† Mean of the sensitivities for each grade (the proportion of photographs at that grade correctly graded as that grade).
‡ Agreement that takes the order of the grades into account and counts disagreements more heavily the further apart the grades are (quadratic weights).
§ Agreement among the gradings of the 6 non-specialist physicians (two-way random-effects model, absolute agreement, single rater).
¶ Agreement with the first reading when 3 physicians graded 100 photographs again 1 month later (range across the 3).

For hemorrhage, the weighted kappa of the AI system was 0.89, higher than the 0.82 of the non-specialist physicians, with a difference of 0.07 (95% CI, 0.03 to 0.11) (Figure 1 and Table 2). For hard exudates the values were 0.78 and 0.73, and the confidence interval for the difference, -0.02 to 0.12, crossed 0, so I could not conclude which was better.

A 3-by-3 figure showing, by color intensity, the number of photographs for each combination of the 3 grades in the reference grading and the 3 grades in the AI grading for neovascularization
Figure 2. Correspondence between the AI grading and the reference grading for neovascularization. Numbers are photographs, and the diagonal from upper left to lower right shows the photographs on which the gradings agreed.

For neovascularization, in contrast, the accuracy of the AI system was 87.0%, higher than the 74.8% of the non-specialist physicians, yet the balanced accuracy was 40.8% versus 75.9% and the weighted kappa 0.42 versus 0.61, with the order reversed. The AI system answered “none” for 95.1% of the 432 photographs and missed 73.2% of the 56 photographs graded mild or severe by the reference (Figure 2).

This 87.0% is the same value as answering “none” for everything, and it does not express the ability to detect neovascularization. The difference in weighted kappa was -0.19 (-0.35 to -0.03), and for this finding the non-specialist physicians can be said to be closer to the reference.

Among the 6 non-specialist physicians, the inter-rater intraclass correlation coefficient was 0.52 to 0.67 and the intra-rater weighted kappa was 0.71 to 0.91: the gradings of the same person were stable, but the variation between people was not small.

Taken together, the statistical conclusion is that the AI system was closer to the reference than the non-specialist physicians in grading hemorrhage, that I could not conclude that there was a difference for hard exudates, and that for neovascularization it missed many photographs despite its high accuracy. Only 22 photographs had severe neovascularization, and the confidence interval for the kappa of the AI system was wide, at 0.25 to 0.56, so evaluating this finding requires confirmation with more photographs that show it.

Work performed and estimated fee

Item Details
Analysis method Evaluation of accuracy for 3 findings (accuracy, balanced accuracy, and weighted kappa), and a paired comparison of the AI system and the non-specialist physicians
Additional analyses 95% confidence intervals from 1,000 bootstrap samples, and evaluation of inter-rater agreement (intraclass correlation coefficient) and intra-rater agreement (weighted kappa)
Tables prepared 1 table of the number of photographs at each grade in the reference grading, 1 table of measures of accuracy and reliability; 2 tables in total
Figures prepared 1 figure of weighted kappa for each finding, 1 figure of the correspondence between the AI grading and the reference for neovascularization; 2 figures in total
Deliverables Analysis report (reasons for the choice of methods and discussion of the results), tables of results (Excel), figures (PNG and TIFF), and a draft of the statistical analysis section for the paper. Analysis code is available on request for an additional fee (¥22,000, incl. tax)
Estimated time About 3 weeks from receipt of the data
Estimated fee ¥308,000 (incl. tax)

The table lists the main analyses only. I also carry out the finer analyses needed to follow a sound statistical process, such as checking distributions and cleaning the data; these, together with after-care with no time limit (answers to your questions after delivery), are included in the fee.

Data Scientist Kenichiro Suzuki

Data ScientistKenichiro Suzuki

Free consultationSee fee examples

Recent Posts

Linear Mixed Model | 6-Minute Walk Distance in COPD Rehabilitation

A linear mixed model comparing 6-minute walk distance at four time points with missing data. How to read a non-significant group-by-time interaction.

Cox Regression and Multiple Imputation | Mortality in Hemodialysis

Cox regression of 8 factors and all-cause mortality in new hemodialysis patients, with multiple imputation for missing grip strength and other values.

ROC Analysis | Comparing the AUCs of 4 Blood Markers for Bacteremia

ROC analysis of the AUCs of 4 markers for bacteremia: all pairs tested with the paired DeLong test and corrected with the Benjamini–Hochberg procedure.

Kruskal–Wallis Test | Fatigue and Pain in 5 Rheumatoid Arthritis Groups

Kruskal–Wallis test with corrected pairwise comparisons of fatigue and pain scores among 5 rheumatoid arthritis treatment groups, plus factor analysis.

RMST | Pancreatic Cancer Chemotherapy When Survival Curves Cross

RMST (restricted mean survival time) comparing 2 first-line chemotherapies for advanced pancreatic cancer when survival curves cross, with adjustment.

Multiple Regression | Factors Associated With Dementia Caregiver Burden

Multiple regression with 8 prespecified factors for burden and quality of life in family caregivers of people with dementia, with principal components.

Multiple Regression | Monthly Antimicrobial Use and Resistance Over Time

Multiple regression of monthly antimicrobial use and the proportion of resistant Pseudomonas aeruginosa, after unit root tests and differencing.

Cox Regression | Recurrence After 2 Methods of Atrial Fibrillation Ablation

Cox regression comparing recurrence after 2 methods of catheter ablation for atrial fibrillation, with 6 subgroups read from tests of interaction.