GSP Cochlea: A graph signal processing approach for studying sound encoding.
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
MATLAB · 433 lines · 16 KB · GPL-3.0
- %% GRAPH SIGNAL PROCESSING ANALYSIS OF SOUND PROCESSING IN THE COCHLEA
- % Melia E. Bonomo, Santiago Segarra, Robert M. Raphael
- % Rice University, 2026
- % This code is freely distributed under the GNU General Public License.
- % http://www.gnu.org/licenses/gpl-3.0.html
- % PATIENT GROUPS
- % 32 patients spread across 7 levels of hearing loss severity
- % FOR EACH PATIENT GROUP
- % FOR EACH PATIENT (i.e., AUDIOGRAM)
- % 1. Input audiogram to UR_EAR model [1] to determine impairment
- % 2. Run UR_EAR model on N randomly sample stimuli
- % SAVE: voltage signals (VIHC) for each stimulus
- % 3. Run gsp on N signals for the 100 nodes
- % SAVE: graph adjacency matrix (W) for the patient
- % External scripts needed:
- % - UR_EAR toolbox [1]
- % - GSPBOX toolbox [2]
- % External data:
- % - full audiogram dataset [3]
- % - stimulus files [1,4,5]
- % Included files:
- % - stimulus_log_filenames.txt
- % - audiogram_%s.csv' (randomly sampled, each %s level of hearing loss)
- % - CF_position.mat (determined from [6])
- % References:
- %
- % [1] M. S. Zilany, I. C. Bruce, L. H. Carney, Updated parameters and
- % expanded simulation options for a model of the auditory periphery.
- % The Journal of the Acoustical Society of America, 135, (2014).
- % [2] N. Perraudin et al., GSPBOX: A toolbox for signal processing on
- % graphs. arXiv [Preprint] (2016). https://arxiv.org/abs/1408.5781
- % [3] J. A. Germiller et al., AudGenDB: A Public, Internet-Based,
- % Audiologic/Otologic/Genetic Database for Pediatric Hearing Research.
- % Otolaryngology–Head and Neck Surgery, 145, P235-P236 (2011).
- % [4] L. Fritts et al., Data from “Musical Instrument Samples.” University
- % of Iowa. Available at https://theremin.music.uiowa.edu/MIS.html.
- % [5] J. Hillenbrand, R. A. Houde, Vowel recognition: Formants, spectral
- % peaks, and spectral shape. The Journal of the Acoustical Society of
- % America, 98, 2949-2949 (1995).
- % [6] M. Pietsch et al., Spiral form of the human cochlea results from
- % spatial constraints. Scientific reports, 7, 7500 (2017).
- %
- %% Options
- clear
- start_date = 'DD-MM-YYY'; % For saving filename of GS and W
- general_model_mode = false;
- % true: Runs a perfect audiogram
- % false: Runs patient audiograms
- % Autosave options
- save_orig_signals = false; % GS-orig (raw signals)
- save_norm_signals = false; % GS (normalized signals)
- save_W_matrices = false; % W (connectivity matrix)
- % Plotting steps along the pipeline
- plot_patient = 1;
- plot_audiogram = false;
- plot_stim = false;
- plot_VIHC = false;
- plot_GS = false;
- plot_graph = false;
- % Network size
- CF_num = 100; % number of graph nodes
- total_stim = 1000; % number of graph signals to generate
- % Initialize random number generator (gsp)
- seed = 15;
- rng(seed)
- %% File Locations
- main_folder = '/LOCATION';
- data_folder = 'folder';
- %% Patient data information
- % Patient audiograms from AudGenDB
- if general_model_mode == true
- groups = {'gen'};
- else
- groups = {'1','2','3','4','5','6','7'};
- end
- num_groups = size(groups,2);
- data_type = '.csv';
- if general_model_mode == true
- num_patients_each_group = [1];
- else
- num_patients_each_group = [32,32,32,32,32,32,32];
- end
- total_patients = sum(num_patients_each_group);
- %% UR_EAR model parameters
- species = 2; % 1 for cat (2 for human with Shera et al. tuning; 3 for human with Glasberg & Moore tuning)
- % Characteristic Frequency Range (Hz)
- % Must be between 125 Hz and 20 kHz for human model
- minCF = 125; % original range 200 Hz
- maxCF = 8000; % original range 3000 Hz
- CF_range = [minCF, maxCF];
- CFs = logspace(log10(CF_range(1)),log10(CF_range(2)),CF_num); % set range and resolution of CFs here
- CFs([1 end]) = CF_range; % force end points to be exact
- num_iters = length(CFs);
- % Hearing loss in dB, to determine Cohc and Cihc for model using
- % function from Bruce and Zilany models, as in Bruce et al 2018 code.
- %ag_fs = [250 500 1e3 2e3 4e3]; % audiometric frequencies
- ag_fs_ALL = [125 250 500 750 1e3 1.5e3 2e3 3e3 4e3 6e3 8e3]; % audiometric frequencies
- % Stimulus Parameters
- spl = 65; % Sound Level (dB SPL)
- Pref = 20e-6; % reference pressure in pascals
- %from UR_EAR, line 226
- % Model sampling rate (must be 100k, 200k or 500k for AN model):
- Fs = 100e3; % samples/sec
- RsFs = 10e3; % resample rate for time_freq surface plots
- nrep = 1;
- % Load in stimulus randomly sampled list
- input_stim_name = sprintf('%s/results/%s/stimulus_log_filenames.txt',main_folder,data_folder);
- stimulus_log_filenames = readtable(input_stim_name,'Delimiter','tab','ReadVariableNames', false, 'TextType','string'); % dummy delimeter
- %% GSP BOX Parameters
- params.maxit = 50000;
- params.step_size = 0.1;
- params.verbosity = 1;
- params.tol = 1e-5;
- gsp_reset_seed(0);
- % GSP method
- method = 1; %1 = logarithmic prior, 2 = L-2 prior
- % Optimization model
- if method == 1
- % Learn weighted adjacency matrix from pairwise distances using
- % negative log prior on nodes degrees
- s = sqrt(2*(CF_num-1))/2 / 3;
- else
- % Learn weighted adjacency matrix from pairwise distances using
- % l2 prior on nodes degrees
- s = 1/2/sqrt(2);
- end
- %% Running the model
- iPatient_overall = 0;
- for iGroup = 1:num_groups
- nPatient = num_patients_each_group(iGroup);
- if general_model_mode == false
- input_data_name = sprintf('%s/data/audiogram_%s%s',main_folder,groups{iGroup},data_type);
- % Specify variable data types before import
- types = {'uint16','categorical','categorical','categorical','categorical','uint32','categorical','categorical','double','double','double','double','double','double','double','double','double','double','double','uint32','logical','logical','uint32','uint32','datetime','double','uint32','string','uint8','categorical'};
- opts = detectImportOptions(input_data_name);
- opts = setvartype(opts,types);
- data_audiograms = readtable(input_data_name,opts);
- data_audiograms = renamevars(data_audiograms,'Var1','index');
- % Extract patient identifiers & audiograms
- patient_index = data_audiograms.index;
- patient_id = data_audiograms.patient_id;
- audiograms = table2array(data_audiograms(:,9:19));
- else
- % Generic cochlea graph
- patient_index = [000];
- patient_id = [000];
- audiograms = zeros(nPatient,size(ag_fs_ALL,2));
- end
- tic
- for iPatient = 1:nPatient
- iPatient_overall = iPatient_overall + 1;
- %% Run UR_EAR
- % Audiogram Processing
- ag_dbloss_ALL = audiograms(iPatient,:);
- freqs = ~isnan(ag_dbloss_ALL);
- ag_dbloss = ag_dbloss_ALL(freqs);
- ag_fs = ag_fs_ALL(freqs);
- if plot_audiogram == true
- if iPatient == plot_patient
- figure
- plot(ag_fs,ag_dbloss,'o-k','LineWidth',1.75)
- set(gca, 'YDir','reverse')
- set(gca, 'FontSize', 20)
- ylim([-10,90])
- ylabel('Hearing Level in Decibels (dB)')
- xlabel('Frequency (Hz)')
- title('Audiogram')
- end
- end
- dbloss = interp1(ag_fs,ag_dbloss,CFs,'linear','extrap');
- [cohc_vals,cihc_vals] = fitaudiogram2(CFs,dbloss,species);
- if cohc_vals(1) == 0
- % Only set to 1 if coch_vals(2) == 1
- if cohc_vals(2) == 1
- % For a very low CF, a 0 may be returned by Bruce et al. fit
- % audiogram, but this is a bad default. Set it to 1 here.
- cohc_vals(1) = 1;
- end
- end
- if cihc_vals(1) == 0
- % Only set to 1 if coch_vals(2) == 1
- if cihc_vals(2) == 1
- % For a very low CF, a 0 may be returned, but this is a bad default.
- % Set it to 1 here.
- cihc_vals(1) = 1;
- end
- end
- VIHC_signals = nan(CF_num,total_stim);
- VIHC_signals_orig = nan(CF_num,total_stim);
- % Run stimulus
- for iStim = 1:total_stim
- in_stim_name = sprintf('%s/stimuli_all/%s',main_folder,stimulus_log_filenames{iPatient_overall,iStim});
- info = audioinfo(in_stim_name);
- dur1 = info.Duration;
- stim_length_RsFs = round(RsFs * dur1);
- VIHC_population = nan(CF_num,stim_length_RsFs);
- % Load stimulus
- [stimulus,~] = audioread(in_stim_name);
- if plot_stim == true
- if iStim == plot_stim
- % plot the FFT of the stimulus
- % Get length of stimulus.
- N = length(stimulus);
- % Plot FFT
- figure
- f = (0:N-1)*(Fs/N); % frequency range
- power = abs(fft(stimulus)).^2/N;
- plot(f,power,'k-','LineWidth',1.75)
- xlabel('Frequency (Hz)')
- ylabel('Power')
- title(sprintf('%s',stimulus_log_filenames{iPatient,iStim}))
- xlim([0 4000])
- set(gca,'FontSize',15,'FontWeight','bold')
- ax = gca;
- ax.LineWidth = 1;
- end
- end
- % duration of waveform in sec
- dur2 = dur1 + 0.04;
- % Loop through CFs (within nconditions loop) in reverse order so
- % matrices don't have to be resized.
- for iCF = length(CFs):-1:1
- % Get iCF element of each array.
- CF = CFs(iCF); % CF in Hz;
- cohc = cohc_vals(iCF);
- cihc = cihc_vals(iCF);
- % Using ANModel_2014 (2-step process)
- vihc = model_IHC(stimulus',CF,nrep,1/Fs,dur2,cohc,cihc,species);
- % Save output waveform into matrices.
- vihc_resampled = resample(vihc,RsFs,Fs);
- resampled_length = size(vihc_resampled,2);
- VIHC_population(iCF,1:resampled_length) = vihc_resampled(1:resampled_length);
- end % end of CF loop
- if plot_VIHC == true
- if iPatient == plot_patient
- if iStim == plot_stim
- % plot the inner hair cell voltages
- end
- end
- end
- % Average VIHC time series to get the graph signals
- X_orig = squeeze(nanmean(VIHC_population,2));
- % Normalize
- X = normalize(X_orig,'range',[0 1]); %for 1000 signals
- % Save into graph signal variable
- VIHC_signals(:,iStim) = X;
- VIHC_signals_orig(:,iStim) = X_orig;
- if plot_GS == true
- if iPatient == plot_patient
- if iStim == plot_stim
- % plot the graph signals of nodes (IHC)
- end
- end
- end
- stat = sprintf('Finished running iStim = %d',iStim);
- disp(stat)
- end
- %% Save graph signals for patient
- if save_norm_signals == true
- out_GSnorm_data_name = sprintf('%s/results/%s/%s_%d_%d_GS_%s.txt',main_folder,data_folder,groups{iGroup},patient_index(iPatient),patient_id(iPatient),start_date);
- writematrix(VIHC_signals,out_GSnorm_data_name,'Delimiter','tab')
- end
- if save_orig_signals == true
- out_GS_data_name = sprintf('%s/results/%s/%s_%d_%d_GS-orig_%s.txt',main_folder,data_folder,groups{iGroup},patient_index(iPatient),patient_id(iPatient),start_date);
- writematrix(VIHC_signals_orig,out_GS_data_name,'Delimiter','tab')
- end
- toc % time to run UR_EAR
- %% Run GSP BOX
- % Compute the pairwise distances of the features of each signal
- % and learn a graph using them:
- Z = gsp_distanz(VIHC_signals').^2;
- if method == 1
- W = gsp_learn_graph_log_degrees(Z, s*2, s*1, params);
- else
- W = gsp_learn_graph_l2_degrees(Z, s*1, params);
- end
- W(W<1e-5) = 0;
- if plot_graph == true
- if iPatient == plot_patient
- %% Plot graph
- % Cochlea 3D coordinates determined from reference [6] for
- % 100 nodes spaced at given characteristic frequencies (CF)
- load('CF_position.mat')
- CF_position_rev = flip(CF_position,2);
- fprintf('Graph of %d signals: %d edges\n', total_stim,nnz(W)/2);
- G = gsp_graph(W / sum(W(:)) * CF_num, [CF_position_rev(1,:)', CF_position_rev(2,:)', CF_position_rev(3,:)']);
- params_plot.edge_size = 1;
- params_plot.show_edges = 1;
- G.plotting.vertex_size = 30;%5;
- investigate_boundary_effect = false;
- if investigate_boundary_effect == true
- box1 = 17;
- box2 = 71;
- bound_colors = ones(CF_num,3);
- for iNode = [1:box1,box2:CF_num]
- bound_colors(iNode,:) = [0 0 0];
- end
- [ki,kj] = find(G.W);
- num_edges = size(ki,1);
- % Variable containing the color assigned to each edge
- bound_edge_colors = nan(num_edges,3);
- for iEdge = 1:num_edges
- iNode = ki(iEdge);
- jNode = kj(iEdge);
- if iNode <= box1 && jNode >= box2
- % Edge between boundary nodes
- c = [0.8 0 0];
- elseif iNode >= box2 && jNode <= box1
- % Edge between boundary nodes
- c = [0.8 0 0];
- else
- % Edge between non-boundary nodes
- c = [0.6 0.6 0.6];
- end
- bound_edge_colors(iEdge,:) = c;
- end
- G.plotting.vertex_color = bound_colors;
- G.plotting.edge_color = bound_edge_colors;
- figure
- imagesc(W)
- colorbar
- set(gca,'FontSize',15,'FontWeight','bold')
- ax = gca;
- ax.XTick = [1 18 34 51 67 84 93 100]; %CF number
- ax.XTickLabel = {'125' '250' '500' '1k' '2k' '4k' '6k' '8k'}; %CF freq
- ax.YTick = [1 18 34 51 67 84 93 100];
- ax.YTickLabel = {'125' '250' '500' '1k' '2k' '4k' '6k' '8k'};
- ax.XAxisLocation='top';
- ax.Position = [0.1220 0.1100 0.7272 0.8150];
- end
- figure;
- gsp_plot_graph(G, params_plot);
- axis equal
- view([-90 90])
- end
- end
- %% Save W data for patient
- if save_W_matrices == true
- out_W_data_name = sprintf('%s/results/%s/%s_%d_%d_W_%s.txt',main_folder,data_folder,groups{iGroup},patient_index(iPatient),patient_id(iPatient),start_date);
- writematrix(W,out_W_data_name,'Delimiter','tab')
- end
- end
- end
GSPcochlea.m at commit d517533, under GPL-3.0 · at the source
Overview
- Department of Physics and Astronomy, Rice University, Houston, TX 77005, USA
- Department of Electrical and Computer Engineering, Rice University, Houston, TX 77005, USA
- Department of Bioengineering, Rice University, Houston, TX 77005, USA
Abstract
Humans are able to hear in a variety of complicated acoustic environments. This feat begins in the peripheral auditory system, where the cochlea collects and transmits thousands of individual bits of sound data to the brain. Here, we introduce GSP Cochlea: a graph signal processing-based framework to investigate and visualize sound encoding. We show that a cochlea graph with a mesh topology provides a mechanism of denoising, efficient information transfer, and modular processing. We demonstrate an application to assess hearing loss as more than just a decibel loss at particular frequencies of sound but also a significant change to the cochlea graph architecture. GSP Cochlea is a generalized approach that provides new insight into the higher-level functional activity of the inner ear.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above.
meliabonomo/GSPcochlea
d517533f31d166e162a55745fe8ad12ebf43c1d9, 15 April 2026Availability: 1 check, the latest on 29 September 2026: the link answers
- 29 September 2026: the link answers
3 files
- GSPcochlea.m — MATLAB, 433 lines
- LICENSE — License, 674 lines
- README.md — Text, 38 lines
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 1 script, each with its path and the digest of its content;
- no match between paragraphs and code yet;
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data availability
Computer codes written for the GSP Cochlea formulation presented here are available at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 29 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 3 authors, 5 keywords, 2 funders, 8 references.
Cite
This paper
Bonomo, M. E., Segarra, S., & Raphael, R. M. (2026). GSP Cochlea: A graph signal processing approach for studying sound encoding. PNAS nexus, 5(5), pgag134. https://
BibTeX
@article{bonomo2026gsp,
author = {Bonomo, Melia E and Segarra, Santiago and Raphael, Robert M},
title = {{GSP Cochlea: A graph signal processing approach for studying sound encoding}},
journal = {PNAS nexus},
year = {2026},
month = apr,
volume = {5},
number = {5},
pages = {pgag134},
publisher = {Oxford University Press},
issn = {2752-6542},
doi = {10.1093/
url = {https://
pmid = {42099576},
pmcid = {PMC13148644}
}
RIS
TY - JOUR
AU - Bonomo, Melia E
AU - Segarra, Santiago
AU - Raphael, Robert M
TI - GSP Cochlea: A graph signal processing approach for studying sound encoding
T2 - PNAS nexus
J2 - PNAS Nexus
PY - 2026
DA - 2026/
VL - 5
IS - 5
SP - pgag134
SN - 2752-6542
PB - Oxford University Press
DO - 10.1093/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1093/
"type": "article-journal",
"title": "GSP Cochlea: A graph signal processing approach for studying sound encoding",
"container-title": "PNAS nexus",
"author": [
{
"family": "Bonomo",
"given": "Melia E"
},
{
"family": "Segarra",
"given": "Santiago"
},
{
"family": "Raphael",
"given": "Robert M"
}
],
"container-title-short":
"volume": "5",
"issue": "5",
"page": "pgag134",
"DOI": "10.1093/
"PMID": "42099576",
"PMCID": "PMC13148644",
"ISSN": "2752-6542",
"publisher": "Oxford University Press",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
21
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1523/jneurosci.1104-25.2026 [code]
- Timbre Encoding in the Inferior Colliculus.Journal: The Journal of neuroscience : the official journal of the Society for NeuroscienceIn common: Statistics and Machine Learning Toolbox, computational, 1 reference
- [2] doi:10.1162/imag.a.1234 [code]
- Multiscale parcellation of dynamic causal models of the brain.Journal: Imaging neuroscience (Cambridge, Mass.)In common: Statistics and Machine Learning Toolbox, computational, 1 reference
- [3] doi:10.1371/journal.pcbi.1014673 [code]
- Modeling the influences of non-local connectomic projections on geometrically constrained cortical dynamics.Journal: PLoS computational biologyIn common: Statistics and Machine Learning Toolbox, computational, 1 reference
- [4] doi:10.1038/s41531-026-01354-3 [code]
- Neuromodulation-induced normalization of cortical metastable dynamics signatures in Parkinson's disease.Journal: NPJ Parkinson's diseaseIn common: Statistics and Machine Learning Toolbox, other condition, 1 reference
- [5] doi:10.1007/s12311-026-02042-x
- The Cerebellar Connectome.Journal: Cerebellum (London, England)In common: 2 references
- [6] doi:10.1371/journal.pbio.3003927 [code]
- Brain structural and functional connectivity converge prenatally but diverge after birth.Journal: PLoS biologyIn common: Statistics and Machine Learning Toolbox, 1 reference
- [7] doi:10.1016/j.neuroimage.2026.122171 [code]
- A conserved node degree-based backbone and flexible hub organization of brain connectome during naturalistic movie watching.Journal: NeuroImageIn common: Statistics and Machine Learning Toolbox, 1 reference
- [8] doi:10.1038/s41467-026-75959-w [code]
- Charting higher-order models of brain function beyond pairwise interactions.Journal: Nature communicationsIn common: Statistics and Machine Learning Toolbox, 1 reference
- [9] doi:10.1016/j.isci.2026.116903 [code]
- Neurobiological and behavioral relevance of intrinsic functional connectome constraints on task-evoked neural activation.Journal: iScienceIn common: Statistics and Machine Learning Toolbox, 1 reference
- [10] doi:10.1038/s42003-026-10131-0 [code]
- Shared genetic architecture between the topology of brain white matter structural connectome and fluid intelligence.Journal: Communications biologyIn common: Statistics and Machine Learning Toolbox, 1 reference
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 1 script, and 0 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:3a15a81230674db4…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
