OSCR

Experience reorganizes content-specific memory traces in macaques.

Code ↔ Paper

25 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 25 matches · 13 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
  1. [1] § Methods › Decoding of neural population with linear SVM ↔ AbbaspoorAljishiHoffman2025/perpl_SVMClassificationNeuralPopulation.m, lines 1–86 · score 0.94 · linear SVM model, neural population, Bayesian optimization, objective evaluations, design matrix, cross validation
  2. [2] § Methods › Hidden Markov model of assembly activation ↔ AbbaspoorAljishiHoffman2025/perpl_MultistateHMM.m, the whole file · a weak match · score 0.91 · initial transition matrix, low high activation, emission matrix, avoid zero, row normalization, HMM
  3. [3] § Methods › Generalized linear modeling of cell assembly activity ↔ AbbaspoorAljishiHoffman2025/perpl_fitCellAssemblyGLM.m, the whole file · a weak match · score 0.89 · fitted GLMs, angular velocity, linear velocity, dependent variable, cell assembly, ordinal
  4. [4] § Methods › Detecting hippocampal SWRs and estimating ripple slope › Spectral analysis ↔ AbbaspoorHussinHoffman2023/Packages/buzcode-master/buzcode-master/externalPackages/FMAToolbox/Analyses/RippleStats.m, the whole file · a weak match · score 0.85 · instantaneous amplitude, ripple band, ripple peak, ripple frequency, peak frequency, ripple event
  5. [5] § Methods › Decoding of neural population with linear SVM ↔ AbbaspoorAljishiHoffman2025/perpl_selectSVMHyperparams.m, lines 1–53 · score 0.84 · fold cross validation, hyperparameter tuning, cross validation accuracy, BoxConstraints, SVM, linear
  6. [6] § Methods › Hidden Markov model of assembly activation ↔ AbbaspoorAljishiHoffman2025/perpl_MultistateHMM.m, the whole file · a weak match · score 0.83 · emission matrix, transition matrix, hmmtrain, hmmviterbi, tolerance, reordered
  7. [7] § Methods › Assembly drift (Kendall’s τ) › Trend estimation using the Theil–Sen estimator ↔ AbbaspoorHussinHoffman2023/Packages/buzcode-master/buzcode-master/externalPackages/FMAToolbox/General/CircularRegression.m, lines 1–123 · score 0.83 · Theil Sen, pairwise slopes, dependent variable, regression, intercept, minimizing
  8. [8] § Methods › Decoding of neural population with linear SVM ↔ AbbaspoorAljishiHoffman2025/perpl_SVMClassificationNeuralPopulation.m, lines 1–86 · score 0.82 · cross validation accuracy, cvLoss, linear SVM, fold, hyperparameter, tuning
  9. [9] § Methods › Detecting hippocampal SWRs and estimating ripple slope ↔ AbbaspoorHussinHoffman2023/Packages/buzcode-master/buzcode-master/detectors/detectEvents/bz_FindRipples.m, lines 1–128 · score 0.81 · inter ripple interval, normalized squared signal, ripple detection, hippocampal, thresholding, duration
  10. [10] § Methods › Detecting hippocampal SWRs and estimating ripple slope › Spectral analysis ↔ AbbaspoorHussinHoffman2023/Packages/buzcode-master/buzcode-master/analysis/lfp/SharpWaveRipples/bz_RippleStats.m, the whole file · a weak match · score 0.81 · instantaneous amplitude, ripple band, ripple peak, ripple frequency, peak frequency, properties
  11. [11] § Methods › Detecting hippocampal SWRs and estimating ripple slope ↔ AbbaspoorHussinHoffman2023/Packages/buzcode-master/buzcode-master/externalPackages/FMAToolbox/Analyses/FindRipples.m, lines 1–45 · score 0.75 · inter ripple interval, normalized squared signal, hippocampal, band, thresholding, duration
  12. [12] § Methods › Decoding of neural population with linear SVM ↔ AbbaspoorAljishiHoffman2025/perpl_SVMClassificationNeuralPopulation.m, lines 133–198 · score 0.71 · permutation accuracies, cross validation, SVM, bootstrapping, hyperparameters, permuted
  13. [13] § Methods › Classification of deep and superficial CA1 pyramidal cells ↔ AbbaspoorHoffman2024/perpl_classify_DeepSuperficial.m, lines 5–76 · score 0.67 · sharp wave, ripple power, reversal, depth, SWRs, superficial
  14. [14] § Methods › Detecting dynamic changes in neuron–assembly coupling ↔ AbbaspoorAljishiHoffman2025/Cell Assembly Detection/LopesdosSantos_AssemblyToolbox/assembly_patterns.m, the whole file · a weak match · score 0.67 · assembly detection, Assembly templates, spike matrices, cell assemblies, activity, neurons
  15. [15] § Methods › Detecting dynamic changes in neuron–assembly coupling ↔ AbbaspoorAljishiHoffman2025/Cell Assembly Detection/perpl_AssemblyDetection.m, the whole file · a weak match · score 0.66 · assembly detection, Assembly templates, spike matrices, cell assemblies, activity, sleep
  16. [16] § Network mechanisms of cell assembly dynamics ↔ AbbaspoorHussinHoffman2023/Packages/buzcode-master/buzcode-master/externalPackages/FMAToolbox/General/CircularRegression.m, lines 1–123 · score 0.65 · Theil Sen, best fitted, confidence intervals, pairwise, median, coefficient
  17. [17] § Methods › Assembly pattern identification and activation strength ↔ AbbaspoorAljishiHoffman2025/Cell Assembly Detection/LopesdosSantos_AssemblyToolbox/assembly_patterns.m, the whole file · a weak match · score 0.64 · fast ICA algorithm, assembly patterns, rows, activation, cell, matrix
  18. [18] § Newly learned and remotely learned sequences can be decoded from synchronized spiking ensembles ↔ AbbaspoorAljishiHoffman2025/perpl_fitCellAssemblyGLM.m, the whole file · a weak match · score 0.64 · behavioral outcomes, cell assemblies, GLM, covariance, fitted, predicted
  19. [19] § Physiological features of assembly member neurons ↔ AbbaspoorHussinHoffman2023/Packages/buzcode-master/buzcode-master/detectors/detectEvents/detect_swr/detect_swr.m, lines 1–48 · score 0.59 · sharp wave ripple, pyramidal cells, SWR, global, properties
  20. [20] § Newly learned and remotely learned sequences can be decoded from synchronized spiking ensembles ↔ AbbaspoorHussinHoffman2023/Packages/buzcode-master/buzcode-master/externalPackages/ndt_1_0_4/classifiers/@libsvm_CL/libsvm_CL.m, lines 1–129 · score 0.59 · support vector machine, SVM, Accuracy, Decoding, classify, neural
  21. [21] § Methods › Assembly pattern identification and activation strength ↔ AbbaspoorAljishiHoffman2025/Cell Assembly Detection/perpl_AssemblyDetection.m, the whole file · a weak match · score 0.59 · fast ICA, assembly patterns, ZPROJ, weights, cell, matrix
  22. [22] § Newly learned and remotely learned sequences can be decoded from synchronized spiking ensembles ↔ AbbaspoorHussinHoffman2023/Packages/buzcode-master/buzcode-master/externalPackages/FMAToolbox/FMAToolbox.m, the whole file · a weak match · score 0.57 · local field potential, raster, brain, broadband, stimulus, waveforms
  23. [23] § Methods › Electrophysiological recordings ↔ AbbaspoorHoffman2024/perpl_PairwisePhaseConsistency.m, the whole file · a weak match · score 0.56 · bitVolts, downsampled, binary, LFPs, filtered, channel
  24. [24] § Methods › Classification of deep and superficial CA1 pyramidal cells ↔ AbbaspoorHussinHoffman2023/Packages/buzcode-master/buzcode-master/detectors/detectEvents/detect_swr/detect_swr.m, lines 1–48 · score 0.53 · sharp wave, SWRs, pyramidale, layers, superficial, deep
  25. [25] § Methods › Gini coefficient ↔ AbbaspoorAljishiHoffman2025/TypicalSparsityMeasures/TypicalSparsityMeasures/TypicalSparsityMeasures.m, the whole file · a weak match · score 0.52 · Typical Sparsity, Gini, ascending, vector

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 · 421 lines · 18 KB · no license · 3 matches

  1. function LinearSVMConditionificationTable = perpl_SVMConditionificationNeuralPopulation(FR, Condition, FeatureMask, varargin)
  2. % perpl_SVMConditionificationNeuralPopulation
  3. % -------------------------------------------------------------------------
  4. % PURPOSE
  5. % Train a linear SVM to Conditionify observations using a neural-population design
  6. % matrix, tune the BoxConstraint hyperparameter using Bayesian optimization,
  7. % evaluate cross-validated accuracy, and run multiple permutation-based tests
  8. % that probe different properties of the neural population code:
  9. %
  10. % (1) Label permutation test (tests whether accuracy exceeds chance given labels)
  11. % (2) Activity heterogeneity permutation (shuffles neuron identities within trials)
  12. % (3) Within-subpopulation heterogeneity permutation (shuffles within +/− weight groups)
  13. % (4) Noise-correlation disruption permutation (shuffles trials within Condition per neuron)
  14. % (5) Cofiring structure analysis (+ permutation test):
  15. % compares within-group vs across-group correlations (groups defined by SVM weight sign)
  16. %
  17. % INPUTS
  18. % FR : numeric matrix, size (nTrials x nNeurons)
  19. % Design matrix used for Conditionification. Rows are trials/observations and
  20. % columns are neurons/features (e.g., firing rates in a chosen epoch).
  21. %
  22. % Condition : vector/categorical/cellstr/string array, length nTrials
  23. % Condition labels for each trial (must match the number of rows in FR).
  24. %
  25. % FeatureMask : logical or numeric mask for unstable neurons/features
  26. % If logical: length nNeurons, true entries are set to 0 in FR.
  27. % If numeric indices: those columns are set to 0 in FR.
  28. %
  29. % NAME-VALUE OPTIONAL INPUTS
  30. % 'KFold' : positive integer (default: 10)
  31. % Number of cross-validation folds.
  32. %
  33. % 'BoxConstraintRange' : 1x2 numeric vector (default: [1e-10, 1])
  34. % Range used for Bayesian optimization of BoxConstraint (log-transformed).
  35. %
  36. % 'MaxObjectiveEvaluations' : positive integer (default: 100)
  37. % Maximum objective evaluations for Bayesian optimization.
  38. %
  39. % 'AcquisitionFunctionName' : char/string (default: 'expected-improvement-plus')
  40. % Acquisition function used by Bayesian optimization.
  41. %
  42. % 'NumPermutations' : positive integer (default: 5000)
  43. % Number of permutations for permutation tests (label/activity/subpop/noise/corr).
  44. %
  45. % 'NumBootstraps' : positive integer (default: 10000)
  46. % Number of bootstrap resamples for confidence intervals on permutation distributions.
  47. %
  48. % 'Alpha' : scalar in (0,1) (default: 0.05)
  49. % Significance level for bootstrap confidence intervals.
  50. %
  51. % 'UseParallel' : logical scalar (default: true)
  52. % If true, uses parfor for permutation loops when possible.
  53. %
  54. % 'ConditionValues' : [] or 1x2 cell array / string array / numeric array (default: [])
  55. % If provided, these two values define the two conditions for the
  56. % noise-correlation disruption permutation. If empty, the function
  57. % attempts to infer two unique Conditiones from Condition.
  58. %
  59. % OUTPUTS
  60. % LinearSVMConditionificationTable : struct
  61. % A struct with fields mirroring the original table variables:
  62. % .SVMMdl trained SVM model (best BoxConstraint)
  63. % .CVMdl cross-validated model object
  64. % .cvLoss cross-validation loss
  65. % .cvAccuracy cross-validation accuracy
  66. % .ConditionPermAccuracy permutation accuracies (label shuffle)
  67. % .ConditionPermAccuracyStats [CI_low, mean, CI_high] for label shuffle
  68. % .ConditionPermPvalue p-value for label shuffle
  69. % .weights SVM weights (Beta)
  70. % .normWeights L2-normalized SVM weights
  71. % .bias SVM bias term
  72. % .ActPermAccuracy permutation accuracies (neuron identity shuffle)
  73. % .ActPermAccuracyStats CI stats for neuron identity shuffle
  74. % .ActPermPvalue p-value for neuron identity shuffle
  75. % .MatchPermAccuracy accuracies (shuffle within +/− weight subpops)
  76. % .MatchPermAccuracyStats CI stats for within-subpop shuffle
  77. % .MatchPermPvalue p-value for within-subpop shuffle
  78. % .NoisePermAccuracy accuracies (destroy noise correlations)
  79. % .NoisePermAccuracyStats CI stats for noise-corr shuffle
  80. % .NoisePermPvalue p-value for noise-corr shuffle
  81. % .Cofiring [meanWithinCorr, meanAcrossCorr, difference]
  82. % .CofiringPerm permutation distribution of corr differences
  83. % .CofiringStats CI stats for corr-difference permutations
  84. % .CofiringPvalue p-value for corr-difference permutation test
  85. %
  86. % -------------------------------------------------------------------------
  87. % ----------------------------- Parse inputs ------------------------------
  88. p = inputParser;
  89. p.FunctionName = mfilename;
  90. addRequired(p, 'FR', @(z) isnumeric(z) && ismatrix(z) && ~isempty(z));
  91. addRequired(p, 'Condition', @(z) ~isempty(z) && numel(z) == size(FR,1));
  92. addRequired(p, 'FeatureMask', @(z) isempty(z) || islogical(z) || (isnumeric(z) && isvector(z)));
  93. addParameter(p, 'KFold', 10, @(z) isnumeric(z) && isscalar(z) && z>=2 && mod(z,1)==0);
  94. addParameter(p, 'BoxConstraintRange', [1e-10, 1], @(z) isnumeric(z) && numel(z)==2 && all(z>0));
  95. addParameter(p, 'MaxObjectiveEvaluations', 100, @(z) isnumeric(z) && isscalar(z) && z>=1 && mod(z,1)==0);
  96. addParameter(p, 'AcquisitionFunctionName', 'expected-improvement-plus', @(z) ischar(z) || isstring(z));
  97. addParameter(p, 'NumPermutations', 5000, @(z) isnumeric(z) && isscalar(z) && z>=1 && mod(z,1)==0);
  98. addParameter(p, 'NumBootstraps', 10000, @(z) isnumeric(z) && isscalar(z) && z>=1 && mod(z,1)==0);
  99. addParameter(p, 'Alpha', 0.05, @(z) isnumeric(z) && isscalar(z) && z>0 && z<1);
  100. addParameter(p, 'UseParallel', true, @(z) islogical(z) && isscalar(z));
  101. addParameter(p, 'ConditionValues', [], @(z) isempty(z) || numel(z)==2);
  102. parse(p, FR, Condition, FeatureMask, varargin{:});
  103. KFold = p.Results.KFold;
  104. BoxConstraintRange = p.Results.BoxConstraintRange;
  105. MaxObjectiveEvaluations= p.Results.MaxObjectiveEvaluations;
  106. AcquisitionFunctionName= string(p.Results.AcquisitionFunctionName);
  107. numPermutations = p.Results.NumPermutations;
  108. numBootstraps = p.Results.NumBootstraps;
  109. alpha = p.Results.Alpha;
  110. useParallel = p.Results.UseParallel;
  111. ConditionValues = p.Results.ConditionValues;
  112. % ----------------------------- Prepare data ------------------------------
  113. % Z-score predictors (matches your code)
  114. FR = zscore(FR);
  115. if ~isempty(FeatureMask)
  116. if islogical(FeatureMask)
  117. if numel(FeatureMask) ~= size(FR,2)
  118. error('FeatureMask (logical) must have length = size(FR,2).');
  119. end
  120. FR(:, FeatureMask) = 0;
  121. else
  122. FR(:, FeatureMask) = 0;
  123. end
  124. end
  125. % ---------------------- Train model + hyperparameter opt -----------------
  126. % Define the range for BoxConstraint (log scale)
  127. boxConstraintVar = optimizableVariable('BoxConstraint', BoxConstraintRange, 'Transform', 'log');
  128. Mdl = fitcsvm(FR, Condition, ...
  129. 'Standardize', true, ...
  130. 'KernelFunction', 'linear', ...
  131. 'OptimizeHyperparameters', boxConstraintVar, ...
  132. 'HyperparameterOptimizationOptions', struct( ...
  133. 'AcquisitionFunctionName', char(AcquisitionFunctionName), ...
  134. 'MaxObjectiveEvaluations', MaxObjectiveEvaluations));
  135. % ---------------------- Cross-validation performance ---------------------
  136. CVMdl = crossval(Mdl, 'KFold', KFold);
  137. cvLoss = kfoldLoss(CVMdl);
  138. cvAccuracy = 1 - cvLoss;
  139. disp(['Cross-Validation Accuracy: ', num2str(cvAccuracy)]);
  140. % ---------------------- Initialize output container ----------------------
  141. LinearSVMConditionificationTable = struct();
  142. LinearSVMConditionificationTable.SVMMdl = Mdl;
  143. LinearSVMConditionificationTable.CVMdl = CVMdl;
  144. LinearSVMConditionificationTable.cvLoss = cvLoss;
  145. LinearSVMConditionificationTable.cvAccuracy = cvAccuracy;
  146. % ---------------------- Permutation test: labels -------------------------
  147. permAccuracy = NaN(numPermutations, 1);
  148. if useParallel
  149. parfor i = 1:numPermutations
  150. permutedCondition = Condition(randperm(length(Condition)));
  151. permMdl = fitcsvm(FR, permutedCondition, ...
  152. 'Standardize', true, ...
  153. 'KernelFunction', 'linear', ...
  154. 'BoxConstraint', Mdl.ModelParameters.BoxConstraint);
  155. permCVMdl = crossval(permMdl, 'KFold', KFold);
  156. permLoss = kfoldLoss(permCVMdl);
  157. permAccuracy(i) = 1 - permLoss;
  158. end
  159. else
  160. for i = 1:numPermutations
  161. permutedCondition = Condition(randperm(length(Condition)));
  162. permMdl = fitcsvm(FR, permutedCondition, ...
  163. 'Standardize', true, ...
  164. 'KernelFunction', 'linear', ...
  165. 'BoxConstraint', Mdl.ModelParameters.BoxConstraint);
  166. permCVMdl = crossval(permMdl, 'KFold', KFold);
  167. permLoss = kfoldLoss(permCVMdl);
  168. permAccuracy(i) = 1 - permLoss;
  169. end
  170. end
  171. pValue = mean(permAccuracy >= cvAccuracy);
  172. disp(['Original Cross-Validation Accuracy: ', num2str(cvAccuracy)]);
  173. disp(['P-Value from Permutation Test: ', num2str(pValue)]);
  174. ci = bootci(numBootstraps, {@mean, permAccuracy}, 'alpha', alpha);
  175. LinearSVMConditionificationTable.ConditionPermAccuracy = permAccuracy;
  176. LinearSVMConditionificationTable.ConditionPermAccuracyStats = [ci(1) mean(permAccuracy) ci(2)];
  177. LinearSVMConditionificationTable.ConditionPermPvalue = pValue;
  178. % ---------------------- Extract weights (coefficients) -------------------
  179. weights = Mdl.Beta;
  180. bias = Mdl.Bias;
  181. normWeights = weights / norm(weights, 2);
  182. LinearSVMConditionificationTable.weights = weights;
  183. LinearSVMConditionificationTable.normWeights = normWeights;
  184. LinearSVMConditionificationTable.bias = bias;
  185. % ---------------------- Permutation: heterogeneity across neurons --------
  186. permAccuracy = NaN(numPermutations, 1);
  187. if useParallel
  188. parfor i = 1:numPermutations
  189. permFR = arrayfun(@(row) FR(row, randperm(size(FR, 2))), 1:size(FR, 1), 'UniformOutput', false);
  190. permFR = cell2mat(permFR');
  191. permMdl = fitcsvm(permFR, Condition, ...
  192. 'Standardize', true, ...
  193. 'KernelFunction', 'linear', ...
  194. 'BoxConstraint', Mdl.ModelParameters.BoxConstraint);
  195. permCVMdl = crossval(permMdl, 'KFold', KFold);
  196. permLoss = kfoldLoss(permCVMdl);
  197. permAccuracy(i) = 1 - permLoss;
  198. end
  199. else
  200. for i = 1:numPermutations
  201. permFR = arrayfun(@(row) FR(row, randperm(size(FR, 2))), 1:size(FR, 1), 'UniformOutput', false);
  202. permFR = cell2mat(permFR');
  203. permMdl = fitcsvm(permFR, Condition, ...
  204. 'Standardize', true, ...
  205. 'KernelFunction', 'linear', ...
  206. 'BoxConstraint', Mdl.ModelParameters.BoxConstraint);
  207. permCVMdl = crossval(permMdl, 'KFold', KFold);
  208. permLoss = kfoldLoss(permCVMdl);
  209. permAccuracy(i) = 1 - permLoss;
  210. end
  211. end
  212. pValue = mean(permAccuracy >= cvAccuracy);
  213. ci = bootci(numBootstraps, {@mean, permAccuracy}, 'alpha', alpha);
  214. LinearSVMConditionificationTable.ActPermAccuracy = permAccuracy;
  215. LinearSVMConditionificationTable.ActPermAccuracyStats = [ci(1) mean(permAccuracy) ci(2)];
  216. LinearSVMConditionificationTable.ActPermPvalue = pValue;
  217. % ---------------------- Permutation: within functional subpops -----------
  218. positiveWeights = find(normWeights > 0);
  219. negativeWeights = find(normWeights < 0);
  220. permAccuracy = NaN(numPermutations, 1);
  221. if useParallel
  222. parfor i = 1:numPermutations
  223. permFR = FR;
  224. for j = 1:size(FR, 1)
  225. if ~isempty(positiveWeights)
  226. permFR(j, positiveWeights) = FR(j, positiveWeights(randperm(length(positiveWeights))));
  227. end
  228. if ~isempty(negativeWeights)
  229. permFR(j, negativeWeights) = FR(j, negativeWeights(randperm(length(negativeWeights))));
  230. end
  231. end
  232. permMdl = fitcsvm(permFR, Condition, ...
  233. 'Standardize', true, ...
  234. 'KernelFunction', 'linear', ...
  235. 'BoxConstraint', Mdl.ModelParameters.BoxConstraint);
  236. permCVMdl = crossval(permMdl, 'KFold', KFold);
  237. permLoss = kfoldLoss(permCVMdl);
  238. permAccuracy(i) = 1 - permLoss;
  239. end
  240. else
  241. for i = 1:numPermutations
  242. permFR = FR;
  243. for j = 1:size(FR, 1)
  244. if ~isempty(positiveWeights)
  245. permFR(j, positiveWeights) = FR(j, positiveWeights(randperm(length(positiveWeights))));
  246. end
  247. if ~isempty(negativeWeights)
  248. permFR(j, negativeWeights) = FR(j, negativeWeights(randperm(length(negativeWeights))));
  249. end
  250. end
  251. permMdl = fitcsvm(permFR, Condition, ...
  252. 'Standardize', true, ...
  253. 'KernelFunction', 'linear', ...
  254. 'BoxConstraint', Mdl.ModelParameters.BoxConstraint);
  255. permCVMdl = crossval(permMdl, 'KFold', KFold);
  256. permLoss = kfoldLoss(permCVMdl);
  257. permAccuracy(i) = 1 - permLoss;
  258. end
  259. end
  260. pValue = mean(permAccuracy >= cvAccuracy);
  261. ci = bootci(numBootstraps, {@mean, permAccuracy}, 'alpha', alpha);
  262. LinearSVMConditionificationTable.MatchPermAccuracy = permAccuracy;
  263. LinearSVMConditionificationTable.MatchPermAccuracyStats = [ci(1) mean(permAccuracy) ci(2)];
  264. LinearSVMConditionificationTable.MatchPermPvalue = pValue;
  265. % ---------------------- Permutation: destroy noise correlations ----------
  266. permAccuracy = NaN(numPermutations, 1);
  267. % Determine the two conditions used for within-Condition shuffling
  268. if isempty(ConditionValues)
  269. u = unique(Condition);
  270. if numel(u) ~= 2
  271. error('Noise-correlation permutation requires exactly 2 unique Conditiones. Provide ''ConditionValues'' if needed.');
  272. end
  273. ConditionValues = u(:)';
  274. end
  275. if useParallel
  276. parfor i = 1:numPermutations
  277. permFR = FR;
  278. for cond = 1:2
  279. condIndices = find(contains(string(Condition), string(ConditionValues(cond))));
  280. for neuron = 1:size(FR, 2)
  281. permFR(condIndices, neuron) = FR(condIndices(randperm(length(condIndices))), neuron);
  282. end
  283. end
  284. permMdl = fitcsvm(permFR, Condition, ...
  285. 'Standardize', true, ...
  286. 'KernelFunction', 'linear', ...
  287. 'BoxConstraint', Mdl.ModelParameters.BoxConstraint);
  288. permCVMdl = crossval(permMdl, 'KFold', KFold);
  289. permLoss = kfoldLoss(permCVMdl);
  290. permAccuracy(i) = 1 - permLoss;
  291. end
  292. else
  293. for i = 1:numPermutations
  294. permFR = FR;
  295. for cond = 1:2
  296. condIndices = find(contains(string(Condition), string(ConditionValues(cond))));
  297. for neuron = 1:size(FR, 2)
  298. permFR(condIndices, neuron) = FR(condIndices(randperm(length(condIndices))), neuron);
  299. end
  300. end
  301. permMdl = fitcsvm(permFR, Condition, ...
  302. 'Standardize', true, ...
  303. 'KernelFunction', 'linear', ...
  304. 'BoxConstraint', Mdl.ModelParameters.BoxConstraint);
  305. permCVMdl = crossval(permMdl, 'KFold', KFold);
  306. permLoss = kfoldLoss(permCVMdl);
  307. permAccuracy(i) = 1 - permLoss;
  308. end
  309. end
  310. pValue = mean(permAccuracy >= cvAccuracy);
  311. ci = bootci(numBootstraps, {@mean, permAccuracy}, 'alpha', alpha);
  312. LinearSVMConditionificationTable.NoisePermAccuracy = permAccuracy;
  313. LinearSVMConditionificationTable.NoisePermAccuracyStats = [ci(1) mean(permAccuracy) ci(2)];
  314. LinearSVMConditionificationTable.NoisePermPvalue = pValue;
  315. % ---------------------- Cofiring comparison + permutation ----------------
  316. positiveWeights = find(normWeights > 0);
  317. negativeWeights = find(normWeights < 0);
  318. corrMatrix = corr(FR);
  319. withinPosCorr = corrMatrix(positiveWeights, positiveWeights);
  320. withinNegCorr = corrMatrix(negativeWeights, negativeWeights);
  321. acrossCorr = corrMatrix(positiveWeights, negativeWeights);
  322. WithinPosCorr = withinPosCorr(triu(true(size(withinPosCorr)), 1));
  323. WithinNegCorr = withinNegCorr(triu(true(size(withinNegCorr)), 1));
  324. meanWithinCorr = mean([WithinPosCorr; WithinNegCorr], 'omitnan');
  325. meanAcrossCorr = mean(acrossCorr(:), 'omitnan');
  326. origCorrDifference = meanWithinCorr - meanAcrossCorr;
  327. LinearSVMConditionificationTable.Cofiring = [meanWithinCorr, meanAcrossCorr, origCorrDifference];
  328. permCorrDifferences = zeros(numPermutations, 1);
  329. for i = 1:numPermutations
  330. permutedSigns = sign(normWeights);
  331. permutedSigns = permutedSigns(randperm(length(permutedSigns)));
  332. permutedWeights = abs(normWeights) .* permutedSigns;
  333. permPosWeights = find(permutedWeights > 0);
  334. permNegWeights = find(permutedWeights < 0);
  335. permWithinPosCorr = corrMatrix(permPosWeights, permPosWeights);
  336. permWithinNegCorr = corrMatrix(permNegWeights, permNegWeights);
  337. permAcrossCorr = corrMatrix(permPosWeights, permNegWeights);
  338. permWithinPosCorr = permWithinPosCorr(triu(true(size(permWithinPosCorr)), 1));
  339. permWithinNegCorr = permWithinNegCorr(triu(true(size(permWithinNegCorr)), 1));
  340. permMeanWithinCorr = mean([permWithinPosCorr; permWithinNegCorr], 'omitnan');
  341. permMeanAcrossCorr = mean(permAcrossCorr(:), 'omitnan');
  342. permCorrDifferences(i) = permMeanWithinCorr - permMeanAcrossCorr;
  343. end
  344. pValue = mean(permCorrDifferences >= origCorrDifference);
  345. disp(['Original Correlation Difference: ', num2str(origCorrDifference)]);
  346. disp(['P-Value from Permutation Test: ', num2str(pValue)]);
  347. % Bootstrap CI for permutation distribution of correlation differences
  348. ci = bootci(1000, {@mean, permCorrDifferences}, 'alpha', alpha);
  349. LinearSVMConditionificationTable.CofiringPerm = permCorrDifferences;
  350. LinearSVMConditionificationTable.CofiringStats = [ci(1) mean(permCorrDifferences) ci(2)];
  351. LinearSVMConditionificationTable.CofiringPvalue = pValue;
  352. end

perpl_SVMClassificationNeuralPopulation.m at commit 0921967, no license · at the source

Overview

Authors: Saman Abbaspoor1,2,3,4, Ayman Aljishi1, Kari L. Hoffman1,5
  1. Department of Psychology, Vanderbilt Vision Research Center, Vanderbilt Brain Institute, Vanderbilt University,Nashville, TN USA
  2. F. M. Kirby Neurobiology Center, Boston Children’s Hospital,Boston, MA USA
  3. Hansjoerg Wyss and Rosamund Stone Zander Translational Neuroscience Center, Boston Children’s Hospital,Boston, MA USA
  4. Present Address: Department of Neurology, Harvard Medical School,Boston, MA USA
  5. Department of Biomedical Engineering, Vanderbilt University,Nashville, TN USA
Institutions: Vanderbilt University (United States); Boston Children's Hospital (United States); Harvard University (United States)
Journal: Nature neuroscience, volume 29, issue 8, pages 1976-1986
Dates: received 25 August 2025; accepted 2 June 2026; published online 29 July 2026; in print 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s41593-026-02357-2 · PMID 42527550 · PMCID PMC13433320 · OpenAlex W4409502185
Open access: hybrid, a free copy (OpenAlex)
Status: code verified
Categories: non-human primate (organism)
Methods: Spectral & time-frequency, Connectivity, Statistics, Smoothing, state filtering, decompositions, Machine learning, Preprocessing, Single-unit activity, calcium imaging
Keywords: Consolidation, Neural circuits, Hippocampus, Long-term memory, Replay
MeSH: Hippocampus*, Learning*, Memory*, Mental Recall*, Animals, Macaca mulatta, Male, Sleep (* major topic)
Topic: Memory and Neural Mechanisms (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Citations: cited by 1 paper (Europe PMC); 89 references in the paper

Abstract

Memory formation relies on the reorganization of neural activity patterns during experience that persist in subsequent sleep. How these processes promote learning while preserving established memories remains unclear. Here we recorded neural ensemble activity from the hippocampal and associated regions in freely moving macaques as they recalled item sequences presented that day (‘new’), 1 day earlier (‘recent’) or more than 2 weeks earlier (‘old’). Cell assemblies biased for old sequences showed less drift, greater network connectivity and stronger sleep reactivation than new-biased assemblies. Pairs of old and recent assemblies formed persistent task-to-sleep coupling (‘metassemblies’), unlike new assembly pairs, and these assembly pairs showed longer interactions over time than the new pairs. In the hippocampus, the propensity for superficial and deep CA1 pyramidal cells to form integrated assemblies increased with memory age. These findings reveal rapid organization and stabilization of neural activity in the primate brain, suggesting potential mechanisms for balancing learning with memory linking and durability.

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 25 matches between paragraphs and lines of code.

petersenpeter/phy2-plugins

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 9044cf42c7f74f9e6bbcc624fb47f4342107277b, 13 May 2025
Languages: Python (11)
Size: 17 files, 11 scripts
Software Heritage: archived
Found in: the text, “Manual curation and reclustering with phy”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Phy (10 files), NumPy (8 files), SciPy (5 files), scikit-learn (3 files), Matplotlib (1 file), pandas (1 file), seaborn (1 file), UMAP (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
12 files

mathworks.com/matlabcentral/fileexchange

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: found in the paper
Software Heritage: not checked
Found in: the text, “Measuring bias in cell assemblies”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 2 checks, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: unreachable at the last attempt (HTTP 403)

hoffman-lab/manuscripts

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 09219676a8cc6b48ea4ed0b8c0d1156793e03456, 11 February 2026
Languages: MATLAB (5308), C (119), C/C++ (34), Java (10), C++ (4), Shell (4), Jupyter (2)
Size: 7,659 files, 5,481 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: tests, documentation, 1 notebook
Not found: README, license file, CITATION.cff, environment file, continuous integration
Tools: EEGLAB (171 files), Statistics and Machine Learning Toolbox (117 files), Signal Processing Toolbox (78 files), Chronux (74 files), CircStat (73 files), Image Processing Toolbox (19 files), FieldTrip (14 files), fdr_bh (Benjamini-Hochberg FDR) (5 files), boundedline (2 files), Parallel Computing Toolbox (2 files), Matplotlib (2 files), NumPy (2 files), scikit-image (2 files), export_fig (1 file), Curve Fitting Toolbox (1 file), Optimization Toolbox (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
2,000 files

Code availability

All custom codes are available via GitHub at https://github.com/hoffman-lab/Manuscripts/tree/main/AbbaspoorAljishiHoffman2025.

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:

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

Data availability

Preprocessed data used for generating these results are available via figshare at 10.6084/m9.figshare.31418819 (ref. 89).

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, 3 authors, 5 keywords, 8 MeSH terms, 4 funders, 89 references.

Cite

This paper

Abbaspoor, S., Aljishi, A., & Hoffman, K. L. (2026). Experience reorganizes content-specific memory traces in macaques. Nature neuroscience, 29(8), 1976-1986. https://doi.org/10.1038/s41593-026-02357-2

BibTeX

@article{abbaspoor2026experience,
author = {Abbaspoor, Saman and Aljishi, Ayman and Hoffman, Kari L.},
title = {{Experience reorganizes content-specific memory traces in macaques}},
journal = {Nature neuroscience},
year = {2026},
month = jul,
volume = {29},
number = {8},
pages = {1976--1986},
publisher = {Nature Portfolio},
issn = {1097-6256},
doi = {10.1038/s41593-026-02357-2},
url = {https://doi.org/10.1038/s41593-026-02357-2},
pmid = {42527550},
pmcid = {PMC13433320}
}

RIS

TY - JOUR
AU - Abbaspoor, Saman
AU - Aljishi, Ayman
AU - Hoffman, Kari L.
TI - Experience reorganizes content-specific memory traces in macaques
T2 - Nature neuroscience
J2 - Nat Neurosci
PY - 2026
DA - 2026/07/29
VL - 29
IS - 8
SP - 1976
EP - 1986
SN - 1097-6256
PB - Nature Portfolio
DO - 10.1038/s41593-026-02357-2
UR - https://doi.org/10.1038/s41593-026-02357-2
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41593-026-02357-2",
"type": "article-journal",
"title": "Experience reorganizes content-specific memory traces in macaques",
"container-title": "Nature neuroscience",
"author": [
{
"family": "Abbaspoor",
"given": "Saman"
},
{
"family": "Aljishi",
"given": "Ayman"
},
{
"family": "Hoffman",
"given": "Kari L."
}
],
"container-title-short": "Nat Neurosci",
"volume": "29",
"issue": "8",
"page": "1976-1986",
"DOI": "10.1038/s41593-026-02357-2",
"PMID": "42527550",
"PMCID": "PMC13433320",
"ISSN": "1097-6256",
"publisher": "Nature Portfolio",
"URL": "https://doi.org/10.1038/s41593-026-02357-2",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
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.1038/s41467-026-75347-4 [code]
Sleep reveals dynamics integrating and segregating movement and stimulus representations in V1.
Journal: Nature communications
In common: Phy, Chronux, export_fig, 17 other tools, 5 references
[2] 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 reports
In common: Chronux, export_fig, boundedline, 14 other tools, 3 references
[3] doi:10.7554/elife.108023 [code]
Challenges in replay detection by TDLM in post-encoding resting state.
Journal: eLife
In common: Statistics and Machine Learning Toolbox, seaborn, scikit-learn, 4 other tools, 14 references
[4] doi:10.1016/j.neuron.2026.03.034 [code]
Dentate gyrus interneurons modulate winner-take-all network dynamics in freely behaving mice.
Journal: Neuron
In common: Chronux, boundedline, CircStat, 13 other tools, 3 references
[5] doi:10.1038/s41467-026-73106-z [code]
Respiratory pauses highlight sleep architecture in mice.
Journal: Nature communications
In common: Chronux, export_fig, boundedline, 13 other tools, 1 reference
[6] doi:10.7554/elife.110795 [code]
REM sleep prefrontal high-frequency oscillation chains mediate distinct cortical - hippocampal reactivation patterns compared to NREM sleep.
Journal: eLife
In common: Chronux, boundedline, CircStat, 5 other tools, 8 references
[7] doi:10.1523/jneurosci.2001-25.2026 [code]
Dynamics of Dentate Gyrus Place Cells and Dentate Spikes during Spatial and Nonspatial Changes in Environments.
Journal: The Journal of neuroscience : the official journal of the Society for Neuroscience
In common: Phy, Chronux, export_fig, 11 other tools, 1 reference
[8] 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: boundedline, fdr_bh (Benjamini-Hochberg FDR), Optimization Toolbox, 12 other tools
[9] doi:10.1162/imag.a.1229 [code]
40 Hz audiovisual stimulation improves sustained attention and related brain oscillations.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Chronux, fdr_bh (Benjamini-Hochberg FDR), CircStat, 11 other tools
[10] doi:10.1038/s41467-026-77318-1 [code]
Offline generative network reconfiguration guides insight-like accelerated learning by assimilation into schema in rats.
Journal: Nature communications
In common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, seaborn, 4 other tools, 8 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.