Multidimensional psychometric functions can typically be estimated nonparametrically for greater accuracy or parametrically for greater efficiency. By recasting the estimation problem from regression to classification, however, powerful machine learning tools can be leveraged to provide an adjustable balance between accuracy and efficiency. Contrast sensitivity functions (CSFs) are behaviorally estimated curves that provide insight into both peripheral and central visual function. Because estimation can be impractically long, current clinical workflows must make compromises such as limited sampling across spatial frequency or strong assumptions on CSF shape. This article describes the development of the machine learning contrast response function (MLCRF) estimator, which quantifies the expected probability of success in performing a contrast detection or discrimination task. A machine learning CSF can then be derived from the MLCRF. Using simulated eyes created from canonical CSF curves and actual human contrast response data, the accuracy and efficiency of the machine learning contrast sensitivity function (MLCSF) was evaluated to determine its potential utility for research and clinical applications. With stimuli selected randomly, the MLCSF estimator converged slowly toward ground truth. With optimal stimulus selection via Bayesian active learning, convergence was nearly an order of magnitude faster, requiring only tens of stimuli to achieve reasonable estimates. Inclusion of an informative prior provided no consistent advantage to the estimator as configured. MLCSF achieved efficiencies on par with quickCSF, a conventional parametric estimator, but with systematically higher accuracy. Because MLCSF design allows accuracy to be traded off against efficiency, it should be explored further to uncover its full potential.

*f*(

**x**) to be a latent function defined on a continuous multidimensional space \({{\bf x}} \in \mathcal{X}\). For the current application,

**x**represents an ordered pair (ω, κ) indexing a visual grating at a particular spatial frequency and contrast. The latent function itself represents the probability of correctly detecting this grating. A Gaussian process (GP) represents a convenient means to encode prior knowledge about the latent function:

**X**= {

**x**

_{1},

**x**

_{2},...,

**x**

_{n}}. In binary classification tasks the dependent variable can take on one of two values indicating failure or success:

*y*∈ {0, 1}. The probability of success

_{i}*p*(

*y*= 1|

*f*) is modeled by a sigmoidal link function ψ(

**x**). This function is distributed according to a Bernoulli likelihood:

**y**,

**X**} from one eye. The posterior is a GP and probabilistically constrains the latent function as described above. Because of the nonlinear link function and use of the Bernoulli likelihood, the posteriors cannot be solved for in closed form. They are therefore estimated via approximate inference techniques, in this case, variational inference (Hensman, Matthews, & Ghahramani, 2015; Titsias, 2009).

**x**

^{*}∈

**X**

^{*}defined over spatial frequency and visual contrast. Therefore the new sample

**x**

^{*}that, upon observation, maximizes some utility function

*U*(

**x**

^{*}) is optimal. We define an acquisition function for obtaining this sample as

*U*(·) reflects model quality. We implement uncertainty sampling by defining the utility function as the differential entropy, which quantifies the uncertainty associated with the predictive distribution. In this specific acquisition function, the differential entropy serves as a proxy for information gain, meaning that it aims to select the next sample point

**x**

^{*}that would maximize the information about the underlying latent function (Houlsby, Huszár, Ghahramani, & Lengyel, 2011). This is consistent with the overall goal of Bayesian active learning, which seeks to build an accurate model with as few samples as possible.

*f*(ω, κ). With the setup described above, the entire estimation procedure for the CRF is reduced to learning a GP over the latent function. A GP is completely determined by its mean and covariance functions (Rasmussen & Williams, 2006). By selecting closed forms for these functions, estimation further reduces to updating the corresponding parameters, which are then combined with observed data to generate a posterior belief about the CRF. Because the parameters in question reflect the GP rather than the latent function, they represent hyperparameters of the overall model, yielding a formally semiparametric estimator for contrast response.

*s*

_{1}and

*s*

_{2}represent scaling factors and

*l*represents a length constant along the spatial frequency dimension. Other kernel designs are possible, but this design has been particularly successful at estimating behavioral functions similar to the CSF (Song et al., 2017).

*PyTorch 1.13*, n.d.) and GPyTorch (

*GPyTorch 1.8.1*, n.d.). Project information, including code and data necessary to replicate these experiments, can be found at https://osf.io/cpkn5/.

*c*= 0. Zero on the latent function maps to a probability of success of 0.5, implying that without any data, the estimator assumes maximum uncertainty about the shape of the CRF. The covariance function was initialized such that

*s*

_{1}

*= s*

_{2}

*= l =*1. The intention of this prior was to allow the sampled data to speak for themselves to deliver a final estimate with few assumptions. In every condition, a set of phantom shaping data points were added to assist estimator convergence. These values indexed detection failures at locations well beyond any reported human CSF curve. At each octave of spatial frequency, a phantom failure at a contrast of 0.0005 was added. Another phantom failure was added at (128, 1).

_{10}contrast between the ground truth CSF and the estimated CSF was quantified. Spatial frequencies for which the CSF would have taken values greater than 1 are excluded from this calculation. The estimated CSF was discretized to the nearest contrast grid value. Each phenotype was evaluated separately for 10 repetitions and the average behavior summarized.

^{2}, resolution of 2732 × 2048 pixels and pixel density of 264 pixels per inch. The viewing distance of all participants from the screen was 20 inches. The iPads used at all sites were calibrated similarly to reduce the variance between each site where the study was conducted. The stimulus set consisted of Gabor patches (targets) at six spatial frequencies. An initial test was performed for each group of participants to approximate the maximum spatial frequency that could be perceived. The spatial frequencies used for NT were 0.5, 1, 4, 8, 16 and 32 cycles per degree and for SZ were 0.5, 1, 2, 4, 8 and 16 cycles per degree, respectively. The stimuli were also presented in 8 orientations (0°, 22.5°, 45°, 67.5°, 90°, 112.5°, 135°, 157.5°). Gaussian windows of Gabors varied with σ between 0.25° and 1° and with phases (0°, 45°, 90°, 135°).

*a posteriori*estimate. It should be kept in mind, however, that this method is fully Bayesian, meaning that every point estimate in the displayed predictive posteriors actually represents a single point in a complete distribution.

*M*on the initial

_{i}*i*sample points during active learning, the most informative next sample point is determined, that stimulus is delivered, the simulated participant response is observed, and a new model

*M*

_{i}_{+1}is learned with

*i*+1 points and model

*M*as the prior. This procedure continues until data from 100 samples are accumulated.

_{i}*Behavior Research Methods,*51, 1271–1285, https://doi.org/10.3758/s13428-018-1062-3.

*Fast, Continuous Psychometric Estimation System Utilizing Machine Learning and Associated Method of Use*(United States Patent US11037677B2), https://patents.google.com/patent/US11037677B2.

*Deep Learning and Parallel Computing Environment for Bioengineering Systems*(pp. 153–164). St. Louis: Elsevier.

*NeuroImage,*67, 153–162, https://doi.org/10.1016/j.neuroimage.2012.11.019. [PubMed]

*Journal of Vision,*19(10), 86b, https://doi.org/10.1167/19.10.86b.

*IEEE Journal of Biomedical and Health Informatics,*24(12), 3499–3506, https://doi.org/10.1109/JBHI.2020.2999567. [PubMed]

*Investigative Ophthalmology & Visual Science,*57(1), 198–207, https://doi.org/10.1167/iovs.15-18084. [PubMed]

*Frontiers in Digital Health,*3, 723348, https://doi.org/10.3389/fdgth.2021.723348. [PubMed]

*Current Biology: CB,*24(4), R146–147, https://doi.org/10.1016/j.cub.2014.01.004. [PubMed]

*Journal of Vision,*15(9), 5–5, https://doi.org/10.1167/15.9.5. [PubMed]

*Vision Research,*21(7), 1041–1053, https://doi.org/10.1016/0042-6989(81)90009-2. [PubMed]

*Advances in Neural Information Processing Systems,*28, 2377–2385, https://proceedings.neurips.cc/paper/2015/file/d9731321ef4e063ebbee79298fa36f56-Paper.pdf.

*Advances in Neural Information Processing Systems,*31, https://proceedings.neurips.cc/paper_files/paper/2018/file/27e8e17134dd7083b050476733207ea1-Paper.pdf.

*UAI,*286–295, https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=df9aea6fef7301c00cdbdd7a3bf613b3c974e183.

*International Ophthalmology Clinics,*43(2), 5–15, https://doi.org/10.1097/00004397-200343020-00004. [PubMed]

*Signal Detection Theory and Psychophysics*. Hoboken, NJ: John Wiley & Sons, Inc.

*Journal of Vision,*16(6), 15, https://doi.org/10.1167/16.6.15. [PubMed]

*Communications of the ACM,*7(12EDITED), 701–702.

*Acta Acustica United with Acustica,*104(5), 762–765, https://doi.org/info:doi/10.3813/AAA.919218.

*Artificial Intelligence and Statistics,*351–360, http://proceedings.mlr.press/v38/hensman15.pdf.

*Journal of Vision,*15(9), 2, https://doi.org/10.1167/15.9.2. [PubMed]

*ArXiv Preprint ArXiv:1112.5745*, https://doi.org/10.48550/arXiv.1112.5745.

*Webvision: The Organization of the Retina and Visual System*. Salt Lake City: University of Utah Health Sciences Center, http://www.ncbi.nlm.nih.gov/books/NBK11509/.

*Psychophysics: A Practical Introduction*. St. Louis: Elsevier.

*American Journal of Optometry and Physiological Optics,*61, 119.

*Vision Research,*37(12), 1595–1604, https://doi.org/10.1016/s0042-6989(96)00310-0. [PubMed]

*ArXiv Preprint ArXiv:2103.01002*, https://doi.org/10.1177/003685042110297.

*Webvision: The Organization of the Retina and Visual System*. Salt Lake City: University of Utah Health Sciences Center, http://www.ncbi.nlm.nih.gov/books/NBK11530/. [PubMed]

*Vision Research,*39(16), 2729–2737, https://doi.org/10.1016/S0042-6989(98)00285-5. [PubMed]

*ArXiv Preprint ArXiv:2002.01547*, https://doi.org/10.48550/arXiv.2002.01547.

*Explainable AI in healthcare and medicine: Building a culture of transparency and accountability*(pp. 305–311). Berlin: Springer International Publishing, https://doi.org/10.1007/978-3-030-53352-6_29.

*Perception & Psychophysics,*63(8), 1279–1292. [PubMed]

*Vision Research,*46(19), 3160–3176, https://doi.org/10.1016/j.visres.2006.04.022. [PubMed]

*Journal of Vision,*10(3), 17.1–21, https://doi.org/10.1167/10.3.17. [PubMed]

*Journal of the Acoustical Society of America,*49(2B), 467–477.

*Gaussian Processes for Machine Learning*. Cambridge, MA: The MIT Press.

*Journal of the Optical Society of America A,*10(7), 1591–1599, https://doi.org/10.1364/JOSAA.10.001591.

*Journal of the Acoustical Society of America,*144(1), 421, https://doi.org/10.1121/1.5047436.

*Trends in Cognitive Sciences,*12(11), 411–417, https://doi.org/10.1016/j.tics.2008.07.006. [PubMed]

*Journal of the Acoustical Society of America,*141(4), 2513, https://doi.org/10.1121/1.4979594.

*Attention, Perception & Psychophysics,*80(3), 798–812, https://doi.org/10.3758/s13414-017-1460-0. [PubMed]

*Ear and Hearing,*36(6), e326–335, https://doi.org/10.1097/AUD.0000000000000186. [PubMed]

*Journal of Vision,*9(7), 11, https://doi.org/10.1167/9.7.11. [PubMed]

*Artificial Intelligence and Statistics,*567–574, https://proceedings.mlr.press/v5/titsias09a.html.

*Vision Research,*35(17), 2503–2522. [PubMed]

*Perception & Psychophysics,*61(1), 87–106. [PubMed]

*Frontiers in Neuroscience,*10, 616, https://doi.org/10.3389/fnins.2016.00616. [PubMed]

*Journal of Vision,*5(9), 717–740, https://doi.org/10.1167/5.9.6. [PubMed]

*Perception & Psychophysics,*33(2), 113–120. [PubMed]

*Perception & Psychophysics,*63(8), 1293–1313, https://doi.org/10.3758/BF03194544. [PubMed]

*Vision Research,*36(22), 3587–3596, https://doi.org/10.1016/0042-6989(96)00091-0. [PubMed]

*Journal of Vision,*22(14), 3728–3728, https://doi.org/10.1167/jov.22.14.3728.

*Ophthalmology,*123(12), 2498–2508, https://doi.org/10.1016/j.ophtha.2016.08.041. [PubMed]

*Journal of Vision,*21(12), 9, https://doi.org/10.1167/jov.21.12.9. [PubMed]

*Neurocomputing,*237, 350–361, https://doi.org/10.1016/j.neucom.2017.01.026.