Improving ophthalmologic care through artificial intelligence

For some, hearing the words artificial intelligence, or AI, sparks imaginative scenes of robot overlords, self-driving cars, dystopian surveillance, chatbots, and machines replacing humans at work. However, researchers and faculty at the Mary M. and Sash A. Spencer Center for Vision Research at the Byers Eye Institute have begun to embrace AI and its promise to improve disease prediction and identify novel therapies to improve eye care. Indeed, the first FDA-approved AI application was cleared for ophthalmology to detect retinal damage in diabetes (see “Tele-Ophthalmology: Digital care in a digital world”, page 5).

Patient Hana Feldmeier tests a virtual reality headset to assess her visual field.

Paving the way with imaging and structured big data

Theodore Leng, MD, associate professor of ophthalmology, has been concentrating his efforts in leveraging AI technology to improve diagnostic prediction in age-related macular degeneration (AMD). In AMD, there is an insidiously progressive dry form of the disease that is very common, and an explosive, damaging wet form that affects a subset of patients. Leng worked with Daniel Rubin, MD, professor of biomedical data sciences and of ophthalmology, to develop algorithms that for the first time could predict which patients with dry AMD would progress to wet—an enormous step forward for the field.

Robert Chang, MD, associate professor of ophthalmology, has been an early adopter of introducing AI into vision care. Recently, Chang’s multidisciplinary team published a study where they used AI algorithms on full, 3D macular optical coherence tomography (OCT) images to detect if patients need a referral for glaucoma.

“Early detection of glaucoma is key to preventing long-term disability,” Chang said. “Also, clinically we have trouble distinguishing glaucoma from nearsightedness, or myopia, so we included those challenging cases into the algorithms too.”

Chang’s team is amassing a multimodal dataset from Stanford, compiling retinal and optic nerve photos, OCTs, visual field tests, and treatment history from the past 10 years and over 1,000 patients. They supplemented it with similar international datasets for external validation. Chang anticipates that incorporating this data will allow the algorithms to handle more patient-to-patient variability and be less susceptible to error.

Understanding unstructured data in patient notes

Working with Chang, Sophia Wang, MD, assistant professor of ophthalmology, is also leveraging big data to improve patient care. Wang, a previous Stanford glaucoma fellow, is training an algorithm to improve how electronic health records information is extracted and analyzed on the scale of hundreds of thousands to millions of ophthalmic patient records.

In a typical doctor’s note, rich information from clinical findings to treatment details is written in sentences and using medical jargon, which is difficult for computers to analyze. Wang’s approach uses natural language processing, a subfield of AI, that allows a computer to understand human language as a person speaks or writes.

Wang collaborates with Tina Hernandez-Boussard, MD, PhD, MPH, associate professor in medicine (biomedical informatics), and Suzann Pershing, MD, assistant professor of ophthalmology and of health research and policy, in accessing one of the largest national registries of health data – the American Academy of Ophthalmology IRIS Registry. With access to such diverse, longitudinal, high quality datasets, these glaucoma algorithms eventually may predict who will respond best to different therapies.

“My hope is that our algorithms will tell us if a patient is low or high risk and needs surgery sooner, and maybe even what surgery would be best for them,” Wang said.

The Stanford Acuity Test allows users to perform repeated vision testing from the comfort of their home via a smartphone and a website.

Upgrading the traditional vision exam

Chris Piech, PhD, assistant professor of computer science, received a diagnosis of uveitis, or intraocular inflammation, when he was just 8 years old, and has spent his life battling an array of eye complications ever since. After undergoing recent cataract surgery at Byers Eye Institute by Charles Lin, MD, clinical associate professor of ophthalmology, Piech asked if Lin was interested in collaborating on a project to improve the traditional eye chart, called the Snellen vision test.

“Chart-based visual acuity is not always accurate,” Piech said. “As patients get further down on the chart and letters began to blur, they begin guessing, which leads to variable and sometimes inaccurate results.”

Chang joined the collaboration, as did Ali Malik, a PhD computer science student in Piech’s lab, and Laura Scott, Piech’s wife. Their collaborative project quickly proved successful, and the results formed the basis for the Stanford Acuity Test, an online test driven by AI, which can now be accessed at

The test reduced 74% of error when run on 1,000 computer simulations that mimicked real patients. While it doesn’t replace a doctor visit or provide medical advice, it can serve as a helpful tool for repeated self-vision testing. The results were published in the Proceedings of the AAAI Conference on Artificial Intelligence, and the group is now conducting a study comparing the Stanford Acuity Test with Snellen and ETDRS exams in patients.

Computer-assisted vision testing

Ann Shue, MD, clinical assistant professor of ophthalmology, is trained in two subspecialties, pediatric ophthalmology and glaucoma. Along with Chang, she is testing the reliability of using virtual reality (VR) to test visual fields, especially in children. In her clinic, patients are trying out two different VR headsets in lieu of traditional visual field tests.

“A VR visual field test allows patients to sit in a position they are comfortable with, while still allowing us to get information to form a diagnostic portfolio,” Shue said. “And, computer-assisted vision testing would also allow patients the flexibility of vision testing from home, which is helpful in the time of COVID, but also any time, or for patients in remote areas with limited access to care.”

The future of AI at Stanford ­

Together, these cutting-edge research projects have incorporated AI into the research and clinical environment at Stanford to help validate new technology for future clinical care.

“Stanford has facilitated a supportive environment for bringing technology from the lab into the clinic,” Chang said. “Ultimately, understanding vast amounts of data and knowing how to analyze it is the key to enabling doctors to predict a patient’s future and thus truly personalizing his/her treatment plan.”


Kathryn Sill is a web and communications specialist for the Byers Eye Institute in the Department of Ophthalmology, at Stanford University School of Medicine. Email her at