OSCR

Dynamics-informed priors (DIP) for neural mass modelling.

Code ↔ Paper

4 matches 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 4 matches
  1. [1] § Methods › Datasets ↔ plot_spectra_params.m, lines 229–268 · score 0.68 · power spectral densities, frequency bins, resolution, post LTG, lamotrigine, levetiracetam
  2. [2] § Methods › Datasets ↔ Spectra/final_spectra_gen.m, lines 3–83 · score 0.66 · post treatment, pre treatment, segmented, drug, baseline, 45 Hz
  3. [3] § Methods › Parameter estimation ↔ Simulations/Cost_lansdcapes/R1_De/DIP_DCM_25_fixed_params/spm_nlsi_GN.m, lines 1–60 · score 0.65 · variational Laplace, free energy, generative models, Gaussian, inversion, log
  4. [4] § Methods › Parameter estimation ↔ Simulations/Cost_lansdcapes/R1_De/DIP_DCM_25_fixed_params/spm_nlsi_GN.m, lines 1–60 · score 0.60 · free energy, generative models, Gaussian, covariance, variational, Bayesian

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 · 613 lines · 19 KB · GPL-3.0 · 2 matches

  1. function [Ep,Cp,Eh,F,L,dFdp,dFdpp] = spm_nlsi_GN(M,U,Y)
  2. % Bayesian inversion of nonlinear models - Gauss-Newton/Variational Laplace
  3. % FORMAT [Ep,Cp,Eh,F] = spm_nlsi_GN(M,U,Y)
  4. %
  5. % [Dynamic] MIMO models
  6. %__________________________________________________________________________
  7. %
  8. % M.IS - function name f(P,M,U) - generative model
  9. % This function specifies the nonlinear model:
  10. % y = Y.y = IS(P,M,U) + X0*P0 + e
  11. % where e ~ N(0,C). For dynamic systems this would be an integration
  12. % scheme (e.g. spm_int). spm_int expects the following:
  13. %
  14. % M.f - f(x,u,P,M)
  15. % M.g - g(x,u,P,M)
  16. % M.h - h(x,u,P,M)
  17. % x - state variables
  18. % u - inputs or causes
  19. % P - free parameters
  20. % M - fixed functional forms and parameters in M
  21. %
  22. % M.FS - function name f(y,M) - feature selection
  23. % This [optional] function performs feature selection assuming the
  24. % generalized model y = FS(y,M) = FS(IS(P,M,U),M) + X0*P0 + e
  25. %
  26. % M.P - starting estimates for model parameters [optional]
  27. %
  28. % M.pE - prior expectation - E{P} of model parameters
  29. % M.pC - prior covariance - Cov{P} of model parameters
  30. %
  31. % M.hE - prior expectation - E{h} of log-precision parameters
  32. % M.hC - prior covariance - Cov{h} of log-precision parameters
  33. %
  34. % U.u - inputs (or just U)
  35. % U.dt - sampling interval
  36. %
  37. % Y.y - outputs (samples x observations x ...)
  38. % Y.dt - sampling interval for outputs
  39. % Y.X0 - confounds or null space (over size(y,1) samples or all vec(y))
  40. % Y.Q - q error precision components (over size(y,1) samples or all vec(y))
  41. %
  42. %
  43. % Parameter estimates
  44. %--------------------------------------------------------------------------
  45. % Ep - (p x 1) conditional expectation E{P|y}
  46. % Cp - (p x p) conditional covariance Cov{P|y}
  47. % Eh - (q x 1) conditional log-precisions E{h|y}
  48. %
  49. % log evidence
  50. %--------------------------------------------------------------------------
  51. % F - [-ve] free energy F = log evidence = p(y|f,g,pE,pC) = p(y|m)
  52. %
  53. %__________________________________________________________________________
  54. % Returns the moments of the posterior p.d.f. of the parameters of a
  55. % nonlinear model specified by IS(P,M,U) under Gaussian assumptions.
  56. % Usually, IS is an integrator of a dynamic MIMO input-state-output model
  57. %
  58. % dx/dt = f(x,u,P)
  59. % y = g(x,u,P) + X0*P0 + e
  60. %
  61. % A static nonlinear observation model with fixed input or causes u
  62. % obtains when x = []. i.e.
  63. %
  64. % y = g([],u,P) + X0*P0e + e
  65. %
  66. % but static nonlinear models are specified more simply using
  67. %
  68. % y = IS(P,M,U) + X0*P0 + e
  69. %
  70. % Priors on the free parameters P are specified in terms of expectation pE
  71. % and covariance pC. The E-Step uses a Fisher-Scoring scheme and a Laplace
  72. % approximation to estimate the conditional expectation and covariance of P
  73. % If the free-energy starts to increase, an abbreviated descent is
  74. % invoked. The M-Step estimates the precision components of e, in terms
  75. % of log-precisions. Although these two steps can be thought of in
  76. % terms of E and N steps they are in fact variational steps of a full
  77. % variational Laplace scheme that accommodates conditional uncertainty
  78. % over both parameters and log precisions (c.f. hyperparameters with hyper
  79. % priors)
  80. %
  81. % An optional feature selection can be specified with parameters M.FS.
  82. %
  83. % For generic aspects of the scheme see:
  84. %
  85. % Friston K, Mattout J, Trujillo-Barreto N, Ashburner J, Penny W.
  86. % Variational free energy and the Laplace approximation.
  87. % NeuroImage. 2007 Jan 1;34(1):220-34.
  88. %
  89. % This scheme handels complex data along the lines originally described in:
  90. %
  91. % Sehpard RJ, Lordan BP, and Grant EH.
  92. % Least squares analysis of complex data with applications to permittivity
  93. % measurements.
  94. % J. Phys. D. Appl. Phys 1970 3:1759-1764.
  95. %
  96. %__________________________________________________________________________
  97. % Copyright (C) 2001-2015 Wellcome Trust Centre for Neuroimaging
  98. % Karl Friston
  99. % $Id: spm_nlsi_GN.m 7279 2018-03-10 21:22:44Z karl $
  100. % options
  101. %--------------------------------------------------------------------------
  102. try, M.nograph; catch, M.nograph = 0; end
  103. try, M.noprint; catch, M.noprint = 0; end
  104. try, M.Nmax; catch, M.Nmax = 128; end
  105. % figure (unless disabled)
  106. %--------------------------------------------------------------------------
  107. if ~M.nograph
  108. Fsi = spm_figure('GetWin','SI');
  109. end
  110. % check integrator
  111. %--------------------------------------------------------------------------
  112. try
  113. M.IS;
  114. catch
  115. M.IS = 'spm_int';
  116. end
  117. % composition of feature selection and prediction (usually an integrator)
  118. %--------------------------------------------------------------------------
  119. try
  120. y = Y.y;
  121. catch
  122. y = Y;
  123. end
  124. try
  125. % try FS(y,M)
  126. %----------------------------------------------------------------------
  127. try
  128. y = feval(M.FS,y,M);
  129. IS = inline([M.FS '(' M.IS '(P,M,U),M)'],'P','M','U');
  130. % try FS(y)
  131. %------------------------------------------------------------------
  132. catch
  133. y = feval(M.FS,y);
  134. IS = inline([M.FS '(' M.IS '(P,M,U))'],'P','M','U');
  135. end
  136. catch
  137. % otherwise FS(y) = y
  138. %----------------------------------------------------------------------
  139. try
  140. IS = inline([M.IS '(P,M,U)'],'P','M','U');
  141. catch
  142. IS = M.IS;
  143. end
  144. end
  145. % converted to function handle
  146. %--------------------------------------------------------------------------
  147. IS = spm_funcheck(IS);
  148. % paramter update eqation
  149. %--------------------------------------------------------------------------
  150. if isfield(M,'f'), M.f = spm_funcheck(M.f); end
  151. if isfield(M,'g'), M.g = spm_funcheck(M.g); end
  152. if isfield(M,'h'), M.h = spm_funcheck(M.h); end
  153. % size of data (samples x response component x response component ...)
  154. %--------------------------------------------------------------------------
  155. if iscell(y)
  156. ns = size(y{1},1);
  157. else
  158. ns = size(y,1);
  159. end
  160. ny = length(spm_vec(y)); % total number of response variables
  161. nr = ny/ns; % number response components
  162. M.ns = ns; % number of samples M.ns
  163. % initial states
  164. %--------------------------------------------------------------------------
  165. try
  166. M.x;
  167. catch
  168. if ~isfield(M,'n'), M.n = 0; end
  169. M.x = sparse(M.n,1);
  170. end
  171. % input
  172. %--------------------------------------------------------------------------
  173. try
  174. U;
  175. catch
  176. U = [];
  177. end
  178. % initial parameters
  179. %--------------------------------------------------------------------------
  180. try
  181. spm_vec(M.P) - spm_vec(M.pE);
  182. fprintf('\nParameter initialisation successful\n')
  183. catch
  184. M.P = M.pE;
  185. end
  186. % time-step
  187. %--------------------------------------------------------------------------
  188. try
  189. dt = Y.dt;
  190. catch
  191. dt = 1;
  192. end
  193. % precision components Q
  194. %--------------------------------------------------------------------------
  195. try
  196. Q = Y.Q;
  197. if isnumeric(Q), Q = {Q}; end
  198. catch
  199. Q = spm_Ce(ns*ones(1,nr));
  200. end
  201. nh = length(Q); % number of precision components
  202. nq = ny/length(Q{1}); % for compact Kronecker form of M-step
  203. % prior moments (assume uninformative priors if not specifed)
  204. %--------------------------------------------------------------------------
  205. pE = M.pE;
  206. try
  207. pC = M.pC;
  208. catch
  209. np = spm_length(M.pE);
  210. pC = speye(np,np)*exp(16);
  211. end
  212. % confounds (if specified)
  213. %--------------------------------------------------------------------------
  214. try
  215. nb = size(Y.X0,1); % number of bins
  216. nx = ny/nb; % number of blocks
  217. dfdu = kron(speye(nx,nx),Y.X0);
  218. catch
  219. dfdu = sparse(ny,0);
  220. end
  221. if isempty(dfdu), dfdu = sparse(ny,0); end
  222. % hyperpriors - expectation (and initialize hyperparameters)
  223. %--------------------------------------------------------------------------
  224. try
  225. hE = M.hE;
  226. if length(hE) ~= nh
  227. hE = hE + sparse(nh,1);
  228. end
  229. catch
  230. hE = sparse(nh,1) - log(var(spm_vec(y))) + 4;
  231. end
  232. h = hE;
  233. % hyperpriors - covariance
  234. %--------------------------------------------------------------------------
  235. try
  236. ihC = spm_inv(M.hC);
  237. if length(ihC) ~= nh
  238. ihC = ihC*speye(nh,nh);
  239. end
  240. catch
  241. ihC = speye(nh,nh)*exp(4);
  242. end
  243. % unpack covariance
  244. %--------------------------------------------------------------------------
  245. if isstruct(pC);
  246. pC = spm_diag(spm_vec(pC));
  247. end
  248. % dimension reduction of parameter space
  249. %--------------------------------------------------------------------------
  250. V = spm_svd(pC,0);
  251. nu = size(dfdu,2); % number of parameters (confounds)
  252. np = size(V,2); % number of parameters (effective)
  253. ip = (1:np)';
  254. iu = (1:nu)' + np;
  255. % second-order moments (in reduced space)
  256. %--------------------------------------------------------------------------
  257. pC = V'*pC*V;
  258. uC = speye(nu,nu)/1e-8;
  259. ipC = inv(spm_cat(spm_diag({pC,uC})));
  260. % initialize conditional density
  261. %--------------------------------------------------------------------------
  262. Eu = spm_pinv(dfdu)*spm_vec(y);
  263. p = [V'*(spm_vec(M.P) - spm_vec(M.pE)); Eu];
  264. Ep = spm_unvec(spm_vec(pE) + V*p(ip),pE);
  265. % EM
  266. %==========================================================================
  267. criterion = [0 0 0 0];
  268. C.F = -Inf; % free energy
  269. v = -4; % log ascent rate
  270. dFdh = zeros(nh,1);
  271. dFdhh = zeros(nh,nh);
  272. for k = 1:M.Nmax
  273. % time
  274. %----------------------------------------------------------------------
  275. tStart = tic;
  276. % E-Step: prediction f, and gradients; dfdp
  277. %======================================================================
  278. try
  279. % gradients
  280. %------------------------------------------------------------------
  281. [dfdp,f] = spm_diff(IS,Ep,M,U,1,{V});
  282. dfdp = reshape(spm_vec(dfdp),ny,np);
  283. % check for stability
  284. %------------------------------------------------------------------
  285. normdfdp = norm(dfdp,'inf');
  286. revert = isnan(normdfdp) || normdfdp > exp(32);
  287. catch
  288. revert = true;
  289. end
  290. if revert && k > 1
  291. for i = 1:4
  292. % reset expansion point and increase regularization
  293. %--------------------------------------------------------------
  294. v = min(v - 2,-4);
  295. % E-Step: update
  296. %--------------------------------------------------------------
  297. p = C.p + spm_dx(dFdpp,dFdp,{v});
  298. Ep = spm_unvec(spm_vec(pE) + V*p(ip),pE);
  299. % try again
  300. %--------------------------------------------------------------
  301. try
  302. [dfdp,f] = spm_diff(IS,Ep,M,U,1,{V});
  303. dfdp = reshape(spm_vec(dfdp),ny,np);
  304. % check for stability
  305. %----------------------------------------------------------
  306. normdfdp = norm(dfdp,'inf');
  307. revert = isnan(normdfdp) || normdfdp > exp(32);
  308. catch
  309. revert = true;
  310. end
  311. % break
  312. %--------------------------------------------------------------
  313. if ~revert, break, end
  314. end
  315. end
  316. % convergence failure
  317. %----------------------------------------------------------------------
  318. if revert
  319. error('SPM:spm_nlsi_GN','Convergence failure.');
  320. end
  321. % prediction error and full gradients
  322. %----------------------------------------------------------------------
  323. e = spm_vec(y) - spm_vec(f) - dfdu*p(iu);
  324. J = -[dfdp dfdu];
  325. % M-step: Fisher scoring scheme to find h = max{F(p,h)}
  326. %======================================================================
  327. for m = 1:8
  328. % precision and conditional covariance
  329. %------------------------------------------------------------------
  330. iS = sparse(0);
  331. for i = 1:nh
  332. iS = iS + Q{i}*(exp(-32) + exp(h(i)));
  333. end
  334. S = spm_inv(iS);
  335. iS = kron(speye(nq),iS);
  336. Pp = real(J'*iS*J);
  337. Cp = spm_inv(Pp + ipC);
  338. % precision operators for M-Step
  339. %------------------------------------------------------------------
  340. for i = 1:nh
  341. P{i} = Q{i}*exp(h(i));
  342. PS{i} = P{i}*S;
  343. P{i} = kron(speye(nq),P{i});
  344. JPJ{i} = real(J'*P{i}*J);
  345. end
  346. % derivatives: dLdh = dL/dh,...
  347. %------------------------------------------------------------------
  348. for i = 1:nh
  349. dFdh(i,1) = trace(PS{i})*nq/2 ...
  350. - real(e'*P{i}*e)/2 ...
  351. - spm_trace(Cp,JPJ{i})/2;
  352. for j = i:nh
  353. dFdhh(i,j) = - spm_trace(PS{i},PS{j})*nq/2;
  354. dFdhh(j,i) = dFdhh(i,j);
  355. end
  356. end
  357. % add hyperpriors
  358. %------------------------------------------------------------------
  359. d = h - hE;
  360. dFdh = dFdh - ihC*d;
  361. dFdhh = dFdhh - ihC;
  362. Ch = spm_inv(real(-dFdhh));
  363. % update ReML estimate
  364. %------------------------------------------------------------------
  365. dh = spm_dx(dFdhh,dFdh,{4});
  366. dh = min(max(dh,-1),1);
  367. h = h + dh;
  368. % convergence
  369. %------------------------------------------------------------------
  370. dF = dFdh'*dh;
  371. if dF < 1e-2, break, end
  372. end
  373. % E-Step with Levenberg-Marquardt regularization
  374. %======================================================================
  375. % objective function: F(p) = log evidence - divergence
  376. %----------------------------------------------------------------------
  377. L(1) = spm_logdet(iS)*nq/2 - real(e'*iS*e)/2 - ny*log(8*atan(1))/2; ...
  378. L(2) = spm_logdet(ipC*Cp)/2 - p'*ipC*p/2;
  379. L(3) = spm_logdet(ihC*Ch)/2 - d'*ihC*d/2;
  380. F = sum(L);
  381. % record increases and reference log-evidence for reporting
  382. %----------------------------------------------------------------------
  383. try
  384. F0;
  385. if ~M.noprint
  386. fprintf(' actual: %.3e (%.2f sec)\n',full(F - C.F),toc(tStart))
  387. end
  388. catch
  389. F0 = F;
  390. end
  391. % if F has increased, update gradients and curvatures for E-Step
  392. %----------------------------------------------------------------------
  393. if F > C.F || k < 3
  394. % accept current estimates
  395. %------------------------------------------------------------------
  396. C.p = p;
  397. C.h = h;
  398. C.F = F;
  399. C.L = L;
  400. C.Cp = Cp;
  401. % E-Step: Conditional update of gradients and curvature
  402. %------------------------------------------------------------------
  403. dFdp = -real(J'*iS*e) - ipC*p;
  404. dFdpp = -real(J'*iS*J) - ipC;
  405. % decrease regularization
  406. %------------------------------------------------------------------
  407. v = min(v + 1/2,4);
  408. str = 'EM:(+)';
  409. else
  410. % reset expansion point
  411. %------------------------------------------------------------------
  412. p = C.p;
  413. h = C.h;
  414. Cp = C.Cp;
  415. % and increase regularization
  416. %------------------------------------------------------------------
  417. v = min(v - 2,-4);
  418. str = 'EM:(-)';
  419. end
  420. % E-Step: update
  421. %======================================================================
  422. dp = spm_dx(dFdpp,dFdp,{v});
  423. p = p + dp;
  424. Ep = spm_unvec(spm_vec(pE) + V*p(ip),pE);
  425. % Graphics
  426. %======================================================================
  427. if exist('Fsi', 'var')
  428. spm_figure('Select', Fsi)
  429. % reshape prediction if necessary
  430. %------------------------------------------------------------------
  431. e = spm_vec(e);
  432. f = spm_vec(f);
  433. try
  434. e = reshape(e,ns,nr);
  435. f = reshape(f,ns,nr);
  436. end
  437. % subplot prediction
  438. %------------------------------------------------------------------
  439. x = (1:size(e,1))*dt;
  440. xLab = 'time (seconds)';
  441. try
  442. if length(M.Hz) == ns
  443. x = M.Hz;
  444. xLab = 'Frequency (Hz)';
  445. end
  446. end
  447. % plot real or complex predictions
  448. %------------------------------------------------------------------
  449. tstr = sprintf('%s: %i','prediction and response: E-Step',k);
  450. if isreal(spm_vec(y))
  451. subplot(2,1,1)
  452. plot(x,real(f)), hold on
  453. plot(x,real(f + e),':'), hold off
  454. xlabel(xLab)
  455. title(tstr,'FontSize',16)
  456. grid on
  457. else
  458. subplot(2,2,1)
  459. plot(x,real(f)), hold on
  460. plot(x,real(f + e),':'), hold off
  461. xlabel(xLab)
  462. ylabel('real')
  463. title(tstr,'FontSize',16)
  464. grid on
  465. subplot(2,2,2)
  466. plot(x,imag(f)), hold on
  467. plot(x,imag(f + e),':'), hold off
  468. xlabel(xLab)
  469. ylabel('imaginary')
  470. title(tstr,'FontSize',16)
  471. grid on
  472. end
  473. % subplot parameters
  474. %--------------------------------------------------------------
  475. subplot(2,1,2)
  476. bar(full(V*p(ip)))
  477. xlabel('parameter')
  478. tstr = 'conditional [minus prior] expectation';
  479. title(tstr,'FontSize',16)
  480. grid on
  481. drawnow
  482. end
  483. % convergence
  484. %----------------------------------------------------------------------
  485. dF = dFdp'*dp;
  486. if ~M.noprint
  487. fprintf('%-6s: %i %6s %-6.3e %6s %.3e ',str,k,'F:',full(C.F - F0),'dF predicted:',full(dF))
  488. end
  489. criterion = [(dF < 1e-1) criterion(1:end - 1)];
  490. if all(criterion)
  491. if ~M.noprint
  492. fprintf(' convergence\n')
  493. end
  494. break
  495. end
  496. % F_all(k)=C.F;
  497. % Ep_all(1,k) = Ep.R(1);
  498. % Ep_all(2,k) = Ep.R(2);
  499. % Ep_all(3,k) = Ep.T(1);
  500. % Ep_all(4,k) = Ep.T(2);
  501. % Ep_all(5,k) = Ep.G;
  502. % Ep_all(6,k) = Ep.H(1);
  503. % Ep_all(7,k) = Ep.H(2);
  504. % Ep_all(8,k) = Ep.H(3);
  505. % Ep_all(9,k) = Ep.H(4);
  506. % Ep_all(10,k) = Ep.H(5);
  507. % Ep_all(11,k) = Ep.A{1};
  508. % Ep_all(12,k) = Ep.A{2};
  509. % Ep_all(13,k) = Ep.A{3};
  510. % Ep_all(14,k) = Ep.D;
  511. % Ep_all(15,k) = Ep.I;
  512. end
  513. if exist('Fsi', 'var')
  514. spm_figure('Focus', Fsi)
  515. end
  516. % outputs
  517. %--------------------------------------------------------------------------
  518. Ep = spm_unvec(spm_vec(pE) + V*C.p(ip),pE);
  519. Cp = V*C.Cp(ip,ip)*V';
  520. Eh = C.h;
  521. F = C.F;
  522. L = C.L;
  523. % F_all=F_all;
  524. % Ep_all=Ep_all;

spm_nlsi_GN.m at commit f00781c, under GPL-3.0 · at the source

Overview

  1. Department of Mathematics and Statistics, University of Exeter, Exeter, United Kingdom
  2. Living Systems Institute, University of Exeter, Exeter, United Kingdom
  3. Department of Basic and Clinical Neuroscience, King’s College London, London, United Kingdom
  4. Department of Psychology, Faculty of Health & Life Sciences, University of Exeter, Exeter, United Kingdom
Institutions: University of Exeter (United Kingdom); King's College London (United Kingdom)
Journal: Imaging neuroscience (Cambridge, Mass.), volume 4, article IMAG.a.1250
Dates: received 30 September 2025; accepted 27 April 2026; published online 29 May 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1162/imag.a.1250 · PMID 42232074 · PMCID PMC13224311 · OpenAlex W4414606096
Open access: diamond, a free copy (OpenAlex)
Status: code verified
Categories: EEG (modality), none (in silico) (organism), epilepsy (population)
Methods: Spectral & time-frequency, Preprocessing, Statistics, Single-unit activity, calcium imaging, Machine learning
Keywords: dynamic causal modelling, spectral analysis of M/EEG, variational Bayes, parameter estimation, genetic algorithms, pharmacodynamics of anti-seizure medication
Topic: Neural Networks and Applications (Artificial Intelligence, Computer Science), according to OpenAlex
Funding: EPSRC (UKRI1460, EP/T017856/1, 2407565); Wellcome grant (226709/Z/22/Z)
Citations: not cited yet (Europe PMC); 78 references in the paper

Abstract

Neural mass models (NMMs) are important mathematical tools for inferring hidden neural mechanisms that generate healthy and pathological brain activities. A critical step in the inference process is parameter estimation, which calibrates NMMs based on measured neuroimaging data. While parameter estimation can be conducted via various approaches, one of the most influential methods is dynamic causal modelling (DCM). DCM adopts a Bayesian inference approach that relies on, and is sensitive to, the specification of prior parameter distributions reflecting a priori hypotheses about the causes of data. However, most parameters of NMMs encode neuronal properties that are not directly measurable. For this reason, in the absence of sufficient empirical data and well-founded prior beliefs, inference becomes increasingly susceptible to bias. Therefore, it was imperative to establish a comprehensive strategy for mapping model parameters to data. This study proposes a computational extension of DCM, named DCM with dynamics-informed priors (DIP-DCM), which adopts a genetic algorithm (GA) to map parameter values to model dynamics. Optimal sub-regions of the parameter space were subsequently selected and translated into groups of parameter priors for DCM. DIP-DCM was compared with the “standard” DCM inference and to the standalone GA, using two independent neuroimaging datasets. Results indicated that DIP-DCM models were the best predictors of data and captured key mechanistic signatures of psychiatric disease and pharmacological interventions. Overall, DIP-DCM handled local minima and explored diverse parameter regimes following trajectories informed directly by model dynamics and data. This study suggests that DIP-DCM is an advantageous route to parameter estimation when information is limited, enabling a data-driven derivation of parameter priors in exploratory studies, across different biological contexts and datasets.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repositories

Its files are read in the Code ↔ Paper reader above, with 4 matches between paragraphs and lines of code.

AlessiaCaccamo/Figures_DIP_DCM_25

License: GPL-3.0
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: f00781c57bf551de87ebf5b17203045a259a276b, 18 March 2026
Languages: MATLAB (60)
Size: 165 files, 60 scripts
Software Heritage: not archived
Found in: “Data and Code Availability”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: SPM (14 files), Statistics and Machine Learning Toolbox (6 files), Optimization Toolbox (2 files), Violinplot-Matlab (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
62 files

AlessiaCaccamo/DIP_DCM_25

License: GPL-3.0
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: a148b5d5de0891a1dbb200d322809b27f017bf24, 2 October 2025
Languages: MATLAB (40)
Size: 46 files, 40 scripts
Software Heritage: not archived
Found in: “Data and Code Availability”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: SPM (8 files), Optimization Toolbox (2 files)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
42 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:

  • 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 100 scripts, each with its path and the digest of its content;
  • 4 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

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

Data and Code Availability

All analyses were conducted on data published previously by Biondi et al. (2022) and Shaw et al. (2020). Code used to generate figures including the database of parameter estimates can be found at https://github.com/AlessiaCaccamo/Figures_DIP_DCM_25.git. The DIP-DCM toolbox code is open source, under the terms of the GNU General Public License, and can be found at https://github.com/AlessiaCaccamo/DIP_DCM_25.git. This works on Windows, Linux, and macOS with an installed version of SPM12, and was not tested with other SPM versions. Code includes third-party functions (SPM, https://www.fil.ion.ucl.ac.uk/spm), with their respective copyright.

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

  • Authors: added Dominic M. Dunstan (0000-0003-1973-1404); Alexander D. Shaw (0000-0001-5741-7526); Marc Goodfellow (0000-0002-7282-7280); removed Dominic M. Dunstan; Alexander D. Shaw; Marc Goodfellow

Version 1, 28 September 2026: the first record

Recorded: type, language, journal, volume, pages, dates, 5 authors, 6 keywords, 2 funders, 76 references.

Cite

This paper

Caccamo, A., Dunstan, D. M., Richardson, M. P., Shaw, A. D., & Goodfellow, M. (2026). Dynamics-informed priors (DIP) for neural mass modelling. Imaging neuroscience (Cambridge, Mass.), 4, IMAG.a.1250. https://doi.org/10.1162/imag.a.1250

BibTeX

@article{caccamo2026dynamics,
author = {Caccamo, Alessia and Dunstan, Dominic M. and Richardson, Mark P. and Shaw, Alexander D. and Goodfellow, Marc},
title = {{Dynamics-informed priors (DIP) for neural mass modelling}},
journal = {Imaging neuroscience (Cambridge, Mass.)},
year = {2026},
month = may,
volume = {4},
pages = {IMAG.a.1250},
publisher = {MIT Press},
issn = {2837-6056},
doi = {10.1162/imag.a.1250},
url = {https://doi.org/10.1162/imag.a.1250},
pmid = {42232074},
pmcid = {PMC13224311}
}

RIS

TY - JOUR
AU - Caccamo, Alessia
AU - Dunstan, Dominic M.
AU - Richardson, Mark P.
AU - Shaw, Alexander D.
AU - Goodfellow, Marc
TI - Dynamics-informed priors (DIP) for neural mass modelling
T2 - Imaging neuroscience (Cambridge, Mass.)
J2 - Imaging Neurosci (Camb)
PY - 2026
DA - 2026/05/29
VL - 4
SP - IMAG.a.1250
SN - 2837-6056
PB - MIT Press
DO - 10.1162/imag.a.1250
UR - https://doi.org/10.1162/imag.a.1250
LA - en
ER -

CSL-JSON

{
"id": "10.1162/imag.a.1250",
"type": "article-journal",
"title": "Dynamics-informed priors (DIP) for neural mass modelling",
"container-title": "Imaging neuroscience (Cambridge, Mass.)",
"author": [
{
"family": "Caccamo",
"given": "Alessia"
},
{
"family": "Dunstan",
"given": "Dominic M."
},
{
"family": "Richardson",
"given": "Mark P."
},
{
"family": "Shaw",
"given": "Alexander D."
},
{
"family": "Goodfellow",
"given": "Marc"
}
],
"container-title-short": "Imaging Neurosci (Camb)",
"volume": "4",
"page": "IMAG.a.1250",
"DOI": "10.1162/imag.a.1250",
"PMID": "42232074",
"PMCID": "PMC13224311",
"ISSN": "2837-6056",
"publisher": "MIT Press",
"URL": "https://doi.org/10.1162/imag.a.1250",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
29
]
]
}
}

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.1162/imag.a.1249 [code]
Global search metaheuristics for neural mass model calibration.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Optimization Toolbox, Statistics and Machine Learning Toolbox, none (in silico), EEG, 9 references, 3 authors
[2] doi:10.1371/journal.pcbi.1014222 [code]
Neural population models for EEG: From Canonical models to alternative model structures.
Journal: PLoS computational biology
In common: EEG, 6 references
[3] doi:10.1007/s12021-025-09759-w [code]
Limitations of Variational Laplace-Based Dynamic Causal Modelling for Multistable Cortical Circuits.
Journal: Neuroinformatics
In common: SPM, Statistics and Machine Learning Toolbox, 4 references
[4] doi:10.1162/imag.a.1234 [code]
Multiscale parcellation of dynamic causal models of the brain.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: SPM, Statistics and Machine Learning Toolbox, 3 references
[5] doi:10.1038/s41467-026-76306-9 [code]
Non-invasive characterization of perivascular subarachnoid spaces.
Journal: Nature communications
In common: Violinplot-Matlab, Optimization Toolbox, SPM, 1 other tool
[6] doi:10.1016/j.bbih.2026.101299 [code]
Multimodal approach to identify neuropsychophysiological subgroups in myalgic encephalomyelitis/chronic fatigue syndrome and their relevance for rehabilitation: protocol for a mechanistic cross-sectional and longitudinal study.
Journal: Brain, behavior, & immunity - health
In common: Violinplot-Matlab, Optimization Toolbox, SPM, 1 other tool
[7] doi:10.1038/s41467-026-74565-0 [code]
The functional neurobiology of dispositions towards negative emotions.
Journal: Nature communications
In common: Violinplot-Matlab, Optimization Toolbox, SPM, 1 other tool
[8] doi:10.1002/hbm.70577 [code]
Disgust Propensity, Not Disgust Sensitivity, Shapes the Reactivity of a Subjective Disgust Circuit in Humans.
Journal: Human brain mapping
In common: Violinplot-Matlab, Optimization Toolbox, SPM, 1 other tool
[9] 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 communications
In common: Violinplot-Matlab, Optimization Toolbox, SPM, 1 other tool
[10] doi:10.1371/journal.pcbi.1014022 [code]
Emergence of multifrequency activity in a laminar neural mass model.
Journal: PLoS computational biology
In common: 4 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.