toplogo
Sign In

Upgraded CARFAC Cochlear Model with Improved Implementations in Matlab, NumPy, and JAX


Core Concepts
The open-source CARFAC cochlear model has been upgraded to version 2, with improvements to the Matlab implementation, and new Python/NumPy and JAX implementations, addressing issues like DC distortion, neural synchrony, and modeling hearing impairment.
Abstract
The CARFAC (Cascade of Asymmetric Resonators with Fast-Acting Compression) cochlear model has been upgraded to version 2, with the following key changes: AC Coupler Moved: The 20 Hz highpass filter that was part of the inner hair cell (IHC) has been moved into the cascade of asymmetric resonators (CAR), suppressing DC response in the basilar membrane (BM) output. Open-Loop Bug Fix: A bug in the open-loop mode has been fixed, where the ramping of AGC filter parameters would continue to extrapolate beyond the intended value. Linear CAR Option: A linear mode has been added to set the outer hair cell (OHC) nonlinear function output to 1.0, allowing for linear-systems analysis. Two-Capacitor IHC Model: A new two-capacitor IHC model has been introduced, resulting in reduced neural synchrony at high frequencies compared to the previous one-capacitor model. IHC Model Selection: The CARFAC_Design function now allows selecting between the one-cap and two-cap IHC models. Delay-per-Stage Option: An optional one-sample delay per cascaded resonator stage has been added, allowing for channel-parallel array operations. Simplification of Stage Gain Updates: The computation of stage gain updates has been simplified, using a parabolic approximation instead of the exact ratio of polynomials. AGC Spatial Smoothing Simplification: The internal options for the AGC loop's spatial smoothing filter have been reduced to just the 3-point FIR implementation. Outer Hair Cell Impairment: A new feature allows modeling a reduction of cochlear amplifier function, as a step toward a differentiable parameterized model of hearing impairment. Extensive Tests: New test routines have been added to help keep the Matlab, NumPy, and JAX versions synchronized, and facilitate updating the C++ version. These changes have also been propagated to the Auditory Model Toolbox (AMT), with the new version named "lyon2024" to distinguish it from the previous "lyon2011" version. Additionally, new Python/NumPy and JAX implementations of CARFAC have been developed, with the JAX version designed to be compatible with JAX's functional programming style and automatic differentiation capabilities. Benchmarks show that the JAX version can be up to 61 times faster than the NumPy version, with a real-time factor of approximately 0.04 on longer audio segments.
Stats
The following sentences contain key metrics or figures: The change in peak gain or sensitivity between the healthy and passive cases is frequency dependent, with a maximum around 50 dB. The JAX version approaches 61 times the speed of NumPy at longer segment lengths of audio, and the overall speed of JAX is a real-time factor (RTF) of approximately 0.04. For running on split segments of audio, simulating a streaming experience, the RTF is 0.11 with 10ms streaming chunks, or 0.046 with 100ms streaming chunks.
Quotes
"The open-source CARFAC (Cascade of Asymmetric Resonators with Fast-Acting Compression) cochlear model is upgraded to version 2, with improvements to the Matlab implementation, and with new Python/NumPy and JAX implementations—but C++ version changes are still pending." "To model a reduction in OHC activity associated with sensorineural hearing loss, we added a vector of ohc_health coefficients—one number per stage, where a value of 0 means passive response and 1 means the default healthy level of activity." "JAX, on the other hand, can compile to run on GPU and TPU systems, and supports automatic differentiation, so works better in big machine learning contexts."

Key Insights Distilled From

by Rich... at arxiv.org 04-29-2024

https://arxiv.org/pdf/2404.17490.pdf
The CARFAC v2 Cochlear Model in Matlab, NumPy, and JAX

Deeper Inquiries

How could the CARFAC model be further extended to better capture the complex dynamics of the human auditory system, beyond the current improvements?

The CARFAC model, while already a sophisticated representation of the cochlear system, can be extended in several ways to better capture the intricate dynamics of the human auditory system. One avenue for enhancement could involve incorporating more detailed models of auditory nerve fiber responses, including different classes of fibers with varying spontaneous firing rates. By simulating the responses of these fiber types within the model, a more nuanced representation of neural activity patterns could be achieved, leading to a closer match with actual physiological responses. Furthermore, to address the issue of zero or negative neural activity patterns in quiet conditions, a refinement could involve adjusting the model to ensure non-negativity of the output. This adjustment could involve shifting the subtraction of the mean in quiet from the IHC to the AGC stage, allowing for a more physiologically plausible representation of neural firing rates. Additionally, to better simulate hearing impairments such as synaptopathy or hidden hearing loss, future versions of the CARFAC model could incorporate mechanisms to model these conditions explicitly. By introducing additional stages or modifications to existing components, the model could more accurately reflect the impact of such impairments on auditory processing.

What are the potential limitations or drawbacks of the simplified spatial smoothing filter in the AGC loop, and how could this be addressed in future versions?

The simplified spatial smoothing filter in the AGC loop, which currently utilizes a 3-point FIR filter, may have limitations in cases where significant spatial coupling or smoothing is required. One drawback is that the 3-point FIR filter may not be able to achieve the desired smoothing amounts in scenarios where the spatial coupling is extensive or the sample rate is insufficient to run the filter multiple times within a time constant. To address this limitation in future versions, one approach could involve introducing more advanced filtering techniques, such as higher-order FIR filters or IIR filters with forward/backward processing. By implementing more sophisticated filtering methods, the AGC loop could achieve greater spatial smoothing capabilities, accommodating a wider range of spatial coupling requirements without compromising performance. Furthermore, adaptive filtering algorithms could be explored to dynamically adjust the filter characteristics based on the input signals and desired smoothing levels. This adaptive approach could optimize the spatial smoothing process in real-time, ensuring effective processing across varying spatial configurations.

Given the significant performance improvements of the JAX implementation, how could this be leveraged to enable real-time applications or large-scale simulations of the auditory system?

The substantial performance enhancements of the JAX implementation present opportunities to leverage the model for real-time applications and large-scale simulations of the auditory system. To enable real-time applications, the efficient computation capabilities of JAX could be utilized to process audio inputs and generate auditory responses in near real-time. By optimizing the model for low-latency execution, applications such as real-time sound processing, auditory feedback systems, or interactive auditory simulations could benefit from the speed and efficiency of the JAX implementation. For large-scale simulations of the auditory system, the scalability of JAX on parallel computing platforms like GPUs and TPUs could be harnessed to handle complex simulations involving a high volume of data or computational tasks. By parallelizing the computations across multiple processing units, JAX can accelerate the simulation of intricate auditory processes, enabling researchers to explore detailed auditory models and conduct extensive simulations efficiently. Moreover, the automatic differentiation capabilities of JAX can facilitate gradient-based optimization techniques for parameter tuning and model refinement in large-scale simulations. This feature enables researchers to fine-tune the model parameters and optimize the auditory system simulations for specific research objectives or applications, enhancing the accuracy and effectiveness of the simulations.
0
visual_icon
generate_icon
translate_icon
scholar_search_icon
star