ABRA
Auditory Brainstem Response Analyzer
ABRA is an Auditory Brainstem Response (ABR) analysis pipeline whose core is a pair of convolutional neural networks built on top of a preprocessing stage: a peak-finding CNN that localizes the Wave I peak, and a thresholding CNN that predicts the signal detection threshold from waveform-stack data. Raw ABR data (Tucker Davis .arf, EPFL .tsv/.asc, or standardized .csv) is normalized and cleaned first; the preprocessed waveforms then feed into these models to automate what has traditionally required manual marking and subjective threshold calls. Users can run this pipeline via a Streamlit web app for batch upload and analysis, with optional manual override. The project is developed with the UCSD Manor Lab; method and validation are described in the bioRxiv preprint.
From preprocessing to CNNs
Preprocessing takes raw files and produces a unified representation of ABR waveforms: format-specific parsing (e.g. attenuation vs absolute dB SPL for .arf), alignment of level and frequency dimensions, and optional filtering or baseline correction. The result is a vector representation of each waveform that the CNNs expect for peak-finding and thresholding.
The peak-finding CNN operates on these preprocessed waveforms. It is a convolutional network (1D convolutions along the time axis) trained to regress peak locations for wave I of the ABR. The model learns to be robust to noise and level-dependent morphology so that peak tables can be generated automatically across conditions.
The thresholding CNN takes preprocessed waveform-stack data and predicts the signal detection threshold—the stimulus level (e.g. dB SPL) at which the ABR is deemed present. This is done viaclassification ( present/absent per level), with the CNN capturing the relationship between waveform shape and detectability. Together, the peak and threshold models turn raw preprocessed ABR data into structured outputs (peak latencies/amplitudes, threshold estimates) that the Streamlit app surfaces for users to review and export.
Training & evaluation
The convolutional neural networks are trained on diverse datasets collected from multiple experimental settings. This multi-site, multi-protocol training data is intended to improve generalization so that the peak-finding and thresholding models perform well across different laboratories, acquisition systems, and stimulus parameters. Before training, each ABR is put through a data augmentation pipeline including random noise addition, random amplitude scaling, and random time shift, allowing the model to learn to be robust to and generalize for new data with these variations. Preprocessed waveform-stack data are used as inputs; labels are expert manual annotations (peak latencies and amplitudes, threshold judgments) so that the models learn to replicate expert-level decisions in a consistent, automated way. The training data is split into training, validation, and test sets to evaluate the model's performance.
Evaluation demonstrates that ABRA’s deep learning models achieve performance comparable to expert human annotators on the key ABR metrics: peak amplitude, peak latency, and auditory threshold estimates. In addition, the toolbox dramatically reduces analysis time compared to manual marking and threshold calls, and it enhances reproducibility across datasets from different laboratories—addressing the variability and limited reproducibility that traditionally accompany subjective manual ABR interpretation. The app is used in the lab for batch analysis: preprocessing runs first, then the CNNs produce peak tables and threshold estimates that users can review and edit before export.
Technical depth
Preprocessing supports Tucker Davis .arf (with optional attenuation→dB SPL handling), EPFL .tsv and .asc, and .csv with Level(dB) and Freq(Hz) and a data vector per row. The pipeline normalizes sampling, alignment, and units so that the peak-finding and thresholding CNNs receive fixed-size or padded inputs. Model artifacts (saved weights, config) are loaded at inference; the Streamlit app (ABRA.py) calls into the preprocessing and model code, then renders tables and plots.
The codebase is organized so that preprocessing, peak model, and threshold model are distinct modules; utils hold shared logic, and notebooks demonstrate usage. An API-only install (requirements-api.txt) allows programmatic use of the preprocessing and CNN inference without the web UI. Local runs use streamlit run ABRA.py in a conda environment (Python 3.12).
Tradeoffs
Using CNNs for peak finding and thresholding trades interpretability for automation and consistency: the models learn from data rather than hand-tuned rules, but individual predictions are not easily explained. Preprocessing is kept explicit and format-aware so that the CNNs see a consistent input distribution; domain shifts (e.g. new acquisition systems or protocols) may require retraining or fine-tuning. The Streamlit UI and manual-edit workflows provide a safety net—researchers can override model outputs and export corrected results—so the system remains suitable for high-throughput batch analysis with human-in-the-loop quality control.
Limitations & future work
The CNNs are trained on data from supported formats and acquisition paradigms; performance may degrade on very different hardware or protocols without retraining. Future work may include shared or multi-task backbones for peak and threshold models, uncertainty estimates (e.g. confidence intervals for threshold), and integration with additional export and lab pipeline tools. The open-source repo documents installation, usage, and extension points for the preprocessing and CNN inference pipeline.