Predicting visual acuity with machine learning in treated ocular trauma patients

Zhi-Lu Zhou, Jiemin Chen, Rui-Jue Liu, Xiaoying Yu, Meng Wang, Hong-Xia Hao, Dongmei Liu, Qi Zhang, Jie Wang, Wentao XiaInternational Journal of Ophthalmology 2023 · DOI

Abstract

AIM: To predict best-corrected visual acuity (BCVA) by machine learning in patients with ocular trauma who were treated for at least 6 months. METHODS: The internal dataset consisted of 850 patients (1589 eyes) with an average age of 44.29 years. Four machine-learning algorithms (XGBoost, SVR, Bayesian ridge, and random forest regressor) were used to predict BCVA, and four algorithms (XGBoost, SVM, logistic regression, and random forest classifier) were used to classify BCVA impairment. Features were extracted from clinical records, optical coherence tomography (OCT) images, and fundus photographs. RESULTS: Significant correlation was found between predicted and actual values (PCC > 0.6). The XGBoost model achieved a Pearson correlation coefficient (PCC) of 0.96 and a classification accuracy of 0.90 on the independent test set. CONCLUSION: Predicting BCVA using machine-learning models in patients with treated ocular trauma is accurate and helpful in the objective identification of visual dysfunction.

Introduction

Ocular trauma is a leading cause of monocular blindness, yet assessing its long-term functional impact remains a clinical and forensic challenge. In forensic medicine, where legal compensation or insurance claims are often at stake, clinicians frequently encounter "poor cooperation" or potential malingering during subjective vision tests. While objective tests like Visual Evoked Potentials (PVEP) exist, they are often noisy and influenced by patient effort. There is a critical need for an objective system that can analyze the physical structure of a treated eye (the "hardware") to accurately predict its functional output (the "software" or vision).

Methodology

Researchers developed a machine learning framework to address this need through two primary tasks: a regression task to predict exact vision scores and a classification task to categorize vision as impaired or healthy based on a 0.3 logMAR threshold.

Feature Engineering and Dataset

The study utilized an internal dataset of 1,589 eyes collected between 2015 and 2021, and an independent test set of 100 eyes for final validation. Seventeen variables were extracted across three categories:

  1. Clinical Features: Age, gender, and the Ocular Trauma Score (OTS).
  2. OCT Imaging: Retinal Nerve Fiber Layer (RNFL) thickness, cube volume, and subfield thickness.
  3. Fundus Photographs: Areas of abnormal macula (Comus), ASV-ANM, and cup-to-disc ratios (CDR).
The machine learning workflow illustrates the process from feature preparation and dataset splitting to model design and final evaluation.

Model Selection and Interpretability

Four popular algorithms were benchmarked: Extreme Gradient Boosting (XGBoost), Support Vector Machines (SVM/SVR), Random Forest, and Bayesian Ridge/Logistic Regression. To ensure the models were not "black boxes," the team used SHAP (Shapley Additive Explanations) to visualize which features most heavily influenced predictions, ensuring alignment with known ophthalmic principles.

Results and Key Insights

XGBoost consistently outperformed other models, particularly in traumatic eye groups, due to its ability to handle non-linear relationships in tabular clinical data.

Predictive Accuracy

On the independent test set, the model achieved a Pearson Correlation Coefficient (PCC) of 0.96, indicating that predicted vision almost perfectly mirrored actual measured vision. The Mean Absolute Error (MAE) was only 0.20 logMAR, a narrow margin in clinical terms. For identifying significant visual impairment, the model reached 90% accuracy with a high specificity of 95%.

Bland-Altman plots show the strong agreement between predicted and actual BCVA values, with most data points falling within the limits of agreement.

Structural Anchors

While Uncorrected Visual Acuity (UVA) was a strong predictor, structural markers like Superior RNFL thickness and Cube Subfield Thickness (CST) acted as vital objective anchors. These markers allow the model to flag discrepancies if a patient claims significant vision loss despite having healthy retinal structures.

Discussion and Future Work

The study demonstrates that retinal structure and vision have a consistent enough relationship to build hardware-agnostic diagnostic tools. However, a current limitation is the manual or semi-manual extraction of features from images, which is time-consuming. Future research aims to develop "end-to-end" deep learning models (such as CNNs) to predict vision directly from raw OCT and fundus files, creating a fully automated diagnostic pipeline for forensic and clinical use.

Summary updated

Abstract

AIM: To predict best-corrected visual acuity (BCVA) by machine learning in patients with ocular trauma who were treated for at least 6mo. METHODS: The internal dataset consisted of 850 patients with 1589 eyes and an average age of 44.29y. The initial visual acuity was 0.99 logMAR. The test dataset consisted of 60 patients with 100 eyes collected while the model was optimized. Four different machine-learning algorithms (Extreme Gradient Boosting, support vector regression, Bayesian ridge, and random forest regressor) were used to predict BCVA, and four algorithms (Extreme Gradient Boosting, support vector machine, logistic regression, and random forest classifier) were used to classify BCVA in patients with ocular trauma after treatment for 6mo or longer. Clinical features were obtained from outpatient records, and ocular parameters were extracted from optical coherence tomography images and fundus photographs. These features were put into different machine-learning models, and the obtained predicted values were compared with the actual BCVA values. The best-performing model and the best variable selected were further evaluated in the test dataset. RESULTS: There was a significant correlation between the predicted and actual values [all Pearson correlation coefficient (PCC)>0.6]. Considering only the data from the traumatic group (group A) into account, the lowest mean absolute error (MAE) and root mean square error (RMSE) were 0.30 and 0.40 logMAR, respectively. In the traumatic and healthy groups (group B), the lowest MAE and RMSE were 0.20 and 0.33 logMAR, respectively. The sensitivity was always higher than the specificity in group A, in contrast to the results in group B. The classification accuracy and precision were above 0.80 in both groups. The MAE, RMSE, and PCC of the test dataset were 0.20, 0.29, and 0.96, respectively. The sensitivity, precision, specificity, and accuracy of the test dataset were 0.83, 0.92, 0.95, and 0.90, respectively. CONCLUSION: Predicting BCVA using machine-learning models in patients with treated ocular trauma is accurate and helpful in the identification of visual dysfunction.
BibTeX
@article{zhou2023predicting,
  author = {Zhi-Lu Zhou and Jiemin Chen and Rui-Jue Liu and Xiaoying Yu and Meng Wang and Hong-Xia Hao and Dongmei Liu and Qi Zhang and Jie Wang and Wentao Xia},
  title = {{Predicting visual acuity with machine learning in treated ocular trauma patients}},
  journal = {International Journal of Ophthalmology},
  year = {2023},
  doi = {10.18240/ijo.2023.07.02},
}
Figure