Association learning drives synaptic plasticity at feedforward synapses in somatosensory cortex.
The 2 matches
- [1] § Methods › Regression discontinuity tree model ↔ RDD_Test_V6.py, lines 92–204 · score 0.79 · regression discontinuity tree, Mann Whitney, cutoff point, qEPSC, variable, depth
- [2] § Methods › Quantification and statistical analysis ↔ RDD_Test_V6.py, lines 92–204 · score 0.77 · linear regressions, regression discontinuity tree, Mann Whitney, validated, SEM, bar
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
Python · 220 lines · 9.3 KB · no license · 2 matches
- # -*- coding: utf-8 -*-
- """
- Created on Thu Oct 2 15:51:54 2025
- @author: JoeCh
- """
- import tkinter as tk
- from tkinter import filedialog, simpledialog
- import pandas as pd
- import matplotlib.pyplot as plt
- import numpy as np
- from sklearn.tree import DecisionTreeRegressor, plot_tree
- from sklearn.model_selection import GridSearchCV, cross_val_score
- from scipy.stats import mannwhitneyu, linregress, ttest_ind
- # Global variables
- df = None
- running_var = None
- outcome_var = None
- # Function to create a scrollable frame for radio buttons
- def create_scrollable_radiobuttons(columns, parent_frame):
- for widget in parent_frame.winfo_children():
- widget.destroy()
- canvas = tk.Canvas(parent_frame, height=200, width=250)
- scrollbar = tk.Scrollbar(parent_frame, orient="vertical", command=canvas.yview)
- scroll_frame = tk.Frame(canvas)
- scroll_frame.bind("<Configure>", lambda e: canvas.configure(scrollregion=canvas.bbox("all")))
- canvas.create_window((0, 0), window=scroll_frame, anchor="nw")
- canvas.configure(yscrollcommand=scrollbar.set)
- var = tk.StringVar()
- for col in columns:
- radio_button = tk.Radiobutton(scroll_frame, text=col, variable=var, value=col)
- radio_button.pack(anchor=tk.W)
- def on_mouse_wheel(event):
- canvas.yview_scroll(-1 * (event.delta // 120), "units")
- canvas.bind("<Enter>", lambda _: canvas.bind_all("<MouseWheel>", on_mouse_wheel))
- canvas.bind("<Leave>", lambda _: canvas.unbind_all("<MouseWheel>"))
- canvas.pack(side="left", fill="both", expand=True)
- scrollbar.pack(side="right", fill="y")
- return var
- # File chooser
- def choose_file():
- global df, running_var, outcome_var
- file_path = filedialog.askopenfilename(filetypes=[("Excel files", "*.xls;*.xlsx")])
- if file_path:
- df = pd.read_excel(file_path)
- columns = df.columns.tolist()
- running_var = create_scrollable_radiobuttons(columns, frame_running)
- outcome_var = create_scrollable_radiobuttons(columns, frame_outcome)
- # Bootstrap CI
- def bootstrap_ci(model, X, y, n_bootstrap=1000):
- estimates = []
- for _ in range(n_bootstrap):
- sample_idx = np.random.choice(len(y), len(y), replace=True)
- X_sample, y_sample = X[sample_idx], y[sample_idx]
- model.fit(X_sample, y_sample)
- estimates.append(model.predict(X).mean())
- lower_bound = np.percentile(estimates, 2.5)
- upper_bound = np.percentile(estimates, 97.5)
- return lower_bound, upper_bound
- # Permutation test (studentized t-statistic)
- def permutation_test_tstat(X, y, cutoff, n_permutations=1000):
- mask_above = X.flatten() > cutoff
- mask_below = ~mask_above
- y_above, y_below = y[mask_above], y[mask_below]
- if len(y_above) < 2 or len(y_below) < 2:
- return 1.0, 0.0, 0.0
- tau = y_above.mean() - y_below.mean()
- se = np.sqrt(y_above.var(ddof=1)/len(y_above) + y_below.var(ddof=1)/len(y_below))
- orig_t = tau / se if se > 0 else 0.0
- perm_tstats = []
- for _ in range(n_permutations):
- y_perm = np.random.permutation(y)
- ya, yb = y_perm[mask_above], y_perm[mask_below]
- if len(ya) < 2 or len(yb) < 2:
- perm_tstats.append(0.0)
- continue
- tau_perm = ya.mean() - yb.mean()
- se_perm = np.sqrt(ya.var(ddof=1)/len(ya) + yb.var(ddof=1)/len(yb))
- perm_tstats.append(tau_perm/se_perm if se_perm > 0 else 0.0)
- p_val = (np.sum(np.abs(perm_tstats) >= np.abs(orig_t)) + 1) / (n_permutations + 1)
- return p_val, orig_t, tau
- # Main analysis
- def run_rdt():
- global df, running_var, outcome_var
- if running_var.get() and outcome_var.get():
- running_variable = running_var.get()
- outcome_variable = outcome_var.get()
- color_map = {'SAT1': 'blue','SAT2': 'magenta','SAT5': 'lime','ACC': 'black',
- 'ACC6': 'gray','PSEcntl': 'lightcoral','PSE1': 'red','PSE2': 'maroon',
- 'SDT1': 'lightblue','SDT2': 'teal','Naïve': 'Purple','Naive': 'Purple','EE': 'gray'}
- X = df[running_variable].values.reshape(-1, 1)
- y = df[outcome_variable].values
- # Fit tree and find cutoff
- param_grid = {'max_depth': range(1, 11)}
- dt_regressor = DecisionTreeRegressor()
- grid_search = GridSearchCV(dt_regressor, param_grid, cv=5, scoring='neg_mean_squared_error')
- grid_search.fit(X, y)
- best_tree = grid_search.best_estimator_
- optimal_cutoff = best_tree.tree_.threshold[0]
- slope, intercept, r_value, p_value, std_err = linregress(X.flatten(), y)
- # Plot scatter + regression line
- plt.figure(figsize=(10, 6))
- scatter_handles = []
- used_colors = set()
- for grp, color in color_map.items():
- df_grp = df[df['GrpTrain'] == grp]
- if not df_grp.empty:
- scatter_handle = plt.scatter(df_grp[running_variable], df_grp[outcome_variable], color=color, label=grp)
- scatter_handles.append(scatter_handle)
- used_colors.add(color)
- plt.axvline(x=optimal_cutoff, color='red', alpha=0.25, linestyle='--',
- label=f'Optimal Cutoff Point: {optimal_cutoff:.2f} µm')
- x_values = np.linspace(min(X), max(X), 100)
- y_values = intercept + slope * x_values
- plt.plot(x_values, y_values, color='black', linestyle='--', linewidth=2,
- label=f'Linear Regression (p-value: {p_value:.4f})')
- plt.legend()
- plt.xlabel("Depth (µm)", fontsize=26)
- plt.ylabel("Amplitude (pA)", fontsize=26)
- plt.title('Regression Discontinuity Tree with Linear Regression')
- plt.show()
- # Show decision tree
- plt.figure(figsize=(12, 8))
- plot_tree(best_tree, feature_names=[running_variable], filled=True, rounded=True)
- plt.show()
- # Cross-validation
- cross_val_scores = cross_val_score(best_tree, X, y, cv=5, scoring='neg_mean_squared_error')
- print(f'Cross-validated MSE: {cross_val_scores.mean()}')
- # Bootstrap CI
- lb, ub = bootstrap_ci(best_tree, X, y)
- print(f'Bootstrap CI: ({lb}, {ub})')
- # Choose cutoff
- cutoff_choice = simpledialog.askstring("Cutoff Selection", "Choose cutoff selection method: (RDT/Manual)")
- if cutoff_choice.lower() == 'rdt':
- cutoff = optimal_cutoff
- elif cutoff_choice.lower() == 'manual':
- cutoff = float(simpledialog.askstring("Manual Cutoff", "Enter manual cutoff value:"))
- else:
- raise ValueError("Invalid choice. Please choose either 'RDT' or 'Manual'.")
- # Groups
- group_below_cutoff = df[df[running_variable] <= cutoff][outcome_variable]
- group_above_cutoff = df[df[running_variable] > cutoff][outcome_variable]
- # Mann-Whitney
- mw_stat, mw_p = mannwhitneyu(group_below_cutoff, group_above_cutoff)
- # Discontinuity τ and t-test
- tau = group_above_cutoff.mean() - group_below_cutoff.mean()
- t_stat, _ = ttest_ind(group_above_cutoff, group_below_cutoff, equal_var=False)
- # Permutation test (t-stat based)
- perm_p, orig_t, orig_tau = permutation_test_tstat(X.flatten(), y, cutoff)
- print("Average qEPSC below cutoff:", group_below_cutoff.mean())
- print("Average qEPSC above cutoff:", group_above_cutoff.mean())
- print("Mann-Whitney test p-value:", mw_p)
- print(f"Discontinuity estimate (τ): {tau:.4f}")
- print(f"T-statistic for discontinuity: {t_stat:.4f}")
- print(f"Permutation test p-value: {perm_p}")
- # Bar plot
- training_group = simpledialog.askstring("Input", "Enter the training group:")
- average_below_cutoff = group_below_cutoff.mean()
- average_above_cutoff = group_above_cutoff.mean()
- std_err_below_cutoff = group_below_cutoff.sem()
- std_err_above_cutoff = group_above_cutoff.sem()
- bar_color = color_map.get(training_group, 'gray')
- plt.figure(figsize=(8, 6))
- bars = plt.bar([0, 1],
- [average_below_cutoff, average_above_cutoff],
- color=[bar_color, bar_color], alpha=0.25,
- yerr=[std_err_below_cutoff, std_err_above_cutoff], capsize=5)
- for i, group in enumerate([group_below_cutoff, group_above_cutoff]):
- x = np.ones(len(group)) * i
- jitter = np.linspace(-0.15, 0.15, len(group))
- plt.scatter(x + jitter, group, color=bar_color, alpha=0.6)
- plt.xticks([0, 1], ['Layer 2', 'Layer 3'], fontsize=26)
- plt.ylabel("Amplitude (pA)", fontsize=26)
- plt.title('Comparison of Amplitude Below and Above Cutoff', fontsize=18)
- plt.text(0.5, max(average_below_cutoff, average_above_cutoff) + 7,
- f'MW p={mw_p:.4f} | τ={tau:.2f} pA | T={t_stat:.2f} | Perm p={perm_p:.4f}',
- ha='center', fontsize=16)
- plt.show()
- root = tk.Tk()
- root.title("Excel Columns Radiobuttons")
- frame_running = tk.Frame(root)
- frame_running.pack(side=tk.LEFT, padx=10, pady=10)
- label_running = tk.Label(frame_running, text="X (Running)")
- label_running.pack()
- frame_outcome = tk.Frame(root)
- frame_outcome.pack(side=tk.LEFT, padx=10, pady=10)
- label_outcome = tk.Label(frame_outcome, text="Y (Outcome)")
- label_outcome.pack()
- button_choose = tk.Button(root, text="Choose Excel File", command=choose_file)
- button_choose.pack()
- button_plot = tk.Button(root, text="Run RDT Analysis", command=run_rdt)
- button_plot.pack()
- root.mainloop()
RDD_Test_V6.py at commit 36cdd36, no license · at the source
Overview
- Department of Biological Sciences and Center for Neural Basis of Cognition, Carnegie Mellon University, 4400 Fifth Avenue, Pittsburgh, PA 15213, United States
- Unit on Functional Neural Circuits, Systems Neurodevelopment Laboratory, National Institute of Mental Health, National Institutes of Health, Bethesda, MD 20892, United States
Abstract
Learning broadly alters neocortical synapses, although the input and target specificity for this plasticity has not been well-defined. Feedforward synapses into sensory cortex have early critical periods for plasticity after which they are resistant to experience-dependent changes. Whether these synapses are altered during learning has not been investigated, particularly in a setting where animals must identify causal relationships between sensory stimuli and rewards. Here, we examined whether these feedforward synapses can be altered by training mice in a freely-moving and whisker-dependent association task. Pathway-specific optogenetic stimulation and analysis of quantal excitatory postsynaptic currents in layer 2/
Significance statement: Although it is well accepted that sensory learning can alter cortical synapses, the pathways that are modified and the specific cues that drive this synaptic change have not been systematically investigated. By manipulating stimulus–reward probabilities, we identified discrete and opposite changes in the strength of L4–L2/
Reproduced under the paper's license (CC BY-NC), from the paper cited above.
Repositories
Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.
barthlab/Sensory-association-training-behavior
0321e55f8bb3a86c0fa4c20fd8622ea038c5a554, 12 October 2020Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
3 files
- codes/
SAT_analysis.m , MATLAB, 885 lines - LICENSE, License, 674 lines
- README.md, Text, 65 lines
barthlab/RegressionDiscontinuityTree
36cdd36346d24f65dc334a4e39cb2a9079a154f9, 8 December 2025Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
2 files
- RDD_Test_V6.py, Python, 220 lines, 2 matches
- README.md, Text, 25 lines
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 2 scripts, each with its path and the digest of its content;
- 2 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
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, 5 keywords, 15 MeSH terms, 1 funder, 96 references, 4 RRIDs.
Cite
This paper
Christian, J. A., Park, E., & Barth, A. L. (2026). Association learning drives synaptic plasticity at feedforward synapses in somatosensory cortex. Cerebral cortex (New York, N.Y. : 1991), 36(6), bhag047. https://
BibTeX
@article{christian2026as
author = {Christian, Joseph A and Park, Eunsol and Barth, Alison L},
title = {{Association learning drives synaptic plasticity at feedforward synapses in somatosensory cortex}},
journal = {Cerebral cortex (New York, N.Y. : 1991)},
year = {2026},
month = jun,
volume = {36},
number = {6},
pages = {bhag047},
publisher = {Oxford University Press},
issn = {1047-3211},
doi = {10.1093/
url = {https://
pmid = {42248694},
pmcid = {PMC13240849}
}
RIS
TY - JOUR
AU - Christian, Joseph A
AU - Park, Eunsol
AU - Barth, Alison L
TI - Association learning drives synaptic plasticity at feedforward synapses in somatosensory cortex
T2 - Cerebral cortex (New York, N.Y. : 1991)
J2 - Cereb Cortex
PY - 2026
DA - 2026/
VL - 36
IS - 6
SP - bhag047
SN - 1047-3211
PB - Oxford University Press
DO - 10.1093/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1093/
"type": "article-journal",
"title": "Association learning drives synaptic plasticity at feedforward synapses in somatosensory cortex",
"container-title": "Cerebral cortex (New York, N.Y. : 1991)",
"author": [
{
"family": "Christian",
"given": "Joseph A"
},
{
"family": "Park",
"given": "Eunsol"
},
{
"family": "Barth",
"given": "Alison L"
}
],
"container-title-short":
"volume": "36",
"issue": "6",
"page": "bhag047",
"DOI": "10.1093/
"PMID": "42248694",
"PMCID": "PMC13240849",
"ISSN": "1047-3211",
"publisher": "Oxford University Press",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
1
]
]
}
}
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.1523/jneurosci.0987-25.2026 [code]
- Cell-Type-Specific Synaptic Scaling Mechanisms Differentially Contribute to Associative Learning.Journal: The Journal of neuroscience : the official journal of the Society for NeuroscienceIn common: pandas, SciPy, Matplotlib, 1 other tool, cellular / molecular, 6 references
- [2] doi:10.1371/journal.pbio.3003831 [code]
- Disinhibitory signaling enables flexible coding of top-down information in cortical networks.Journal: PLoS biologyIn common: scikit-learn, pandas, SciPy, 2 other tools, mouse, 3 references
- [3] doi:10.1126/sciadv.aef0343 [code]
- Learning induces activation-mechanism-dep
endent neural plasticity in an intracortical microstimulation task. Journal: Science advancesIn common: scikit-learn, pandas, SciPy, 2 other tools, 3 references - [4] doi:10.1126/sciadv.aed4808 [code]
- Perirhinal input to auditory cortex supports memory-guided sensory perception.Journal: Science advancesIn common: mouse, 5 references
- [5] doi:10.1093/pnasnexus/pgag055 [code]
- Comparative transcriptomics reveals differences in cortical cell type organization between metatherian and eutherian mammals.Journal: PNAS nexusIn common: scikit-learn, pandas, SciPy, 2 other tools, mouse, cellular / molecular, 2 references
- [6] doi:10.1523/jneurosci.1506-25.2026 [code]
- Controlling Spatio-Temporal Sequences of Neural Activity by Local Synaptic Changes.Journal: The Journal of neuroscience : the official journal of the Society for NeuroscienceIn common: scikit-learn, pandas, SciPy, 2 other tools, cellular / molecular, 2 references
- [7] doi: [code]
- Real-time closed-loop feedback system for mouse mesoscale cortical signal and movement controlJournal: eLifeIn common: scikit-learn, pandas, SciPy, 2 other tools, mouse, 2 references
- [8] doi:10.1371/journal.pcbi.1014164 [code]
- 'Backpropagation and the brain' realized in cortical error neuron microcircuits.Journal: PLoS computational biologyIn common: SciPy, Matplotlib, NumPy, 3 references
- [9] doi:10.1038/s42003-026-10418-2 [code]
- Cortical PV and VIP interneurons similarly influence SST neuron output despite distinct unitary properties.Journal: Communications biologyIn common: mouse, cellular / molecular, 4 references
- [10] doi:10.1038/s41467-026-74460-8 [code]
- Spike-based alignment learning solves the weight transport problem.Journal: Nature communicationsIn common: scikit-learn, pandas, SciPy, 2 other tools, 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.
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: 2 repositories of the authors' code, each at its verified commit and with its license, 2 scripts, and 2 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:5e6e282192376769…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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.
