Top-down selection of visual working memory contents is supported by alpha-band phase-synchronized oscillatory networks
The 5 matches
- [1] § Methods › Classification analysis of trials of single features ↔ Figure_6_computation_synchrony.py, lines 145–223 · score 0.74 · random forest classifier, Classification accuracy, binary mask, trained, matrices, baseline
- [2] § Methods › Classification analysis of trials of single features ↔ Figure_6_computation_amplitude.py, lines 63–142 · score 0.64 · random forest classifier, Classification accuracy, trained, amplitudes, matrices, baseline
- [3] § Methods › Classification analysis of trials of single features ↔ Figure_6_computation_synchrony.py, lines 145–223 · score 0.60 · random forest classification, binary mask, matrices, baseline, synchronization
- [4] § Results › The memorized visual feature can be decoded from α-band synchronization patterns ↔ Figure_6_computation_amplitude.py, lines 63–142 · score 0.55 · random forest classifier, Classification accuracy, trained, baseline, Figure 6
- [5] § Results › α-band network synchronization predicts individual behavioral performance ↔ Figure_5_visualization.py, lines 127–167 · score 0.54 · Hit Rates, graph strength, iPLV, Pearson, HR, behavioral
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 · 223 lines · 8.8 KB · no license · 2 matches
- # -*- coding: utf-8 -*-
- """
- Created on Sat Sep 9 11:55:43 2023
- @author: hhaque
- """
- import numpy as np
- import os
- import pandas as pd
- from sklearn.ensemble import RandomForestClassifier
- from sklearn.model_selection import LeaveOneOut
- def get_complex(a, b):
- c = complex(a,b)
- return c
- vcomplex = np.vectorize(get_complex)
- def bin_to_npy(subject, condition, condition_set_name, frequency):
- fpath = '{}\\__trial_connectomes_csv\\{}\\{} {} Hz\\'.format(subject, condition_set_name, condition, frequency)
- nb_of_trials = int(len(os.listdir(fpath)) / 2)
- for trial in range(nb_of_trials):
- filename_re = '{} {} {} Hz trial_{} re.bin'.format(condition_set_name, condition, frequency, trial)
- filename_im = '{} {} {} Hz trial_{} im.bin'.format(condition_set_name, condition, frequency, trial)
- fpath_re = fpath + filename_re
- fpath_im = fpath + filename_im
- IM_real = np.fromfile(fpath_re, dtype='>f')
- IM_imag = np.fromfile(fpath_im, dtype='>f')
- trial_IM = vcomplex(IM_real, IM_imag)
- baseline_IM = trial_IM[0:79800]
- firstTW = trial_IM[79800:159600]
- secondTW = trial_IM[159600:]
- if trial == 0:
- all_IM = np.stack([baseline_IM, firstTW, secondTW])
- all_IM = np.expand_dims(all_IM, axis = 0)
- if trial != 0:
- IM = np.stack([baseline_IM, firstTW, secondTW])
- IM = np.expand_dims(IM, axis = 0)
- all_IM = np.vstack([all_IM, IM])
- return all_IM
- def get_iPLV_matrix(all_matrices, TW):
- IMs = all_matrices[:, TW, :] #extracting single TW from 3D (results in 2D)
- average = np.mean(IMs, axis = 0) #averages across all trials (results in 1D)
- iPLV_matrix = abs(average.imag) #taking iPLV of each element
- return iPLV_matrix
- def get_binary_mask(all_matrices, TW, tie = 1000):
- baseline_iPLV = get_iPLV_matrix(all_matrices, 0) #getting 1D matrix of average iPLV values for baseline
- retention_iPLV = get_iPLV_matrix(all_matrices, TW) #getting 1D matrix of average iPLV values for a retention window
- difference_iPLV = np.subtract(retention_iPLV, baseline_iPLV) #difference between the two
- max_indices = np.argsort(difference_iPLV)[::-1]
- binary_mask = np.zeros(np.shape(difference_iPLV))
- for i in range(tie):
- binary_mask[max_indices[i]] = 1
- return binary_mask
- def get_1D_sync_vector(input_matrix, binary_mask):
- input_matrix = input_matrix.imag
- input_matrix = np.where(input_matrix == 0, 1e-12, input_matrix)
- input_matrix = input_matrix * binary_mask #taking imag ONLY and then masking it
- output_matrix = input_matrix[input_matrix != 0] #removing elements with 0 and vector gets shorter
- return output_matrix
- def get_feature_matrix(npy_file, TW, binary_mask):
- nb_trials = np.shape(npy_file)[0]
- for i in range(nb_trials):
- trial_matrix = npy_file[i, TW, :]
- trial_vector = get_1D_sync_vector(trial_matrix, binary_mask)
- if i == 0:
- feature_matrix = trial_vector
- else:
- feature_matrix = np.vstack((feature_matrix, trial_vector))
- return feature_matrix
- '''Import trial IM and create feature array'''
- subject_list = ['S{:03d}'.format(i) for i in range(1, 21)]
- condition_set_name = '3x2_Feature_x_Obj'
- load = '2'
- conditions = ['Shape{}_HIT'.format(load), 'Color{}_HIT'.format(load), 'Spatial{}_HIT'.format(load)]
- frequencies = ['3.00', '3.28', '3.68', '4.02', '4.29', '4.52', '5.05',
- '5.63', '6.00', '6.56', '7.40', '8.05', '8.57', '9.03',
- '10.09', '11.25', '12.00', '13.06', '14.89', '16.00',
- '17.14', '18.00', '20.10', '22.50', '24.00', '25.95',
- '30.00', '34.29', '36.00', '40.00', '45.00', '51.43',
- '60.00', '72.00', '80.00', '90.00', '102.86', '120.00']
- for frequency in frequencies:
- frequency = frequency.replace('.', '-')
- print(frequency)
- all_matrices = []
- for subject in subject_list:
- for idx, condition in enumerate(conditions):
- npy_matrix = bin_to_npy(subject, condition, condition_set_name, frequency)
- if idx == 0:
- subject_matrices = npy_matrix
- if idx > 0:
- subject_matrices = np.vstack((subject_matrices, npy_matrix))
- all_matrices.append(subject_matrices)
- print('{} added to all_matrices for {}'.format(subject, frequency))
- for TW in [1, 2]:
- binary_mask = get_binary_mask(all_matrices, TW)
- for id_s, subject in enumerate(subject_list):
- subject_IMs_allTW = all_matrices[id_s]
- subject_IMs = subject_IMs_allTW[:, TW, :]
- subject_IMs_baseline = subject_IMs_allTW[:, 0, :]
- trial_nbs = int(subject_IMs.shape[0] / len(conditions))
- output_fpath = '\\Single_trial_matrices\\{}\\{}'.format(subject, condition_set_name)
- if not os.path.exists(output_fpath):
- os.makedirs(output_fpath)
- for id_c, condition in enumerate(conditions):
- if id_c == 0:
- condition_IM = subject_IMs[0:trial_nbs, :]
- condition_IM_baseline = subject_IMs_baseline[0:trial_nbs, :]
- if id_c == 1:
- condition_IM = subject_IMs[trial_nbs:(trial_nbs*2), :]
- condition_IM_baseline = subject_IMs_baseline[trial_nbs:(trial_nbs*2), :]
- if id_c == 2:
- condition_IM = subject_IMs[(trial_nbs*2):, :]
- condition_IM_baseline = subject_IMs_baseline[(trial_nbs*2):, :]
- feature_matrix = get_feature_matrix(condition_IM, binary_mask)
- feature_matrix_baseline = get_feature_matrix(condition_IM_baseline, binary_mask)
- feature_matrix_baseline = np.mean(feature_matrix_baseline, axis = 0)
- feature_matrix = feature_matrix - feature_matrix_baseline
- feature_matrix_output = '{}\\{}_TW{}_{}_feature_array.npy'.format(output_fpath, condition, TW, frequency)
- np.save(feature_matrix_output, feature_matrix)
- '''Perform random forest classification'''
- fpath = '\\Single_trial_matrices'
- conditions = ['Shape4_HIT', 'Color4_HIT', 'Spatial4_HIT']
- for subject in subject_list:
- print(subject)
- output_name = 'Synchrony_three_features_load4_{}'.format(subject)
- list_of_accuracies = []
- for TW in [1, 2]:
- classification_accuracy = []
- for frequency in frequencies:
- frequency = frequency.replace('.', '-')
- fpath = 'Single_trial_matrices\\{}\\{}'.format(subject, condition_set_name)
- for idx, condition in enumerate(conditions):
- npy_file = '{}\\{}_TW{}_{}_feature_array.npy'.format(fpath, condition, TW, frequency)
- npy_matrix = np.load(npy_file)
- y_condition = [idx] * np.shape(npy_matrix)[0]
- if idx == 0:
- X = npy_matrix
- y = y_condition
- if idx > 0:
- X = np.concatenate([X, npy_matrix])
- y.extend(y_condition)
- y = np.array(y)
- corr_predict = 0
- wrong_predict = 0
- loo = LeaveOneOut()
- for train_index, test_index in loo.split(X):
- X_train, X_test = X[train_index], X[test_index]
- y_train, y_test = y[train_index], y[test_index]
- clf = RandomForestClassifier(random_state=0)
- clf.fit(X_train, y_train)
- X_predicted = clf.predict(X_test)
- if np.array_equal(X_predicted, y_test) == True:
- corr_predict += 1
- else:
- wrong_predict += 1
- if (corr_predict + wrong_predict) == np.shape(X)[0]:
- print('{} is done'.format(frequency))
- else:
- print('Hmm, sth went wrong')
- classification_accuracy.append(corr_predict / np.shape(X)[0])
- list_of_accuracies.append(classification_accuracy)
- df = pd.DataFrame(list_of_accuracies)
- df = df.transpose()
- df.columns = ['Early', 'Late']
- df['Frequency'] = frequencies
- df = df[['Frequency', 'Early', 'Late']]
- output_fpath = 'Classification_output\\'
- output_fpath = output_fpath + output_name + '.csv'
- df.to_csv(output_fpath, index = False, sep = ',')
Figure_6_computation_synchrony.py at commit 0ebb16f, no license · at the source
Overview
- Neuroscience Center, HiLIFE-Helsinki Institute of Life Science, University of Helsinki, Helsinki, Finland
- BioMag Laboratory, HUS Medical Imaging Centre, Helsinki University Central Hospital, Helsinki, Finland
- Department of Neuroscience and Biomedical Engineering (NBE), Aalto University, Espoo, Finland
- Centre for Cognitive Neuroimaging (CCNi), School of Psychology and Neuroscience, University of Glasgow, Glasgow, United Kingdom
Abstract
The abstract is not reproduced here: the paper's license (none stated) does not allow it. Read it in the paper, at the publisher or on Europe PMC.
Repositories
Its files are read in the Code ↔ Paper reader above, with 5 matches between paragraphs and lines of code.
palvalab/vwm_synchronization
0ebb16fda87a10118f2fea3dd6cadb707dc77064, 21 December 2023Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
15 files
- Figure_2_computation.py, Python, 95 lines
- Figure_2_visualization.p
y , Python, 250 lines - Figure_3_computation.py, Python, 77 lines
- Figure_3_visualization.p
y , Python, 194 lines - Figure_4_visualization.p
y , Python, 81 lines - Figure_5_computation.py, Python, 148 lines
- Figure_5_visualization.p
y , Python, 167 lines, 1 match - Figure_6_computation_amp
litude.py , Python, 142 lines, 2 matches - Figure_6_computation_syn
chrony.py , Python, 223 lines, 2 matches - Figure_6_visualization_a
mplitude.py , Python, 173 lines - Figure_6_visualization_s
ynchrony.py , Python, 166 lines - Figure_7_computation.py, Python, 37 lines
- Figure_7_visualization.p
y , Python, 107 lines - utils/
plot_functions.py , Python, 866 lines - utils/
vwm_core.py , Python, 325 lines
doi:10.5061/dryad.np5hqc00n
Availability: 1 check, the latest on 26 September 2026: the link answers (HTTP 200)
- 26 September 2026: the link answers (HTTP 200)
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 15 scripts, each with its path and the digest of its content;
- 5 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
- datadryad.org/
stash/ , at datadryad.org; found in “Data and Code Availability”share/ -dtfwwnpbbsazmej4xushup1 8prtotrhveqyjpl2rdc
Code and data availability statement
The paper has a code and data availability statement. Its license (none stated) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to a dataset: datadryad.org/
stash/ share/ -dtfwwnpbbsazmej4xushup1 8prtotrhveqyjpl2rdc - it points to the authors' code: doi:10.5061/
dryad.np5hqc00n , palvalab/vwm_synchronization - it says that the data are available on request
- it says that the code is available on request
Read it in the paper: doi.org/10.1162/imag.a.1034.
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, 6 authors, 5 keywords, 2 funders, 104 references.
Cite
This paper
Haque, H., Wang, S. H., Siebenhühner, F., Robertson, E. M., Palva, J. M., & Palva, S. (2025). Top-down selection of visual working memory contents is supported by alpha-band phase-synchronized oscillatory networks. Imaging Neuroscience, 3, IMAG.a.1034. https://
BibTeX
@article{haque2025top,
author = {Haque, Hamed and Wang, Sheng H and Siebenhühner, Felix and Robertson, Edwin M and Palva, J Matias and Palva, Satu},
title = {{Top-down selection of visual working memory contents is supported by alpha-band phase-synchronized oscillatory networks}},
journal = {Imaging Neuroscience},
year = {2025},
volume = {3},
pages = {IMAG.a.1034},
publisher = {MIT Press},
issn = {2837-6056},
doi = {10.1162/
url = {https://
pmcid = {PMC12723408}
}
RIS
TY - JOUR
AU - Haque, Hamed
AU - Wang, Sheng H
AU - Siebenhühner, Felix
AU - Robertson, Edwin M
AU - Palva, J Matias
AU - Palva, Satu
TI - Top-down selection of visual working memory contents is supported by alpha-band phase-synchronized oscillatory networks
T2 - Imaging Neuroscience
J2 - Imaging Neurosci (Camb)
PY - 2025
DA - 2025
VL - 3
SP - IMAG.a.1034
SN - 2837-6056
PB - MIT Press
DO - 10.1162/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1162/
"type": "article-journal",
"title": "Top-down selection of visual working memory contents is supported by alpha-band phase-synchronized oscillatory networks",
"container-title": "Imaging Neuroscience",
"author": [
{
"family": "Haque",
"given": "Hamed"
},
{
"family": "Wang",
"given": "Sheng H"
},
{
"family": "Siebenhühner",
"given": "Felix"
},
{
"family": "Robertson",
"given": "Edwin M"
},
{
"family": "Palva",
"given": "J Matias"
},
{
"family": "Palva",
"given": "Satu"
}
],
"container-title-short":
"volume": "3",
"page": "IMAG.a.1034",
"DOI": "10.1162/
"PMCID": "PMC12723408",
"ISSN": "2837-6056",
"publisher": "MIT Press",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2025
]
]
}
}
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/s42003-026-10071-9 [code]
- Alpha phase coding supports feature binding during working memory maintenance.Journal: Communications biologyIn common: scikit-learn, SciPy, Matplotlib, 1 other tool, MEG, cognitive, 11 references
- [2] doi:10.1038/s41467-026-73818-2 [code]
- Prefrontal parvalbumin neurons mediate working memory in a task demand-dependent manner.Journal: Nature communicationsIn common: scikit-learn, pandas, SciPy, 2 other tools, cognitive, 6 references
- [3] doi:10.7554/elife.108017 [code]
- Visual working memory guides attention rhythmically in humans.Journal: eLifeIn common: cognitive, 8 references
- [4] doi:10.1162/imag.a.1335 [code]
- Functionally distinct alpha components are differentially modulated by attention and affect behavior.Journal: Imaging neuroscience (Cambridge, Mass.)In common: MEG, cognitive, 7 references
- [5] doi:10.1016/j.isci.2026.117377 [code]
- Resting-state neural oscillations predict individual differences in verbal learning and encoding strategy use.Journal: iScienceIn common: scikit-learn, SciPy, Matplotlib, 1 other tool, MEG, cognitive, 4 references
- [6] doi:10.1038/s41467-026-75959-w [code]
- Charting higher-order models of brain function beyond pairwise interactions.Journal: Nature communicationsIn common: seaborn, scikit-learn, pandas, 3 other tools, 5 references
- [7] doi:10.1093/nc/niag029 [code]
- A data-driven approach to identifying and evaluating connectivity-based neural correlates of conscious visual perception.Journal: Neuroscience of consciousnessIn common: seaborn, scikit-learn, pandas, 3 other tools, MEG, cognitive, 3 references
- [8] doi:10.7554/elife.108408 [code]
- Frequency and laminar profile of feature-specific visual activity revealed by interleaved EEG-fMRI.Journal: eLifeIn common: seaborn, pandas, SciPy, 2 other tools, 4 references
- [9] doi:10.1038/s41467-026-75705-2 [code]
- Redundant prefrontal hemispheres adapt storage strategy to working memory demands.Journal: Nature communicationsIn common: seaborn, scikit-learn, pandas, 3 other tools, cognitive, 3 references
- [10] doi:10.1038/s41593-026-02285-1 [code]
- Fixation duration on natural scenes is explained by memory encoding not processing demand.Journal: Nature neuroscienceIn common: seaborn, scikit-learn, pandas, 3 other tools, MEG, cognitive, 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, 15 scripts, and 5 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:915bb55bd3189f77…
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.
