**Purpose**:
This study investigates deep-learning (DL) sequence modeling techniques to reliably fit dark adaptation (DA) curves and estimate their key parameters in patients with age-related macular degeneration (AMD) to improve robustness and curve predictions.

**Methods**:
A long-short-term memory autoencoder was used as the DL method to model the DA curve. The performance was compared against the classical nonlinear regression method using goodness-of-fit and repeatability metrics. Experiments were performed to predict the latter portion of the curve using data from early measurements. The prediction accuracy was quantified as the rod intercept time (RIT) prediction error between predicted and actual curves.

**Results**:
The two models had comparable goodness-of-fit measures, with root mean squared error (RMSE; SD) = 0.11 (0.04) log-units (LU) for the classical model and RMSE = 0.13 (0.06) LU for the DL model. Repeatability of the curve fits evaluated after introduction of random perturbations, and after performing repeated testing, demonstrated superiority of the DL method, especially among parameters related to cone decay. The DL method exhibited superior ability to predict the curve and RIT using points prior to −2 LU, with 3.1 ± 3.1 minutes RIT prediction error, compared to 19.1 ± 18.6 minutes RIT error for the classical method.

**Conclusions**:
The parameters obtained from the DL method demonstrated superior robustness as well as predictability of the curve. These could provide important advances in using multiple DA curve parameters to characterize AMD severity.

**Translational Relevance**:
Dark adaptation is an important functional measure in studies of AMD and curve modeling using DL methods can lead to improved clinical trial end points.

^{1}Parameters derived from these DA curves can serve as useful indicators in assessing retinal function, and provide information relevant to disease severity with associations to severe stages including atrophy.

^{2}The rod intercept time (RIT), defined by the time taken to reach a criterion threshold, is a commonly used clinical parameter derived from the DA curve.

^{3}

^{–}

^{5}RIT has shown particular relevance to AMD,

^{3}

^{,}

^{6}

^{–}

^{9}with reported associations to AMD disease severity and the presence of certain phenotypes, such as reticular pseudodrusen (RPD).

^{10}

^{–}

^{12}Other parameters obtained from the DA test include final thresholds and rates of recovery for the rods and cones, and the time to the rod-cone break.

^{8}

^{,}

^{13}

^{–}

^{15}These parameters may provide additional insights into disease severity and progression; these rely on accurate and robust modeling of the DA curve.

^{14}

^{,}

^{16}

^{17}Dark adaptation measures the rate of recovery of retinal sensitivity following exposure to a light that bleaches some fraction of rhodopsin in the photoreceptors. Recent developments have been made to both the instruments and the testing paradigms to facilitate the feasibility of DA testing in the clinical setting. The changes include utilization of a partial bleach, which leads to shorter recovery times, and the application of the RIT parameter as an outcome, which obviates the need to reach the final threshold sensitivity. RIT parameter measures the time to reach a threshold sensitivity within the rod-driven portion of the recovery (portion of the recovery up to approximately 1 log unit [LU] below the cone rod break), thus requiring only limited curve modeling. To estimate parameters in addition to RIT, the raw data acquired in practical clinical test protocols requires curve fitting.

^{8}

^{,}

^{18}The DA curve may be modeled as exponent + linear decay (or exponent + two linear decays),

^{14}with the cone-mediated portion of the curve represented by an exponential decay and the rod-mediated portion of the curve (S2) represented by a linear decay (and the third component remaining unmeasured in this clinical testing paradigm). Although rod-related variables derived from the dark adaptation curve have shown stronger relationship with AMD disease severity, both cone- and rod-related variables in isolation or in combination could enhance the understanding of disease-related changes further. This requires robust approaches for curve modeling to derive reliable measurements for all parameters computed from the curve.

^{10}During the DA test, each collected test point aims to estimate sensitivity threshold at that time point in a specific area of the retina using a staircase estimation. Measurement fluctuations could be triggered by premature or laggard responses from the tired patients.

^{19}Slight differences in fixation could result in responses coming from non-identical areas of retina. Moreover, some stages of the curve may contain sparse and limited number of measurements causing high uncertainty to parameter estimation. Robustly modeling the curve overcoming these spurious and sparse measurements can thus be a challenge and a limitation to obtaining representative curve-derived parameters reliably. When evaluating how disease (e.g. AMD) affects the DA curve and its ability to capture changes over time, it is important for the curve fitting method to be minimally sensitive to fluctuations and ideally able to distinguish disease-induced deviations from measurement fluctuations.

^{14}are traditionally used to estimate the parameters: errors between the curve and the measured data points are minimized using an iterative optimization algorithm. This classical method treats all data points equally, while attempting to minimize the error between the measured data and the estimated curve. Although faster implementations with error bounds have been explored,

^{19}spurious measurements can still drive to undesired solutions causing high variability in parameters. Alternatively, deep learning (DL) sequence modeling techniques can be used to observe the patterns in the acquired data, potentially identify and suppress spurious data points, and augment sparse regions to robustly estimate the curve. Importantly, this approach does not explicitly specify the curve equation or the number of curve parameters; the model predicts a suitable curve representation after observing the data points for that particular test, as well as learning from trends in the tests of other patients. However, the resulting curve obtained from the DL algorithm can be utilized to fit the classical DA equation, in order to obtain the classical curve parameters.

^{20}and presence of RPD.

^{10}

^{4}In brief, the patient's pupil was dilated and the participant was asked to focus on a fixation light. A photoflash producing an equivalent 82% bleach centered at 5 degrees on the inferior visual meridian was performed, and threshold measurements were made at the same location with a 1.7 diameter, 500-nm wavelength circular test spot, using a 3-down/1-up modified staircase threshold estimate procedure. The initial stimulus intensity (P

_{0}) was 5 cd/m

^{2}. Threshold measurements were continued until the patient's visual sensitivity recovered to be able to detect a dimmer stimulus intensity of 5 × 10

^{−3}cd/m

^{2}(a relative decrease of 3 log units [LU], denoted as −3 LU), or until a maximum test duration of 40 minutes was reached, whichever occurred first. The raw test sensitivities (P) were extracted from the instrument at each measured time point and the relative decrease is recorded in LU according to log

_{10}(P/P

_{0}). The total number of DA tests performed was 1496. These were from longitudinal follow-up testing of 207 unique patients or healthy volunteers, over a maximum period of 6 years. There were 349 tests repeated within 3 months of the baseline test for the same individual. For additional independent validation, 21 DA tests of 10 patients with AMD were acquired where 11 test pairs were performed within a 60-day interval.

^{9}

^{,}

^{21}and each eye was graded according to age-related eye disease study (AREDS) criteria

^{22}for AMD severity (AREDS 9-step scale) and the presence/absence of RPD at annual increments.

*y*(LU) at time

*x*(minutes [min]) is measured following cessation of the bleach. The five derived parameters were (a, [LU]) the time cone decay intercept, (b, [min

^{−1}]) cone decay time constant, (c [LU/min]) rod slope, (d, [LU]) the cone plateau and (e, [min]) the time to the rod-cone break.

_{0}) was set to the halfway time point of the total test duration. Cone plateau (d

_{0}) was set to the average of the maximum and minimum intensity [(LU

_{max}+ LU

_{min})/2] measurements in the test. After empirical testing parameters a

_{0}, b

_{0}, and c

_{0}were set according to LU

_{min}– d

_{0}, 15/e

_{0}, and (LU

_{max}– d

_{0})/e

_{0}, respectively. Optimization was performed using a trust-region algorithm with convergence criteria: parameter tolerance = 10

^{−5}, function tolerance = 10

^{−5}, maximum function evaluations 600, and maximum iterations = 400. These hyperparameters were set empirically during initial development in a subset of the data.

^{−2}. These hyperparameters were set empirically during initial development in a subset of the data.

_{NLR}).

_{NLR}).

*P*< 0.001, by paired

*t*-test). The RIT measurements in the acquired data set ranged from 3.6 to 39.9 minutes. The measured RIT between the NLR and the LSTM methods had a difference (mean ± SD) = 0.3 ± 0.4 minutes (range = 0.0–2.8 minutes).

_{NLR}method showed lower outlier percentages across all parameters (Table 1). The NLR method exhibited substantially increased outliers in parameters related to cone decay.

*P*< 0.001.

_{NLR}method exhibited superior repeatability, compared to those from the LOWESS

_{NLR}and NLR methods. All parameters except the rod-cone break (e) and RIT exhibited statistically significant differences (

*P*< 0.001, Wilcoxon signed rank test). RIT repeatability was also compared with the values obtained from the AdaptDx machine and found to be comparable across the four different methods compared. However, all methods demonstrated comparable performance when measuring RIT, indicating the relevance of the curve fitting method when deriving parameters in addition to the RIT form DA tests. Repeated tests capture both noisy random fluctuations in data points as well as any biases resulting in an overall shorter or longer test. Thus, the measured error between parameters, such as RIT, from the tests were larger compared to the random noise experiment described before. Supplementary Figure S1 shows additional validation using 11 independent test set pairs supporting the observations in Figure 4 where the LSTM

_{NLR}method exhibited superior overall repeatability when all parameters are considered. Supplementary Figure S2 shows 5 representative patients’ cases comparing curve derivations using both methods within 3 months. Supplementary Figure S3 shows convergence plots during training.

_{NLR}comparisons performed in this paper. Thus, the LSTM method (see Fig. 3, Fig. 4e) can serve as a noise-reducing, interpolation method to the raw data points recorded during the test.

**T. De Silva**, None;

**K. Hess**, None;

**P. Grisso**, None;

**A.T. Thavikulwat**, None;

**H. Wiley**, None;

**T.D.L. Keenan**, None;

**E.Y. Chew**, None;

**B.G. Jeffrey**, None;

**C.A. Cukras**, None

*Prog Retin Eye Res*. 2004; 23(3): 307–380. [CrossRef] [PubMed]

*Ophthalmol Ther*. 2021; 10(1): 21–38. [CrossRef] [PubMed]

*Transl Vis Sci Technol*. 2017; 6(3): 15. [CrossRef] [PubMed]

*J Ocul Biol Dis Infor*. 2008; 1(1): 7–11. [CrossRef] [PubMed]

*Invest Ophthalmol Vis Sci*. 2001; 42(8): 1882–1890. [PubMed]

*Ophthalmology*. 2016; 123(2): 344–351. [CrossRef] [PubMed]

*Ophthalmology*. 2007; 114(9): 1728–1735. [CrossRef] [PubMed]

*Invest Ophthalmol Vis Sci*. 2008; 49(1): 55–65. [CrossRef] [PubMed]

*Investig Ophthalmol Vis Sci*. 2018; 59(6): 2411–2421. [CrossRef]

*Ophthalmology*. 2015; 122(10): 2053–2062. [CrossRef] [PubMed]

*Investig Ophthalmol Vis Sci*. 2012; 83(9): 5213–5220.

*Investig Ophthalmol Vis Sci*. 2011; 52(13): 9457–9469. [CrossRef]

*Vision Res*. 1999; 39(23): 3975–3982. [CrossRef] [PubMed]

*Behav Res Methods, Instruments, Comput*. 1999; 31(4): 712–717. [CrossRef]

*Vis Neurosci*. 1992; 8(1): 27–39. [PubMed]

*Ophthalmology*. 2001; 108(7): 1196–1202. [CrossRef] [PubMed]

*J Physiol*. 1975; 248(2): 413–431. [CrossRef] [PubMed]

*Behav Res Methods Instrum Comput*. 1999; 31(4): 712–717. [CrossRef] [PubMed]

*Prog Retin Eye Res*. 2021; 88: 101015. [CrossRef] [PubMed]

*Arch Ophthalmol*. 2005; 123(11): 1570–1574. [PubMed]

*Ophthalmology*. 2015; 122(10): 2053–2062. [CrossRef] [PubMed]

*Arch Ophthalmol*. 2005; 123(11): 1484–1498. [PubMed]