OSCR

Computing the effects of excitatory-inhibitory balance on neuronal input-output properties.

Code ↔ Paper

1 match between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 1 match
  1. [1] § Materials and methods › Stimulus parameters › Sustained stimulus. ↔ ScriptsPlos_sustained_final.m, lines 305–333 · score 0.55 · steady state, relative delay, onset, ramped, duration, ms

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 · 489 lines · 19 KB · MIT · 1 match

  1. %Scripts for re-creating Figs 1-5 of manuscript
  2. % Simulations for sustained stimulus; transient stimulus are in another script
  3. %Each script recreates figures in manuscript; data saved
  4. %common functions near bottom of page.
  5. %**NOTE: highlight segment you wish to run and push "Run Selection" in Editor tab; if you push "Run", it will run the entire program**
  6. %% ---------Fig. 2B of manuscript---------
  7. totalTime=200;delT=0.01;Rec_length=round(totalTime/delT);time=delT*(1:Rec_length); %time related variables in ms
  8. nE=250;%number of excitatory inputs
  9. kn=0.2; %ratio of inhibitory to excitatory neurons; must be between 0-1
  10. gEmax=0.0103; gImax=gEmax; %synaptic current peaks (current clamp); 250µV PSPs
  11. kq=gImax/gEmax;%ratio of I to E charge or conductance; must be between 0-1;
  12. rE=50; %rate of afferent input (Poisson process) to reference cell in Hz;
  13. pE=0.85; %excitatory input probability to reference cell
  14. pI=kn*kq; %effective inhibitory probability to reference cell
  15. pEtoI=0.35; %probability of inputs to I cells; controls input ratef
  16. pEavg=zeros(1,Rec_length);pIavg=pEavg;pNavg=pEavg;
  17. spkE=zeros(1,Rec_length);histE=spkE;
  18. %-UNCOMMENT DESIRED FIGURE----------
  19. % %----Fig 2Bi--------
  20. % pE=0.35;
  21. % piEtoI=0.35;
  22. % kn=0.3;
  23. %gMode=1; % current based, switch to 2 for conductance
  24. % sweeps=1000;
  25. %
  26. % %----Fig 2Bii--------
  27. % pE=0.55;
  28. % piEtoI=0.35;
  29. % kn=0.4;
  30. %gMode=1; % current based, switch to 2 for conductance
  31. % sweeps=1000;
  32. %----Fig 2Biii--------
  33. pE=0.85;
  34. piEtoI=0.35;
  35. kn=0.68;
  36. gMode=1; % current based, switch to 2 for conductance
  37. sweeps=1000;
  38. %------synaptic parameters
  39. if gMode==1 %current based
  40. gEmax=0.0103; gImax=gEmax; %synaptic current peaks (current clamp); 250µV PSPs
  41. end
  42. if gMode==2 %conductance based
  43. gEmax=1.47e-4; %for 250µV EPSP
  44. gImax=10.45e-4; %for -250µV IPSP
  45. end
  46. tic
  47. for sw=1:sweeps
  48. [pEt,pIt,rI,vE]=go(kn,kq,pE,piEtoI,rE,nE,gMode,gEmax,gImax,delT,Rec_length);
  49. pEavg=pEavg+pEt;
  50. pIavg=pIavg+pIt;
  51. pNavg=pNavg+(pEt.*(1-pIt));
  52. spkE((vE>=-10))=1;
  53. histE=histE+spkE;
  54. end
  55. pEavg=pEavg/sweeps;pIavg=pIavg/sweeps;pNavg=pNavg/sweeps;
  56. toc
  57. figure(1);clf;hold on;
  58. subplot(2,1,1);plot(time,histE);xlabel('time (ms)','FontSize',14);ylabel('counts','FontSize',14)
  59. subplot(2,1,2);hold on;plot(time,pEavg,'b');plot(time,pIavg,'r');plot(time,pNavg,'k');xlabel('time (ms)','FontSize',14);ylabel ('p','FontSize',14);lgd=legend('pE','pI','pNet');lgd.Title.FontSize = 14;
  60. %% Figure 3B
  61. gMode=1; %1 is current clamp; 2 is conductance
  62. totalTime=1000;delT=0.01;Rec_length=round(totalTime/delT);time=delT*(1:Rec_length); %time related variables in ms
  63. %-----------constants----------------------
  64. arStart=round(0.2*Rec_length);arEnd=round(0.8*Rec_length);
  65. %----set up parameters to vary--------
  66. sweeps=100;
  67. nTrialsE=20;
  68. gEmax=0.0103; gImax=gEmax; %synaptic current peaks (current clamp); 250µV PSPs
  69. probE=linspace(0.1,1,nTrialsE);
  70. piEtoI=[0 0.4 0.5 0.6 0.7];
  71. nTrialsI=numel(piEtoI);
  72. k=0.2;kq=1;
  73. rE=50*ones(1,Rec_length); %firing rate of afferents in Hz
  74. ntheta=60;
  75. dM=zeros(nTrialsI,nTrialsE,6); %data Matrix
  76. tic
  77. figure(300);clf;hold on;
  78. for jj=1:nTrialsI
  79. for j=1:nTrialsE
  80. [prbE,prbEstd,meanE,stdE,prbI,prbIstd,meanI,stdI,meanF,stdF]=goB(k,kq,probE(j),piEtoI(jj),rE(j),gEmax,gImax,gMode,sweeps,arStart,arEnd);
  81. ['nTrialsI: ' num2str(jj) ' nTrialsE: ' num2str(j) ' probE: ' num2str(prbE) ' probI: ' num2str(prbI) ' freqE: ' num2str(meanF) ]
  82. dM(jj,j,1)=prbE;
  83. dM(jj,j,2) = prbI;
  84. dM(jj,j,3) = meanE;
  85. dM(jj,j,4)=meanI;
  86. dM(jj,j,5)=meanF;
  87. dM(jj,j,6)=stdF;
  88. % ['pE is:' num2str(probE(j)) ' pI is: ' num2str(Iavg) ' piEtoI: ' num2str(piEtoI(jj))]
  89. end
  90. errorbar(dM(jj,:,1),dM(jj,:,5),dM(jj,:,6),'-sqk','MarkerFace','k');axis([0 1 0 200]);xlabel('pE','FontSize',20);ylabel('firing rate','FontSize',20);
  91. end
  92. save('Fig3B.mat','dM');
  93. toc
  94. %% Figure 3C
  95. gMode=1;%1 is current clamp; 2 is conductance
  96. totalTime=1000;delT=0.01;Rec_length=round(totalTime/delT);time=delT*(1:Rec_length); %time related variables in ms
  97. arStart=round(0.2*Rec_length);arEnd=round(0.8*Rec_length);
  98. %-----------constants----------------------
  99. gEmax=0.0103; gImax=gEmax; %synaptic current peaks (current clamp); 250µV PSPs
  100. %----set up parameters to vary--------
  101. sweeps=100;
  102. nTrialsE=20;
  103. probE=linspace(0.0,1,nTrialsE);
  104. kScalar=[0 0.2 0.4 0.6 0.8];
  105. nTrialsK=numel(kScalar);
  106. rE=50;
  107. k=1;kq=1;
  108. piEtoI=0.35;
  109. dM=zeros(nTrialsK,nTrialsE,6);
  110. tic
  111. figure(300);clf;hold on;
  112. for jj=1:nTrialsK
  113. k=kScalar(jj)*probE;
  114. for j=1:nTrialsE
  115. [prbE,prbEstd,meanE,stdE,prbI,prbIstd,meanI,stdI,meanF,stdF]=goB(k(j),kq,probE(j),piEtoI,rE,gEmax,gImax,gMode,sweeps,arStart,arEnd);
  116. ['nTrialsI: ' num2str(jj) ' nTrialsE: ' num2str(j) ' probE: ' num2str(prbE) ' probI: ' num2str(prbI) ' k: ' num2str(k(j)) ' freqE: ' num2str(meanF) ]
  117. dM(jj,j,1)=prbE;
  118. dM(jj,j,2) = prbI;
  119. dM(jj,j,3) = meanE;
  120. dM(jj,j,4)=meanI;
  121. dM(jj,j,5)=meanF;
  122. dM(jj,j,6)=stdF;
  123. end
  124. errorbar(dM(jj,:,1),dM(jj,:,5),dM(jj,:,6),'-sqk','MarkerFace','k');axis([0 1 0 200]);xlabel('pE','FontSize',20);ylabel('firing rate','FontSize',20)
  125. end
  126. save('Fig3C.mat','dM');
  127. toc
  128. %% Figure 3D
  129. gMode=1;
  130. totalTime=1000;delT=0.01;Rec_length=round(totalTime/delT);time=delT*(1:Rec_length); %time related variables in ms
  131. arStart=round(0.2*Rec_length);arEnd=round(0.8*Rec_length);
  132. %-----------constants----------------------
  133. %----set up parameters to vary--------
  134. sweeps=100;
  135. nTrialsE=20;
  136. probE=linspace(0.0,1,nTrialsE);
  137. pEtoI=[0 0.4 0.5 0.6 0.7 0.8];
  138. nTrialspEtoI=numel(pEtoI);
  139. gEmax=0.0103; gImax=gEmax; %synaptic current peaks (current clamp); 250µV PSPs
  140. k=0.2;kq=1;
  141. rE=50;
  142. dM=zeros(nTrialspEtoI,nTrialsE,6);
  143. tic
  144. figure(300);clf;hold on;
  145. for jj=1:nTrialspEtoI
  146. piEtoI=pEtoI(jj)*probE;
  147. for j=1:nTrialsE
  148. [prbE,prbEstd,meanE,stdE,prbI,prbIstd,meanI,stdI,meanF,stdF]=goB(k,kq,probE(j),piEtoI(j),rE,gEmax,gImax,gMode,sweeps,arStart,arEnd);
  149. ['nTrialspEtoI: ' num2str(jj) ' nTrialsE: ' num2str(j) ' probE: ' num2str(prbE) ' probI: ' num2str(prbI) ' freqE: ' num2str(meanF) ]
  150. dM(jj,j,1)=prbE;
  151. dM(jj,j,2) = prbI;
  152. dM(jj,j,3) = meanE;
  153. dM(jj,j,4)=meanI;
  154. dM(jj,j,5)=meanF;
  155. dM(jj,j,6)=stdF;
  156. end
  157. pause(0.1);
  158. errorbar(dM(jj,:,1),dM(jj,:,5),dM(jj,:,6),'-sqk','MarkerFace','k');axis([0 1 0 200]);xlabel('pE','FontSize',20);ylabel('firing rate','FontSize',20)
  159. end
  160. save('Fig3D.mat','dM');
  161. toc
  162. %% ----Figure 4B-------------
  163. gMode=1; %1 is current clamp; 2 is conductance
  164. totalTime=1000;delT=0.01;Rec_length=round(totalTime/delT);time=delT*(1:Rec_length); %time related variables in ms
  165. arStart=round(0.2*Rec_length);arEnd=round(0.8*Rec_length);
  166. %-----------constants----------------------
  167. gEmax=0.0103; gImax=gEmax; %synaptic current peaks (current clamp); 250µV PSPs
  168. %----set up parameters to vary--------
  169. sweeps=100;
  170. nTrialsE=50;
  171. x=linspace(2,8,nTrialsE);
  172. xctr=round(mean(x));sigX=1.5;
  173. k=0.2;kq=1;
  174. pEtoI=[0 0.275 0.3]; %synaptic efficacy from I cells to reference cell
  175. nTrialspEtoI=numel(pEtoI);
  176. aScalar=0.35;
  177. rE=50;
  178. dM=zeros(nTrialspEtoI,nTrialsE,6);
  179. tic
  180. figure(300);clf;hold on;
  181. probE=aScalar*exp(-0.5*((x-xctr)/sigX).^2);
  182. for jj=1:nTrialspEtoI
  183. for j=1:nTrialsE
  184. [prbE,prbEstd,meanE,stdE,prbI,prbIstd,meanI,stdI,meanF,stdF]=goB(k,kq,probE(j),pEtoI(jj),rE,gEmax,gImax,gMode,sweeps,arStart,arEnd);
  185. ['nTrialspEtoI: ' num2str(jj) ' nTrialsE: ' num2str(j) ' probE: ' num2str(prbE) ' probI: ' num2str(prbI) ' freqE: ' num2str(meanF) ]
  186. dM(jj,j,1)=prbE;
  187. dM(jj,j,2) = prbI;
  188. dM(jj,j,3) = meanE;
  189. dM(jj,j,4)=meanI;
  190. dM(jj,j,5)=meanF;
  191. dM(jj,j,6)=stdF;
  192. end
  193. figure(300);errorbar(x,dM(jj,:,5),dM(jj,:,6),'-sqk','MarkerFace','k');axis([min(x) max(x) -2 60]);xlabel('sensory Feature','FontSize',20);ylabel('firing rate','FontSize',20)
  194. end
  195. save('Fig4B.mat','dM');
  196. toc
  197. %% Figure 4C
  198. gMode=1;
  199. totalTime=1000;delT=0.01;Rec_length=round(totalTime/delT);time=delT*(1:Rec_length); %time related variables in ms
  200. arStart=round(0.2*Rec_length);arEnd=round(0.8*Rec_length);
  201. %-----------constants----------------------
  202. gEmax=0.0103; gImax=gEmax; %synaptic current peaks (current clamp); 250µV PSPs
  203. %----set up parameters to vary--------
  204. sweeps=100;
  205. nTrialsE=20;
  206. x=linspace(2,8,nTrialsE);
  207. xctr=round(mean(x));sigX=1.5;
  208. kScalar=[0 0.2 0.4];
  209. nTrialsK=numel(kScalar);
  210. aScalar=0.35;
  211. dM=zeros(nTrialsK,nTrialsE,6);
  212. rE=50;
  213. k=1;
  214. piEtoI=0.35;
  215. tic
  216. figure(300);clf;hold on;
  217. for jj=1:nTrialsK
  218. probE=aScalar*exp(-0.5*((x-xctr)/sigX).^2);
  219. k=kScalar(jj)*probE;
  220. for j=1:nTrialsE
  221. [prbE,prbEstd,meanE,stdE,prbI,prbIstd,meanI,stdI,meanF,stdF]=goB(k(j),kq,probE(j),piEtoI,rE,gEmax,gImax,gMode,sweeps,arStart,arEnd);
  222. ['nTrialsI: ' num2str(jj) ' nTrialsE: ' num2str(j) ' probE: ' num2str(prbE) ' probI: ' num2str(prbI) ' k: ' num2str(k(j)) ' freqE: ' num2str(meanF) ]
  223. dM(jj,j,1)=prbE;
  224. dM(jj,j,2) = prbI;
  225. dM(jj,j,3) = meanE;
  226. dM(jj,j,4)=meanI;
  227. dM(jj,j,5)=meanF;
  228. dM(jj,j,6)=stdF;
  229. end
  230. figure(300);errorbar(x,dM(jj,:,5),dM(jj,:,6),'-sqk','MarkerFace','k');axis([min(x) max(x) -2 60]);xlabel('sensory Feature','FontSize',20);ylabel('firing rate','FontSize',20)
  231. end
  232. save('Fig4C.mat','dM');
  233. toc
  234. %% Figure 4D
  235. gMode=1;
  236. totalTime=1000;delT=0.01;Rec_length=round(totalTime/delT);time=delT*(1:Rec_length); %time related variables in ms
  237. arStart=round(0.2*Rec_length);arEnd=round(0.8*Rec_length);
  238. %-----------constants----------------------
  239. gEmax=0.0103; gImax=gEmax; %synaptic current peaks (current clamp); 250µV PSPs
  240. %----set up parameters to vary--------
  241. sweeps=100;
  242. nTrialsE=20;
  243. x=linspace(2,8,nTrialsE);
  244. xctr=round(mean(x));sigX=1.5;
  245. pEtoI=[0.7 0.8 0.9];
  246. nTrialspEtoI=numel(pEtoI);
  247. k=0.2;kq=1;
  248. rE=50;
  249. aScalar=0.35;
  250. dM=zeros(nTrialspEtoI,nTrialsE,6);
  251. tic
  252. figure(300);clf;hold on;
  253. probE=aScalar*exp(-0.5*((x-xctr)/sigX).^2);
  254. for jj=1:nTrialspEtoI
  255. piEtoI=pEtoI(jj)*probE;
  256. for j=1:nTrialsE
  257. [prbE,prbEstd,meanE,stdE,prbI,prbIstd,meanI,stdI,meanF,stdF]=goB(k,kq,probE(j),piEtoI(j),rE,gEmax,gImax,gMode,sweeps,arStart,arEnd);
  258. ['nTrialspEtoI: ' num2str(jj) ' nTrialsE: ' num2str(j) ' probE: ' num2str(prbE) ' probI: ' num2str(prbI) ' freqE: ' num2str(meanF) ]
  259. dM(jj,j,1)=prbE;
  260. dM(jj,j,2) = prbI;
  261. dM(jj,j,3) = meanE;
  262. dM(jj,j,4)=meanI;
  263. dM(jj,j,5)=meanF;
  264. dM(jj,j,6)=stdF;
  265. end
  266. pause(0.1);
  267. errorbar(x,dM(jj,:,5),dM(jj,:,6),'-sqk','MarkerFace','k');axis([min(x) max(x) -2 60]);xlabel('sensory Feature','FontSize',20);ylabel('firing rate','FontSize',20)
  268. end
  269. save('Fig4D.mat','dM');
  270. toc
  271. %% Figure 5
  272. totalTime=120;delT=0.01;Rec_length=round(totalTime/delT);time=delT*(1:Rec_length); %time related variables in ms
  273. histE=zeros(1,Rec_length);
  274. rE=50;rI=rE;gEmax=0.0103; gImax=gEmax;
  275. %----parameters to vary
  276. sweeps=1000;
  277. pE=1;% steady-state excitatory probability
  278. delE=5;delI=5; % relative delay (onset);example: if delE=5, delI=7 then inhibition occurs 2 ms after excitation
  279. rmpE=round(20);rmpI=rmpE; %ramp duration in ms
  280. nE=250;nI=nE;
  281. [pEt,pIt]=ramp(delE,delI,rmpE,rmpI,totalTime);
  282. pEt=pE*smooth(pEt,500);pEt=pEt';
  283. pIt=pE*smooth(pIt,500);pIt=pIt';
  284. pNt=pEt.*(1-pIt);
  285. tic
  286. for sw=1:sweeps
  287. gE=gEmax*genPSPtrain(pEt,rE,nE,totalTime,delT);
  288. gI=gImax*genPSPtrain(pEt.*pIt,rI,nI,totalTime,delT);
  289. v=LIF(gE,gI,1,Rec_length,delT,1);
  290. histE(find(v>=0))= histE(find(v>=0))+1;
  291. end
  292. figure(1);clf;hold on;subplot(2,1,1);hold on;plot(time,pEt,'b','lineWidth',2);plot(time,pIt,'--r','lineWidth',3);plot(time,pNt,'k','lineWidth',2);axis([0 120 0 1]);
  293. xlabel('time (ms)','FontSize',20);ylabel('Prob','FontSize',20);lgd=legend('pE','pI','pNet');lgd.Title.FontSize = 14;
  294. subplot(2,1,2);stem(time,histE,'k','Marker','none');xlabel('time (ms)','FontSize',20);ylabel('counts','FontSize',20);xlim([0 120]);
  295. h=figure(1);savefig(h,'fig5');
  296. toc
  297. %% common functions
  298. function [gdIn]=genPSPtrain(probIn,r,n,totalTime,delT)
  299. Rec_length=round(totalTime/delT);
  300. ptau=2.0;impLength=round(25/delT);t=(1:impLength);
  301. uPSP=(delT*t/ptau).*exp(1-t*delT/ptau);
  302. gdIn=zeros(1,numel(probIn));gdI=gdIn;gImpE=zeros(1,round(25/delT));
  303. %train=binornd(nE,tR*delT*0.001*probIn);
  304. train=poissrnd(n*r*delT*0.001*probIn);
  305. gdIn = conv(train,uPSP);
  306. gdIn(Rec_length+1:numel(gdIn))=[];
  307. end
  308. function [envE,envI]=ramp(delE,delI,rmpE,rmpI,totalTime)
  309. delT=0.01;rampDur=rmpE;del=round(delE/delT);
  310. Rec_length=round(totalTime/delT);envE=zeros(1,Rec_length);
  311. dur=round((totalTime-2*rampDur-2*delE)/delT);rLength=round(rampDur/delT);m=1/rLength;xEnd = rLength+del+1+dur-100;
  312. envE(del:rLength+(del))=(1/rLength)*(del:del+rLength)-(1/rLength)*del;
  313. envE(rLength+del+1:xEnd)=1;
  314. envE(xEnd:rLength+xEnd-1)=-m*(xEnd:rLength+xEnd-1)+m*(xEnd+rLength);
  315. delT=0.01;rampDur=rmpI;del=round(delI/delT);diffDel=(round(delE/delT)-round(delI/delT));
  316. Rec_length=round(totalTime/delT);envI=zeros(1,Rec_length);
  317. dur=round((totalTime-2*rampDur-2*delI)/delT)-diffDel;rLength=round(rampDur/delT);m=1/rLength;
  318. xEnd = rLength+del+1+dur-100-diffDel;
  319. envI(del:rLength+(del))=(1/rLength)*(del:del+rLength)-(1/rLength)*del;
  320. envI(rLength+del+1:xEnd)=1;
  321. envI(xEnd:rLength+xEnd-1)=-m*(xEnd:rLength+xEnd-1)+m*(xEnd+rLength);
  322. end
  323. function [pEt,pIt,rI,vE]=go(kn,kq,pE,pEtoI,rE,nE,gMode,gEmax,gImax,delT,Rec_length)
  324. %--constants,vectors, matrices-------
  325. nI=kn*nE; %number of inhibitory cells
  326. vE=zeros(1,Rec_length); vI=vE;%voltage traces
  327. spkI=zeros(1,Rec_length);
  328. totalTime=delT*Rec_length;
  329. %---synaptic parameters-------
  330. gE=zeros(1,Rec_length);gI=kq*gE; %synaptic conductances
  331. pEt=zeros(1,Rec_length); pIt=pEt;%probability traces
  332. %-----make template synaptic current; alpha function------
  333. ptau=2;t=(1:Rec_length); uPSP=1*(delT*t/ptau).*exp(1-t*delT/ptau);
  334. %------make a bank of inhibitory inputs to E cells---
  335. %simulate the activities of I cells and store in matrices
  336. numWaves=3*nI; %3x as many as needed; goes slower if increases
  337. spkIbank=zeros(numWaves,Rec_length); %matrices to store spikes
  338. for nn=1:numWaves
  339. train=poissrnd(pEtoI*rE*nE*delT*0.001,[1 Rec_length]); %when pE=1
  340. gE=gEmax*conv(train,uPSP);gE(Rec_length+1:numel(gE))=[];
  341. vI=LIF(gE,0*gI,gMode,Rec_length,delT,1); %with (1) or without (0) spikes
  342. spkIbank(nn,(find(vI>=0)))=spkIbank(nn,(find(vI>=0)))+1;
  343. end
  344. rI=1000*sum(sum(spkIbank(:,:)))/(numWaves*totalTime); %average firing rate of inhibitory cells
  345. %-------calculate E and I inputs to reference cell-----------
  346. gI=gI*0;
  347. lambda = rE*nE*delT*0.001;
  348. train=poissrnd(pE*lambda,[1 Rec_length]);
  349. cPSP=conv(train,uPSP);cPSP(Rec_length+1:numel(cPSP))=[];
  350. pEt=cPSP/(sum(uPSP)*lambda);% calculate excitatory probability time course
  351. gE=gEmax*cPSP;
  352. Ilist=randperm(numWaves,nI); %pick random set of nI inhibitory inputs from bank
  353. for ii=1:numel(Ilist)
  354. spkI=spkI+spkIbank(Ilist(ii),:);
  355. end
  356. cPSP=conv(spkI,uPSP);cPSP(Rec_length+1:numel(cPSP))=[];
  357. pIt=cPSP/(sum(uPSP)*lambda);
  358. gI=gImax*cPSP;%conv(spkI,kq*uPSP);gI(Rec_length+1:numel(gI))=[];
  359. vE=LIF(gE,pE*gI,gMode,Rec_length,delT,1);
  360. %nEspks=sum(vE>-10); %count number of evoked spikes
  361. end
  362. function [prbE,prbEstd,meanE,stdE,prbI,prbIstd,meanI,stdI,meanF,stdF]=goB(kval,kq,prbE,pIX, tR,gEmax,gImax,gMode,sweeps,arStart,arEnd)
  363. nE=250;nI=nE;delT=0.01;totalTime=1000;Rec_length=round(totalTime/delT); IRh=0.2;q=0.0557;tau=10;
  364. lambda=nE*tR*delT*0.001; %used for Poisson train
  365. vE=zeros(1,Rec_length);vI=vE;freqN=zeros(1,Rec_length);
  366. gE=zeros(1,Rec_length);gI=gE;
  367. ptau=2;t=(1:Rec_length); uPSP=(delT*t/ptau).*exp(1-t*delT/ptau); imp=exp(-t/500);imp=imp/sum(imp);
  368. knI=round(kval*nI);
  369. kswps=3*knI; spkIbank=zeros(kswps,Rec_length);
  370. nIspks=0;nMaxspks=0;
  371. for nn=1:kswps %rI
  372. train=poissrnd(nE*tR*delT*0.001*pIX,1,Rec_length);
  373. gE = gEmax*conv(train,uPSP);gE(Rec_length+1:numel(gE))=[];
  374. vI=LIF(gE,0*gI,1,Rec_length,delT,1) ;
  375. spkIbank(nn,(find(vI>=0)))=spkIbank(nn,(find(vI>=0)))+1;
  376. nMaxspks=nMaxspks+sum(vI(arStart:arEnd)>-10);
  377. if(sum(vI>-10))>0
  378. nIspks=nIspks+1;
  379. end
  380. end
  381. nMaxspks=nMaxspks/kswps;
  382. rI=nMaxspks/((arEnd-arStart)*delT/1000);
  383. ppI=nIspks/kswps;
  384. %-----make unitary PSP template--------
  385. ptau=2;t=(1:Rec_length);
  386. uPSP=(delT*t/ptau).*exp(1-t*delT/ptau);
  387. nEspks=0;nEspksPred=0;freqIavg=0;spkMatrix=zeros(4,sweeps);
  388. q=sum(gEmax*uPSP)*delT;
  389. fspks=zeros(1,sweeps);
  390. for sw=1:sweeps
  391. gIhisto=zeros(1,Rec_length);
  392. Ilist=randperm(kswps,knI);
  393. for nn=1:knI
  394. gIhisto=gIhisto+spkIbank(Ilist(nn),:);
  395. end
  396. cPSP=conv(gIhisto,kq*uPSP);cPSP(Rec_length+1:numel(cPSP))=[];
  397. pIt=cPSP/(sum(uPSP)*lambda);
  398. gI=gImax*cPSP;%conv(spkI,kq*uPSP);gI(Rec_length+1:numel(gI))=[];
  399. spkMatrix(3,sw)=mean(pIt(arStart:arEnd)); %mean I prob
  400. spkMatrix(4,sw)=mean(gI(arStart:arEnd)); %mean I current
  401. gI=gI*prbE;%conditioned on pE
  402. train=poissrnd(lambda*prbE,1,Rec_length);
  403. cPSP=conv(train,uPSP);cPSP(Rec_length+1:numel(cPSP))=[];
  404. pEt=cPSP/(sum(uPSP)*lambda);% calculate excitatory probability time course
  405. gE = gEmax*cPSP;%conv(train,uPSP);gE(Rec_length+1:numel(gE))=[];
  406. spkMatrix(1,sw)=mean(pEt(arStart:arEnd)); %mean E prob
  407. spkMatrix(2,sw)=mean(gE(arStart:arEnd)); %mean E current
  408. vE=LIF(gE,gI,1,Rec_length,delT,1);%figure(101);clf;hold on;plot(vE,'b');
  409. nEspks=sum(vE>-10);
  410. spkMatrix(5,sw)=1000*nEspks/totalTime; %firing rate in Hz
  411. end
  412. prbE=mean(spkMatrix(1,:));prbEstd=std(spkMatrix(1,:));
  413. meanE=mean(spkMatrix(2,:))/sweeps;stdE=std(spkMatrix(2,:));
  414. prbI=mean(spkMatrix(3,:));prbIstd=std(spkMatrix(3,:));
  415. meanI=mean(spkMatrix(4,:))/sweeps;stdI=std(spkMatrix(4,:));
  416. meanF=mean(spkMatrix(5,:));stdF=std(spkMatrix(5,:));
  417. end
  418. function v=LIF(gexc,ginh,gMode,Rec_length,delT,spkOn)
  419. tau=10;R=75;El=-70;vTh=-55; %LIF parameters
  420. v=zeros(1,Rec_length)+El;Isyn=0*v;
  421. i=2;
  422. while (i<=Rec_length)
  423. if gMode==2 %conductance mode
  424. Isyn(i)=gexc(i)*(v(i-1)-0)+ginh(i)*(v(i-1)+80);
  425. end
  426. if gMode==1 %current clamp mode
  427. Isyn(i)=-(gexc(i)-ginh(i));
  428. end
  429. delV=(-(v(i-1)-El)-R*(Isyn(i)))*(delT/tau);
  430. v(i)=v(i-1)+delV;
  431. if spkOn==1 %generate spikes?
  432. if (v(i)>vTh)
  433. v(i)=0;
  434. v(i+1)=El;
  435. i=i+1;
  436. end
  437. end
  438. i=i+1;
  439. end
  440. end

ScriptsPlos_sustained_final.m at commit 555de40, under MIT · at the source

Overview

Authors: Alex D Reyes1
ORCID iDs: Alex D Reyes
  1. Center for Neural Science, New York University, New York, New York, United States of America
Institutions: New York University (United States)
Journal: PLoS computational biology, volume 22, issue 3, article e1013958
Dates: received 16 May 2025; accepted 29 January 2026; published online 9 March 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1371/journal.pcbi.1013958 · PMID 41802014 · PMCID PMC12998957 · OpenAlex W7134237319
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: computational modeling (no new data) (modality), human (organism), computational (subfield)
Methods: Evoked potentials, Single-unit activity, calcium imaging
MeSH: Models, Neurological*, Nerve Net*, Neural Inhibition*, Neurons*, Action Potentials, Animals, Computational Biology, Computer Simulation, Humans (* major topic)
Topic: Neural dynamics and brain function (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: National Institute of Health Sciences (1 R01 MH129031-01)
Citations: not cited yet (Europe PMC); 79 references in the paper

Abstract

In sensory systems, stimuli are represented through the diverse firing responses and receptive fields of neurons. These features emerge from the interaction between excitatory (E) and inhibitory (I) neuron populations within the network. Changes in sensory inputs alter this balance, leading to shifts in firing patterns and the input-output properties of individual neurons and the network. Although these phenomena have been extensively investigated experimentally and theoretically, the principles governing how E and I inputs are integrated remain unclear. Here, probabilistic rules are derived to describe how neurons in feedforward inhibitory circuits combine these inputs to generate stimulus-evoked responses. This simple model is broadly applicable, capturing a wide range of response features that would otherwise require multiple separate models, and offers insights into the cellular and network mechanisms influencing the input-output properties of neurons, gain modulation, and the emergence of diverse temporal firing patterns.

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 1 match between paragraphs and lines of code.

AlexDReyes/ReyesPlosCompBio2025

License: MIT
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: 555de40e74a771eea36c941cdbc9558e08653bd3, 2 February 2026
Languages: MATLAB (2)
Size: 4 files, 2 scripts
Software Heritage: not archived
Found in: “Data Availability”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
4 files

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;
  • 1 match 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

No dataset and no data link were found in the paper.

Data Availability

The source code and data used to produce the results and analyses presented in this manuscript are available on a Github repository at https://github.com/AlexDReyes/ReyesPlosCompBio2025.git.

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, 30 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 1 author, 9 MeSH terms, 1 funder, 77 references.

Cite

This paper

Reyes, A. D. (2026). Computing the effects of excitatory-inhibitory balance on neuronal input-output properties. PLoS computational biology, 22(3), e1013958. https://doi.org/10.1371/journal.pcbi.1013958

BibTeX

@article{reyes2026computing,
author = {Reyes, Alex D},
title = {{Computing the effects of excitatory-inhibitory balance on neuronal input-output properties}},
journal = {PLoS computational biology},
year = {2026},
month = mar,
volume = {22},
number = {3},
pages = {e1013958},
publisher = {PLOS},
issn = {1553-734X},
doi = {10.1371/journal.pcbi.1013958},
url = {https://doi.org/10.1371/journal.pcbi.1013958},
pmid = {41802014},
pmcid = {PMC12998957}
}

RIS

TY - JOUR
AU - Reyes, Alex D
TI - Computing the effects of excitatory-inhibitory balance on neuronal input-output properties
T2 - PLoS computational biology
J2 - PLoS Comput Biol
PY - 2026
DA - 2026/03/09
VL - 22
IS - 3
SP - e1013958
SN - 1553-734X
PB - PLOS
DO - 10.1371/journal.pcbi.1013958
UR - https://doi.org/10.1371/journal.pcbi.1013958
LA - en
ER -

CSL-JSON

{
"id": "10.1371/journal.pcbi.1013958",
"type": "article-journal",
"title": "Computing the effects of excitatory-inhibitory balance on neuronal input-output properties",
"container-title": "PLoS computational biology",
"author": [
{
"family": "Reyes",
"given": "Alex D"
}
],
"container-title-short": "PLoS Comput Biol",
"volume": "22",
"issue": "3",
"page": "e1013958",
"DOI": "10.1371/journal.pcbi.1013958",
"PMID": "41802014",
"PMCID": "PMC12998957",
"ISSN": "1553-734X",
"publisher": "PLOS",
"URL": "https://doi.org/10.1371/journal.pcbi.1013958",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
9
]
]
}
}

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.7554/elife.95562 [code]
Spatially targeted inhibitory rhythms differentially affect neuronal integration.
Journal: eLife
In common: 7 references
[2] doi:10.1038/s41562-026-02414-7 [code]
Optimized feature gains explain and predict successes and failures of human selective listening.
Journal: Nature human behaviour
In common: 4 references
[3] doi:10.1038/s41467-026-71842-w [code]
Layer-specific attentional modulation in the human primary somatosensory cortex.
Journal: Nature communications
In common: 4 references
[4] doi:10.7554/elife.107099 [code]
Local inhibitory dynamics underpin temporal integration and functional segregation between barrels and septa in the mouse barrel cortex.
Journal: eLife
In common: 3 references
[5] doi:10.1038/s41467-026-72146-9 [code]
Modeling attention and binding in the brain through bidirectional recurrent gating.
Journal: Nature communications
In common: 3 references
[6] doi:10.1016/j.isci.2026.116125 [code]
Post-synaptic facilitation and network dynamics underlying stimulus-specific combination sensitivity.
Journal: iScience
In common: 3 references
[7] doi:10.1371/journal.pbio.3003707 [code]
Behavioral engagement facilitates auditory neuron responses beyond their receptive fields.
Journal: PLoS biology
In common: 3 references
[8] doi:10.1038/s41467-026-70354-x [code]
Global error signal guides local optimization in mismatch calculation.
Journal: Nature communications
In common: computational modeling (no new data), 2 references
[9] doi:10.1371/journal.pcbi.1014378 [code]
A mean-field model of neural networks with PV and SOM interneurons reveals connectivity-based mechanisms of gamma oscillations.
Journal: PLoS computational biology
In common: computational, 2 references
[10] doi:10.1371/journal.pbio.3003789 [code]
Encoding performance of cortical neurons critically depends on their morphological and neurophysiological properties.
Journal: PLoS biology
In common: 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.

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.