OSCR

Model-based semantic distance reveals adaptive coordination of distinct cognitive systems in flexible knowledge retrieval.

Code ↔ Paper

12 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 12 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] § Methods › Functional system decomposition ↔ Demo/Script08_Factor_loading_heatmap.m, lines 38–58 · score 0.62 · negative Matrix Factorization, Orthogonal Projection, cross validation, OPNMF, dimensional, components
  2. [2] § Methods › Functional system decomposition ↔ OPNMF/opnmf.m, lines 1–42 · score 0.61 · negative Matrix Factorization, Orthogonal Projection, OPNMF, components, coefficient, error
  3. [3] § Methods › Multivariate predictive modelling ↔ Code/example/regression_tpls.m, lines 13–30 · score 0.61 · inner cross validation, Parameter optimization, bootstrap, PLS, fold, components
  4. [4] § Methods › Identification of model-based semantic distance signature ↔ Code/mvpa/dependency/Tor Wager/fast_haufe.m, the whole file · a weak match · score 0.59 · Haufe transformation, forward model, backward, weight
  5. [5] § Methods › Model-based quantification of semantic distance ↔ main/feature/get_vector.py, lines 190–234 · score 0.58 · fastText, word2vec, conceptNet, GloVe, vectors, dimensional
  6. [6] § Results › A robust neural signature predicts the continuum of semantic associations ↔ Code/mvpa/algorithm/thresholded partial least squares/examples/TPLS_example1.m, lines 64–109 · score 0.56 · brain predictive, fMRI, Thresholded Partial, map, PLS, Squares
  7. [7] § Results › A robust neural signature predicts the continuum of semantic associations ↔ Code/mvpa/algorithm/thresholded partial least squares/TPLSm/evalTuningParam.m, lines 6–55 · score 0.55 · tuning parameters, standard error, cross validation, MSE, component, Vector
  8. [8] § Results › Neural signature of semantic distance consists of three distinct cognitive systems ↔ OPNMF/opnmf.m, lines 1–42 · score 0.53 · negative Matrix Factorization, Orthogonal Projection, OPNMF, neural, distance
  9. [9] § Methods › Model-based quantification of semantic distance ↔ main/feature/get_vector.py, lines 29–59 · score 0.53 · fastText, word2vec, GloVe, words, Model
  10. [10] § Results › Model-based semantic distance reliably captures flexible retrieval demands ↔ main/feature/get_vector.py, lines 190–234 · score 0.52 · fastText, word2vec, conceptNet, GloVe, vectors, model
  11. [11] § Methods › Multivariate predictive modelling ↔ Code/example/regression_tpls.m, lines 54–75 · score 0.52 · fold inner, cross validation, squared, bootstrap, components, threshold
  12. [12] § Results › Neural signature of semantic distance consists of three distinct cognitive systems ↔ Demo/Script08_Factor_loading_heatmap.m, lines 38–58 · score 0.52 · negative Matrix Factorization, Orthogonal Projection, OPNMF, validated

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 · 496 lines · 19 KB · no license · 3 matches

  1. # -*- coding: utf-8 -*-
  2. """
  3. Module Help:
  4. get_word_vector_from_model
  5. Text_vector
  6. Clean_text
  7. Image_vector
  8. @author: Cheng Liu
  9. """
  10. import sys,os
  11. sys.path.append(os.getcwd())
  12. from feature.load_model import *
  13. import re
  14. import torchvision.transforms as transforms
  15. import nltk
  16. from nltk.corpus import stopwords
  17. # 尝试获取停用词,如果失败则下载后重试
  18. try:
  19. stop_words = stopwords.words('english')
  20. except LookupError: # NLTK 在未找到资源时会抛出 LookupError
  21. print("Stopwords resource not found. Downloading now...")
  22. nltk.download('stopwords')
  23. stop_words = stopwords.words('english') # 重新尝试加载停用词
  24. def get_word_vector_from_model(wordlist,model,dimension=300):
  25. """
  26. get vector of each word, if the word is not in this model, output nan
  27. Parameters
  28. ----------
  29. wordlist : list
  30. list of words
  31. model :
  32. glove, word2vec, fastText
  33. dimension : int
  34. Returns
  35. ----------
  36. wordvectorlist : list
  37. list of vecors of words
  38. """
  39. wordvectorlist = []
  40. for w in wordlist:
  41. try :
  42. vec = model[w]
  43. except :
  44. print('------------------------------')
  45. print(w + ' is not in this model!')
  46. print('------------------------------')
  47. vec = np.empty(dimension)
  48. vec[:] = np.nan
  49. wordvectorlist.append(vec)
  50. return wordvectorlist
  51. def Clean_text(sentencelist, ifstpw=0):
  52. """
  53. clean the text by delete punctuation and stopwords
  54. Parameters
  55. ----------
  56. sentencelist : list
  57. list of text
  58. ifstpw : bool
  59. if delete words in stopwords {0,1} default is 0, do not delete words
  60. Returns
  61. ----------
  62. wordlist : nested list
  63. list of word list
  64. """
  65. # delete punctuation, keep only letters
  66. wordlist = [re.sub(r'[^\w\s]', ' ', sentence).split() for sentence in sentencelist]
  67. if ifstpw == 1:
  68. # delete words in stopwords
  69. for i in range(len(wordlist)):
  70. wordlist[i] = [w for w in wordlist[i] if w.lower() not in stopwords]
  71. elif ifstpw == 0:
  72. for i in range(len(wordlist)):
  73. wordlist[i] = [w for w in wordlist[i]]
  74. return wordlist
  75. def get_vector_from_bert_model(modelpath,vectorType,chunks):
  76. """
  77. get vector from bert model by different vectorType
  78. Parameters
  79. ----------
  80. modelpath : str
  81. bert model path
  82. vectorType : str
  83. select your vector type of data
  84. 'word': get vector of each single word, data format is one word each row
  85. 'sentence': get vector of each sentence, data format is some words each row
  86. 'word_in_sentence': get vector of each word that in sentence (it means the word has a contextual information), data format is some words each row
  87. chunks : str in list
  88. divide all data into different chunk
  89. Returns
  90. ----------
  91. vectorlist :
  92. list of vector
  93. """
  94. model,tokenizer = get_bert_model(modelpath)
  95. print('< -- get bert model success! -- >')
  96. all_outputs = []
  97. if vectorType == 'sentence':
  98. #process by chunks
  99. outputs = []
  100. for chunk in chunks:
  101. input_ids = tokenizer.encode(chunk,add_special_tokens=True,return_tensors='pt')
  102. outputs = model(input_ids).last_hidden_state[0,1:-1,:].detach().numpy()
  103. all_outputs.append(outputs)
  104. elif vectorType == 'word' or vectorType == 'word_in_sentence':
  105. #process by chunks
  106. for chunk in chunks:
  107. if vectorType == 'word':
  108. chunk = [c.split() for c in chunk]
  109. input_ids = [tokenizer.encode(c,add_special_tokens=True,return_tensors='pt') for c in chunk]
  110. outputs = [model(inp).last_hidden_state[0,1:-1,:].detach().numpy() for inp in input_ids]
  111. all_outputs.append(outputs)
  112. return all_outputs
  113. def get_vector_from_gpt2_model(modelpath,vectorType,chunks):
  114. model,tokenizer = get_gpt2_model(modelpath)
  115. print('< -- get gpt2 model success! -- >')
  116. all_outputs = []
  117. if vectorType == 'sentence':
  118. #process by chunks
  119. for chunk in chunks:
  120. input_ids = tokenizer.encode(chunk,add_special_tokens=True,return_tensors='pt')
  121. outputs = model(input_ids).last_hidden_state[0,:,:].detach().numpy()
  122. all_outputs.append(outputs)
  123. elif vectorType == 'word' or vectorType == 'word_in_sentence':
  124. #process by chunks
  125. for chunk in chunks:
  126. chunk = [c.split() for c in chunk]
  127. input_ids = [tokenizer.encode(c,add_special_tokens=True,return_tensors='pt') for c in chunk]
  128. outputs = [model(inp).last_hidden_state[0,:,:].detach().numpy() for inp in input_ids]
  129. all_outputs.append(outputs)
  130. return all_outputs
  131. def get_vector_from_clip_model(modelpath,vectorType,chunks,multi='image'):
  132. if multi == 'text':
  133. model,_,tokenizer = get_clip_model(modelpath)
  134. print('< -- get clip model success! -- >')
  135. all_outputs = []
  136. if vectorType == 'sentence':
  137. #process by chunks
  138. for chunk in chunks:
  139. input_ids = tokenizer(chunk, padding=True, return_tensors="pt")
  140. outputs = model.get_text_features(**input_ids).detach().numpy()
  141. all_outputs.append(outputs)
  142. elif vectorType == 'word' or vectorType == 'word_in_sentence':
  143. for chunk in chunks:
  144. chunk = [c.split() for c in chunk]
  145. input_ids = [tokenizer(c, padding=True, return_tensors="pt") for c in chunk]
  146. outputs = [model.get_text_features(**inp).detach().numpy() for inp in input_ids]
  147. all_outputs.append(outputs)
  148. elif multi == 'image':
  149. model,processor,_ = get_clip_model(modelpath)
  150. print('< -- get clip model success! -- >')
  151. all_outputs = []
  152. for chunk in chunks:
  153. inputs_ids = processor(images=chunk, return_tensors="pt", padding=True)
  154. outputs = model.get_image_features(**inputs_ids).detach().numpy()
  155. all_outputs.append(outputs)
  156. return all_outputs
  157. def get_vector_from_pretrained_model(modeltype,modelpath,vectorType,chunks,dimension):
  158. if modeltype == 'glv':
  159. model = get_glove_model(modelpath)
  160. print('< -- get glove model success! -- >')
  161. elif modeltype == 'w2v':
  162. model = get_gensim_model(modelpath,binary = True)
  163. print('< -- get word2vec model success! -- >')
  164. elif modeltype == 'fast':
  165. model = get_gensim_model(modelpath,binary = False)
  166. print('< -- get fastText model success! -- >')
  167. elif modeltype == 'cnt':
  168. model = get_gensim_model(modelpath,binary = False)
  169. print('< -- get conceptNet model success! -- >')
  170. elif modeltype == 'rws':
  171. model = get_gensim_model(modelpath,binary = False)
  172. print('< -- get conceptNet model success! -- >')
  173. all_outputs = []
  174. if vectorType == 'word' or vectorType == 'word_in_sentence':
  175. for chunk in chunks:
  176. chunk = [c.split() for c in chunk]
  177. outputs = []
  178. for wl in chunk:
  179. wlvec = get_word_vector_from_model(wordlist = wl,model = model,dimension=dimension)
  180. outputs.append(np.array(wlvec))
  181. all_outputs.append(outputs)
  182. elif vectorType == 'sentence':
  183. for chunk in chunks:
  184. chunk = [c.split() for c in chunk]
  185. outputs = []
  186. for wl in chunk:
  187. wlvec = get_word_vector_from_model(wordlist = wl,model = model,dimension=dimension)
  188. wlvec = [v for v in wlvec if np.isnan(v).any() == 0]
  189. if len(wlvec) == 0:
  190. vec = np.empty(dimension)
  191. vec[:] = np.nan
  192. outputs.append(vec)
  193. else :
  194. outputs.append(np.mean(wlvec,axis=0))
  195. all_outputs.append(outputs)
  196. return all_outputs
  197. def get_vector_from_elmo_model(modelpath,vectorType,chunks):
  198. model = get_elmo_model(modelpath)
  199. print('< -- get elmo model success! -- >')
  200. all_outputs = []
  201. if vectorType == 'word':
  202. # process by chunks
  203. for chunk in chunks:
  204. chunk = [c.split() for c in chunk]
  205. chunk = [[c] for c in chunk]
  206. character_ids = [batch_to_ids(c) for c in chunk]
  207. outputs = [model(cha)['elmo_representations'][0].detach().numpy().squeeze() for cha in character_ids]
  208. all_outputs.append(outputs)
  209. elif vectorType == 'sentence' :
  210. for chunk in chunks:
  211. chunk = [[c] for c in chunk]
  212. character_ids = batch_to_ids(chunk)
  213. out = model(character_ids)['elmo_representations'][0].detach().numpy()
  214. outputs = []
  215. for o in out:
  216. non_zero_rows = [i for i in range(o.shape[0]) if np.any(o[i])]
  217. outputs.append(o[non_zero_rows].squeeze())
  218. outputs = np.array(outputs)
  219. all_outputs.append(outputs)
  220. elif vectorType == 'word_in_sentence':
  221. for chunk in chunks:
  222. chunk = [c.split() for c in chunk]
  223. character_ids = batch_to_ids(chunk)
  224. out = model(character_ids)['elmo_representations'][0].detach().numpy()
  225. outputs = []
  226. for o in out:
  227. non_zero_rows = [i for i in range(o.shape[0]) if np.any(o[i])]
  228. outputs.append(o[non_zero_rows].squeeze())
  229. all_outputs.append(outputs)
  230. return all_outputs
  231. def get_vector_from_vgg_model(modelpath,vectorType,chunks):
  232. model = get_vgg_model(modelpath)
  233. print('< -- get elmo model success! -- >')
  234. preprocess = transforms.Compose([
  235. transforms.Resize((224, 224)), # 调整图像大小为 224x224
  236. transforms.ToTensor(),
  237. transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
  238. ])
  239. all_outputs = []
  240. for chunk in chunks:
  241. chunk = [preprocess(c).unsqueeze(0) for c in chunk]
  242. outputs = np.array([model(c).data.numpy().squeeze() for c in chunk])
  243. all_outputs.append(outputs)
  244. return all_outputs
  245. def out_vec_by_word(sentencelist,label,all_outputs,matchfile,outpath,filetype,outword):
  246. ## merge all chunks
  247. sentencevectorlist = []
  248. outputslist = []
  249. for out in all_outputs:
  250. outlist = []
  251. for o in out:
  252. outlist.append(o)
  253. outputslist.extend(outlist)
  254. print('< -- output vectorlist success! -- >')
  255. ## output results
  256. if matchfile == None:
  257. for i in range(len(outputslist)):
  258. sentencevectorlist = outputslist[i]
  259. outpath = '../results/Vector_' + label + '_word_in_sentence_' + str(i)+ '.' + filetype
  260. savefiles(sentencelist[i].split(),sentencevectorlist,outpath,filetype,outword)
  261. else:
  262. matchf = readfiles(matchfile)
  263. for m in range(len(matchf)):
  264. idx = sentencelist[m].split().index(matchf[m])
  265. sentencevectorlist.append(outputslist[m][idx])
  266. savefiles(matchf,sentencevectorlist,outpath,filetype,outword)
  267. return sentencevectorlist
  268. def out_vec_by_row(sentencelist,all_outputs,outpath,filetype,outword):
  269. ## merge outputs
  270. outputslist = []
  271. sentencevectorlist = []
  272. for out in all_outputs:
  273. outputslist.extend(out)
  274. sentencevectorlist = [arr.flatten() for arr in outputslist]
  275. ## output results
  276. savefiles(sentencelist,sentencevectorlist,outpath,filetype,outword)
  277. return sentencevectorlist
  278. def Text_vector(file, vectorType, label = 'gpt2_base',filetype = 'csv', outword = 'n', ifstpw=0, matchfile = None):
  279. """
  280. get vector of each row of text, if the word is not in this model, output nan
  281. Parameters
  282. ----------
  283. file : file
  284. Text filepath
  285. label : str
  286. model label (unique singal for getting the model that you want to load)
  287. filetype : str, optional
  288. you can select outfile format {'txt','csv','xlsx'}, default format is csv
  289. outword : str, optional
  290. you can select if output words and vectors into one file {'n','y'}
  291. ifstpw : bool
  292. whether delete words in stopwords {0,1} default is 0, do not delete words
  293. vectorType : str, optional
  294. you can select which type of vector you want {'word','sentence'}
  295. --> 'sentence': default, output one vector of each row of data
  296. --> 'word': output vectors for each word of each row of data
  297. matchfile : str, optional
  298. Returns
  299. ----------
  300. output a file include Text(optional) and vectors
  301. """
  302. ## load data as list
  303. if isinstance(file, list):
  304. sentencelist = file
  305. else:
  306. sentencelist = readfiles(file)
  307. print('< -- read files as sentencelist success! -- >')
  308. ## divide text
  309. chunk_size = 500
  310. chunks = [sentencelist[i:i + chunk_size] for i in range(0, len(sentencelist), chunk_size)]
  311. ## get current model info
  312. modelinfo = get_modelInfo()
  313. if label in modelinfo['label'].values:
  314. modeltype = modelinfo.loc[modelinfo['label'] == label,'modeltype'].values[0]
  315. modelpath = modelinfo.loc[modelinfo['label'] == label,'modelpath'].values[0]
  316. dimension = int(modelinfo.loc[modelinfo['label'] == label,'dimension'].values[0])
  317. else:
  318. print("There is no such label in the models list, please add model info in models/modelinfo.csv")
  319. ## get outpath
  320. print('< -- get modelinformation success! -- >')
  321. ## output information
  322. if not os.path.exists('../results'):
  323. os.makedirs('../results')
  324. outpath = '../results/Vector_' + label + '.' + filetype
  325. ## load data file to list
  326. if vectorType == 'sentence':
  327. if modeltype == 'bert':
  328. all_outputs = get_vector_from_bert_model(modelpath,vectorType,chunks)
  329. elif modeltype == 'gpt2':
  330. all_outputs = get_vector_from_gpt2_model(modelpath,vectorType,chunks)
  331. elif modeltype == 'clip':
  332. all_outputs = get_vector_from_clip_model(modelpath,vectorType,chunks,multi='text')
  333. elif modeltype == 'glv' or modeltype == 'w2v' or modeltype == 'fast' or modeltype == 'cnt' or modeltype == 'rws':
  334. all_outputs = get_vector_from_pretrained_model(modeltype,modelpath,vectorType,chunks,dimension)
  335. elif modeltype == 'elmo':
  336. all_outputs = get_vector_from_elmo_model(modelpath,vectorType,chunks)
  337. else :
  338. print('please check if the modeltype is right:{"bert","glv","w2v","gpt2","clip","fast","rws","elmo","cnt"}')
  339. sentencevectorlist = out_vec_by_row(sentencelist,all_outputs,outpath,filetype,outword)
  340. elif vectorType == 'word' or vectorType == 'word_in_sentence':
  341. ## select different model
  342. if modeltype == 'bert':
  343. all_outputs = get_vector_from_bert_model(modelpath,vectorType,chunks)
  344. elif modeltype == 'gpt2':
  345. all_outputs = get_vector_from_gpt2_model(modelpath,vectorType,chunks)
  346. elif modeltype == 'clip':
  347. all_outputs = get_vector_from_clip_model(modelpath,vectorType,chunks,multi='text')
  348. elif modeltype == 'glv' or modeltype == 'w2v' or modeltype == 'fast' or modeltype == 'cnt' or modeltype == 'rws':
  349. all_outputs = get_vector_from_pretrained_model(modeltype,modelpath,vectorType,chunks,dimension)
  350. elif modeltype == 'elmo':
  351. all_outputs = get_vector_from_elmo_model(modelpath,vectorType,chunks)
  352. else :
  353. print('please check if the modeltype is right:{"bert","glv","w2v","gpt2","clip","fast","rws","elmo","cnt"}')
  354. print('< -- get vector success! -- >')
  355. if vectorType == 'word_in_sentence':
  356. sentencevectorlist = out_vec_by_word(sentencelist,label,all_outputs,matchfile,outpath,filetype,outword)
  357. elif vectorType == 'word':
  358. sentencevectorlist = out_vec_by_row(sentencelist,all_outputs,outpath,filetype,outword)
  359. print('< -- results has output -- >')
  360. print(outpath)
  361. return sentencevectorlist
  362. def Image_vector(imagefile, label = 'clip_base', filetype = 'csv', outword = 'n', vectorType = None):
  363. """
  364. get vector of each row of image
  365. Parameters
  366. ----------
  367. imagefile : file
  368. image path
  369. filetype : str, optional
  370. you can select outfile format {'txt','csv','xlsx'}, default format is csv
  371. outword : str, optional
  372. you can select if output words and vectors into one file {'n','y'}
  373. Returns
  374. ----------
  375. output a file include Text(optional) and vectors
  376. """
  377. modelinfo = get_modelInfo()
  378. if label in modelinfo['label'].values:
  379. modeltype = modelinfo.loc[modelinfo['label'] == label,'modeltype'].values[0]
  380. modelpath = modelinfo.loc[modelinfo['label'] == label,'modelpath'].values[0]
  381. dimension = int(modelinfo.loc[modelinfo['label'] == label,'dimension'].values[0])
  382. else:
  383. print("There is no such label in the models list, please add model info in models/modelinfo.csv")
  384. ## output information
  385. if not os.path.exists('results'):
  386. os.makedirs('results')
  387. outpath = 'results/Vector_' + label + '.' + filetype
  388. imagelist = readfiles(imagefile)
  389. image = [Image.open(f).convert("RGB") for f in imagelist]
  390. ## divide text
  391. chunk_size = 500
  392. chunks = [image[i:i + chunk_size] for i in range(0, len(image), chunk_size)]
  393. if modeltype == 'clip':
  394. all_outputs = get_vector_from_clip_model(modelpath,vectorType,chunks,multi='image')
  395. elif modeltype == 'vgg':
  396. all_outputs = get_vector_from_vgg_model(modelpath,vectorType,chunks)
  397. else :
  398. print('please check if the modeltype is right:{"bert","glv","w2v","gpt2","clip","fast","rws","elmo","cnt"}')
  399. ## merge outputs
  400. sentencevectorlist = out_vec_by_row(imagelist,all_outputs,outpath,filetype,outword)
  401. print('< -- results has output -- >')
  402. return sentencevectorlist

get_vector.py at commit 87e3334, no license · at the source

Overview

  1. Institute of Science and Technology for Brain-inspired Intelligence, Fudan University,Shanghai, China
  2. Department of Psychology, Queen’s University,Ontario, Canada
  3. Department of Psychology, University of York,York, United Kingdom
Institutions: Fudan University (China); Queen's University (Canada); University of York (United Kingdom)
Journal: Nature communications, volume 17, issue 1, article 8936
Dates: received 28 November 2025; accepted 14 July 2026; published online 22 July 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s41467-026-75841-9 · PMID 42637769 · PMCID PMC13503705 · OpenAlex W7170052645
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: human (organism), cognitive (subfield)
Methods: Connectivity, Statistics, Smoothing, state filtering, decompositions, Machine learning, Preprocessing, fMRI & imaging
Keywords: Long-term memory, Language
MeSH: Brain*, Cognition*, Knowledge*, Semantics*, Brain Mapping, Humans, Language, Machine Learning, Magnetic Resonance Imaging, Models, Neurological (* major topic)
Topic: Neurobiology of Language and Bilingualism (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Citations: cited by 1 paper (Europe PMC); 89 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) 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 12 matches between paragraphs and lines of code.

lc451574367/Embedding

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 87e3334679c886f18f1289687185568b22cdad21, 18 May 2024
Languages: Python (11)
Size: 27 files, 11 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, tests
Not found: license file, CITATION.cff, environment file, continuous integration, documentation
Tools: PyTorch (4 files), Pillow (3 files), Hugging Face Transformers (3 files), NumPy (2 files), pandas (2 files)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
12 files

cognizelab/fmatrix-OPNMF

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 885fbd5772565766a653611bf41d3a9b25edeca7, 30 March 2026
Languages: MATLAB (25)
Size: 35 files, 25 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, CITATION.cff
Not found: license file, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
26 files

cognizelab/semantic-distance-signature

License: GPL-3.0
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 4e9f962c5cfce6ed7dcb7099be2b6d6a8751bb26, 7 July 2026
Languages: MATLAB (191)
Size: 230 files, 191 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, license file, documentation
Not found: CITATION.cff, environment file, tests, continuous integration
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
193 files

Zenodo 21161485

License: CC-BY-4.0
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: the references
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
192 files
At the source:

Code availability statement

The paper has a code availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1038/s41467-026-75841-9.

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:

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

Data availability statement

The paper has a data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

  • no repository, dataset or request procedure was recognized in it

Read it in the paper: doi.org/10.1038/s41467-026-75841-9.

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, 5 authors, 2 keywords, 10 MeSH terms, 3 funders, 81 references.

Cite

This paper

Zhuang, K., Liang, X., Smallwood, J., Jefferies, E., & Vatansever, D. (2026). Model-based semantic distance reveals adaptive coordination of distinct cognitive systems in flexible knowledge retrieval. Nature communications, 17(1), 8936. https://doi.org/10.1038/s41467-026-75841-9

BibTeX

@article{zhuang2026model,
author = {Zhuang, Kaixiang and Liang, Xinyu and Smallwood, Jonathan and Jefferies, Elizabeth and Vatansever, Deniz},
title = {{Model-based semantic distance reveals adaptive coordination of distinct cognitive systems in flexible knowledge retrieval}},
journal = {Nature communications},
year = {2026},
month = jul,
volume = {17},
number = {1},
pages = {8936},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/s41467-026-75841-9},
url = {https://doi.org/10.1038/s41467-026-75841-9},
pmid = {42637769},
pmcid = {PMC13503705}
}

RIS

TY - JOUR
AU - Zhuang, Kaixiang
AU - Liang, Xinyu
AU - Smallwood, Jonathan
AU - Jefferies, Elizabeth
AU - Vatansever, Deniz
TI - Model-based semantic distance reveals adaptive coordination of distinct cognitive systems in flexible knowledge retrieval
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/07/22
VL - 17
IS - 1
SP - 8936
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/s41467-026-75841-9
UR - https://doi.org/10.1038/s41467-026-75841-9
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-75841-9",
"type": "article-journal",
"title": "Model-based semantic distance reveals adaptive coordination of distinct cognitive systems in flexible knowledge retrieval",
"container-title": "Nature communications",
"author": [
{
"family": "Zhuang",
"given": "Kaixiang"
},
{
"family": "Liang",
"given": "Xinyu"
},
{
"family": "Smallwood",
"given": "Jonathan"
},
{
"family": "Jefferies",
"given": "Elizabeth"
},
{
"family": "Vatansever",
"given": "Deniz"
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "8936",
"DOI": "10.1038/s41467-026-75841-9",
"PMID": "42637769",
"PMCID": "PMC13503705",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41467-026-75841-9",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
22
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1038/s41467-026-73153-6 [code]
Latent neural architecture organising shared aesthetic evaluations of visual artworks.
Journal: Nature communications
In common: Pillow, PyTorch, Statistics and Machine Learning Toolbox, 2 other tools, cognitive, 8 references, 3 authors
[2] doi:10.1002/hbm.70536 [code]
The Neural Processes Underpinning Flexible Semantic Retrieval in Visual and Auditory Modalities.
Journal: Human brain mapping
In common: NumPy, cognitive, 15 references
[3] doi:10.1073/pnas.2528851123 [code]
Sender-receiver subdivisions of the default mode network in perceptual and memory-guided cognition.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: NumPy, cognitive, 7 references, 2 authors
[4] doi:10.1162/imag.a.1281
Syntactic processing engages the semantic control network.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: 13 references
[5] doi:10.1162/nol.a.244 [code]
A Novel Approach to Map the Causal Impact of Brain Stimulation on Semantic Processing With Language Models.
Journal: Neurobiology of language (Cambridge, Mass.)
In common: Hugging Face Transformers, PyTorch, NumPy, 11 references
[6] doi:10.1038/s41467-026-71568-9 [code]
Convergent and selective representations of pain, appetitive processes, aversive processes, and cognitive control in the insula.
Journal: Nature communications
In common: Parallel Computing Toolbox, SPM, Pillow, 3 other tools, cognitive, 5 references
[7] doi:10.1038/s41593-026-02205-3 [code]
Competitive interactions shape mammalian brain network dynamics and computation.
Journal: Nature neuroscience
In common: Parallel Computing Toolbox, SPM, PyTorch, 3 other tools, 5 references
[8] doi:10.7554/elife.107933 [code]
Modality-agnostic decoding of vision and language from fMRI.
Journal: eLife
In common: Hugging Face Transformers, SPM, Pillow, 3 other tools, cognitive, 4 references
[9] doi:10.1038/s41467-026-74565-0 [code]
The functional neurobiology of dispositions towards negative emotions.
Journal: Nature communications
In common: Violinplot-Matlab, Parallel Computing Toolbox, SPM, 3 other tools, cognitive, 3 references
[10] doi:10.1162/imag.a.1201 [code]
All spectral frequencies of neural activity reveal semantic representation in the human anterior ventral temporal cortex.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Parallel Computing Toolbox, SPM, Statistics and Machine Learning Toolbox, 1 other tool, 5 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.