Trial-by-trial fMRI-neurofeedback dissociates fusiform and occipital contributions to face detection and recognition.
17 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 21 matches · 2 of them tie a paragraph to a whole file without given lines: weak matches, whose lines are not tinted
- [1] § Results › Behavioural performance in the visual task › Response latencies ↔ supplementary_figures/fig5/sfig5_behavioral_barplots.R, lines 1 to 44 · score 0.85 · identify_outliers, response latencies, EXP participants, image frames, rstatix, IQR · block
oscr:b:YX0M957CDADTD-2· Report a mismatch - [2] § Results › Impact of self-regulation on subsequent activation of target ROIs during face detection and recognition ↔ fig5/fig5_models2to5_task_effects.R, lines 1 to 46 · score 0.85 · regOFA, FFA detection responses, regFFA, OFA detection responses, Dot whisker, FFA recognition responses · block
oscr:b:3KQMKBD8BWMCY-L· Report a mismatch - [3] § Results › NFB self-regulation performance › Learning across runs ↔ fig3/fig3_model1_learning.R, lines 1 to 47 · score 0.85 · percent signal change, diffPSC, Linear Mixed, predicted marginal, Dot whisker, Training Day · block
oscr:b:VNZTV3V7QRKE4-A· Report a mismatch - [4] § Results › NFB self-regulation performance › Session by group TS comparisons ↔ supplementary_figures/fig1/sfig1_first_vs_last_run_permutation.m, lines 1 to 39 · score 0.84 · FFA targeted sessions, regulation blocks, OFA targeted, training session revealed, FFA activity, 1–7 · block
oscr:b:KSHB54KSSM0DK-M· Report a mismatch - [5] § Methods › Self-regulation performance › Linear mixed-effects models ↔ fig5/fig5_models2to5_task_effects.R, lines 321 to 399 · score 0.73 · unstandardized model, dot whisker, linear mixed, Marginal, fitted, coefficients · block
oscr:b:VRMC46G610A8K-4· Report a mismatch - [6] § Methods › Technical details › NFB setup › Preprocessing with prepNFB Tool ↔ functions/my_spm_check_registration.m, the whole file · a weak match · score 0.73 · Wellcome Trust, prepNFB, simplify, Neuroimaging, SPM, coregistration · block
oscr:b:T3GC2KWRR97H0-3· Report a mismatch - [7] § Results › NFB self-regulation performance › Session by group TS comparisons ↔ supplementary_figures/fig1/sfig1_first_vs_last_run_permutation.m, lines 1 to 39 · score 0.72 · target session minus, volume permutation, sign flipping, Shaded error, pronounced, training session · block
oscr:b:KSHB54KSSM0DK-M· Report a mismatch - [8] § Methods › Self-regulation performance › Linear mixed-effects models ↔ fig6/fig6_models6and7_behavior.R, lines 414 to 464 · score 0.72 · unstandardized model, post hoc, dot whisker, deviation, variables, coefficients · block
oscr:b:Y3693RFMDCYDF-9· Report a mismatch - [9] § Methods › The effects of self-regulation performance on ROI detection and recognition responses ↔ supplementary_figures/fig4/sfig4_models2to5_animal_trials.R, lines 1 to 45 · score 0.70 · regOFA, recognition models, regFFA, OFA detection response, Training day, interaction · block
oscr:b:TX213KJJGWMV6-Z· Report a mismatch - [10] § Methods › The effects of self-regulation performance on ROI detection and recognition responses ↔ fig5/fig5_models2to5_task_effects.R, lines 1 to 46 · score 0.70 · regOFA, recognition models, regFFA, OFA detection response, Training day, interaction · block
oscr:b:3KQMKBD8BWMCY-L· Report a mismatch - [11] § Results › The effects of ROI detection and recognition responses on behavioural performance ↔ supplementary_figures/fig8/sfig8_sts_learning.R, lines 91 to 174 · score 0.67 · linear mixed model, simple slope, standardized coefficient, Dot whisker, Training Day, marginal · block
oscr:b:6VCD93QEM2ARQ-Y· Report a mismatch - [12] § Methods › Pre-training › Functional localizer task ↔ functions/run_offa_loc.m, lines 2 to 42 · score 0.66 · fearful faces, neutral faces, oval, houses, scrambled, button · block
oscr:b:E55N7BZCCYD7D-0· Report a mismatch - [13] § Results › NFB self-regulation performance › Session by group TS comparisons ↔ fig2/fig2_within_group_between_session_permutation.m, lines 1 to 29 · score 0.62 · volume permutation, sign flipping, Shaded error, scores, modulation, Figure 2 · block
oscr:b:3CSS2NA4P0CVZ-3· Report a mismatch - [14] § Results › Impact of self-regulation on subsequent activation of target ROIs during face detection and recognition › Detection-related activity ↔ fig6/fig6_models6and7_behavior.R, lines 163 to 205 · score 0.60 · p.holm, Post hoc, simple slopes, OFA detection, SE, CI · block
oscr:b:057CMTAJ615VM-0· Report a mismatch - [15] § Methods › Path analysis using structural equation modelling ↔ fig7/fig7_sem_path_models.py, lines 1 to 36 · score 0.59 · fit statistic, model fitting, Training Day, Semopy, covariance, CONT · block
oscr:b:DZCKWH9R2C4RM-Z· Report a mismatch - [16] § Methods › Technical details › NFB setup › ROI selection with analyse localizer tool ↔ functions/my_spm_check_registration.m, the whole file · a weak match · score 0.58 · ROI masks, prepNFB, coregister, template, position, tool · block
oscr:b:T3GC2KWRR97H0-3· Report a mismatch - [17] § Results › Behavioural performance in the visual task › Response latencies ↔ supplementary_figures/fig5/sfig5_behavioral_barplots.R, lines 154 to 236 · score 0.56 · Post hoc, Holm corrected, p.holm, Training Session, SD, detection · block
oscr:b:YJNSMGQJ63NDT-Z· Report a mismatch - [18] § Results › NFB self-regulation performance › Learning across runs ↔ fig6/fig6_models6and7_behavior.R, lines 207 to 248 · score 0.55 · p.holm, Post hoc, OFA session, FFA · block
oscr:b:WY5CM1MRYD4VB-Y· Report a mismatch - [19] § Methods › Participants ↔ fig3/fig3_model1_learning.R, lines 1 to 47 · score 0.53 · received sham feedback, yoked, training, NFB, regulation · block
oscr:b:VNZTV3V7QRKE4-A· Report a mismatch - [20] § Methods › Technical details › NFB setup › ROI selection with analyse localizer tool ↔ fig4/fig4_whole_brain_regulation.py, lines 1 to 48 · score 0.52 · activation maps, located, hemisphere, threshold, smoothed, voxels · block
oscr:b:VXASFJW9DWKR5-F· Report a mismatch - [21] § Methods › Offline analysis of whole brain data › Preprocessing ↔ functions/analyze_rs.m, lines 1 to 73 · score 0.50 · Preprocessing steps, scans, SPM, realignment, Temporal, smoothing · block
oscr:b:5HJK3MJ9E2MDB-X· Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
R · 399 lines · 18 KB · no license · 3 matches
- # =============================================================================
- # Figure 5 — Models 2–5: Impact of NFB Self-Regulation on Face Detection
- # and Recognition
- # =============================================================================
- #
- # Paper: ReFOFA (NCOMMS-24-11279)
- # Sample: Experimental group only, face stimuli only (N = 22, 1494 trials)
- #
- # Models:
- # Model 2 (md1): DV = FFA detection response (task_detect_FFA_beta_s)
- # Model 3 (md3): DV = OFA detection response (task_detect_OFA_beta_s)
- # Model 4 (md2): DV = FFA recognition response (task_recogn_FFA_beta_s)
- # Model 5 (md4): DV = OFA recognition response (task_recogn_OFA_beta_s)
- #
- # Key predictors: regFFA_s, regOFA_s (NFB regulation PSC, z-scored)
- # Interactions: regFFA × regOFA × Session (three-way)
- # Covariates: runID, Training_Day, detection_frms,
- # + detection beta for recognition models
- # Random effects: (1|subID) + (1|stimID)
- #
- # Output:
- # Left panel — Dot-whisker coefficients (Models 2 & 3: Detection)
- # Right panel — Dot-whisker coefficients (Models 4 & 5: Recognition)
- # Center — Predicted marginal effects with marginal density plots
- # =============================================================================
- rm(list = ls())
- # --- 1. Libraries ------------------------------------------------------------
- library(readxl) # read_excel() for source data
- library(lme4) # lmer() for mixed-effects models
- library(lmerTest) # p-values via Satterthwaite
- library(sjPlot) # plot_model() for predicted effects
- library(ggplot2) # plotting framework
- library(dotwhisker) # dwplot() for coefficient plots
- library(dplyr) # data wrangling
- library(arm) # standardize()
- library(emmeans) # emtrends() for simple slopes
- library(reghelper) # simple_slopes()
- library(egg) # theme_article()
- library(patchwork) # plot composition
- library(cowplot) # plot_grid() for combining ggMarginal plots
- library(ggExtra) # ggMarginal() for marginal density plots
- library(ggrastr) # rasterise() for efficient raw data overlay
- # --- 2. Working directory & data ---------------------------------------------
- # Set working directory to the script's location (works in RStudio)
- if (requireNamespace("rstudioapi", quietly = TRUE) && rstudioapi::isAvailable()) {
- setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
- } else {}
- setwd("..") # move up to "code and source data" root
- # Read from Source Data Excel (skip row 1 = description)
- df <- read_excel("sourceData.xlsx", sheet = "Fig. 5", skip = 1)
- cat("Data loaded:", nrow(df), "trials,", length(unique(df$subID)), "subjects\n")
- # --- 3. Factor coding --------------------------------------------------------
- # Sum-to-zero (deviation) contrasts: −0.5 / +0.5
- # Levels ordered so the contrast direction matches the manuscript
- df$Regulation <- factor(df$Regulation, levels = c("OFA", "FFA"))
- contrasts(df$Regulation) <- c(-0.5, 0.5)
- df$Training_Day <- factor(df$Training_Day, ordered = TRUE)
- # Mean-center runID for consistent conditional effect interpretation
- df$runID <- df$runID - mean(df$runID)
- # Ensure scaled variables are numeric (read_excel may import as list-columns)
- scale_cols <- c("regFFA_s", "regOFA_s", "diffROI_s",
- "task_detect_FFA_beta_s", "task_detect_OFA_beta_s",
- "task_recogn_FFA_beta_s", "task_recogn_OFA_beta_s",
- "task_FFA_beta_s", "task_OFA_beta_s")
- for (col in scale_cols) {
- df[[col]] <- as.numeric(df[[col]])
- }
- # --- 4. Model fitting --------------------------------------------------------
- # Note on model numbering:
- # Paper Model 2 → md1 (FFA detection DV)
- # Paper Model 3 → md3 (OFA detection DV)
- # Paper Model 4 → md2 (FFA recognition DV)
- # Paper Model 5 → md4 (OFA recognition DV)
- # This follows the original analysis script naming convention.
- cat("\n--- Fitting Model 2: FFA detection ---\n")
- md1 <- lmer(task_detect_FFA_beta_s ~ regFFA_s + regOFA_s + Regulation +
- runID + Training_Day + detection_frms +
- regFFA_s * regOFA_s * Regulation +
- (1|subID) + (1|stimID),
- data = df, REML = TRUE)
- print(summary(md1))
- cat("\n--- Fitting Model 3: OFA detection ---\n")
- md3 <- lmer(task_detect_OFA_beta_s ~ regFFA_s + regOFA_s + Regulation +
- runID + Training_Day + detection_frms +
- regFFA_s * regOFA_s * Regulation +
- (1|subID) + (1|stimID),
- data = df, REML = TRUE)
- print(summary(md3))
- cat("\n--- Fitting Model 4: FFA recognition ---\n")
- md2 <- lmer(task_recogn_FFA_beta_s ~ regFFA_s + regOFA_s + Regulation +
- runID + Training_Day + detection_frms +
- task_detect_FFA_beta_s +
- regFFA_s * regOFA_s * Regulation +
- (1|subID) + (1|stimID),
- data = df, REML = TRUE)
- print(summary(md2))
- cat("\n--- Fitting Model 5: OFA recognition ---\n")
- md4 <- lmer(task_recogn_OFA_beta_s ~ regFFA_s + regOFA_s + Regulation +
- runID + Training_Day + detection_frms +
- task_detect_OFA_beta_s +
- regFFA_s * regOFA_s * Regulation +
- (1|subID) + (1|stimID),
- data = df, REML = TRUE)
- print(summary(md4))
- # --- 4a. Standardized coefficients with CIs ----------------------------------
- cat("\n--- Standardized coefficients (arm::standardize) with 95% Wald CIs ---\n")
- std_with_ci <- function(model, label) {
- std_obj <- standardize(model)
- coefs <- as.data.frame(summary(std_obj)$coefficients)
- ci <- confint(std_obj, method = "Wald")
- ci <- ci[rownames(coefs), ]
- result <- cbind(coefs, ci)
- cat(paste0("\n", label, ":\n"))
- print(result)
- return(result)
- }
- md1_std_ci <- std_with_ci(md1, "Model 2: FFA detection")
- md3_std_ci <- std_with_ci(md3, "Model 3: OFA detection")
- md2_std_ci <- std_with_ci(md2, "Model 4: FFA recognition")
- md4_std_ci <- std_with_ci(md4, "Model 5: OFA recognition")
- # Keep arm::standardize model objects for dwplot (by_2sd = FALSE)
- md1_std_obj <- standardize(md1)
- md3_std_obj <- standardize(md3)
- md2_std_obj <- standardize(md2)
- md4_std_obj <- standardize(md4)
- # --- 4b. Simple slopes via emtrends (Holm-corrected per model) ---------------
- # For each model, we test 4 slopes: 2 predictors (regFFA, regOFA) × 2 sessions.
- # Holm correction is applied across the 4 slopes within each model.
- holm_correct_slopes <- function(model, model_label) {
- t_ffa <- as.data.frame(summary(emtrends(model, ~ Regulation, var = "regFFA_s"),
- infer = c(TRUE, TRUE), level = 0.95))
- t_ofa <- as.data.frame(summary(emtrends(model, ~ Regulation, var = "regOFA_s"),
- infer = c(TRUE, TRUE), level = 0.95))
- names(t_ffa)[grep("trend", names(t_ffa))] <- "slope"
- names(t_ofa)[grep("trend", names(t_ofa))] <- "slope"
- t_ffa$predictor <- "regFFA"
- t_ofa$predictor <- "regOFA"
- combined <- rbind(t_ffa, t_ofa)
- combined$p.holm <- p.adjust(combined$p.value, method = "holm")
- combined$sig <- ifelse(combined$p.holm < 0.001, "***",
- ifelse(combined$p.holm < 0.01, "**",
- ifelse(combined$p.holm < 0.05, "*", "ns.")))
- ratio_col <- ifelse("t.ratio" %in% names(combined), "t.ratio", "z.ratio")
- cat("\n===", model_label, "— Simple slopes (Holm-corrected for 4 tests) ===\n")
- print(combined[, c("predictor", "Regulation", "slope", "SE", "df",
- "lower.CL", "upper.CL", ratio_col,
- "p.value", "p.holm", "sig")])
- return(combined)
- }
- slopes_md1 <- holm_correct_slopes(md1, "Model 2: FFA detection")
- slopes_md3 <- holm_correct_slopes(md3, "Model 3: OFA detection")
- slopes_md2 <- holm_correct_slopes(md2, "Model 4: FFA recognition")
- slopes_md4 <- holm_correct_slopes(md4, "Model 5: OFA recognition")
- # --- 5. Coefficient plots (dot-whisker) --------------------------------------
- # Uses arm::standardize model objects with by_2sd = FALSE so that plotted
- # coefficients match the standardized values reported in the text.
- # Color scheme: blue = FFA ROI, red = OFA ROI
- colorSpecs <- c('#0F4889', '#D84545',
- '#0F4889', '#D84545',
- '#0F4889', '#D84545',
- '#0F4889', '#D84545',
- '#0F4889', '#D84545',
- '#0F4889', '#D84545',
- '#0F4889', '#D84545')
- predictor_labels_std <- c(
- z.regFFA_s = "regFFA",
- z.regOFA_s = "regOFA",
- c.Regulation = "Session",
- `z.regFFA_s:z.regOFA_s` = "regFFA*regOFA",
- `z.regFFA_s:c.Regulation` = "regFFA*Session",
- `z.regOFA_s:c.Regulation` = "regOFA*Session",
- `z.regFFA_s:z.regOFA_s:c.Regulation` = "regFFA*regOFA*Session"
- )
- variable_order_std <- c("z.regFFA_s", "z.regOFA_s", "c.Regulation",
- "z.regFFA_s:z.regOFA_s",
- "z.regFFA_s:c.Regulation", "z.regOFA_s:c.Regulation",
- "z.regFFA_s:z.regOFA_s:c.Regulation")
- # Detection: Models 2 & 3
- p1 <- dwplot(list(md3_std_obj, md1_std_obj),
- by_2sd = FALSE, ci = 0.95,
- dot_args = list(size = 4, shape = 21, fill = colorSpecs, color = "black", stroke = 1.2),
- whisker_args = list(size = 1, color = colorSpecs),
- style = "dotwhisker",
- vline = geom_vline(xintercept = 0, colour = "grey60",
- size = 1, linetype = 2),
- vars_order = variable_order_std) %>%
- relabel_predictors(predictor_labels_std) +
- scale_color_manual(name = "ROI", labels = c("FFA", "OFA")) +
- xlab("Standardized Coefficient (ß)") + ylab("") +
- ggtitle("Model 2 and 3: Detection") +
- theme_blank() +
- theme_article()
- # Recognition: Models 4 & 5
- p2 <- dwplot(list(md4_std_obj, md2_std_obj),
- by_2sd = FALSE, ci = 0.95,
- dot_args = list(size = 4, shape = 21, fill = colorSpecs, color = "black", stroke = 1.2),
- whisker_args = list(size = 1, color = colorSpecs),
- style = "dotwhisker",
- vline = geom_vline(xintercept = 0, colour = "grey60",
- size = 1, linetype = 2),
- vars_order = variable_order_std) %>%
- relabel_predictors(predictor_labels_std) +
- scale_color_manual(name = "ROI", labels = c("FFA", "OFA")) +
- xlab("Standardized Coefficient (ß)") + ylab("") +
- ggtitle("Model 4 and 5: Recognition") +
- theme_blank() +
- theme_article()
- # --- 6. Marginal effects with density margins --------------------------------
- colorSpecs_ffa_2 <- c('#378AD3', '#0C4787') # light/dark blue
- colorSpecs_ofa_2 <- c('#FF8585', '#D74545') # light/dark red
- ylimits <- c(-1, 2)
- densPlot_size <- 8
- # -- 6a. DETECTION panels (pl1–pl4) --
- # pl1: regFFA → FFA detection
- pl1_base <- plot_model(md1, type = "pred", terms = c('regFFA_s', 'Regulation'),
- legend.title = "Session", show.legend = FALSE,
- colors = colorSpecs_ffa_2) +
- theme_sjplot2() + geom_line(size = 1) +
- rasterise(geom_point(data = df,
- aes(x = regFFA_s, y = task_detect_FFA_beta_s, color = Regulation),
- alpha = 0.15, size = 0.5, inherit.aes = FALSE)) +
- xlab('regFFA (PSC)') + ylab(expression(paste("Detection Resp ", (beta)))) +
- coord_cartesian(ylim = ylimits) + ggtitle('FFA')
- pl1 <- ggMarginal(pl1_base, type = "density", groupColour = TRUE,
- groupFill = TRUE, alpha = 0.3, size = densPlot_size)
- # pl2: regFFA → OFA detection
- pl2_base <- plot_model(md3, type = "pred", terms = c('regFFA_s', 'Regulation'),
- legend.title = "Session", show.legend = FALSE,
- colors = colorSpecs_ofa_2) +
- theme_sjplot2() + geom_line(size = 1) +
- rasterise(geom_point(data = df,
- aes(x = regFFA_s, y = task_detect_OFA_beta_s, color = Regulation),
- alpha = 0.15, size = 0.5, inherit.aes = FALSE)) +
- xlab('regFFA (PSC)') + ylab(expression(paste("Detection Resp ", (beta)))) +
- coord_cartesian(ylim = ylimits) + ggtitle('OFA')
- pl2 <- ggMarginal(pl2_base, type = "density", groupColour = TRUE,
- groupFill = TRUE, alpha = 0.3, size = densPlot_size)
- # pl3: regOFA → FFA detection
- pl3_base <- plot_model(md1, type = "pred", terms = c('regOFA_s', 'Regulation'),
- legend.title = "Session", show.legend = FALSE,
- colors = colorSpecs_ffa_2) +
- theme_sjplot2() + geom_line(size = 1) +
- rasterise(geom_point(data = df,
- aes(x = regOFA_s, y = task_detect_FFA_beta_s, color = Regulation),
- alpha = 0.15, size = 0.5, inherit.aes = FALSE)) +
- xlab('regOFA (PSC)') + ylab(expression(paste("Detection Resp ", (beta)))) +
- coord_cartesian(ylim = ylimits) + ggtitle('FFA')
- pl3 <- ggMarginal(pl3_base, type = "density", groupColour = TRUE,
- groupFill = TRUE, alpha = 0.3, size = densPlot_size)
- # pl4: regOFA → OFA detection
- pl4_base <- plot_model(md3, type = "pred", terms = c('regOFA_s', 'Regulation'),
- legend.title = "Session", show.legend = FALSE,
- colors = colorSpecs_ofa_2) +
- theme_sjplot2() + geom_line(size = 1) +
- rasterise(geom_point(data = df,
- aes(x = regOFA_s, y = task_detect_OFA_beta_s, color = Regulation),
- alpha = 0.15, size = 0.5, inherit.aes = FALSE)) +
- xlab('regOFA (PSC)') + ylab(expression(paste("Detection Resp ", (beta)))) +
- coord_cartesian(ylim = ylimits) + ggtitle('OFA')
- pl4 <- ggMarginal(pl4_base, type = "density", groupColour = TRUE,
- groupFill = TRUE, alpha = 0.3, size = densPlot_size)
- # -- 6b. RECOGNITION panels (pl5–pl8) --
- # pl5: regFFA → FFA recognition
- pl5_base <- plot_model(md2, type = "pred", terms = c('regFFA_s', 'Regulation'),
- legend.title = "Session", show.legend = FALSE,
- colors = colorSpecs_ffa_2) +
- theme_sjplot2() + geom_line(size = 1) +
- rasterise(geom_point(data = df,
- aes(x = regFFA_s, y = task_recogn_FFA_beta_s, color = Regulation),
- alpha = 0.15, size = 0.5, inherit.aes = FALSE)) +
- xlab('regFFA (PSC)') + ylab(expression(paste("Recognition Resp ", (beta)))) +
- coord_cartesian(ylim = ylimits) + ggtitle('FFA')
- pl5 <- ggMarginal(pl5_base, type = "density", groupColour = TRUE,
- groupFill = TRUE, alpha = 0.3, size = densPlot_size)
- # pl6: regFFA → OFA recognition
- pl6_base <- plot_model(md4, type = "pred", terms = c('regFFA_s', 'Regulation'),
- legend.title = "Session", show.legend = FALSE,
- colors = colorSpecs_ofa_2) +
- theme_sjplot2() + geom_line(size = 1) +
- rasterise(geom_point(data = df,
- aes(x = regFFA_s, y = task_recogn_OFA_beta_s, color = Regulation),
- alpha = 0.15, size = 0.5, inherit.aes = FALSE)) +
- xlab('regFFA (PSC)') + ylab(expression(paste("Recognition Resp ", (beta)))) +
- coord_cartesian(ylim = ylimits) + ggtitle('OFA')
- pl6 <- ggMarginal(pl6_base, type = "density", groupColour = TRUE,
- groupFill = TRUE, alpha = 0.3, size = densPlot_size)
- # pl7: regOFA → FFA recognition
- pl7_base <- plot_model(md2, type = "pred", terms = c('regOFA_s', 'Regulation'),
- legend.title = "Session", show.legend = FALSE,
- colors = colorSpecs_ffa_2) +
- theme_sjplot2() + geom_line(size = 1) +
- rasterise(geom_point(data = df,
- aes(x = regOFA_s, y = task_recogn_FFA_beta_s, color = Regulation),
- alpha = 0.15, size = 0.5, inherit.aes = FALSE)) +
- xlab('regOFA (PSC)') + ylab(expression(paste("Recognition Resp ", (beta)))) +
- coord_cartesian(ylim = ylimits) + ggtitle('FFA')
- pl7 <- ggMarginal(pl7_base, type = "density", groupColour = TRUE,
- groupFill = TRUE, alpha = 0.3, size = densPlot_size)
- # pl8: regOFA → OFA recognition
- pl8_base <- plot_model(md4, type = "pred", terms = c('regOFA_s', 'Regulation'),
- legend.title = "Session", show.legend = FALSE,
- colors = colorSpecs_ofa_2) +
- theme_sjplot2() + geom_line(size = 1) +
- rasterise(geom_point(data = df,
- aes(x = regOFA_s, y = task_recogn_OFA_beta_s, color = Regulation),
- alpha = 0.15, size = 0.5, inherit.aes = FALSE)) +
- xlab('regOFA (PSC)') + ylab(expression(paste("Recognition Resp ", (beta)))) +
- coord_cartesian(ylim = ylimits) + ggtitle('OFA')
- pl8 <- ggMarginal(pl8_base, type = "density", groupColour = TRUE,
- groupFill = TRUE, alpha = 0.3, size = densPlot_size)
- # --- 7. Assemble figure ------------------------------------------------------
- # Detection half: regFFA panels | regOFA panels | coefficient plot
- figure1 <- cowplot::plot_grid(
- cowplot::plot_grid(pl1, pl2, ncol = 1), # regFFA → FFA/OFA detection
- cowplot::plot_grid(pl3, pl4, ncol = 1), # regOFA → FFA/OFA detection
- NULL, # spacing
- p1, # dot-whisker
- ncol = 4,
- rel_widths = c(1, 1, 0.3, 1.2)
- )
- # Recognition half: coefficient plot | regFFA panels | regOFA panels
- figure2 <- cowplot::plot_grid(
- p2, # dot-whisker
- NULL, # spacing
- cowplot::plot_grid(pl5, pl6, ncol = 1), # regFFA → FFA/OFA recognition
- cowplot::plot_grid(pl7, pl8, ncol = 1), # regOFA → FFA/OFA recognition
- ncol = 4,
- rel_widths = c(1.2, 0.3, 1, 1)
- )
- # --- 8. Summary table (for SFig. 2) ------------------------------------------
- # Full unstandardized model output tables for the supplementary materials
- # (SFig. 2). Raw coefficients are reported in the original units of the model
- # (z-scored task beta responses) and include all covariates, random effects,
- # and fit statistics. Standardized coefficients are reported in the main text
- # and dot-whisker plots (from arm::standardize) for visual comparison across
- # predictors on a common scale.
- myDV <- c('Model 2: FFA detection', 'Model 3: OFA Detection',
- 'Model 4: FFA Recognition', 'Model 5: OFA Recognition')
- tab_model(md1, md3, md2, md4,
- dv.labels = myDV,
- show.se = TRUE,
- string.est = "Estimate", string.se = "SE",
- title = 'Linear Mixed Models: Self-Regulation → Task Responses')
fig5_models2to5_task_effects.R at commit 45a6b36, no license · at the source
Overview
- Laboratory for Behavioural Neurology and Imaging of Cognition, Department of Basic Neuroscience, University of Geneva,Geneva, Switzerland
- Center for Bio- and Medical Technologies, Moscow, Russia
- Swiss Center for Affective Science, University of Geneva,Geneva, Switzerland
- Center for Biomedical Imaging, University of Geneva/EPFL,Lausanne, Switzerland
Abstract
Self-regulation of specific brain regions can be achieved using neurofeedback with real-time functional magnetic resonance imaging (rt-fMRI). We leveraged this technique to dissect the role of two tightly interconnected areas implicated in face perception, by interleaving a visual task with upregulation of either the occipital (OFA) or fusiform face-responsive areas (FFA) in a trial-wise manner. Experimental participants (N = 22) successfully enhanced their target region when compared to yoked controls (N = 20). Regulation was face-selective, as evidenced by concomitant increases in other nodes of the face processing network. Critically, face detection was faster with enhanced FFA activity but hindered by enhanced OFA, whereas face identity recognition was optimal with concomitant increases in both FFA and OFA. These results argue against traditional face processing models assuming an information flow from posterior occipital to anterior fusiform cortex and instead support non-hierarchical models where FFA mediates initial face detection and OFA contributes to subsequent identity recognition.
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 21 matches between paragraphs and lines of code.
lucp88/prepNFB
a9dfcd7af5e41e5708f84f6f0bb9e5f714bd7009, 17 February 2022Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
27 files
- Coreg_ROIs_gui.m, MATLAB, 293 lines
- analyze_loc.m, MATLAB, 478 lines
- coreg_results.m, MATLAB, 297 lines
- create_ROIs_gui.m, MATLAB, 408 lines
- create_protocol.m, MATLAB, 1,026 lines
- functions/
analyze_loc_func.m , MATLAB, 309 lines - functions/
analyze_rs.m , MATLAB, 217 lines, 1 match - functions/
coreg_ROIs.m , MATLAB, 216 lines - functions/
creat_fam_param.m , MATLAB, 91 lines - functions/
create_ini.m , MATLAB, 49 lines - functions/
create_task_param.m , MATLAB, 126 lines - functions/
dicom_imp.m , MATLAB, 134 lines - functions/
mkSubDir.m , MATLAB, 67 lines - functions/
my_spm_check_registratio , MATLAB, 130 lines, 2 matchesn.m - functions/
my_spm_image.m , MATLAB, 594 lines - functions/
my_spm_orthviews.m , MATLAB, 2,297 lines - functions/
rgb2Hex.m , MATLAB, 6 lines - functions/
run_fam_task.m , MATLAB, 212 lines - functions/
run_offa_loc.m , MATLAB, 390 lines, 1 match - functions/
show_ROIs.m , MATLAB, 150 lines - functions/
show_contrast_results.m , MATLAB, 214 lines - functions/
user_fb_update.m , MATLAB, 78 lines - functions/
write_ROIs.m , MATLAB, 36 lines - functions/
write_clust.m , MATLAB, 83 lines - prep_NFB.m, MATLAB, 793 lines
- quit_dlg.m, MATLAB, 228 lines
- README.md, Text, 67 lines
lucp88/NCOMMS-24-11279A
45a6b36e2b19e216fb8cbc9cdae1ed277f9c0fdf, 17 April 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
20 files
- fig2/
fig2_between_group_permu , MATLAB, 283 linestation.m - fig2/
fig2_within_group_betwee , MATLAB, 282 lines, 1 matchn_session_permutation.m - fig2/
shadedErrorBar.m , MATLAB, 182 lines - fig3/
fig3_model1_learning.R , R, 205 lines, 2 matches - fig4/
fig4_whole_brain_regulat , Python, 140 lines, 1 matchion.py - fig5/
fig5_models2to5_task_eff , R, 399 lines, 3 matchesects.R - fig6/
fig6_models6and7_behavio , R, 545 lines, 3 matchesr.R - fig6/
fig6_output_log.R , R, 165 lines - fig7/
edit_path_diagrams.py , Python, 157 lines - fig7/
fig7_sem_path_models.py , Python, 163 lines, 1 match - supplementary_figures/
fig1/ , MATLAB, 366 lines, 2 matchessfig1_first_vs_last_run_ permutation.m - supplementary_figures/
fig1/ , MATLAB, 182 linesshadedErrorBar.m - supplementary_figures/
fig2/ , R, 266 linessfig2_raw_data_and_diagn ostics.R - supplementary_figures/
fig4/ , R, 358 lines, 1 matchsfig4_models2to5_animal_ trials.R - supplementary_figures/
fig5/ , R, 237 lines, 2 matchessfig5_behavioral_barplot s.R - supplementary_figures/
fig8/ , R, 174 lines, 1 matchsfig8_sts_learning.R - supplementary_figures/
fig8/ , MATLAB, 197 linessfig8_sts_timecourse.m - supplementary_figures/
fig8/ , MATLAB, 182 linesshadedErrorBar.m - supplementary_figures/
fig9/ , R, 553 linessfig9_models6and7_sts.R - README.md, Text, 1 line
Zenodo 19548058
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
- 27 September 2026: the link answers (HTTP 200)
20 files
- fig2/
fig2_between_group_permu , MATLAB, 283 linestation.m - fig2/
fig2_within_group_betwee , MATLAB, 282 linesn_session_permutation.m - fig2/
shadedErrorBar.m , MATLAB, 182 lines - fig3/
fig3_model1_learning.R , R, 205 lines - fig4/
fig4_whole_brain_regulat , Python, 140 linesion.py - fig5/
fig5_models2to5_task_eff , R, 399 linesects.R - fig6/
fig6_models6and7_behavio , R, 545 linesr.R - fig6/
fig6_output_log.R , R, 165 lines - fig7/
edit_path_diagrams.py , Python, 157 lines - fig7/
fig7_sem_path_models.py , Python, 163 lines - supplementary_figures/
fig1/ , MATLAB, 366 linessfig1_first_vs_last_run_ permutation.m - supplementary_figures/
fig1/ , MATLAB, 182 linesshadedErrorBar.m - supplementary_figures/
fig2/ , R, 266 linessfig2_raw_data_and_diagn ostics.R - supplementary_figures/
fig4/ , R, 358 linessfig4_models2to5_animal_ trials.R - supplementary_figures/
fig5/ , R, 237 linessfig5_behavioral_barplot s.R - supplementary_figures/
fig8/ , R, 174 linessfig8_sts_learning.R - supplementary_figures/
fig8/ , MATLAB, 197 linessfig8_sts_timecourse.m - supplementary_figures/
fig8/ , MATLAB, 182 linesshadedErrorBar.m - supplementary_figures/
fig9/ , R, 553 linessfig9_models6and7_sts.R - README.md, Text, 1 line
Code availability
The prepNFB toolbox developed for this study is available at https://
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;
- 64 scripts, each with its path and the digest of its content;
- 21 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
- figshare:32071872, at figshare; found in DataCite
Data availability
The source data underlying all main and Supplementary Figs. are provided in the Source Data file published with this paper. The individual-level neuroimaging and behavioural data generated in this study are available under restricted access due to participant privacy protections under the ethical approval granted by the Ethical Committee of Geneva University Hospital (HUG), which does not permit unrestricted public deposition of identifiable neuroimaging data. Access can be obtained by contacting the corresponding author and completing a data use agreement specifying the intended use. Access requests will be reviewed and responded to within 30 days, subject to ethical approval. Data are available for academic, non-commercial research purposes. Data will remain available for a minimum of 10 years following publication. Source data are provided with this paper.
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, issue, pages, dates, 3 authors, 2 keywords, 14 MeSH terms, 1 funder, 81 references.
Cite
This paper
Peek, L., Koush, Y., & Vuilleumier, P. (2026). Trial-by-trial fMRI-neurofeedback dissociates fusiform and occipital contributions to face detection and recognition. Nature communications, 17(1), 7515. https://
BibTeX
@article{peek2026trial,
author = {Peek, Lucas and Koush, Yury and Vuilleumier, Patrik},
title = {{Trial-by-trial fMRI-neurofeedback dissociates fusiform and occipital contributions to face detection and recognition}},
journal = {Nature communications},
year = {2026},
month = jun,
volume = {17},
number = {1},
pages = {7515},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/
url = {https://
pmid = {42288473},
pmcid = {PMC13409027}
}
RIS
TY - JOUR
AU - Peek, Lucas
AU - Koush, Yury
AU - Vuilleumier, Patrik
TI - Trial-by-trial fMRI-neurofeedback dissociates fusiform and occipital contributions to face detection and recognition
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/
VL - 17
IS - 1
SP - 7515
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Trial-by-trial fMRI-neurofeedback dissociates fusiform and occipital contributions to face detection and recognition",
"container-title": "Nature communications",
"author": [
{
"family": "Peek",
"given": "Lucas"
},
{
"family": "Koush",
"given": "Yury"
},
{
"family": "Vuilleumier",
"given": "Patrik"
}
],
"container-title-short":
"volume": "17",
"issue": "1",
"page": "7515",
"DOI": "10.1038/
"PMID": "42288473",
"PMCID": "PMC13409027",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
13
]
]
}
}
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.1016/j.isci.2024.108915 [code]
- Enhanced attention-related alertness following right anterior insular cortex neurofeedback training.Journal: iScienceIn common: rstatix, patchwork, SPM, 3 other tools, 7 references
- [2] doi:10.1038/s41467-025-61395-9 [code]
- Double dissociation of dynamic and static face perception provides causal evidence for a third visual pathway.Journal: Nature communicationsIn common: Nilearn, patchwork, NiBabel, 4 other tools, 6 references
- [3] doi:10.1162/imag.a.1268 [code]
- Real-time fMRI-triggered experience sampling: A proof-of-concept study.Journal: Imaging neuroscience (Cambridge, Mass.)In common: shadedErrorBar, emmeans, lmerTest, 6 other tools, fMRI, 3 references
- [4] doi:10.1093/cercor/bhae211
- Neural computations in prosopagnosia.Journal: Cerebral cortex (New York, N.Y. : 1991)In common: 10 references
- [5] doi:10.1093/cercor/bhae435 [code]
- Global changes in the pattern of connectivity in developmental prosopagnosia.Journal: Cerebral cortex (New York, N.Y. : 1991)In common: ggplot2, tidyverse, NumPy, 8 references
- [6] doi:10.1038/s41467-024-47749-9 [code]
- Prediction error processing and sharpening of expected information across the face-processing hierarchy.Journal: Nature communicationsIn common: Nilearn, NiBabel, Image Processing Toolbox, 3 other tools, 6 references
- [7] doi:10.1371/journal.pcbi.1012507 [code]
- Distributed network flows generate localized category selectivity in human visual cortex.Journal: PLoS computational biologyIn common: NiBabel, Statistics and Machine Learning Toolbox, pandas, 1 other tool, 7 references
- [8] doi:10.1016/j.nicl.2025.103899 [code]
- Modulating the sense of agency in functional neurological disorder using real-time fMRI neurofeedback: a proof-of-concept study.Journal: NeuroImage. ClinicalIn common: Psychtoolbox, emmeans, SPM, 3 other tools, fMRI, 4 references
- [9] doi:10.1093/cercor/bhab212 [code]
- Visual Information Routes in the Posterior Dorsal and Ventral Face Network Studied with Intracranial Neurophysiology and White Matter Tract Endpoints.Journal: Cerebral cortex (New York, N.Y. : 1991)In common: 9 references
- [10] doi:10.7554/elife.109640
- Concurrent category-selective neural activity across the ventral occipito-temporal cortex supports a non-hierarchical view of human visual recognition.Journal: eLifeIn common: 9 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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 3 repositories of the authors' code, each at its verified commit and with its license, 64 scripts, and 21 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:448fb8e719a65cdf…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1038/s41467-026-74331-2)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1038/s41467-026-74331-2.svg
:target: https://openscicode.org/badge/doi/10.1038/s41467-026-74331-2
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41467-026-74331-2"><img src="https://openscicode.org/badge/doi/10.1038/s41467-026-74331-2.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge 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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
