Human hippocampal ripples tune cortical responses based on predicted uncertainty.
The 7 matches · 2 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
- [1] § Methods › SWR analyses ↔ code/detectripples_iedreject_df.m, the whole file · a weak match · score 0.76 · 80–120 Hz, artifact rejection, gradient, IEDs, score, Hilbert
- [2] § Methods › TF analyses ↔ code/TF_calculation.m, the whole file · a weak match · score 0.70 · 2.5–32.5 Hz, frequency smoothing, taper, 160 Hz, windows, spectral
- [3] § Results › Prestimulus ripples increase with entropy ↔ code/pipeline_ripples.m, lines 184–266 · score 0.69 · random noise, uniform distribution, entropy bins, Spearman, ripple peak, permutation
- [4] § Methods › SWR analyses ↔ code/ripple_detection.m, lines 1–56 · score 0.69 · 80–120 Hz, ripple detection, body, Hilbert, head, axis
- [5] § Methods › TF analyses ↔ code/pipeline.m, lines 175–257 · score 0.61 · 2.5–32.5 Hz, 35–160 Hz, 0–1 s, GLM, 35 Hz, TF
- [6] § Methods › SWR analyses ↔ code/mixed_eff_models.R, lines 47–85 · score 0.60 · emmeans, lme4, pairwise, ripple peak, family, mixed
- [7] § Methods › SWR analyses ↔ code/pipeline_ripples.m, lines 184–266 · score 0.55 · uniform distribution, surprise bin, ripple peak, subI, entropy
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 · 360 lines · 15 KB · no license · 2 matches
- clearvars
- rng(111)
- region = 'anterior'; baseline = 0; resp_lock = 0;
- nsubs = [3,6,8,9,13,15,16,22,25,31,32,36,37,6,8,10,11,12];
- iszurich = logical([zeros(1,13),ones(1,5)]);
- % nsubs = [3,6,8,9,13,15,16,22,25,31,32,36,37,6,8,10];
- % iszurich = logical([zeros(1,13),ones(1,3)]);
- % create stp and patient_data structs
- [~,stp] = setup(nsubs,iszurich,baseline,resp_lock,region);
- patient_data = getMontage(nsubs,stp,0);
- hpfilt = 200;
- ripdur = 25;
- % fname = sprintf('HPCRipples/HPCAnterior_vaz_hpf%d_%dms_%dsubjs_Jan22_reclean.mat',hpfilt, ripdur, numel(nsubs));
- fname = 'HPCAnterior_vaz_hpf200_25ms_18subjs_zurich_12zlen.mat'
- res = 300;
- load(fname)
- ent = zeros(numel(nsubs),1);
- start = zeros(numel(nsubs),1);
- trial_block = zeros(numel(nsubs),1);
- times = [-1:0.002:1]';
- surp = zeros(1,1);
- peak=zeros(numel(nsubs),1);
- g=1; j=0.8:0.1:2;x=1; y=1; all_trls = []; all_rips = [];
- ytick={'0.8-0.9', '0.9-1','1-1.1','1.1-1.2','1.2-1.3','1.3-1.4' '1.4-1.5',...
- '1.5-1.6','1.6-1.7','1.7-1.8','1.8-1.9','1.9-2'};
- xtick={'-1 to -0.8','-0.8 to -0.6', '-0.6 to -0.4', '-0.4 to-0.2',...
- '-0.2 to 0', '0 to 0.2', '0.2 to 0.4','0.4 to 0.6', '0.6 to 0.8','0.8 to 1'};
- surp_tick = {'0.5-1','1-1.5','1.5-2','2-2.5','2.5-3','3-3.5','3.5-4','4-4.5','4.5-5'};
- for subI = 1:numel(nsubs)
- if nsubs(subI) == 22 % no ripples for sub 22 (and excluded anyways) - position 8
- continue
- end
- k=1;
- fprintf(['Getting clean trials for Patient ',num2str(nsubs(subI)), '\n'])
- if stp.zurich(subI) == 1
- foldn = sprintf('Information/P%dz',nsubs(subI));
- else
- foldn = sprintf('Information/Patient%d+',nsubs(subI));
- end
- cd(foldn)
- if strcmp(stp.region,'anterior')||strcmp(stp.region,'head')||strcmp(stp.region,'body')
- cd(sprintf('hpc_%s',patient_data(subI).hpc_axis))
- else
- cd(sprintf('%s',patient_data(subI).region))
- end
- load('clean_trials_bipolar.mat','clean')
- clean_trials(subI) = clean;
- cd ../../../
- ent_tot(g:g+size(clean_trials(subI).info(:,1),1)-1) = clean_trials(subI).info(:,1);
- % find same ripple in different channels
- sub(subI).unique_rips(:,13) = 1:size(sub(subI).unique_rips,1);
- rips_sorted_by_chan_start{subI} = sortrows(sub(subI).unique_rips,[2,3]);
- dif=diff(rips_sorted_by_chan_start{subI}(:,2:3));
- same_rip =find(abs(dif(:,2))<10 & dif(:,1)==0);
- rips_sorted_by_chan_start{subI}(same_rip,12) = 1;
- % return to original order to remove rip
- rips_sorted_by_chan_start{subI} = sortrows(rips_sorted_by_chan_start{subI},13);
- sub(subI).same_rip=sum(rips_sorted_by_chan_start{subI}(:,12));
- % remove rip
- same_rip_rmv = find(sub(subI).unique_rips(:,12));
- sub(subI).unique_rips(same_rip_rmv,:) = [];
- sub(subI).unique_rips(:,12:13) = [];
- for ripI = 1:size(sub(subI).unique_rips,1)
- t_idx = sub(subI).unique_rips(ripI,2);
- t = clean_trials(subI).trl(t_idx); % trial # insead of index
- ent(subI,ripI) = clean_trials(subI).info(t_idx,1);
- surp(subI,ripI) = clean_trials(subI).info(t_idx,2);
- start(subI,ripI)=times(sub(subI).unique_rips(ripI,3));
- peak(subI,ripI)=times(sub(subI).unique_rips(ripI,5));
- if t < 40
- trial_block(subI,ripI) = t;
- else
- new_t = mod(t,40);
- if new_t == 0
- new_t = 40;
- end
- trial_block(subI,ripI) = new_t;
- end
- end
- g=g+size(clean_trials(subI).info(:,1));
- rip_rate(subI,1:2) = [size(clean_trials(subI).info(:,1),1), size(sub(subI).unique_rips,1)];
- rip_rate(subI,3) = rip_rate(subI,2)/rip_rate(subI,1); %rip per trial
- rip_rate(subI,4) = rip_rate(subI,2)/(rip_rate(subI,1)*2.2); %rip per sec (each trial is 2.2s)
- % ripple frequency as a function of time-bin
- c = histogram(times(sub(subI).unique_rips(:,3)),'BinEdges',[-1:0.2:1]);
- rip_times_prob(subI,1:10) = c.Values ./ sum(c.Values);
- % floats for hist
- ent_rounded = 10*round(sub(subI).unique_rips(:,7),1);
- surp_rounded = 10*round(sub(subI).unique_rips(:,8),1);
- e1d= histogram(ent_rounded, 'BinEdges',[8:1:20]);
- subj_count_ent_rips(subI,1:12) = e1d.Values;
- s1d=histogram(surp_rounded, 'BinEdges',[5:5:50]);
- subj_count_surp_rips(subI,1:9) = s1d.Values;
- if nsubs(subI) == 22
- subj_ent_bins(subI,:) = zeros(1,12);
- subj_surp_bins(subI,:) = zeros(1,9);
- end
- ent_trls = 10*round(clean_trials(subI).info(:,1),1);
- surp_trls = 10*round(clean_trials(subI).info(:,2),1);
- c1d = histogram(ent_trls, 'BinEdges', [8:1:20]);
- count_ent_trls = c1d.Values;
- cs1d =histogram(surp_trls, 'BinEdges', [5:5:50]);
- count_surp_trls = cs1d.Values;
- subj_tot_ent(subI,:) = count_ent_trls;
- subj_tot_surp(subI,:) = count_surp_trls;
- % can be >1 because of multiple ripples per trial
- % y=1 for each entropy trial there was a correposnding ripple
- subj_ent_bins(subI,:) = subj_count_ent_rips(subI,:) ./ count_ent_trls;
- subj_surp_bins(subI,:) = subj_count_surp_rips(subI,:) ./ count_surp_trls;
- marks = find(isnan(subj_ent_bins(subI,:)));
- figure(2);subplot(5,4,subI);
- bar([0.9:0.1:2],subj_ent_bins(subI,:));
- xlabel('Entropy');
- title(sprintf('patient %d',nsubs(subI)));
- ylabel({'ripple conut/entropy trials','>1 because of mult. ripples per trl'});
- if ~isempty(marks); hold on; plot(j(marks),1,'r*'); hold off; end
- clear ent_trls surp_trls count_ent_trls count_surp_trls marks
- rip_time = 1000*round(times(sub(subI).unique_rips(:,5)),2);
- ent_rounded = 10*round(sub(subI).unique_rips(:,7),1);
- surp_rounded = 10*round(sub(subI).unique_rips(:,8),1);
- freq_norm_ent = subj_ent_bins(subI,:);
- freq_norm_surp = subj_surp_bins(subI,:);
- cr=histogram(rip_time,'BinEdges',[-1000:200:1000])
- time_dist(subI,:) = cr.Values;
- ce = histogram(ent_rounded,'BinEdges',[8:1:20])
- ent_dist(subI,:) = ce.Values;
- figure(3);sgtitle({sprintf('Patient %d',nsubs(subI)),'Ripple peak time/entropy distribution'});
- subplot(121);
- c=histogram2(rip_time,ent_rounded,'XBinEdges',[-1000:200:1000],'YBinEdges',[8:1:20]); % if want prob add 'Normalization','Probability', otherwise it's normalized count
- xlabel('Ripple peak time'); ylabel('Entropy'); zlabel('Count');title('Raw count')
- ent_time_hist = c.Values;
- cs=histogram2(rip_time,surp_rounded,'XBinEdges',[-1000:200:1000],'YBinEdges',[5:5:50]); % if want prob add 'Normalization','Probability', otherwise it's normalized count
- xlabel('Ripple peak time'); ylabel('Surprise'); zlabel('Count');title('Raw count')
- surp_time_hist = cs.Values;
- % prop_ent_time_hist = ent_time_hist ./ sum(sum(ent_time_hist)); % convert to prob to avoid issues with different numbers of trials
- sub(subI).ent_prop_time = ent_time_hist .* freq_norm_ent;
- sub(subI).surp_prop_time = surp_time_hist .* freq_norm_surp;
- sub(subI).ent_time = ent_time_hist;
- sub(subI).surp_time = surp_time_hist;
- subplot(122); h=heatmap(sub(subI).ent_prop_time');
- ylabel('Entropy'); xlabel('Ripple peak time');
- h.XDisplayLabels = xtick; h.YDisplayLabels = ytick;
- h.CellLabelColor='none'; h.NodeChildren(3).YDir='normal';
- title('Normalised by proportion per entropy bin')
- ent_rip_prop_3d(:,:,subI) = sub(subI).ent_prop_time;
- ent_rip_3d(:,:,subI) = sub(subI).ent_time;
- surp_rip_prop_3d(:,:,subI) = sub(subI).surp_prop_time;
- surp_rip_3d(:,:,subI) = sub(subI).surp_time;
- clear rip_time rip_ent rip_surp freq_norm_ent freq_norm_surp ent_time_hist surp_time_hist
- % data for R - LME (get trials without ripples)
- t_indices = sub(subI).unique_rips(:,2);
- no_rips = setdiff(1:size(clean_trials(subI).info,1),t_indices);
- no_rips_mat = clean_trials(subI).info(no_rips,1:5);
- no_rips_mat = [nan(size(no_rips,2),6), no_rips_mat];
- no_rips_mat(:,2) = no_rips';
- all_rips(x:x+size(sub(subI).unique_rips,1)-1,:) = [sub(subI).unique_rips,...
- repmat(subI,[size(sub(subI).unique_rips,1),1])];
- all_len = size(sub(subI).unique_rips,1)+size(no_rips_mat,1);
- all_trls(y:y+all_len-1,:) = [[no_rips_mat;sub(subI).unique_rips],...
- repmat(subI,all_len,1)];
- x = x+size(sub(subI).unique_rips,1);
- y = y+all_len;
- clear no_rips_mat
- end
- %% time-ent heatmap
- if numel(nsubs) > 7
- ent_rip_prop_3d(:,:,8) = [];
- surp_rip_prop_3d(:,:,8) = [];
- end
- %normalised
- group_avg_ent_time = nanmean(ent_rip_prop_3d,3);
- group_sum_ent_time = nansum(ent_rip_prop_3d,3);
- figure( 'position',[10 10 500 400]); h1=heatmap(group_avg_ent_time'); %title({'Group average','Normalised by entropy bin'})
- ylabel('Entropy'); xlabel('Ripple peak time');
- h1.XDisplayLabels = xtick; h1.YDisplayLabels = ytick; h1.FontSize = 20;
- h1.CellLabelColor='none'; h1.NodeChildren(3).YDir='normal';h1.Colormap = parula;
- % print('-dsvg',fullfile('Manuscript/Figures/','normalised_rip_ent_time'),['-r' num2str(res)])
- % raw
- group_avg_ent_time_r = nanmean(ent_rip_3d,3);
- figure( 'position',[10 10 900 700]); h1=heatmap(group_avg_ent_time_r'); %title({'Group average'})
- ylabel('Entropy'); xlabel('Ripple peak time');
- h1.XDisplayLabels = xtick; h1.YDisplayLabels = ytick; h1.FontSize = 20;
- h1.CellLabelColor='none'; h1.NodeChildren(3).YDir='normal';h1.Colormap = parula;
- % print('-dtiff',fullfile('Manuscript/Figures/','raw_rip_ent_time'),['-r' num2str(res)])
- group_avg_surp_time = nanmean(surp_rip_prop_3d,3);
- group_sum_surp_time = nansum(surp_rip_prop_3d,3);
- figure( 'position',[10 10 900 700]); h1=heatmap(group_avg_surp_time'); %title({'Group average','Normalised by surprise bin'})
- ylabel('Surprise'); xlabel('Ripple peak time');
- h1.XDisplayLabels = xtick; h1.YDisplayLabels = surp_tick; h1.FontSize = 20;
- h1.CellLabelColor='none'; h1.NodeChildren(3).YDir='normal';h1.Colormap = parula;
- % print('-dtiff',fullfile('Manuscript/Figures/','normalised_rip_surp_time'),['-r' num2str(res)])
- group_avg_surp_time_r = nanmean(surp_rip_3d,3);
- figure( 'position',[10 10 900 700]); h1=heatmap(group_avg_surp_time_r'); %title({'Group average'})
- ylabel('Surprise'); xlabel('Ripple peak time');
- h1.XDisplayLabels = xtick; h1.YDisplayLabels = surp_tick; h1.FontSize = 20;
- h1.CellLabelColor='none'; h1.NodeChildren(3).YDir='normal';h1.Colormap = parula;
- % print('-dtiff',fullfile('Manuscript/Figures/','raw_rip_surp_time'),['-r' num2str(res)])
- % perm test
- if numel(nsubs) > 7
- nperm = numel(nsubs)-1;
- else
- nperm = numel(nsubs);
- end
- for subI = 1:nperm
- sub_mat=ent_rip_prop_3d(:,:,subI);
- sub_mat = sub_mat(~isnan(sub_mat));
- nrand = 1000;
- for i = 1:nrand
- shuff_mat(:,i) = sub_mat(randperm(size(sub_mat,1)));
- corrs(subI,i) = corr(sub_mat,shuff_mat(:,i),'Type','Spearman');
- corrs_kend(subI,i) = corr(sub_mat,shuff_mat(:,i),'Type','Kendall');
- end
- clear sub_mat shuff_mat
- end
- % not sig meaning does not correlate with random noise.
- avg_corr = mean(corrs,2);
- [h_cor,p_cor,ci,stats_cor]=ttest(avg_corr);
- % kendall - same result as spearman
- avg_corr_kend = mean(corrs_kend,2);
- [h_cor_k,p_cor_k,ci_k,stats_cor_k]=ttest(avg_corr_kend);
- % % or x2 on the vectorised avg matrix
- % [h_x2,p_x2,stats_x2]=chi2gof(group_avg_ent_time(:));
- % ks on the avg matrix - sig --> not normally distributed
- [h_ks,p_ks,ksstat,cv]=kstest(group_avg_ent_time);
- %uniform distribution - sig --> not uniformly distributed
- % https://math.stackexchange.com/questions/2435/is-there-a-simple-test-for-uniform-distributions
- % dist=makedist('uniform',0,4);
- % [h_ks_uni,p_ks_uni,ksstat_uni,cv_uni]=kstest(group_avg_ent_time,dist);
- Xent = unifrnd(min(group_avg_ent_time(:)),max(group_avg_ent_time(:)),10,12);
- [~,ent_p_ks_unif,ent_ksstat_uni]=kstest2(group_avg_ent_time(:),Xent(:));
- Xsurp = unifrnd(min(group_avg_surp_time(:)),max(group_avg_surp_time(:)),10,12);
- [~,surp_p_ks_unif,surp_ksstat_uni]=kstest2(group_avg_surp_time(:),Xsurp(:));
- %% trial in block
- idx=find(trial_block);
- rips_trial_block = trial_block(find(trial_block));
- rips_ent = ent(find(ent));
- rips_surp = surp(idx);
- rips_peak = peak(idx);
- ytick={'< 0.8','0.8-1', '1-1.2','1.2-1.4','1.4-1.6','1.6-1.8','1.8-2'};
- xtick={'-1 to -0.8','-0.8 to -0.6', '-0.6 to -0.4', '-0.4 to-0.2',...
- '-0.2 to 0', '0 to 0.2', '0.2 to 0.4','0.4 to 0.6', '0.6 to 0.8','0.8 to 1'};
- % three way heatmap
- x=discretize(rips_peak,10);
- y=discretize(rips_ent,7);
- tbl=array2table([x,y,rips_trial_block]);
- figure(8);h=heatmap(tbl,'Var1','Var2','ColorVariable','Var3','ColorMethod','mean');
- xlabel('Time'); ylabel('Entropy');title('Distribution of HPC ripples as a function of entropy, peri-stimulus time and trial # in block');
- set(gca, 'FontSize', 20);
- h.XDisplayLabels = xtick;
- h.YDisplayLabels = ytick;
- h.CellLabelColor='none'; h.NodeChildren(3).YDir='normal';
- % distribution over trials in block
- for subI = 1:numel(nsubs)
- if nsubs(subI)==22
- continue
- end
- trlIdx= find(trial_block(subI,:));
- blkI = trial_block(subI,trlIdx);
- c1d = histogram(blkI, 'BinEdges', [1:41],'Normalization', 'Probability');%,
- count_ent_trls(subI,:) = c1d.Values;
- clean_trials(subI).info(:,6)=mod(clean_trials(subI).info(:,5),40);
- clean_trials(subI).info((clean_trials(subI).info(:,6)==0),6) = 40;
- trl_idx=clean_trials(subI).info(:,6)==1;%missing first trial
- if sum(trl_idx) ==0
- count_ent_trls(subI,1)=NaN;
- end
- c1d = histogram(blkI, 'BinEdges', [1:41]);%,
- count_trls(subI,:) = c1d.Values;
- % to get this in rip rate - divide by the duration of trial * number of
- % trials that were used (post-cleaning)
- for i = 1:40
- tot_trls = sum(clean_trials(subI).info(:,6) == i);
- tot_trls_time = tot_trls * 2; %2s trl
- trl_rate(subI,i) = ( count_trls(subI,i) / tot_trls_time); %events/s
- rip_per_trls(subI,i) = count_trls(subI,i) / tot_trls;
- end
- end
- % fit exponential learning curve
- % https://people.richland.edu/james/lecture/m116/logs/models.html
- x = [1:40]';
- g = fittype('b*(1-exp(-c*x))');
- [f_exp, gof]=fit(x,nanmean(count_ent_trls)',g,'StartPoint',[1,0]);
- figure( 'position',[10 10 900 700]);plot(f_exp,x,nanmean(count_ent_trls)');
- xlabel('Trial # of block'); ylabel('p(ripple)');text(31,0.03,sprintf('adjusted R^2 = %.2f',gof.adjrsquare))
- set(gca, 'FontSize', 20,'LineWidth',2);
- err = nanstd(trl_rate) / sqrt(numel(nsubs) - 2);
- n_trials = size(trl_rate, 2);
- trial_mean = nanmean(trl_rate);
- % Mean + error bars on top
- scatter(1:n_trials, trial_mean);
- hold on;
- errorbar(1:n_trials, trial_mean, err);
- hold off;
- [f_lin, gof_lin] = fit(x,nanmean(count_ent_trls)','poly2');
- figure(10);plot(f_lin,x,nanmean(count_ent_trls)');
- xlabel('Trial # of block'); ylabel('p(ripple)');
- text(31,0.03,sprintf('adjusted R^2 = %.2f',gof_lin.adjrsquare))
- set(gca, 'FontSize', 20);
- err = nanstd(count_ent_trls)/sqrt(numel(nsubs)-1);
- figure('position',[10 10 500 400]);bar(nanmean(count_ent_trls));
- hold on;
- er = errorbar([1:40],nanmean(count_ent_trls),err);
- er.Color = [0 0 0];
- er.LineStyle = 'none';
- p=plot(f_exp,'-r');xlabel('Trial # in block');ylabel('Ripple probability'); ylim([0 0.045]);
- p.LineWidth=2;hold off
- set(gca, 'FontSize', 20);
- print('-dtiff',fullfile('Manuscript/Figures/','rip_trl_in_blk'),['-r' num2str(res)])
- % text(1,0.042,sprintf('adjusted R^2 = %.2f',gof.adjrsquare))hold off;
pipeline_ripples.m at commit ce37ac8, no license · at the source
Overview
- Laboratory for Clinical Neuroscience, Centre for Biomedical Technology, Universidad Politécnica de Madrid, IdISSC,Madrid, Spain
- Andrew Mayes Centre for Cognitive Neuroscience, University of Manchester,Manchester, UK
- Department of Experimental Psychology, Complutense University of Madrid,Madrid, Spain
- Department of Neurosurgery, University Hospital and University of Zurich,Zurich, Switzerland
- Neuroscience Center Zurich, University of Zurich and ETH Zurich,Zurich, Switzerland
- Movement Disorders and Neuromodulation Unit, Department of Neurology, Charité—Universitätsmedizin Berlin, corporate member of Freie Universität Berlin and Humboldt-Universität zu Berlin,Berlin, Germany
- Department of Neurosurgery, Harvard Medical School, Massachusetts General Hospital,Boston, MA USA
- Brigham & Women’s Hospital, Center for Brain Circuit Therapeutics,Boston, MA USA
- Swiss Epilepsy Center, Klinik Lengg,Zurich, Switzerland
- Epilepsy Unit, Department of Neurology, Hospital Ruber Internacional,Madrid, Spain
- Wellcome Trust Centre for Neuroimaging, Institute of Neurology, University College London,London, UK
- IDG/McGovern Institute for Brain Research, Peking University,Beijing, China
Abstract
To encode information efficiently, our perceptual system should detect when situations are unpredictable (that is, informative) and modulate brain dynamics to prepare for encoding. Under uncertainty, there is an increased need to generate predictions about upcoming information, a process that has been proposed to require coordinated activity between the hippocampus and neocortex. Here we show, with direct recordings from the human hippocampus and visual cortex, that after exposure to unpredictable visual stimulus streams, hippocampal ripple activity increases in frequency and duration before stimulus presentation. Prestimulus hippocampal ripples suppress changes in visual cortex gamma activity associated with uncertainty and modulate poststimulus prediction error gamma responses in higher-level visual cortex to surprising stimuli. We reveal a function of hippocampal ripples in facilitating the propagation of visual stimuli based on the expected information gain. These results, therefore, link hippocampal ripples with predictive coding accounts of neuronal message passing and precision-weighted prediction errors, revealing a mechanism relevant for perceptual synthesis and subsequent memory encoding.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 7 matches between paragraphs and lines of code.
frdarya/GenerativeRipples
ce37ac8416614da9d490e09b4eeed23f5b4ca161, 7 May 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
19 files
- code/
Granger_hpc_fus.m , MATLAB, 209 lines - code/
Granger_hpc_occ.m , MATLAB, 200 lines - code/
HPCripple_FUStf.m , MATLAB, 460 lines - code/
HPCripple_OCCtf.m , MATLAB, 546 lines - code/
HPCripple_fus_subseq_tri , MATLAB, 360 linesals.m - code/
Hicks.m , MATLAB, 104 lines - code/
TF_GLM.m , MATLAB, 118 lines - code/
TF_GroupStats.m , MATLAB, 91 lines - code/
TF_calculation.m , MATLAB, 88 lines, 1 match - code/
behav_time_clean_ctx.m , MATLAB, 185 lines - code/
detectripples_iedreject_ , MATLAB, 130 lines, 1 matchdf.m - code/
mixed_eff_models.R , R, 167 lines, 1 match - code/
pipeline.m , MATLAB, 417 lines, 1 match - code/
pipeline_ctx.m , MATLAB, 429 lines - code/
pipeline_ripples.m , MATLAB, 360 lines, 2 matches - code/
preproc.m , MATLAB, 80 lines - code/
read_logfile.m , MATLAB, 129 lines - code/
ripple_detection.m , MATLAB, 465 lines, 1 match - README.md, Text, 5 lines
Code availability
Analysis codes are available in the following GitHub repository: https://
Reproduced under the paper's license (CC BY), from the paper cited above.
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;
- 18 scripts, each with its path and the digest of its content;
- 7 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- 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
Datasets cited
- openneuro:ds002179, at OpenNeuro; found in the text, “Main”
Data availability
Preprocessed data needed to generate the figures, and over which statistics were computed, are available in the following GitHub repository: 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 2, 28 September 2026
- Publisher: n/a → Nature Portfolio
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 12 authors, 5 keywords, 10 MeSH terms, 6 funders, 76 references.
Cite
This paper
Frank, D., Moratti, S., Hellerstedt, R., Sarnthein, J., Li, N., Horn, A., Imbach, L., Stieglitz, L., Gil-Nagel, A., Toledano, R., Friston, K. J., & Strange, B. A. (2026). Human hippocampal ripples tune cortical responses based on predicted uncertainty. Nature neuroscience, 29(8), 1987-1998. https://
BibTeX
@article{frank2026human,
author = {Frank, Darya and Moratti, Stephan and Hellerstedt, Robin and Sarnthein, Johannes and Li, Ningfei and Horn, Andreas and Imbach, Lukas and Stieglitz, Lennart and Gil-Nagel, Antonio and Toledano, Rafael and Friston, Karl J. and Strange, Bryan A.},
title = {{Human hippocampal ripples tune cortical responses based on predicted uncertainty}},
journal = {Nature neuroscience},
year = {2026},
month = jun,
volume = {29},
number = {8},
pages = {1987--1998},
publisher = {Nature Portfolio},
issn = {1097-6256},
doi = {10.1038/
url = {https://
pmid = {42350816},
pmcid = {PMC13433285}
}
RIS
TY - JOUR
AU - Frank, Darya
AU - Moratti, Stephan
AU - Hellerstedt, Robin
AU - Sarnthein, Johannes
AU - Li, Ningfei
AU - Horn, Andreas
AU - Imbach, Lukas
AU - Stieglitz, Lennart
AU - Gil-Nagel, Antonio
AU - Toledano, Rafael
AU - Friston, Karl J.
AU - Strange, Bryan A.
TI - Human hippocampal ripples tune cortical responses based on predicted uncertainty
T2 - Nature neuroscience
J2 - Nat Neurosci
PY - 2026
DA - 2026/
VL - 29
IS - 8
SP - 1987
EP - 1998
SN - 1097-6256
PB - Nature Portfolio
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Human hippocampal ripples tune cortical responses based on predicted uncertainty",
"container-title": "Nature neuroscience",
"author": [
{
"family": "Frank",
"given": "Darya"
},
{
"family": "Moratti",
"given": "Stephan"
},
{
"family": "Hellerstedt",
"given": "Robin"
},
{
"family": "Sarnthein",
"given": "Johannes"
},
{
"family": "Li",
"given": "Ningfei"
},
{
"family": "Horn",
"given": "Andreas"
},
{
"family": "Imbach",
"given": "Lukas"
},
{
"family": "Stieglitz",
"given": "Lennart"
},
{
"family": "Gil-Nagel",
"given": "Antonio"
},
{
"family": "Toledano",
"given": "Rafael"
},
{
"family": "Friston",
"given": "Karl J."
},
{
"family": "Strange",
"given": "Bryan A."
}
],
"container-title-short":
"volume": "29",
"issue": "8",
"page": "1987-1998",
"DOI": "10.1038/
"PMID": "42350816",
"PMCID": "PMC13433285",
"ISSN": "1097-6256",
"publisher": "Nature Portfolio",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
25
]
]
}
}
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.1002/ana.78206 [code]
- Multimodal Image Guidance in Subthalamic Deep Brain Stimulation for Parkinson's Disease.Journal: Annals of neurologyIn common: Curve Fitting Toolbox, FieldTrip, Image Processing Toolbox, 2 other tools, 2 references, 2 authors
- [2] doi:10.1038/s41467-026-75345-6 [code]
- Hippocampal ripples initiate cortical dimensionality expansion for memory retrieval.Journal: Nature communicationsIn common: boundedline, FieldTrip, Image Processing Toolbox, 2 other tools, cognitive, 9 references
- [3] doi:10.1016/j.celrep.2026.117646 [code]
- Medial entorhinal-hippocampal desynchronization parallels the emergence of memory impairment in a mouse model of Alzheimer's disease pathology.Journal: Cell reportsIn common: boundedline, Curve Fitting Toolbox, car, 7 other tools
- [4] doi:10.7554/elife.107088 [code]
- Development of auditory and spontaneous movement responses to music over the first postnatal year.Journal: eLifeIn common: Wavelet Toolbox, car, FieldTrip, 6 other tools, 1 reference
- [5] doi:10.1002/advs.77857 [code]
- Brain Network Dynamics of Local and Global Predictive Processing in Aging.Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)In common: FieldTrip, Image Processing Toolbox, Signal Processing Toolbox, 1 other tool, cognitive, 7 references
- [6] doi:10.1093/sleep/zsag168 [code]
- Deltas' and spindles' cross-area synchronization and ripple subtypes.Journal: SleepIn common: boundedline, FieldTrip, Image Processing Toolbox, 2 other tools, 5 references
- [7] doi:10.1038/s41598-026-49900-6 [code]
- Global neural oscillations underlie performance variability and attentional state fluctuations in humans.Journal: Scientific reportsIn common: Wavelet Toolbox, FieldTrip, lme4, 3 other tools, cognitive, 3 references
- [8] doi:10.1016/j.isci.2026.116458 [code]
- Neural tracking of prosodic and statistical rhythms jointly supports artificial language learning.Journal: iScienceIn common: FieldTrip, emmeans, lme4, 2 other tools, cognitive, 5 references
- [9] doi:10.1038/s41467-026-75359-0 [code]
- Neural mechanisms of time-forward predictions for naturalistic auditory tone sequences.Journal: Nature communicationsIn common: FieldTrip, Signal Processing Toolbox, Statistics and Machine Learning Toolbox, cognitive, 7 references
- [10] doi:10.1111/ejn.70481 [code]
- Neural and Behavioral Tracking of Musical Phrases Occurs Without Temporal Regularity.Journal: The European journal of neuroscienceIn common: boundedline, FieldTrip, lme4, 4 other tools, cognitive, 2 references
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, 18 scripts, and 7 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:7a538cc5580c1a92…
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.
