-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-- 628c358 by Richard Lyon <dicklyon@google.com>: Start v3 implemention Adding new SYN stage (synape model) for a v3 CARFAC. -- 3ab484e by Richard Lyon <dicklyon@google.com>: Add files via upload -- ab450a0 by Richard Lyon <dicklyon@google.com>: Fixes per robsc's comments on PR 18 Fixed Design process per robsc's comments on PR 18. -- 6975bde by Richard Lyon <dicklyon@google.com>: Some SYN improvements; still needs a lot of work. Some SYN improvements, but really it needs a revamp of the Design process, with better parameterization and automatic calculation of rest rate to subtract to get AGC back closer to how it worked in old versions. -- 17f5564 by Richard Lyon <dicklyon@google.com>: Reparameterized, better design phase I reparameterized the SYN stage in terms of spontaneous and saturation rates for the classes and few other things, and implemented the design process to account for everything to get those to come out right, all in terms of variables that show up on the diagram that's an augmentation of the v2 two_cap IHC diagram (for documentation, in progress). Still need to move some of the numbers into SYN_params. -- b79778a by Richard Lyon <dicklyon@google.com>: Move SYN constants from code into default parameters Moving a bunch of magic numbers out of the SYN_Design code and into the default SYN_params, so they are modifiable by user code. And various other code tweaks and naming improvements (e.g. changed z to r for release rate; short variable names to facilitate labeling on doc diagrams). -- 0181d1e by Richard Lyon <dicklyon@google.com>: Make agc_weights work better across sample rate and n_fiber changes The agc_weights needed to be appropriately set up to do the right thing with different sample rates, and to allow different numbers of IHCs per channel. The AGC feedback is still proportional to the number of fibers, healthy or not, so the agc_weights parameters might need adjustment if the healthy_n_fibers is changed. The param n_fibers was renamed healthy_n_fibers, as that's what applied at design time, and as the n_fibers in the coeffs may change with model training (in the JAX version at least). -- 6cbf240 by Richard Lyon <dicklyon@google.com>: Delete .DS_Store COPYBARA_INTEGRATE_REVIEW=#18 from google:carfac-v3-start 6cbf240 PiperOrigin-RevId: 681626192
- Loading branch information
1 parent
90731bd
commit 926e96e
Showing
6 changed files
with
334 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
function [syn_out, firings, state] = CARFAC_SYN_Step(v_recep, coeffs, state) | ||
% Drive multiple synapse classes with receptor potential from IHC, | ||
% returning instantaneous spike rates per class, for a group of neurons | ||
% associated with the CF channel, including reductions due to synaptopathy. | ||
|
||
% Normalized offset position into neurotransmitter release sigmoid. | ||
x = (v_recep - coeffs.v_halfs) ./ coeffs.v_widths; | ||
|
||
s = 1 ./ (1 + exp(-x)); % Between 0 and 1; positive at rest. | ||
q = state.reservoirs; % aka 1 - w, between 0 and 1; positive at rest. | ||
r = (1 - q) .* s; % aka w*s, between 0 and 1, proportional to release rate. | ||
|
||
% Smooth once with LPF (receptor potential was already smooth), after | ||
% applying the gain coeff a2 to convert to firing prob per sample. | ||
state.lpf_state = state.lpf_state + coeffs.lpf_coeff * ... | ||
(coeffs.a2 .* r - state.lpf_state); % this is firing probs. | ||
firing_probs = state.lpf_state; % Poisson rate per neuron per sample. | ||
% Include number of effective neurons per channel here, and interval T; | ||
% so the rates (instantaneous action potentials per second) can be huge. | ||
firings = coeffs.n_fibers .* firing_probs; | ||
|
||
% Feedback, to update reservoir state q for next time. | ||
state.reservoirs = q + coeffs.res_coeff .* (coeffs.a1 .* r - q); | ||
|
||
% Make an output that resembles ihc_out, to go to agc_in (collapse over classes). | ||
% Includes synaptopathy's presumed effect of reducing feedback via n_fibers. | ||
% But it's relative to the healthy nominal spont, so could potentially go | ||
% a bit negative in quiet is there was loss of high-spont or medium-spont units. | ||
% The weight multiplication is an inner product, reducing n_classes | ||
% columns to 1 column (first transpose the agc_weights row to a column). | ||
syn_out = (coeffs.n_fibers .* firing_probs) * coeffs.agc_weights' - coeffs.spont_sub; |
Oops, something went wrong.