Preserving predictive information under biologically plausible compression.
The 2 matches
- [1] § Materials and methods › Optimization methods ↔ examplescript.m, lines 1–46 · score 0.69 · GradObj, firing rate, SQP, fmincon, MATLAB, algorithm
- [2] § Materials and methods › Coarse-graining functions ↔ figscript.m, lines 986–1055 · score 0.51 · maximally correlated cells, simulate, meta neuron, summed, activity, movies
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 · 286 lines · 8.9 KB · no license · 1 match
- %% example script to optimize PCG
- % Requires MATLAB R2016b or later (local functions in scripts)
- % set up and preprocessing
- load('multmovie_data.mat');
- ntrials = min(nreps); ptrials = round(ntrials*0.5); nsamp = 50; % for bootstrapping
- rng(0); N = 4; cutoff = 20;
- load("maxpredgroupsall.mat"); % create mixed group of ranked pred cells and overlapping groups
- maxpredgroups = reshape(maxpredgroupsall(1:92),N,[]); maxpredgroups = maxpredgroups';
- y = randsample(maxpredgroupsall(1:cutoff),N*30,true); randgroups1 = reshape(y,[],N);
- y = randsample(ncell,N*20,true); randgroups2 = reshape(y,[],N);
- maxpredgroups = [maxpredgroups; randgroups1; randgroups2];
- ngroups = size(maxpredgroups,1);
- % optimize PCG with firing rate constraint
- Dt = 1; nrun = 50;
- mov = 4; % fish movie
- binned = binned(1:nreps(mov),:,:,mov); % in ntrials x trialtime x ncells x movie. binned in binary
- binned = permute(binned,[3,2,1]);
- binned = reshape(binned,ncell,[]);
- [I_wordword,I_CCG,R_CCG,I_PCG,R_PCG,Params,Bootstrap_CCG,Bootstrap_PCG] = preallocate(maxpredgroups,nsamp);
- for i = 1:ngroups
- mycells = maxpredgroups(i,:);
- [I_CCG(i),R_CCG(i),I_wordword(i)] = CCGInfo(mycells,binned,Dt);
- fr = R_CCG(i);
- fun = @(params)PerceptronInfo(mycells,binned,params,Dt);
- con = @(params)mycon(mycells,binned,params,fr);
- paramsrun = nan(nrun,N+1); fvalrun = nan(1,nrun); Rrun = nan(1,nrun);
- for run = 1:nrun
- params0 = 100.*rand(1,N+1);
- [params,fval] = fmincon(fun,params0,[]...
- ,[],[],[],zeros(1,N+1),100.*ones(1,N+1),con,optimset('GradObj','off','Algorithm','sqp','Display','off'));
- paramsrun(run,:) = params; fvalrun(run) = fval; Rrun(run) = PerceptronFR(mycells,binned,params);
- end
- [fval,runidx] = min(fvalrun); params = paramsrun(runidx,:);
- I_PCG(i) = -fval; Params(:,i) = params; R_PCG(i) = Rrun(runidx);
- for j = 1:nsamp
- allptrials = randsample(ntrials,ptrials);
- Bootstrap_CCG(i,j) = LMInfosample(mycells,allptrials,Dt,mov);
- Bootstrap_PCG(i,j) = PerceptronInfosample(mycells,allptrials,params,Dt,mov);
- end
- end
- err_CCG = std(Bootstrap_CCG,0,2)./sqrt(2);
- err_PCG = std(Bootstrap_PCG,0,2)./sqrt(2);
- function [I_wordword,I_CCG,R_CCG,I_PCG,R_PCG,Params,Bootstrap_CCG,Bootstrap_PCG] = preallocate(groups,nsamp)
- % PREALLOCATE sets up and preallocates vectors
- ngroups = size(groups,1); N = size(groups,2);
- I_wordword = nan(1,ngroups); I_CCG = nan(1,ngroups); R_CCG = nan(1,ngroups);
- I_PCG = nan(1,ngroups); R_PCG = nan(1,ngroups); Params = nan(N+1,ngroups);
- Bootstrap_CCG = nan(ngroups,nsamp); Bootstrap_PCG = nan(ngroups,nsamp);
- end
- function [P_wt,condprob] = CondProb(mycells,binned,Dt)
- %CONDPROB gets the probability of words wt and the conditional probability
- % matrix for every wt+dt given wt
- % Dt = # time steps in future
- N=length(mycells);
- binnedspikes = binned(mycells,:);
- % first find all zero words
- idx0 = sum(binnedspikes,1)==0;
- % where this is true, we want binnedwords to be 1 anyway
- % where it is false (0), we want to replace it with the correct word
- binnedwords = double(idx0);
- idx1 = find(idx0==0);
- for i = 1:length(idx1)
- a = num2str(binnedspikes(:,idx1(i)));
- a = sprintf(a);
- binnedwords(idx1(i)) = bin2dec(a)+1;
- end
- presbinnedwords = binnedwords(1:end-Dt);
- futbinnedwords = binnedwords(Dt+1:end);
- jointwords = (futbinnedwords-1).*2^N+presbinnedwords;
- N_wt = histcounts(binnedwords,1:2^N+1)';
- A = histcounts(jointwords,1:2^(2*N)+1)';
- A = reshape(A,2^N,[]);
- condprob = A./sum(A,2,'omitnan');
- % word entropy
- condprob = condprob./sum(condprob,2,'omitnan');
- P_wt = N_wt/sum(N_wt);
- end
- function [I] = WordInfo(P_wt,condprob)
- %WORDINFO gets the mutual information between words at time t and words at
- % t+dt, normalized by mean number of spikes
- H1 = -sum(P_wt.*log2(P_wt),'omitnan');
- H2 = -sum(P_wt.*condprob.*log2(condprob),'all','omitnan');
- I = H1-H2;
- end
- function [I_CCG,R_CCG,I_wordword,cg_spks] = CCGInfo(mycells,binned,Dt)
- %CCGINFO gets I(Mt;sigmat+dt)
- N=length(mycells);
- nword=2^N;
- binnedspikes = binned(mycells,:);
- % first find all zero words
- idx0 = sum(binnedspikes,1)==0;
- % where this is true, we want binnedwords to be 1 anyway
- % where it is false (0), we want to replace it with the correct word
- binnedwords = double(idx0);
- idx1 = find(idx0==0);
- for i = 1:length(idx1)
- a = num2str(binnedspikes(:,idx1(i)));
- a = sprintf(a);
- binnedwords(idx1(i)) = bin2dec(a)+1;
- end
- presbinnedwords = binnedwords(1:end-Dt);
- futbinnedwords = binnedwords(Dt+1:end);
- jointwords = (futbinnedwords-1).*2^N+presbinnedwords;
- N_wt = histcounts(binnedwords,1:2^N+1)';
- A = histcounts(jointwords,1:2^(2*N)+1)';
- A = reshape(A,2^N,[]);
- condprob = A./sum(A,2,'omitnan');
- condprob1 = condprob./sum(condprob,2,'omitnan');
- P_wt = N_wt/sum(N_wt);
- % get word-word info
- I_wordword = WordInfo(P_wt,condprob1);
- % now get cond prob of meta given word
- nstep = floor(log2(N)); % number of coarse-graining steps
- spks = binnedspikes;
- for i = 1:nstep
- R = corrcoef(spks');
- R(eye(size(R))==1) = nan;
- npairs = floor(N/(2^i)); % number of coarse-grained pairs in this step
- g = nan(npairs,2);
- % find correlated pairs
- if npairs ==1
- [row,col] = find(R==max(R,[],'all'));
- if length(row)>2
- row = [row(1) row(3)]; % if two pairs have same max corr, pick 1st pair
- col = [row(2) row(1)];
- end
- g(1,:) = row; % next pair of maximally correlated cells
- % g(1,:) = [1 2];
- else
- for l = 1:npairs
- [row,col] = find(R==max(R,[],'all'));
- if length(row)>2
- row = [row(1) row(3)]; % if two pairs have same max corr, pick 1st pair
- col = [row(2) row(1)];
- end
- g(l,:) = row; % next pair of maximally correlated cells
- R(row,:) = nan; R(:,col) = nan;
- end
- end
- % sum spike train pairs
- cg_spks = zeros(npairs,size(binned,2));
- for l = 1:npairs
- cg_spks(l,:) = sum(spks(g(l,:),:),1);
- end
- cg_spks = cg_spks./max(cg_spks,[],2);
- spks = cg_spks; % update
- end
- condhold = zeros(nword,1);
- % use final cg_spks to find P(Mt|wt)
- for k = 1:nword % w_t
- % find all indices of words(k), count
- idx = find(binnedwords==k);
- idx = idx(idx<size(binned,2));
- % final coarsegraining gives probility of meta neuron spiking
- probM = spks(idx);
- condhold(k) = mean(probM,'omitnan');
- end
- condprob2 = [1-condhold condhold];
- Joint = zeros(nword,2);
- for m = 1:2
- for j = 1:nword
- Joint(j,m) = sum(condprob1(:,j).*condprob2(:,m).*P_wt,'omitnan');
- end
- end
- Joint = Joint./sum(Joint,'all');
- P_Mt = sum(Joint,1);
- P_wt = sum(Joint,2);
- % calculate mutual info
- I_CCG = -sum(P_Mt.*log2(P_Mt),'omitnan')-sum(P_wt.*log2(P_wt),'omitnan')+sum(Joint.*log2(Joint),'all','omitnan');
- R_CCG = P_Mt(2);
- end
- function [I] = PerceptronInfo(mycells,binned,params,Dt)
- %PerceptronInfo gets the mutual information between perceptron at time t and words at
- % t+dt
- N=length(mycells);
- % find all 2^N possible "words"
- nword=2^N;
- vec = 0:nword-1;
- words=dec2bin(vec);
- words=double(reshape(logical(words(:)-'0'),nword,[]));
- words = words.';
- [~, wordorder] = sort(sum(words,1));
- words = words(:,wordorder);
- % first get word probability P_wt
- [P_wt,condprob1] = CondProb(mycells,binned,Dt);
- condprob1 = condprob1./sum(condprob1,2);
- w = params(1:N);
- c = params(N+1);
- condprob2 = zeros(nword,2); % matrix of word counts, rows = wt, col = Mt
- % now get cond prob of meta given word
- for k = 1:nword
- wt = words(:,k);
- z = sum(wt'.*w);
- condprob2(k,2) = (1./(1+exp(-z+c)));
- condprob2(k,1) = 1-condprob2(k,2);
- end
- Joint = zeros(nword,2);
- for m = 1:2
- for j = 1:nword
- Joint(j,m) = sum(condprob1(:,j).*condprob2(:,m).*P_wt,'omitnan');
- end
- end
- Joint = Joint./sum(Joint,'all');
- P_Mt = sum(Joint,1);
- P_wt = sum(Joint,2);
- % calculate mutual info
- I = -sum(P_Mt.*log2(P_Mt),'omitnan')-sum(P_wt.*log2(P_wt),'omitnan')+sum(Joint.*log2(Joint),'all','omitnan');
- I = -I; % return negative info
- end
- function [R_PCG] = PerceptronFR(mycells,binned,params)
- N=length(mycells);
- nword = 2^N;
- vec = 0:nword-1;
- words=dec2bin(vec);
- words=double(reshape(logical(words(:)-'0'),nword,[]));
- words = words.';
- [~, wordorder] = sort(sum(words,1));
- words = words(:,wordorder);
- binnedspikes = binned(mycells,:);
- % first find all zero words
- idx0 = sum(binnedspikes,1)==0;
- % where this is true, we want binnedwords to be 1 anyway
- % where it is false (0), we want to replace it with the correct word
- binnedwords = double(idx0);
- idx1 = find(idx0==0);
- for i = 1:length(idx1)
- a = num2str(binnedspikes(:,idx1(i)));
- a = sprintf(a);
- binnedwords(idx1(i)) = bin2dec(a)+1;
- end
- N_wt = histcounts(binnedwords,1:2^N+1)';
- P_wt = N_wt/sum(N_wt);
- nword = round(nword);
- spkproball = zeros(1,nword);
- w = params(1:N);
- c1 = params(N+1);
- for k = 1:nword
- wt = words(:,k);
- z = sum(wt'.*w);
- probM = 1./(1+exp(-z+c1));
- spkproball(k) = probM.*P_wt(k);
- end
- R_PCG = sum(spkproball);
- end
- function [c,ceq] = mycon(mycells,binned,params,fr)
- R_PCG = PerceptronFR(mycells,binned,params);
- tol = 1e-4;
- c = (R_PCG-fr)^2-tol;
- ceq = [];
- end
examplescript.m at commit 708aa67, no license · at the source
Overview
- Department of Organismal Biology and Anatomy, University of Chicago, Chicago, IL 60637, USA
- Institut de la Vision, Sorbonne Université, INSERM, CNRS, Paris 75012, France
- Physics Frontier Center for Living Systems, University of Chicago, Chicago, IL 60637, USA
Abstract
Retinal ganglion cells show high convergence onto their downstream projections, which poses a problem for information transfer: how can information be preserved through a synaptic layer that has significantly more inputs than outputs? Lossy compression suggests many efficient, yet computation-agnostic, methods for reading out input stimuli or activity patterns. Focusing on prediction as a ubiquitous computation in the brain, we compare compressions that explicitly retain predictive information to common neural compression frameworks that do not. We find evidence that compressing retinal inputs to perform optimal predictive computations allows putative downstream neurons to predict the future near-optimally across natural scenes. Other sensory systems also exhibit compression in their processing hierarchies, and we hope that our framework will be useful in cases where it is not yet known how information about a specific computation is maintained under compression.
Reproduced under the paper's license (CC BY-NC), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.
sepalmer/predictive-coarse-graining
708aa67321388895b0de567ea84ef9b79eff3959, 11 February 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
3 files
- examplescript.m, MATLAB, 286 lines, 1 match
- figscript.m, MATLAB, 2,212 lines, 1 match
- README.md, Text, 33 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;
- 2 scripts, each with its path and the digest of its content;
- 2 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
- doi:10.5061/
dryad.4qrfj6qm8 , at Dryad; found in “Data availability”
Data availability
The data have been published at https://
Reproduced under the paper's license (CC BY-NC), 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
- Funding: added National Science Foundation: 2235451; Simons Foundation: MP-TMPS- 00005320
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 4 authors, 5 keywords, 76 references.
Cite
This paper
Durian, S. C. L., Bojanek, K., Marre, O., & Palmer, S. E. (2026). Preserving predictive information under biologically plausible compression. PNAS nexus, 5(7), pgag224. https://
BibTeX
@article{durian2026prese
author = {Durian, Sylvia C L and Bojanek, Kyle and Marre, Olivier and Palmer, Stephanie E},
title = {{Preserving predictive information under biologically plausible compression}},
journal = {PNAS nexus},
year = {2026},
month = jun,
volume = {5},
number = {7},
pages = {pgag224},
publisher = {Oxford University Press},
issn = {2752-6542},
doi = {10.1093/
url = {https://
pmid = {42403907},
pmcid = {PMC13329666}
}
RIS
TY - JOUR
AU - Durian, Sylvia C L
AU - Bojanek, Kyle
AU - Marre, Olivier
AU - Palmer, Stephanie E
TI - Preserving predictive information under biologically plausible compression
T2 - PNAS nexus
J2 - PNAS Nexus
PY - 2026
DA - 2026/
VL - 5
IS - 7
SP - pgag224
SN - 2752-6542
PB - Oxford University Press
DO - 10.1093/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1093/
"type": "article-journal",
"title": "Preserving predictive information under biologically plausible compression",
"container-title": "PNAS nexus",
"author": [
{
"family": "Durian",
"given": "Sylvia C L"
},
{
"family": "Bojanek",
"given": "Kyle"
},
{
"family": "Marre",
"given": "Olivier"
},
{
"family": "Palmer",
"given": "Stephanie E"
}
],
"container-title-short":
"volume": "5",
"issue": "7",
"page": "pgag224",
"DOI": "10.1093/
"PMID": "42403907",
"PMCID": "PMC13329666",
"ISSN": "2752-6542",
"publisher": "Oxford University Press",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
19
]
]
}
}
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.1038/s41467-026-72619-x [code]
- An inhibitory brainstem pathway reduces visual detection during background motion.Journal: Nature communicationsIn common: 5 references
- [2] doi:10.1126/sciadv.aeg3223 [code]
- The extreme diversity of retinal amacrine cells has deep evolutionary roots.Journal: Science advancesIn common: 2 references, author Olivier Marre
- [3] doi:10.1016/j.isci.2026.117088 [code]
- Spatial biases in visual feature representation of mouse dorsal lateral geniculate nucleus boutons.Journal: iScienceIn common: Statistics and Machine Learning Toolbox, 4 references
- [4] doi:10.1371/journal.pbio.3003915 [code]
- Noise-invariant representations of sound emerge along the canonical cortical hierarchy.Journal: PLoS biologyIn common: Violinplot-Matlab, Optimization Toolbox, Statistics and Machine Learning Toolbox, 1 reference
- [5] doi:10.1038/s41467-026-71151-2 [code]
- Common and distinct neural correlates of social interaction processing and theory of mind in narratives.Journal: Nature communicationsIn common: Violinplot-Matlab, Optimization Toolbox, Statistics and Machine Learning Toolbox, 1 reference
- [6] 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: Violinplot-Matlab, Statistics and Machine Learning Toolbox, 2 references
- [7] doi:10.1038/s41593-026-02350-9 [code]
- Probing inter-areal computations with a two-photon holographic mesoscope.Journal: Nature neuroscienceIn common: Optimization Toolbox, Statistics and Machine Learning Toolbox, 2 references
- [8] doi:10.1038/s41467-026-73540-z [code]
- Predictive acoustical processing in human cortical layers.Journal: Nature communicationsIn common: Optimization Toolbox, Statistics and Machine Learning Toolbox, 2 references
- [9] doi:10.1038/s41467-026-76306-9 [code]
- Non-invasive characterization of perivascular subarachnoid spaces.Journal: Nature communicationsIn common: Violinplot-Matlab, Optimization Toolbox, Statistics and Machine Learning Toolbox
- [10] doi:10.1162/netn.a.554 [code]
- The turbulent brain: Modeling vortex interactions for understanding human cognition.Journal: Network neuroscience (Cambridge, Mass.)In common: Violinplot-Matlab, Optimization Toolbox, Statistics and Machine Learning Toolbox
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, 2 scripts, and 2 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:4e66345d2dc3fc9a…
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.
