OSCR

Sensory adaptation and pupil-linked arousal support flexible evidence accumulation during perceptual decision making.

Code ↔ Paper

9 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 9 matches · 1 of them tie a paragraph to a whole file, not to given lines: a weak match, whose lines are not tinted
  1. [1] § Results › Context-dependent evidence encoding in MT relates to evidence-accumulation behavior ↔ Fig5DE_FigSupp2_4.m, lines 345–481 · score 0.88 · 50–200 ms, 200–400 ms, evidence discriminability, viewing durations, ROC area, firing rate
  2. [2] § Results › Context-dependent evidence encoding in MT relates to evidence-accumulation behavior ↔ Fig5DE_FigSupp2_4.m, lines 161–284 · score 0.88 · MT evidence discriminability, MT evidence encoding, 50–500 ms, 200–400 ms, ROC area, HSF switch
  3. [3] § Results › Context stability shapes sensory adaptation in MT ↔ Fig3_FigSupp1.m, lines 374–430 · score 0.87 · single exponential fits, 480–600 ms, 200–330, 340–470, MT neural response, 480 ms
  4. [4] § Results › Context-dependent evidence encoding in MT relates to evidence-accumulation behavior ↔ Fig5DE_FigSupp2_4.m, lines 161–284 · score 0.81 · MT evidence discriminability, 200–400 ms, ROC area, MT neural, neural activity, stimulus onset
  5. [5] § Results › Context-dependent evidence encoding in MT relates to evidence-accumulation behavior ↔ Fig5DE_FigSupp2_4.m, lines 345–481 · score 0.68 · 50–200 ms, evidence encoding, firing rate, switch trials, window, discriminability
  6. [6] § Materials and methods › Quantification of neural and pupil contributions to behavior ↔ builds/behaviorLogisticFitsPupilTerm.m, lines 295–416 · score 0.67 · predicted probabilities, pupil terms, interaction, R2, Tjur, power
  7. [7] § Materials and methods › Quantification of neural and pupil contributions to behavior ↔ builds/behaviorLogisticFitsNeuralTerm.m, lines 341–468 · score 0.64 · predicted probabilities, pupil terms, interaction, R2, Tjur, power
  8. [8] § Results › Adaptation and arousal-related mechanisms are jointly and differentially recruited across sessions ↔ Fig7.m, lines 93–143 · score 0.58 · explanatory power, neural pupil, pupil terms, Figure 7, Mi, monkeys
  9. [9] § Materials and methods › Analysis of pupil data ↔ utilities/processPupilBaseline.m, the whole file · a weak match · score 0.52 · baseline pupil, Butterworth, scoring, filter, subtracting, linear

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 · 481 lines · 18 KB · MIT · 4 matches

  1. %% Fig5DE_FigSupp2_4.m
  2. % Analyzes relationships between MT neural encoding, discriminability,
  3. % and behavioral performance, separated by sessions where monkeys showed greater
  4. % behavioral sensitivity at LSF vs. HSF.
  5. %
  6. % Session classification:
  7. % Based on psychometric slope differences (from logistic fits):
  8. % - LmoresenLSF: Sessions with steeper slopes at LSF (slope_diff > 0)
  9. % - Lothersen: Sessions with steeper slopes at HSF or equal (slope_diff ≤ 0)
  10. %
  11. % Main Text Figures:
  12. %
  13. % Figure 5D: Three-panel summary for LmoresenLSF sessions.
  14. % Panel 1: Population average firing rate time course (0-900ms)
  15. % - LSF (blue) and HSF (yellow) PREF direction responses
  16. % - Shows mean±SEM across neurons in these sessions
  17. % - LSF responses higher throughout test epoch
  18. %
  19. % Panel 2: ROC area scatter plot (200-400ms average)
  20. % - HSF vs LSF directional selectivity
  21. % - Most points above unity line (higher discriminability at LSF)
  22. % - Different markers by monkey
  23. %
  24. % Panel 3: Binned behavioral performance
  25. % - Fraction correct vs viewing duration (4 bins with midpoints: 162.5, 300, 487.5, 900ms)
  26. % - LSF (blue) and HSF (yellow) with error bars (SEM)
  27. % - LSF performance higher, especially at intermediate durations
  28. %
  29. % Figure 5E: Same three-panel format for Lothersen sessions.
  30. % Tests whether sessions with opposite behavioral pattern show opposite
  31. % or absent neural patterns.
  32. %
  33. % Figure Supplements:
  34. %
  35. % Figure 5-Figure Supplement 2: Test-epoch firing rates (200-400ms) separated by
  36. % monkey AND behavioral sensitivity classification. Six panels (3 monkeys x
  37. % 2 sensitivity groups): row 1 = LmoresenLSF sessions, row 2 = Lothersen
  38. % sessions. Tests whether neural-behavioral correspondence holds within
  39. % individual subjects.
  40. %
  41. % Figure 5-Figure Supplement 4: Exploration of test-stimulus encoding,
  42. % discriminability, and behavior for non-switch trials. Eight panels:
  43. % four columns (1: test-stimulus evidence encoding, 2: test-stimulus ROC
  44. % area 50-200 ms, 3: test-stimulus ROC area 200-400 ms, 4: test-stimulus
  45. % behavioral performance/fraction correct) by two rows, matching the
  46. % Figure 5D/E session-group split (row 1 = LmoresenLSF, n=100; row 2 =
  47. % Lothersen, n=32).
  48. %
  49. % Behavioral bins (from behaviorBinnedPerformance.m):
  50. % Bin 1: 100-225ms
  51. % Bin 2: 225-375ms
  52. % Bin 3: 375-600ms
  53. % Bin 4: 600-1200ms
  54. %
  55. % Required data files:
  56. % - mergedTable_proc.mat
  57. % - sensitivity_diff_labeled_N.mat (psychometric slope classifications)
  58. %
  59. % Required functions:
  60. % - processNeuralData.m (MT activity and ROC area)
  61. % - behaviorBinnedPerformance.m (binned accuracy)
  62. % - computeCohenDCI.m (effect size)
  63. %% Load data
  64. cfg = projectDefaults();
  65. load(fullfile(cfg.paths.data, 'mergedTable_proc_neural.mat')) % keeps Unit_1, skips pupil traces (see buildMergedTableTiers.m)
  66. load(fullfile(cfg.paths.data, 'sensitivity_diff_labeled_N.mat')) % Neural subset
  67. % Subset data appropriately
  68. % "N" = Neural analysis
  69. [mergedTableSub] = createDatSubset(mergedTable_proc, 'N');
  70. dat = mergedTableSub;
  71. clear mergedTable_proc
  72. % Select correct trials
  73. datCorrect = dat(dat.correct == 1,:);
  74. dat = datCorrect;
  75. % Create monkey indices for subsetting units.
  76. % Numeric (not logical) indices are needed here because later code
  77. % composes them with a second index, e.g. An(cond(An)).
  78. monkeyIdx = getMonkeyIndices(dat);
  79. An = find(monkeyIdx.An);
  80. Ch = find(monkeyIdx.Ch);
  81. Mi = find(monkeyIdx.Mi);
  82. monkeyOrder = {'An', 'Mi', 'Ch'};
  83. monkeyMarkers = struct('An', 'o', 'Mi', 'square', 'Ch', 'diamond');
  84. monkeyNumIdx = struct('An', An, 'Ch', Ch, 'Mi', Mi);
  85. colors = cfg.colors.pair;
  86. %%
  87. % Process neural data (calling processNeuralData.m)
  88. % Set up timing/binning:
  89. slide = 10; % msec
  90. bin_size = 100; % msec
  91. start_time = -2600;
  92. end_time = 1200;
  93. bins = cat(2, ...
  94. (start_time:slide:end_time - bin_size)', ...
  95. (start_time + bin_size:slide:end_time)');
  96. xax = mean(bins,2);
  97. numBins = size(bins, 1);
  98. % Output spike matrices organization:
  99. % 1. Low switch frequency switch (PREF)
  100. % 2. Low switch frequency switch (NULL)
  101. % 3. High switch frequency switch (PREF)
  102. % 4. High switch frequency switch (NULL)
  103. % 5. Low switch frequency non-switch (NULL) % testing epoch
  104. % 6. Low switch frequency non-switch (PREF)
  105. % 7. High switch frequency non-switch (NULL)
  106. % 8. High switch frequency non-switch (PREF)
  107. % Output ROC area matrix:
  108. % 1. LSF non-switch trials
  109. % 2. LSF switch trials
  110. % 3. HSF switch trials
  111. % 4. HSF non-switch trials
  112. [spike_rates_avg, spike_rates_SEM, spike_rates_avg_std_norm_avg, ...
  113. spike_rates_avg_std_norm_SEM, ...
  114. ROC_area, cell_selectivity, ...
  115. normalizationTerm, uniqueUnitNames, ...
  116. unit_example] = processNeuralData(dat, slide, bin_size, start_time, end_time, [], []);
  117. %%
  118. % Calculate binned performance difference (LSF-HSF)
  119. % Returns vector of 4 bins:
  120. % Bin 1: 100-225 ms
  121. % Bin 2: 225-375 ms
  122. % Bin 3: 375-600 ms
  123. % Bin 4: 600-1200 ms
  124. % For performance metric need to change dat to using all trials, not just correct trials
  125. dat = mergedTableSub;
  126. [LSF_switch_binned_performance, HSF_switch_binned_performance, binned_behavior_diff] = ...
  127. behaviorBinnedPerformance(dat);
  128. %%
  129. % Parse sensitivity (i.e., psychometric slope)
  130. slope_diff = cell2mat(sensitivity_diff_labeled_N(:,2));
  131. LmoresenLSF = slope_diff > 0;
  132. LmoresenHSF = slope_diff < 0;
  133. Lsamesen = slope_diff == 0;
  134. Lother = LmoresenHSF + Lsamesen;
  135. Lothersen = Lother == 1;
  136. %%
  137. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  138. %%%%%%%%%%%%%%%%%%%% Figure 5D-E %%%%%%%%%%%%%%%%%%
  139. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  140. % Compare evidence encoding, discriminability, and behavior, separately for:
  141. % Figure 5D (figure 99): sessions with greater sensitivity at LSF than HSF (cond = LmoresenLSF)
  142. % Figure 5E (figure 44): sessions with greater sensitivity at HSF than LSF, or equal (cond = Lothersen)
  143. %
  144. % Panel 2 uses the 200-400ms ROC-area window for both D and E (per this
  145. % file's own header above and the manuscript's Fig 5D/E caption: "(middle)
  146. % MT evidence discriminability (average ROC area, 200-400 ms ...)" with E
  147. % described as "Same as D"). The original script used 50-500ms for D's
  148. % Panel 2, inconsistent with its own header and with E -- fixed here.
  149. % Panels 1/3's viewing-duration XTick still differ between D and E in the
  150. % original script; that difference is preserved, just parameterized per
  151. % panel instead of copy-pasted.
  152. panelCond = {LmoresenLSF, Lothersen};
  153. panelFig = [99 44];
  154. panelROCBin = [200 400; 200 400]; % [bin1 bin2] for Panel 2, per panel
  155. panelTimecourseXTick = [false true]; % whether Panel 1 sets an explicit XTick
  156. panelPerfXTick = {cfg.bins.viewDuration.midpoints, [200,400,600,800,1000]}; % Panel 3 XTick
  157. for ee = 1:2
  158. cond = panelCond{ee};
  159. figure(panelFig(ee)); clf
  160. % Evidence encoding (MT neural activity):
  161. subplot(1,3,1); hold on; box on;
  162. testing_dur = 900; % How much of test epoch to display
  163. pref_only = false;
  164. end_bin = find(bins(:,1) == testing_dur - 0.5*bin_size,1);
  165. x_vals_patch = [xax(1:end_bin)' flip(xax(1:end_bin)')]; % X vals -- time relative to test stimulus onset
  166. x_vals = xax(1:end_bin)';
  167. x_val_trim = 0; % Testing stim only
  168. yy = [1,3]; % LSF; HSF
  169. for cc = 1:2
  170. dd = yy(cc);
  171. y_vals = mean(spike_rates_avg_std_norm_avg(cond,1:end_bin,dd), 1, 'omitnan');
  172. y_vals_SEM = nanse(spike_rates_avg_std_norm_avg(cond,1:end_bin,dd),1);
  173. y_vals_patch = [y_vals - y_vals_SEM flip(y_vals + y_vals_SEM)];
  174. p = patch(x_vals_patch(~isnan(y_vals_patch) & x_vals_patch > x_val_trim), y_vals_patch(~isnan(y_vals_patch) & x_vals_patch > x_val_trim), colors{cc});
  175. set(p,'LineStyle','none')
  176. alpha(p, 0.2);
  177. plot(x_vals(~isnan(y_vals) & x_vals > x_val_trim), y_vals(~isnan(y_vals) & x_vals > x_val_trim), 'LineWidth', 0.75, 'Color', colors{cc});
  178. end
  179. xlabel('Time relative to test stim onset (ms)')
  180. ylabel('Avg. firing rate')
  181. ylim([-0.2 0.8])
  182. if panelTimecourseXTick(ee)
  183. set(gca(),'XTick',[200,400,600,800,1000])
  184. end
  185. % Evidence discriminability (MT ROC area):
  186. subplot(1,3,2); hold on; box on;
  187. bin1 = panelROCBin(ee,1); % Starting bin for ROC area average
  188. bin2 = panelROCBin(ee,2); % Ending bin for ROC area average
  189. start_bin = find(bins(:,1) == bin1 - 0.5*bin_size,1);
  190. end_bin = find(bins(:,1) == bin2 - 0.5*bin_size,1);
  191. x_line = -0.4:0.1:1;
  192. y_line = -0.4:0.1:1;
  193. xlim([0.2 1])
  194. ylim([0.2 1])
  195. plot(x_line, y_line, 'k');
  196. % Monkey Mi:
  197. x = mean(ROC_area(Mi(cond(Mi)),start_bin:end_bin,3), 2, 'omitnan');
  198. y = mean(ROC_area(Mi(cond(Mi)),start_bin:end_bin,2), 2, 'omitnan');
  199. plot(x,y, 'k', 'Marker', 'square', 'MarkerSize',10, 'LineStyle', 'none', 'MarkerFaceColor','white')
  200. % Monkey An:
  201. x = mean(ROC_area(An(cond(An)),start_bin:end_bin,3), 2, 'omitnan');
  202. y = mean(ROC_area(An(cond(An)),start_bin:end_bin,2), 2, 'omitnan');
  203. plot(x,y, 'k', 'Marker', 'o', 'MarkerSize',10, 'LineStyle', 'none', 'MarkerFaceColor','white', 'MarkerEdgeColor', 'black')
  204. % Monkey Ch:
  205. x = mean(ROC_area(Ch(cond(Ch)),start_bin:end_bin,3), 2, 'omitnan');
  206. y = mean(ROC_area(Ch(cond(Ch)),start_bin:end_bin,2), 2, 'omitnan');
  207. plot(x,y, 'k', 'Marker', 'diamond', 'MarkerSize',10, 'LineStyle', 'none', 'MarkerFaceColor','white')
  208. x = mean(ROC_area(cond,start_bin:end_bin,3), 2, 'omitnan');
  209. y = mean(ROC_area(cond,start_bin:end_bin,2), 2, 'omitnan');
  210. xlabel('ROC area (HSF)')
  211. ylabel('ROC area (LSF)')
  212. [p, h, stats] = signrank(x,y);
  213. d = computeCohenDCI(y, x, 'paired');
  214. subtitle(['p = ', num2str(p), ' & d = ', num2str(d)])
  215. % Performance (avg. binned percent correct)
  216. subplot(1,3,3); hold on; box on;
  217. LSF_switch_dat = mean(LSF_switch_binned_performance(cond,:));
  218. LSF_switch_dat_sem = nanse(LSF_switch_binned_performance(cond,:));
  219. HSF_switch_dat = mean(HSF_switch_binned_performance(cond,:));
  220. HSF_switch_dat_sem = nanse(HSF_switch_binned_performance(cond,:));
  221. errorbar(cfg.bins.viewDuration.midpoints, LSF_switch_dat, LSF_switch_dat_sem, 'Color', colors{1},'LineWidth', 2)
  222. errorbar(cfg.bins.viewDuration.midpoints, HSF_switch_dat, HSF_switch_dat_sem, 'Color', colors{2}, 'LineWidth', 2)
  223. ylabel('Fraction correct')
  224. xlabel('Binned viewing duration (ms)')
  225. xlim([0 1000])
  226. ylim([0.4 .9])
  227. set(gca(),'XTick', panelPerfXTick{ee})
  228. end
  229. %% Relevant Figure Supplements
  230. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  231. %%%%%%%%%%%%%%%%%%%% Figure 5-Figure Supplement 2 %%%%%%%%%%%%%%%%%%%
  232. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  233. % Test-epoch average activity (HSF vs. LSF), by monkey and by sensitivity
  234. % classification.
  235. % Row 1: sessions more sensitive to evidence at LSF (cond = LmoresenLSF)
  236. % Row 2: sessions more sensitive to evidence at HSF, or equal (cond = Lothersen)
  237. % Panel order (An, Mi, Ch) matches the manuscript, not
  238. % monkeyIdx.names' alphabetical (An, Ch, Mi) order.
  239. bin1 = 200; % Starting bin for response average
  240. bin2 = 400; % Ending bin for response average
  241. start_bin = find(bins(:,1) == bin1 - 0.5*bin_size,1);
  242. end_bin = find(bins(:,1) == bin2 - 0.5*bin_size,1);
  243. sensGroups = {LmoresenLSF, Lothersen};
  244. x_line = -0.2:0.1:2;
  245. y_line = -0.2:0.1:2;
  246. figure(21); clf
  247. for ss = 1:numel(sensGroups)
  248. cond = sensGroups{ss};
  249. for mm = 1:numel(monkeyOrder)
  250. monkeyName = monkeyOrder{mm};
  251. idx = monkeyNumIdx.(monkeyName);
  252. subplot(2,3,(ss-1)*3+mm); hold on; box on;
  253. ylim([-0.2,1])
  254. xlim([-0.2,1])
  255. plot(x_line, y_line, 'k');
  256. x = mean(spike_rates_avg_std_norm_avg(idx(cond(idx)),start_bin:end_bin,3), 2, 'omitnan');
  257. y = mean(spike_rates_avg_std_norm_avg(idx(cond(idx)),start_bin:end_bin,1), 2, 'omitnan');
  258. plot(x,y, 'k', 'Marker', monkeyMarkers.(monkeyName), 'MarkerSize',10, 'LineStyle', 'none', 'MarkerFaceColor','white')
  259. xlabel('High switch frequency avg. FR')
  260. ylabel('Low switch frequency avg. FR')
  261. [p, h, stats] = signrank(x,y);
  262. d = computeCohenDCI(y, x, 'paired');
  263. title(['Testing Epoch average firing rate ', num2str(bin1), '-', num2str(bin2)], ' ms')
  264. subtitle(['p = ', num2str(p), ' & d = ', num2str(d)])
  265. end
  266. end
  267. %%
  268. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  269. %%%%%%%%%%%%%%%%%%%% Figure 5-Figure Supplement 4 %%%%%%%%%%%%%%%%%%%
  270. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  271. % Compare evidence encoding, discriminability, and behavior for non-switch
  272. % trials. Same row split as Figure 5D-E (row 1 = LmoresenLSF, n=100; row 2 =
  273. % Lothersen, n=32). Columns: (1) test-stimulus evidence encoding (non-switch
  274. % PREF firing rate), (2-3) test-stimulus ROC area in early (50-200 ms) and
  275. % late (200-400 ms) windows, (4) non-switch behavioral performance.
  276. %
  277. % Non-switch PREF/NULL columns of spike_rates_avg_std_norm_avg: 5=LSF
  278. % non-switch NULL, 6=LSF non-switch PREF, 7=HSF non-switch NULL, 8=HSF
  279. % non-switch PREF -- as in the "Output spike matrices organization" block
  280. % above. This is NOT simply "trial started on the adapting-epoch preferred
  281. % direction" (that's what processNeuralData.m's raw dd=1/dd=2 selects):
  282. % because LSF (1 switch) and HSF (5 switches) both have an odd number of
  283. % mid-adapting-epoch reversals, the starting direction only equals the
  284. % test-epoch direction when there's *also* a switch at the adapting/test
  285. % boundary. So dd=1 (starts on the adapting-epoch PREF direction) lands on
  286. % columns 1/3 for switch trials but columns 5/7 for non-switch trials --
  287. % confirmed against this panel's published version (columns 6/8 are the
  288. % ones whose time course actually shows the expected non-switch PREF
  289. % pattern: high baseline, dip at the test-stimulus coherence drop, recovery
  290. % to a sustained plateau). See processNeuralData.m for the full derivation.
  291. % ROC_area's non-switch columns (1=LSF, 4=HSF) don't have this issue -- they
  292. % aren't split by dd, so no start/test-direction mismatch is possible.
  293. % Non-switch behavioral performance, for the Column 4 panels:
  294. dat = mergedTableSub;
  295. [LSF_nonswitch_binned_performance, HSF_nonswitch_binned_performance, ~] = ...
  296. behaviorBinnedPerformance(dat, 'nonswitch');
  297. rocWindows = [50 200; 200 400]; % [bin1 bin2] for Columns 2 and 3
  298. figure(45); clf
  299. set(gcf, 'Position', [100 100 1500 700]); % 2x4 grid is denser than this file's other panels; widen so titles/subtitles don't collide
  300. for rr = 1:2
  301. cond = panelCond{rr};
  302. % Column 1: evidence encoding (non-switch PREF MT activity, LSF vs HSF)
  303. subplot(2,4,(rr-1)*4+1); hold on; box on;
  304. testing_dur = 900; % How much of test epoch to display
  305. end_bin = find(bins(:,1) == testing_dur - 0.5*bin_size,1);
  306. x_vals_patch = [xax(1:end_bin)' flip(xax(1:end_bin)')];
  307. x_vals = xax(1:end_bin)';
  308. x_val_trim = 0; % Testing stim only
  309. ylim([-0.2 0.8])
  310. % Shade the two ROC-area windows used in Columns 2-3 (light = early 50-200ms, dark = late 200-400ms)
  311. patch([50 200 200 50], [-0.2 -0.2 0.8 0.8], [0.5 0.5 0.5], 'FaceAlpha', 0.15, 'LineStyle', 'none');
  312. patch([200 400 400 200], [-0.2 -0.2 0.8 0.8], [0.5 0.5 0.5], 'FaceAlpha', 0.3, 'LineStyle', 'none');
  313. yy = [6,8]; % LSF non-switch PREF; HSF non-switch PREF
  314. for cc = 1:2
  315. dd = yy(cc);
  316. y_vals = mean(spike_rates_avg_std_norm_avg(cond,1:end_bin,dd), 1, 'omitnan');
  317. y_vals_SEM = nanse(spike_rates_avg_std_norm_avg(cond,1:end_bin,dd),1);
  318. y_vals_patch = [y_vals - y_vals_SEM flip(y_vals + y_vals_SEM)];
  319. p = patch(x_vals_patch(~isnan(y_vals_patch) & x_vals_patch > x_val_trim), y_vals_patch(~isnan(y_vals_patch) & x_vals_patch > x_val_trim), colors{cc});
  320. set(p,'LineStyle','none')
  321. alpha(p, 0.2);
  322. plot(x_vals(~isnan(y_vals) & x_vals > x_val_trim), y_vals(~isnan(y_vals) & x_vals > x_val_trim), 'LineWidth', 0.75, 'Color', colors{cc});
  323. end
  324. xlabel('Time relative to test stim onset (ms)')
  325. ylabel('Avg. firing rate (non-switch)')
  326. % Columns 2-3: evidence discriminability (non-switch ROC area), early and late windows
  327. for ww = 1:2
  328. subplot(2,4,(rr-1)*4+1+ww); hold on; box on;
  329. bin1 = rocWindows(ww,1);
  330. bin2 = rocWindows(ww,2);
  331. start_bin = find(bins(:,1) == bin1 - 0.5*bin_size,1);
  332. end_bin = find(bins(:,1) == bin2 - 0.5*bin_size,1);
  333. x_line = -0.4:0.1:1;
  334. y_line = -0.4:0.1:1;
  335. xlim([0.2 1])
  336. ylim([0.2 1])
  337. plot(x_line, y_line, 'k');
  338. % Monkey Mi:
  339. x = mean(ROC_area(Mi(cond(Mi)),start_bin:end_bin,4), 2, 'omitnan');
  340. y = mean(ROC_area(Mi(cond(Mi)),start_bin:end_bin,1), 2, 'omitnan');
  341. plot(x,y, 'k', 'Marker', 'square', 'MarkerSize',10, 'LineStyle', 'none', 'MarkerFaceColor','white')
  342. % Monkey An:
  343. x = mean(ROC_area(An(cond(An)),start_bin:end_bin,4), 2, 'omitnan');
  344. y = mean(ROC_area(An(cond(An)),start_bin:end_bin,1), 2, 'omitnan');
  345. plot(x,y, 'k', 'Marker', 'o', 'MarkerSize',10, 'LineStyle', 'none', 'MarkerFaceColor','white', 'MarkerEdgeColor', 'black')
  346. % Monkey Ch:
  347. x = mean(ROC_area(Ch(cond(Ch)),start_bin:end_bin,4), 2, 'omitnan');
  348. y = mean(ROC_area(Ch(cond(Ch)),start_bin:end_bin,1), 2, 'omitnan');
  349. plot(x,y, 'k', 'Marker', 'diamond', 'MarkerSize',10, 'LineStyle', 'none', 'MarkerFaceColor','white')
  350. x = mean(ROC_area(cond,start_bin:end_bin,4), 2, 'omitnan');
  351. y = mean(ROC_area(cond,start_bin:end_bin,1), 2, 'omitnan');
  352. xlabel('ROC area (HSF, non-switch)')
  353. ylabel('ROC area (LSF, non-switch)')
  354. [p, h, stats] = signrank(x,y);
  355. d = computeCohenDCI(y, x, 'paired');
  356. title(sprintf('%d-%d ms', bin1, bin2))
  357. subtitle(['p = ', num2str(p), ' & d = ', num2str(d)])
  358. end
  359. % Column 4: non-switch behavioral performance
  360. subplot(2,4,(rr-1)*4+4); hold on; box on;
  361. LSF_nonswitch_dat = mean(LSF_nonswitch_binned_performance(cond,:));
  362. LSF_nonswitch_dat_sem = nanse(LSF_nonswitch_binned_performance(cond,:));
  363. HSF_nonswitch_dat = mean(HSF_nonswitch_binned_performance(cond,:));
  364. HSF_nonswitch_dat_sem = nanse(HSF_nonswitch_binned_performance(cond,:));
  365. errorbar(cfg.bins.viewDuration.midpoints, LSF_nonswitch_dat, LSF_nonswitch_dat_sem, 'Color', colors{1},'LineWidth', 2)
  366. errorbar(cfg.bins.viewDuration.midpoints, HSF_nonswitch_dat, HSF_nonswitch_dat_sem, 'Color', colors{2}, 'LineWidth', 2)
  367. ylabel('Fraction correct (non-switch)')
  368. xlabel('Binned viewing duration (ms)')
  369. xlim([0 1000])
  370. ylim([0.4 1])
  371. end

Fig5DE_FigSupp2_4.m at commit 6796598, under MIT · at the source

Overview

Authors: Kara D McGaughey1,2,3, Joshua I Gold1,2,3
  1. Department of Neuroscience, University of Pennsylvania, Philadelphia, United States
  2. Computational Neuroscience Initiative, University of Pennsylvania, Philadelphia, United States
  3. Neuroscience Graduate Group, University of Pennsylvania, Philadelphia, United States
Institutions: University of Pennsylvania (United States)
Journal: eLife, volume 15, article RP110685
Dates: published online 27 July 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.7554/elife.110685 · PMID 42504837 · PMCID PMC13405624 · OpenAlex W7147544589
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: non-human primate (organism), cognitive (subfield)
Methods: Spectral & time-frequency, Statistics, Connectivity, Preprocessing, Single-unit activity, calcium imaging, Physiology & signal measures
Keywords: Rhesus macaque
MeSH: Adaptation, Physiological*, Arousal*, Decision Making*, Pupil*, Animals, Macaca mulatta, Male, Photic Stimulation (* major topic)
Topic: Neural and Behavioral Psychology Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: National Science Foundation Graduate Research Fellowship Program (NSFGRFP DGE-1845298); NEI NIH HHS (R01 EY015260); NIMH NIH HHS (R01 MH127566)
Citations: cited by 1 paper (Europe PMC); 82 references in the paper

Abstract

Effective decision making in dynamic environments requires flexible evidence accumulation. Although models often express this flexibility as a property of the accumulator, its implementation in the brain may involve adaptive mechanisms operating at other stages of the decision process. We examined two such mechanisms: (1) stimulus-specific sensory adaptation at the level of evidence encoding, and (2) arousal-related neuromodulation, which could, in principle, affect both evidence encoding and accumulation. We measured single-unit activity in the middle temporal (MT) area and pupil-linked arousal while monkeys performed a modified random-dot motion direction-discrimination task in which an adapting stimulus with varied temporal stability preceded a behaviorally relevant test stimulus. The monkeys’ decisions reflected adaptive evidence accumulation that depended on temporal-context stability and corresponded to context-dependent changes in both stimulus-specific sensory adaptation in MT and task-evoked pupil responses. However, adaptation and pupil adjustments were not related to each other. Together, these findings suggest that multiple mechanisms contribute to flexible, context-dependent evidence accumulation, including changes in sensory adaptation that shape evidence encoding and changes in arousal that may shape the accumulation process itself.

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

TheGoldLab/ms_2026_mcgaughey_gold_elife

License: MIT
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 67965986ec067208edce0f9d5ced848680d48784, 22 July 2026
Languages: MATLAB (39)
Size: 41 files, 39 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 27 September 2026: the link answers
  • 27 September 2026: the link answers
40 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;
  • 39 scripts, each with its path and the digest of its content;
  • 9 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

The data are available on Dryad: https://doi.org/10.5061/dryad.jh9w0vtsr. The code is available on GitHub: https://github.com/TheGoldLab/ms_2026_mcgaughey_gold_elife, copy archived at Gold, 2026.

The following dataset was generated:

McGaughey KD, Gold JI. 2026. Data from: Sensory adaptation and pupil-linked arousal support flexible evidence accumulation during perceptual decision making. Dryad Digital Repository.

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

Recorded: type, language, journal, volume, pages, dates, 2 authors, 1 keyword, 8 MeSH terms, 3 funders, 81 references.

Cite

This paper

McGaughey, K. D., & Gold, J. I. (2026). Sensory adaptation and pupil-linked arousal support flexible evidence accumulation during perceptual decision making. eLife, 15, RP110685. https://doi.org/10.7554/elife.110685

BibTeX

@article{mcgaughey2026sensory,
author = {McGaughey, Kara D and Gold, Joshua I},
title = {{Sensory adaptation and pupil-linked arousal support flexible evidence accumulation during perceptual decision making}},
journal = {eLife},
year = {2026},
month = jul,
volume = {15},
pages = {RP110685},
publisher = {eLife Sciences Publications, Ltd},
issn = {2050-084X},
doi = {10.7554/elife.110685},
url = {https://doi.org/10.7554/elife.110685},
pmid = {42504837},
pmcid = {PMC13405624}
}

RIS

TY - JOUR
AU - McGaughey, Kara D
AU - Gold, Joshua I
TI - Sensory adaptation and pupil-linked arousal support flexible evidence accumulation during perceptual decision making
T2 - eLife
J2 - Elife
PY - 2026
DA - 2026/07/27
VL - 15
SP - RP110685
SN - 2050-084X
PB - eLife Sciences Publications, Ltd
DO - 10.7554/elife.110685
UR - https://doi.org/10.7554/elife.110685
LA - en
ER -

CSL-JSON

{
"id": "10.7554/elife.110685",
"type": "article-journal",
"title": "Sensory adaptation and pupil-linked arousal support flexible evidence accumulation during perceptual decision making",
"container-title": "eLife",
"author": [
{
"family": "McGaughey",
"given": "Kara D"
},
{
"family": "Gold",
"given": "Joshua I"
}
],
"container-title-short": "Elife",
"volume": "15",
"page": "RP110685",
"DOI": "10.7554/elife.110685",
"PMID": "42504837",
"PMCID": "PMC13405624",
"ISSN": "2050-084X",
"publisher": "eLife Sciences Publications, Ltd",
"URL": "https://doi.org/10.7554/elife.110685",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
27
]
]
}
}

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/s41562-026-02533-1 [code]
Fluctuations in arousal reflect latent state transitions that facilitate behavioural optimization.
Journal: Nature human behaviour
In common: Optimization Toolbox, Statistics and Machine Learning Toolbox, cognitive, 9 references
[2] doi:10.1126/sciadv.aed4172 [code]
Locomotion optimizes sensory representations through a computational principle shared by rodents and primates.
Journal: Science advances
In common: 6 references
[3] doi:10.1038/s41467-026-73032-0 [code]
Fast efficient coding and sensory adaptation in gain-adaptive recurrent networks.
Journal: Nature communications
In common: 6 references
[4] doi:10.1371/journal.pone.0355165 [code]
Pupillary dynamics during hands-off L2 driving and transitions of control under high cognitive load.
Journal: PloS one
In common: cognitive, 6 references
[5] doi:10.7554/elife.109622 [code]
Distinct involvements of the subthalamic nucleus subpopulations in reward-biased decision-making in monkeys.
Journal: eLife
In common: Statistics and Machine Learning Toolbox, non-human primate, cognitive, 1 reference, author Joshua I Gold
[6] doi:10.7554/elife.99278 [code]
Brain-wide arousal signals are segregated from movement planning in the superior colliculus of the macaque.
Journal: eLife
In common: non-human primate, 5 references
[7] doi:10.1038/s41467-026-71725-0 [code]
Interactions across hemispheres in prefrontal cortex reflect global cognitive processing.
Journal: Nature communications
In common: Optimization Toolbox, Signal Processing Toolbox, Statistics and Machine Learning Toolbox, non-human primate, cognitive, 2 references
[8] doi:10.1126/sciadv.aeg3535 [code]
Undoing of firing rate adaptation enables invariant population codes.
Journal: Science advances
In common: 5 references
[9] doi:10.1038/s41598-026-46731-3 [code]
Investigating the test-retest reliability and behavioral correlates of pupil responses in the n-back task.
Journal: Scientific reports
In common: cognitive, 5 references
[10] doi:10.1523/eneuro.0417-25.2026 [code]
Learning and Motivation State Fluctuations from Motoric and Neurophysiologic Metrics during a Somatosensory Task in Mice.
Journal: eNeuro
In common: Optimization Toolbox, Signal Processing Toolbox, Statistics and Machine Learning Toolbox, 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.