OSCR

Interpretable metrics for evaluating fidelity, diversity, and privacy in synthetic EEG data

Code ↔ Paper

25 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 25 matches
  1. [1] § Proposed metrics on EEG synthetic data › Fidelity › Time › Frequency ↔ src/frequency_fidelity.py, lines 16–56 · score 0.94 · power spectral densities, fast ripple, dominant frequency, spectral coherence, frequency domain, Frequency fidelity
  2. [2] § Proposed metrics on EEG synthetic data › Diversity ↔ src/diversity.py, lines 11–55 · score 0.92 · Diversity evaluation, Geometric diversity, Intrinsic diversity, pairwise distances, UMAP, synthetic EEG
  3. [3] § Proposed metrics on EEG synthetic data › Fidelity › Complexity ↔ src/complexity_fidelity.py, lines 12–65 · score 0.90 · Lempel Ziv complexity, Multifractal Detrended Fluctuation, Multifractal Detrended Cross, Detrended Cross Correlation, permutation entropy, sample entropy
  4. [4] § Proposed metrics on EEG synthetic data › Fidelity › Time ↔ src/time_fidelity.py, lines 13–38 · score 0.80 · translation invariant, standard deviation, Mahalanobis distance, Wasserstein distance, Hjorth, mobility
  5. [5] § Proposed metrics on EEG synthetic data › Fidelity › Time-frequency ↔ src/time_frequency_fidelity.py, lines 827–961 · score 0.77 · duty cycle, burst statistics, peak, frequency fidelity, envelopes, duration
  6. [6] § Proposed metrics on EEG synthetic data › Privacy › Nearest-neighbours ↔ src/privacy.py, lines 139–195 · score 0.75 · closely synthetic signals, Nearest neighbour, NN distances, Warping, L2, DTW
  7. [7] § Proposed metrics on EEG synthetic data › Fidelity › Spatial ↔ src/evaluation_score.py, lines 611–660 · score 0.73 · channel correlation matrix, cross channel, Spatial fidelity, SD normalised, deviation, RS
  8. [8] § Validation results ↔ src/complexity_fidelity.py, lines 955–1030 · score 0.71 · PermEn, SampEn, RR RS, SS distributions, LZC, entropy
  9. [9] § Proposed metrics on EEG synthetic data › Fidelity › Spatial ↔ src/spatial_fidelity.py, lines 4–26 · score 0.71 · channel dependency structure, correlation matrices, Spatial fidelity, Frobenius, variability, SS
  10. [10] § Proposed metrics on EEG synthetic data › Privacy › Membership inference ↔ src/privacy.py, lines 139–195 · score 0.69 · Membership inference risk, modified entropy, prediction, MIR, confidence, training
  11. [11] § Proposed metrics on EEG synthetic data › Fidelity › Spatial › Fidelity score ↔ src/evaluation_score.py, lines 664–729 · score 0.69 · global fidelity score, Adaptive weights, weighted geometric, aggregation, component, entropy
  12. [12] § Proposed metrics on EEG synthetic data › Fidelity › Time-frequency ↔ src/time_frequency_fidelity.py, lines 25–67 · score 0.68 · Continuous Wavelet Transform, scalogram represents, frequency fidelity, CWT, synthetic signals, metric
  13. [13] § Proposed metrics on EEG synthetic data › Fidelity › Complexity › Complexity metrics interpretation ↔ src/complexity_fidelity.py, lines 12–65 · score 0.67 · correlation coefficients, cross fluctuation, complexity metrics, exponents, Multifractal, entropy
  14. [14] § Proposed metrics on EEG synthetic data › Fidelity › Time › Time fidelity score ↔ src/evaluation_score.py, lines 60–138 · score 0.67 · Hjorth Activity, SD normalised WD, Mahalanobis distance, Mobility, synthetic signals, score
  15. [15] § Proposed metrics on EEG synthetic data › Fidelity › Time-frequency › Visual element ↔ src/time_frequency_fidelity.py, lines 653–717 · score 0.66 · db_ref, freq_scale, vmax, vmin, Intensity, log
  16. [16] § Proposed metrics on EEG synthetic data › Privacy › Nearest-neighbours ↔ src/diversity.py, lines 260–372 · score 0.65 · distance computation, Nearest neighbour, NN distances, Euclidean, globally, synthetic
  17. [17] § Validation results ↔ src/validation/complexity_validation.py, lines 236–307 · score 0.64 · PermEn, phase randomised, SampEn, LZC, Validation, entropy
  18. [18] § Proposed metrics on EEG synthetic data › Privacy › Privacy score ↔ src/evaluation_score.py, lines 812–911 · score 0.62 · Cohen style, NN distances, attacks, accuracy, mapped, components
  19. [19] § Proposed metrics on EEG synthetic data › Fidelity › Time ↔ src/evaluation_score.py, lines 60–138 · score 0.58 · Hjorth activity, Mahalanobis distance, mobility, synthetic signals, covariance, WD
  20. [20] § Proposed metrics on EEG synthetic data › Diversity › Diversity score ↔ src/evaluation_score.py, lines 733–808 · score 0.56 · diversity components, compensation, aggregation, ratios, weights, coverage
  21. [21] § Proposed metrics on EEG synthetic data › Fidelity › Complexity › Visual element ↔ src/complexity_fidelity.py, lines 683–830 · score 0.55 · cross Hurst exponent, singularity spectrum, width, MFDCCA, multifractal
  22. [22] § Validation results ↔ src/diversity.py, lines 11–55 · score 0.55 · Nearest neighbour distances, UMAP, uniqueness, pairwise, coverage, Diversity
  23. [23] § Proposed metrics on EEG synthetic data › Fidelity › Time › Frequency fidelity score ↔ src/evaluation_score.py, lines 140–223 · score 0.54 · band power, dominant frequency, synthetic signals, Coherence, scores, spectral
  24. [24] § Methods › Validation ↔ src/validation/complexity_validation.py, lines 33–160 · score 0.53 · fractal metrics, theoretically, exception, surrogate, Validation, noise
  25. [25] § Proposed metrics on EEG synthetic data › Fidelity › Complexity › Complexity fidelity score ↔ src/complexity_fidelity.py, lines 683–830 · score 0.53 · cross Hurst exponents, real synthetic, width, multifractal, spectrum, fidelity

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 · 911 lines · 29 KB · LGPL-3.0 · 7 matches

  1. from time_fidelity import *
  2. from frequency_fidelity import *
  3. from time_frequency_fidelity import *
  4. from complexity_fidelity import *
  5. from spatial_fidelity import *
  6. from diversity import *
  7. from privacy import *
  8. def _sim(a, b, eps=1e-12):
  9. """Normalised absolute-difference similarity in [0,1]."""
  10. return 1.0 - np.abs(a - b) / (np.abs(a) + np.abs(b) + eps)
  11. def _entropy_weights(values, eps=1e-12):
  12. """
  13. Compute entropy-based adaptive weights.
  14. Higher variability → lower entropy → higher weight.
  15. Parameters
  16. ----------
  17. values : list or array-like
  18. Vector of metric values across domains.
  19. Returns
  20. -------
  21. np.ndarray
  22. Normalized weights summing to 1.
  23. """
  24. x = np.asarray(values, dtype=float)
  25. # Normalize to positive probabilities
  26. x = np.clip(x, eps, None)
  27. p = x / np.sum(x)
  28. # Shannon entropy
  29. H = -np.sum(p * np.log(p + eps))
  30. H_max = np.log(len(p))
  31. # Information utility (1 - normalized entropy)
  32. utility = 1 - (H / H_max)
  33. # If all equal → fallback to uniform weights
  34. if not np.isfinite(utility) or utility <= 0:
  35. return np.ones_like(x) / len(x)
  36. # Weight proportional to deviation from uniformity
  37. w = p * utility
  38. w = np.clip(w, eps, None)
  39. return w / np.sum(w)
  40. def _weighted_geometric_mean(x, w=None, eps=1e-12):
  41. x = np.asarray(x, dtype=float)
  42. x = np.clip(x, eps, 1.0)
  43. if w is None:
  44. w = np.ones_like(x) / x.size
  45. w = np.asarray(w, dtype=float)
  46. w = w / (np.sum(w) + eps)
  47. return float(np.prod(x ** w))
  48. def compute_time_fidelity_score(real_data, synthetic_data, weights=None):
  49. """
  50. Compute a time-domain fidelity score between real and synthetic signals
  51. using Hjorth parameter statistics.
  52. Integrated components (each mapped as S = 1/(1 + distance)):
  53. 1. Normalised WD for Hjorth Activity
  54. 2. Normalised WD for Hjorth Mobility
  55. 3. Normalised WD for Hjorth Complexity
  56. 4. Mahalanobis distance between Hjorth means
  57. All distances are in SD units:
  58. - Hjorth WDs are normalised by the real-data SD.
  59. - Mahalanobis is inherently scale-normalised via the covariance.
  60. Parameters
  61. ----------
  62. real_data : np.ndarray or list
  63. Real signals of shape [n_signals, n_samples].
  64. synthetic_data : np.ndarray or list
  65. Synthetic signals with the same shape as real_data.
  66. weights : dict, optional
  67. Weights for the components. Keys:
  68. {'activity','mobility','complexity','mahalanobis'}.
  69. Default: equal weights across all provided components 0.25 each.
  70. Returns
  71. -------
  72. float
  73. Composite time-domain fidelity score in [0, 1].
  74. """
  75. # Defaults (auto-balance across 4 components)
  76. if weights is None:
  77. w = 1.0 / 4.0
  78. weights = {
  79. 'activity': w, 'mobility': w, 'complexity': w, 'mahalanobis': w
  80. }
  81. # Ensure all keys exist; missing ones default to 0 (excluded from sum)
  82. for k in ('activity', 'mobility', 'complexity', 'mahalanobis'):
  83. weights.setdefault(k, 0.0)
  84. # Compute base Hjorth metrics
  85. tf = TimeFidelity()
  86. hj = tf.compute_hjorth_metrics(real_data, synthetic_data, verbose=False)
  87. import numpy as _np
  88. # distance (in SD units) -> similarity
  89. def _sim(d):
  90. d = float(d)
  91. if not _np.isfinite(d) or d < 0:
  92. return 0.0
  93. return 1.0 / (1.0 + d)
  94. # Use SD-normalised WDs for Hjorth parameters
  95. activity_score = _sim(hj['WD_Activity_normSD'])
  96. mobility_score = _sim(hj['WD_Mobility_normSD'])
  97. complexity_score = _sim(hj['WD_Complexity_normSD'])
  98. # Mahalanobis is already scale-normalised
  99. mahalanobis_score = _sim(hj['Mahalanobis'])
  100. # Weighted combination
  101. time_fidelity_score = (
  102. weights['activity'] * activity_score +
  103. weights['mobility'] * mobility_score +
  104. weights['complexity'] * complexity_score +
  105. weights['mahalanobis'] * mahalanobis_score
  106. )
  107. # Print components
  108. print(f"Time Fidelity Score : {time_fidelity_score:.3f}")
  109. print("Time Fidelity Components:")
  110. print(f" Activity (norm WD): {activity_score:.3f}")
  111. print(f" Mobility (norm WD): {mobility_score:.3f}")
  112. print(f" Complexity (norm WD): {complexity_score:.3f}")
  113. print(f" Mahalanobis : {mahalanobis_score:.3f}")
  114. return time_fidelity_score
  115. def compute_frequency_fidelity_score(real_data, synthetic_data, fs, weights=None):
  116. """
  117. Compute a similarity score between real and synthetic signals that blends
  118. spectral-band power, dominant frequency, coherence and a PSD–Wasserstein
  119. similarity term.
  120. Parameters
  121. ----------
  122. real_data : list | np.ndarray
  123. List/array of real signals (shape: [n_signals, n_samples] or 1-D).
  124. synthetic_data : list | np.ndarray
  125. List/array of synthetic signals (shape: [n_signals, n_samples] or 1-D).
  126. fs : int
  127. Sampling frequency (Hz).
  128. weights : dict, optional
  129. Weights for the four sub-scores. Must contain the keys:
  130. {'relative', 'dom_freq', 'psd_coherence', 'wasserstein'}
  131. Defaults to: {'relative': 0.40,
  132. 'dom_freq': 0.20,
  133. 'psd_coherence': 0.20,
  134. 'wasserstein': 0.20}
  135. Example usage:
  136. --------------
  137. real_data = np.random.randn(10, 2048) # 10 real signals, each 2048 samples
  138. synthetic_data = np.random.randn(10, 2048) # 10 synthetic signals, each 2048 samples
  139. evaluation_score.compute_frequency_fidelity_score(real_data, synthetic_data, fs=2048)
  140. Returns
  141. -------
  142. float
  143. Composite frequency-domain fidelity score in the range (0, 1].
  144. """
  145. # Helper: robust scalar casting
  146. def _as_float(x, default=np.nan):
  147. """
  148. Best-effort conversion of metric outputs (float/array/dict) into a scalar float.
  149. """
  150. if isinstance(x, (int, float, np.floating)):
  151. return float(x)
  152. if isinstance(x, np.generic):
  153. return float(x)
  154. if isinstance(x, (list, tuple, np.ndarray)):
  155. arr = np.asarray(x, dtype=float)
  156. if arr.size == 0:
  157. return float(default)
  158. return float(np.nanmean(arr))
  159. if isinstance(x, dict):
  160. # Try common summary paths used across your metric API
  161. candidates = [
  162. ("RS Summary", "Global Mean"),
  163. ("RS Summary", "Mean"),
  164. ("Summary", "Global Mean"),
  165. ("Summary", "Mean"),
  166. ("Global Mean",),
  167. ("Mean",),
  168. ("wd",),
  169. ("WD",),
  170. ("distance",),
  171. ("value",),
  172. ]
  173. for path in candidates:
  174. v = x
  175. ok = True
  176. for k in path:
  177. if isinstance(v, dict) and k in v:
  178. v = v[k]
  179. else:
  180. ok = False
  181. break
  182. if ok:
  183. return _as_float(v, default=default)
  184. return float(default)
  185. try:
  186. return float(x)
  187. except Exception:
  188. return float(default)
  189. # Default values definition
  190. analysis_band = (0.5, 500.0) # Hz
  191. win_seconds = 4.0 # Welch window length (s)
  192. window = 'hann'
  193. detrend = 'constant'
  194. overlap = 0.5 # 50%
  195. # Keep analysis band under Nyquist
  196. nyq = fs / 2.0
  197. analysis_band = (analysis_band[0], min(analysis_band[1], nyq))
  198. # Initialize FrequencyFidelity class
  199. frequency_fidelity = FrequencyFidelity(
  200. fs,
  201. analysis_band=analysis_band,
  202. win_seconds=win_seconds,
  203. window=window,
  204. detrend=detrend,
  205. overlap=overlap
  206. )
  207. # Weights
  208. if weights is None:
  209. weights = {
  210. 'relative': 0.40,
  211. 'dom_freq': 0.20,
  212. 'psd_coherence': 0.20,
  213. 'wasserstein': 0.20
  214. }
  215. # Fallback – add any missing keys with zero weight
  216. for k in ('relative', 'dom_freq', 'psd_coherence', 'wasserstein'):
  217. weights.setdefault(k, 0.0)
  218. # Optionally normalize weights to sum to 1 (prevents accidental scaling)
  219. wsum = float(sum(weights.values()))
  220. if wsum > 0:
  221. weights = {k: float(v) / wsum for k, v in weights.items()}
  222. # Shape handling
  223. if isinstance(real_data, np.ndarray) and real_data.ndim == 1:
  224. real_data = [real_data]
  225. if isinstance(synthetic_data, np.ndarray) and synthetic_data.ndim == 1:
  226. synthetic_data = [synthetic_data]
  227. # 1) Relative power
  228. freqs_r, psd_r, rel_power_r, dominant_freq_r = frequency_fidelity.compute_relative_power(
  229. real_data,
  230. analysis_band=analysis_band,
  231. win_seconds=win_seconds,
  232. window=window,
  233. detrend=detrend,
  234. overlap=overlap
  235. )
  236. freqs_s, psd_s, rel_power_s, dominant_freq_s = frequency_fidelity.compute_relative_power(
  237. synthetic_data,
  238. analysis_band=analysis_band,
  239. win_seconds=win_seconds,
  240. window=window,
  241. detrend=detrend,
  242. overlap=overlap
  243. )
  244. band_names = ["Delta", "Theta", "Alpha", "Beta", "Gamma"]
  245. real_mean_rel_power = np.array([np.nanmean(rel_power_r[b]) for b in band_names], dtype=float)
  246. synth_mean_rel_power = np.array([np.nanmean(rel_power_s[b]) for b in band_names], dtype=float)
  247. mean_band_diff = np.nanmean(np.abs(real_mean_rel_power - synth_mean_rel_power) * 100.0) # %
  248. # Map diff → similarity (clipped ≥ 0.2 to avoid 0 in extreme cases)
  249. relative_power_score = max(0.2, 1.0 - mean_band_diff / 20.0)
  250. relative_power_score = float(np.clip(relative_power_score, 0.0, 1.0))
  251. # 2) Dominant frequency
  252. freq_diff = abs(np.nanmean(dominant_freq_r) - np.nanmean(dominant_freq_s))
  253. dominant_freq_score = max(0.2, 1.0 - freq_diff / 3.0)
  254. dominant_freq_score = float(np.clip(dominant_freq_score, 0.0, 1.0))
  255. # 3) Coherence
  256. coh = frequency_fidelity.spectral_coherence(
  257. real_data, synthetic_data,
  258. mode="all_vs_all",
  259. per_band=False,
  260. analysis_band=analysis_band,
  261. win_seconds=2.0,
  262. window=window,
  263. detrend=detrend,
  264. overlap=overlap
  265. )
  266. # Robustly extract and validate coherence scalar
  267. coh_val = coh.get("RS Summary", {}).get("Global Mean", np.nan) if isinstance(coh, dict) else np.nan
  268. coh_val = _as_float(coh_val, default=np.nan)
  269. mean_coherence = 0.0
  270. if np.isfinite(coh_val):
  271. mean_coherence = float(np.clip(coh_val, 0.0, 1.0))
  272. # 4) Spectral Wasserstein distance
  273. wd_psd_raw = frequency_fidelity.spectral_wasserstein_distance(
  274. real_data, synthetic_data,
  275. fmin=analysis_band[0],
  276. fmax=analysis_band[1],
  277. mode="pairmean",
  278. per_band=False
  279. )
  280. # Robustly extract scalar WD
  281. wd_psd = _as_float(wd_psd_raw, default=np.nan)
  282. # Map distance → similarity
  283. wasserstein_score = 0.2
  284. if np.isfinite(wd_psd):
  285. wasserstein_score = float(1.0 / (1.0 + wd_psd))
  286. wasserstein_score = float(np.clip(wasserstein_score, 0.0, 1.0))
  287. # Composite score
  288. frequency_fidelity_score = (
  289. weights['relative'] * relative_power_score +
  290. weights['dom_freq'] * dominant_freq_score +
  291. weights['psd_coherence'] * mean_coherence +
  292. weights['wasserstein'] * wasserstein_score
  293. )
  294. frequency_fidelity_score = float(np.clip(frequency_fidelity_score, 0.0, 1.0))
  295. print(f"Frequency Fidelity Score: {frequency_fidelity_score:.2f}")
  296. return frequency_fidelity_score
  297. def compute_time_frequency_fidelity_score(real_data, synthetic_data, fs, *, weights=None, mode: str = "auto",
  298. pad: bool = True, rr_zip_strategy: str = "consecutive", ss_zip_strategy: str = "consecutive",return_sd: bool = False,
  299. return_per_pair: bool = False, verbose: bool = True):
  300. """
  301. Composite time frequnecy similarity for 1-D or 2-D inputs.
  302. Reuses `compute_scalogram_similarity_metrics` and combines RS per-pair metrics:
  303. score_i = w_cssim * SSIM_i
  304. + w_rmse * (1 / (1 + nRMSE_i))
  305. + w_cos * Cosine_i
  306. Parameters
  307. ----------
  308. real_data, synthetic_data : array_like
  309. 1-D (T,) or 2-D (N, T). Only these are required.
  310. weights : dict, optional
  311. {'color_ssim':0.4, 'rmse':0.3, 'cosine_similarity':0.3} by default.
  312. mode : {"auto","zip","all_vs_all"}, default "auto"
  313. - "auto": use "zip" if both inputs are 1-D or both are 2-D with the same N; else "all_vs_all".
  314. - "zip": index-wise pairing.
  315. - "all_vs_all": every real vs every synthetic.
  316. pad : bool, default True
  317. Right-pad signals to a common length before CWT.
  318. rr_zip_strategy, ss_zip_strategy : {"consecutive","halves"}
  319. Zip strategies for within-set RR/SS in the metrics method.
  320. return_sd : bool, default False
  321. Also return SD of per-pair scores.
  322. return_per_pair : bool, default False
  323. Also return list of per-pair scores.
  324. verbose : bool, default True
  325. Print a brief summary.
  326. Example usage:
  327. --------------
  328. real_data = np.random.randn(10, 2048) # 10 real signals, each 2048 samples
  329. synthetic_data = np.random.randn(10, 2048) # 10 synthetic signals, each 2048 samples
  330. evaluation_score.compute_scalogram_fidelity_score(real_data, synthetic_data, fs=2048)
  331. Returns
  332. -------
  333. mean_score : float
  334. (sd_score) : float, optional if return_sd=True
  335. (per_pair_scores) : list[float], optional if return_per_pair=True
  336. """
  337. if weights is None:
  338. weights = {'color_ssim': 0.4, 'rmse': 0.3, 'cosine_similarity': 0.3}
  339. w_cssim = float(weights.get('color_ssim', 0.4))
  340. w_rmse = float(weights.get('rmse', 0.3))
  341. w_cos = float(weights.get('cosine_similarity', 0.3))
  342. # Normalize inputs: auto-wrap 1-D → (1, T)
  343. R = np.asarray(real_data, dtype=float)
  344. S = np.asarray(synthetic_data, dtype=float)
  345. if R.ndim == 1:
  346. R = R[None, :] # shape (1, T)
  347. if S.ndim == 1:
  348. S = S[None, :] # shape (1, T)
  349. # Auto-select pairing if requested
  350. if mode == "auto":
  351. if R.shape[0] == S.shape[0]:
  352. eff_mode = "zip" # pairwise 1–1
  353. else:
  354. eff_mode = "all_vs_all" # every real vs every synthetic
  355. else:
  356. eff_mode = mode
  357. scalo = TimeFrequencyFidelity(fs=fs)
  358. # Reuse your metrics method (does RS, RR, SS under the same mode/strategies)
  359. metrics = scalo.compute_scalogram_similarity_metrics(
  360. R, S,
  361. mode=eff_mode, pad=pad,
  362. rr_zip_strategy=rr_zip_strategy, ss_zip_strategy=ss_zip_strategy,
  363. )
  364. # RS per-pair lists → composite per-pair scores
  365. ssim_list = metrics.get("Per-pair SSIM (RS)", [])
  366. nrmse_list = metrics.get("Per-pair NRMSE (RS)", [])
  367. cos_list = metrics.get("Per-pair Cosine (RS)", [])
  368. scores = []
  369. for ssim_i, nrmse_i, cos_i in zip(ssim_list, nrmse_list, cos_list):
  370. cos_i = max(-1.0, min(1.0, float(cos_i))) # safety
  371. sim_rmse = 1.0 / (1.0 + float(nrmse_i)) # maps to (0,1]
  372. score_i = w_cssim*float(ssim_i) + w_rmse*sim_rmse + w_cos*cos_i
  373. scores.append(float(score_i))
  374. if not scores:
  375. mean_score = float('nan'); sd_score = float('nan')
  376. else:
  377. arr = np.asarray(scores, dtype=float)
  378. mean_score = float(np.mean(arr))
  379. sd_score = float(np.std(arr, ddof=1)) if arr.size > 1 else float('nan')
  380. if verbose:
  381. label = eff_mode if eff_mode != "zip" else f"zip"
  382. print(f"Time-frequency Fidelity Score: {mean_score:.3f} | mode: {label}, pairs: {len(scores)}")
  383. #out = (mean_score,)
  384. #if return_sd:
  385. #out += (sd_score,)
  386. #if return_per_pair:
  387. #out += (scores,)
  388. #return out if len(out) > 1 else out[0]
  389. def compute_complexity_fidelity_score(
  390. real_data,
  391. synthetic_data,
  392. q_range=np.arange(-5, 5, 0.1),
  393. weights=None
  394. ):
  395. """
  396. Complexity fidelity score combining fractal and entropy/complexity similarities.
  397. Final aggregation: weighted geometric mean over available (finite) subscores.
  398. This penalizes collapse in any single complexity component.
  399. Subscores (mapped to [0,1], higher = closer match):
  400. - dcca, mfdfa, mfdcca, sampen, permen, lzc
  401. """
  402. # Default: equal weights across ALL subscores (6 components)
  403. if weights is None:
  404. weights = {
  405. 'dcca': 1/6, 'mfdfa': 1/6, 'mfdcca': 1/6,
  406. 'sampen': 1/6, 'permen': 1/6, 'lzc': 1/6
  407. }
  408. # Wrap 1D arrays
  409. if isinstance(real_data, np.ndarray) and real_data.ndim == 1:
  410. real_data = [real_data]
  411. if isinstance(synthetic_data, np.ndarray) and synthetic_data.ndim == 1:
  412. synthetic_data = [synthetic_data]
  413. # Helpers
  414. def _sim_range(a, b, lo, hi):
  415. d = min(abs(float(a) - float(b)), hi - lo)
  416. return 1.0 - d / (hi - lo)
  417. def _mean_Hq(signals, q_range, get_scales):
  418. Hqs = []
  419. for x in signals:
  420. scales = get_scales(len(x))
  421. if len(scales) < 4:
  422. continue
  423. _, info = nk.fractal_dfa(x, scale=scales, multifractal=True, q=q_range, show=False)
  424. Hq = np.asarray(info["H"])
  425. if np.all(np.isfinite(Hq)):
  426. Hqs.append(Hq)
  427. if not Hqs:
  428. return None
  429. return np.nanmean(np.vstack(Hqs), axis=0)
  430. # Fractality scores
  431. fs_dcca = ComplexityFidelity(real_data, synthetic_data, method='DCCA', q_range=q_range)
  432. fs_dcca.compute_fractal_metrics()
  433. H_rr, H_rs = fs_dcca.means[:2]
  434. F_DCCA = _sim_range(H_rr, H_rs, lo=0.3, hi=1.2)
  435. fs_mfdfa = ComplexityFidelity(real_data, synthetic_data, method='MFDFA', q_range=q_range)
  436. fs_mfdfa.compute_fractal_metrics()
  437. H_r, H_s = fs_mfdfa.means
  438. S_H_mfdfa = _sim_range(H_r, H_s, lo=0.3, hi=1.2)
  439. dummy = ComplexityFidelity(real_data, synthetic_data, method='MFDFA', q_range=q_range)
  440. Hq_r = _mean_Hq(real_data, q_range, dummy._get_win_sizes)
  441. Hq_s = _mean_Hq(synthetic_data, q_range, dummy._get_win_sizes)
  442. if Hq_r is not None and Hq_s is not None:
  443. rmse = float(np.sqrt(np.nanmean((Hq_r - Hq_s) ** 2)))
  444. tau = 0.15
  445. S_Hq = float(np.exp(-rmse / tau))
  446. else:
  447. S_Hq = np.nan
  448. F_MFDFA = S_H_mfdfa if np.isnan(S_Hq) else 0.5 * S_H_mfdfa + 0.5 * S_Hq
  449. fs_mfdcca = ComplexityFidelity(real_data, synthetic_data, method='MFDCCA', q_range=q_range)
  450. fs_mfdcca.compute_fractal_metrics()
  451. Hc_rr, Hc_rs = fs_mfdcca.means[:2]
  452. Da_rr, Da_rs = fs_mfdcca.deltaAlpha_means[:2]
  453. S_H_mfdcca = _sim_range(Hc_rr, Hc_rs, lo=0.3, hi=1.2)
  454. S_Dalpha = _sim_range(Da_rr, Da_rs, lo=0.0, hi=0.5)
  455. F_MFDCCA = 0.7 * S_H_mfdcca + 0.3 * S_Dalpha
  456. # Entropy / algorithmic scores
  457. cf_entropy = ComplexityFidelity(real_data, synthetic_data, method='MFDFA', q_range=q_range)
  458. e = cf_entropy.compute_entropy_complexity_metrics(
  459. real_data, synthetic_data,
  460. sampen_m=2, sampen_r=None,
  461. permen_m=3, permen_tau=1,
  462. lzc_threshold=None,
  463. n_surrogates=0,
  464. verbose=False
  465. )
  466. def _to_sim(wd_norm):
  467. return np.nan if not np.isfinite(wd_norm) else 1.0 / (1.0 + float(wd_norm))
  468. S_SampEn = _to_sim(e.get("WD_SampEn_norm", np.nan))
  469. S_PermEn = _to_sim(e.get("WD_PermEn_norm", np.nan))
  470. S_LZC = _to_sim(e.get("WD_LZC_norm", np.nan))
  471. subscores = {
  472. 'dcca': F_DCCA,
  473. 'mfdfa': F_MFDFA,
  474. 'mfdcca': F_MFDCCA,
  475. 'sampen': S_SampEn,
  476. 'permen': S_PermEn,
  477. 'lzc': S_LZC
  478. }
  479. # Keep only finite subscores
  480. keys = [k for k, v in subscores.items() if np.isfinite(v)]
  481. if not keys:
  482. raise RuntimeError("Complexity fidelity score could not be computed (all subscores NaN).")
  483. vals = np.array([subscores[k] for k in keys], dtype=float)
  484. # Collect weights for valid keys, renormalize
  485. w = np.array([float(weights.get(k, 0.0)) for k in keys], dtype=float)
  486. if float(np.sum(w)) <= 0:
  487. w = np.ones_like(vals) / vals.size
  488. else:
  489. w = w / float(np.sum(w))
  490. score = _weighted_geometric_mean(vals, w)
  491. # Printing
  492. print(f"Complexity Score: {score:0.3f}\n")
  493. for k, v, wi in zip(keys, vals, w):
  494. print(f"{k.upper():8s}: {v:0.3f} | weight = {wi:0.3f}")
  495. return float(np.clip(score, 0.0, 1.0))
  496. def compute_spatial_fidelity_score(real_data, synthetic_data):
  497. """
  498. Compute spatial fidelity score based on cross-channel
  499. correlation matrix similarity.
  500. The score is derived from the SD-normalised deviation:
  501. z_SC = (μ_RS - μ_RR) / σ_RR
  502. F_spatial = 1 / (1 + |z_SC|)
  503. Parameters
  504. ----------
  505. real_data : array-like
  506. Shape (N, C, T) or (C, T)
  507. synthetic_data : array-like
  508. Shape (N, C, T) or (C, T)
  509. Returns
  510. -------
  511. float
  512. Spatial fidelity score in [0,1]
  513. """
  514. real_data = np.asarray(real_data)
  515. synthetic_data = np.asarray(synthetic_data)
  516. if real_data.ndim == 2:
  517. # ambiguous: could be (C,T) or (N,T)
  518. # spatial fidelity is only valid if axis 0 == channels
  519. if real_data.shape[0] < 2:
  520. raise ValueError("Need at least 2 channels for spatial fidelity.")
  521. # optional: enforce expected C
  522. # if real_data.shape[0] != expected_C: raise ...
  523. elif real_data.ndim == 3:
  524. if real_data.shape[1] < 2:
  525. raise ValueError("Need at least 2 channels for spatial fidelity.")
  526. else:
  527. raise ValueError(f"Invalid real_data shape {real_data.shape}; expected 2D or 3D.")
  528. spatial_eval = SpatialFidelity()
  529. results = spatial_eval.evaluate(real_data, synthetic_data)
  530. spatial_score = results.get("F_spatial", np.nan)
  531. # Safety clip
  532. spatial_score = float(np.clip(spatial_score, 0.0, 1.0))
  533. print(f"Spatial Fidelity Score: {spatial_score:.3f}")
  534. return spatial_score
  535. use_adaptive_weights = False
  536. def compute_fidelity_score(real_data, synthetic_data, fs):
  537. """
  538. Computes global fidelity score using entropy-adaptive weighting
  539. and weighted geometric aggregation.
  540. Parameters
  541. ----------
  542. real_data : list or np.ndarray
  543. List of real signals.
  544. synthetic_data : list or np.ndarray
  545. List of synthetic signals.
  546. fs : int
  547. Sampling frequency of the signals.
  548. Returns
  549. -------
  550. float
  551. Fidelity score in [0,1] (higher ⇒ closer match).
  552. Example usage:
  553. --------------
  554. real_data = np.random.randn(10, 2048) # 10 real signals, each 2048 samples
  555. synthetic_data = np.random.randn(10, 2048) # 10 synthetic signals, each 2048 samples
  556. evaluation_score.compute_fidelity_score(real_data, synthetic_data, fs=2048)
  557. """
  558. time_sim = compute_time_fidelity_score(real_data, synthetic_data)
  559. freq_sim = compute_frequency_fidelity_score(real_data, synthetic_data, fs)
  560. scalogram_sim = compute_time_frequency_fidelity_score(real_data, synthetic_data, fs)
  561. fractal_sim = compute_complexity_fidelity_score(real_data, synthetic_data)
  562. spatial_sim = compute_spatial_fidelity_score(real_data,synthetic_data)
  563. components = np.array([
  564. time_sim,
  565. freq_sim,
  566. scalogram_sim,
  567. fractal_sim,
  568. spatial_sim
  569. ], dtype=float)
  570. # Compute weights
  571. if use_adaptive_weights:
  572. weights = _entropy_weights(components)
  573. else:
  574. weights = np.ones(4) / 4.0
  575. # Weighted geometric mean (penalizes collapse)
  576. eps = 1e-12
  577. fidelity_score = np.prod(
  578. np.clip(components, eps, 1.0) ** weights
  579. )
  580. fidelity_score = float(np.clip(fidelity_score, 0.0, 1.0))
  581. print(f"\nGlobal Fidelity Score: {fidelity_score:.3f}")
  582. print("Domain Scores:")
  583. print(f" Time : {time_sim:.3f}")
  584. print(f" Frequency : {freq_sim:.3f}")
  585. print(f" Time-Freq : {scalogram_sim:.3f}")
  586. print(f" Complexity : {fractal_sim:.3f}")
  587. print(f" Spatial : {spatial_sim:.3f}")
  588. print("Adaptive Weights:")
  589. print(f" {weights}")
  590. return fidelity_score
  591. def compute_diversity_score(real_data, synthetic_data, weights=None, n_components=2):
  592. """
  593. Composite diversity score in [0,1].
  594. Aggregation:
  595. - If `weights` is provided: weighted geometric mean using those weights.
  596. - Else: entropy-adaptive weights + weighted geometric mean.
  597. This avoids linear compensation across heterogeneous diversity components.
  598. """
  599. def normalize_ratio(ratio):
  600. if not np.isfinite(ratio) or ratio <= 0:
  601. return np.nan
  602. return float(np.exp(-abs(np.log(ratio))))
  603. div = Diversity(n_components=n_components)
  604. m_cov = div.compute_coverage_diversity(real_data, synthetic_data)
  605. m_geom = div.compute_geometric_diversity(real_data, synthetic_data)
  606. m_intr = div.compute_intrinsic_diversity(real_data, synthetic_data)
  607. # 1) Coverage / Outliers
  608. C_cov = float(m_cov['Coverage'])
  609. O_out = float(m_cov['Outliers'])
  610. # 2) Geometric diversity
  611. LM_PCA = float(m_geom['PCA_LabelMixingScore'])
  612. LM_UM = float(m_geom['UMAP_LabelMixingScore'])
  613. D_PCA = float(m_geom['PCA_OverlapMahalanobis'])
  614. D_UM = float(m_geom['UMAP_OverlapMahalanobis'])
  615. CS_PCA = float(m_geom['PCA_CovShape'])
  616. CS_UM = float(m_geom['UMAP_CovShape'])
  617. # 3) Intrinsic ratios (normalized)
  618. U_NN = normalize_ratio(m_intr['Uniqueness_NN'])
  619. G_glob = normalize_ratio(m_intr['Global_Diversity'])
  620. L_loc_P10 = normalize_ratio(m_intr['Local_Diversity_P10'])
  621. L_loc_P50 = normalize_ratio(m_intr['Local_Diversity_P50'])
  622. comps = np.array([
  623. C_cov, O_out,
  624. LM_PCA, LM_UM,
  625. D_PCA, D_UM,
  626. CS_PCA, CS_UM,
  627. U_NN, G_glob,
  628. L_loc_P10, L_loc_P50
  629. ], dtype=float)
  630. names = [
  631. "coverage", "outliers",
  632. "pca_labelmix", "umap_labelmix",
  633. "pca_overlap", "umap_overlap",
  634. "pca_covshape", "umap_covshape",
  635. "uniqueness", "global_div",
  636. "local_div_p10", "local_div_p50"
  637. ]
  638. # Drop NaNs
  639. valid = np.isfinite(comps)
  640. comps_v = comps[valid]
  641. names_v = [n for n, ok in zip(names, valid) if ok]
  642. if comps_v.size == 0:
  643. raise RuntimeError("Diversity score could not be computed (all submetrics NaN).")
  644. # Entropy weights
  645. w = _entropy_weights(comps_v)
  646. diversity_score = _weighted_geometric_mean(comps_v, w)
  647. # Printing
  648. print(f"Final Diversity Score: {diversity_score:0.3f}\n")
  649. for n, v, wi in zip(names_v, comps_v, w):
  650. print(f"{n:16s}: {v:0.3f} | weight = {wi:0.3f}")
  651. return float(np.clip(diversity_score, 0.0, 1.0))
  652. def compute_privacy_score(
  653. real_data,
  654. synthetic_data,
  655. y_real: np.ndarray | None = None,
  656. *,
  657. normalize: str | None = "zscore_global",
  658. length_normalize: bool = True,
  659. weights: dict | None = None,
  660. ) -> tuple[float, dict]:
  661. """
  662. Composite privacy score in [0, 1]; higher = safer.
  663. Components (all mapped to [0,1] safety scores):
  664. - L2 effect size d_L2 (from NN distances, R–S vs R–R)
  665. - DTW effect size d_DTW (same)
  666. - Optional: MIR (1 - attack accuracy),
  667. if y_real (labels) is provided.
  668. """
  669. pr = Privacy()
  670. # 1) Distance-based effect sizes (Cohen-style)
  671. eff = pr.compute_distance_effect_sizes(
  672. real_data,
  673. synthetic_data,
  674. normalize=normalize,
  675. length_normalize=length_normalize,
  676. )
  677. d_l2 = eff["l2"]["effect_size_d"]
  678. d_dtw = eff["dtw"]["effect_size_d"]
  679. def effect_size_to_safety(d: float,
  680. low: float = 0.0,
  681. high: float = 0.8) -> float:
  682. """Map effect size d to [0,1] safety."""
  683. if np.isnan(d):
  684. return np.nan
  685. if d <= low:
  686. return 0.0
  687. if d >= high:
  688. return 1.0
  689. return float((d - low) / (high - low))
  690. scores = {
  691. "l2": effect_size_to_safety(d_l2),
  692. "dtw": effect_size_to_safety(d_dtw),
  693. }
  694. # 2) Optional MIR component (requires true labels)
  695. scores["mir"] = None
  696. if y_real is not None:
  697. mir = pr.compute_mir_metrics(
  698. real_data,
  699. synthetic_data,
  700. y_real=y_real,
  701. normalize=normalize,
  702. verbose=False,
  703. )
  704. # You could also take max / mean of all attacks here
  705. attack_acc = float(mir["confidence_attack_acc"])
  706. attack_acc = max(0.5, min(1.0, attack_acc)) # clip to [0.5,1]
  707. scores["mir"] = 2.0 * (1.0 - attack_acc)
  708. # 3) Weights + aggregate
  709. base_w = {
  710. "l2": 1.0,
  711. "dtw": 1.0,
  712. "mir": (1.0 if scores["mir"] is not None else 0.0),
  713. }
  714. if weights is not None:
  715. base_w.update(weights)
  716. # Remove MIR weight if MIR is None
  717. if scores["mir"] is None:
  718. base_w.pop("mir", None)
  719. # Normalise weights
  720. tot = sum(base_w.values())
  721. base_w = {k: v / tot for k, v in base_w.items()}
  722. # Aggregate privacy score
  723. privacy_score = sum(base_w[k] * scores[k] for k in base_w)
  724. print(f"Privacy Score (0–1, higher = safer): {privacy_score:.2f}")
  725. print(f" - L2 safety score : {scores['l2']:.2f} (from d_L2 = {d_l2:.2f})")
  726. print(f" - DTW safety score : {scores['dtw']:.2f} (from d_DTW = {d_dtw:.2f})")
  727. if scores["mir"] is not None:
  728. print(f" - MIR safety score : {scores['mir']:.2f}")
  729. else:
  730. print(" - MIR safety score : n/a (labels not provided)")
  731. return privacy_score, scores

evaluation_score.py at commit cb00911, under LGPL-3.0 · at the source

Overview

Authors: Inês Silveira1, Luís Silva1, Dania Furk1, Beatriz Marques1, Nianfei Ao1, Sem Hoogteijling2,3, Irene Heijink2,3, Maeike Zijlmans2,3, Hugo Gamboa1
  1. LIBPhys, NOVA School of Science and Technology, Largo da Torre, 2829-516, Almada, Portugal
  2. Department of Neurology and Neurosurgery, Brain Center, University Medical Center Utrecht, Part of ERN EpiCARE, P.O. box 85500, 3508, GA Utrecht, The Netherlands
  3. Stichting Epilepsie Instellingen Nederland (SEIN), Heemstede, The Netherlands
Dates: published online 16 April 2026
Type: Preprint
License: CC BY
Identifiers: DOI 10.21203/rs.3.rs-9010375/v1 · OpenAlex W7154648917
Open access: green, a free copy (OpenAlex)
Status: code verified
Categories: EEG (modality), human (organism)
Methods: Connectivity, Spectral & time-frequency, Statistics, Smoothing, state filtering, decompositions, Machine learning
Keywords: Synthetic EEG evaluation, Fidelity, Diversity, Privacy
Topic: Functional Brain Connectivity Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: European Research Council (803880)
Citations: not cited yet (Europe PMC); 58 references in the paper

Abstract

The generation of synthetic electroencephalography (EEG) data offers a promising solution to the limited availability of clinical neurophysiological recordings, particularly intracranial EEG (iEEG), where acquisition is invasive, complex, and restricted to small patient cohorts. Although generative models can produce realistic signals, progress in this field is constrained by the absence of standardized and physiologically grounded evaluation protocols. Current assessment strategies rely largely on basic statistical similarity measures and fail to capture the intrinsic properties of EEG, including non-stationarity, spectral organization, and fractal dynamics. Here, we propose a comprehensive evaluation framework for synthetic (i)EEG that integrates fidelity, diversity, and privacy within a unified and interpretable protocol. The framework combines analyses across time, frequency, time–frequency, complexity, and spatial domains using established signal-processing and nonlinear-dynamics metrics. Interpretation is grounded in principled normalization strategies and effect-size conventions, and is further summarized through composite domain-level scores that enable transparent and reproducible comparison across datasets and generative models. Implemented as the open-source Python library, seege_ provides a standardized and interpretable toolkit for evaluating synthetic neurophysiological data, advancing methodological rigor in generative modeling for clinical and neuroscientific research.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above, with 25 matches between paragraphs and lines of code.

BiosignalsLibphys/seege_

License: LGPL-3.0
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Commit: cb009112058a01e45a8aaf2ab4d0313611bdd82c, 18 August 2026
Languages: Python (17), Jupyter (2)
Size: 28 files, 19 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, license file, environment (requirements.txt, setup.py), 2 notebooks
Not found: CITATION.cff, tests, continuous integration, documentation
Tools: NumPy (13 files), Matplotlib (9 files), SciPy (8 files), seaborn (6 files), pandas (4 files), scikit-learn (4 files), scikit-image (2 files), NeuroKit2 (1 file), Numba (1 file), UMAP (1 file)
Availability: 1 check, the latest on 29 September 2026: the link answers
  • 29 September 2026: the link answers
21 files

Code availability

The Python library is available on Github: seege_ (https://github.com/BiosignalsLibphys/seege_).

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:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 19 scripts, each with its path and the digest of its content;
  • 25 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

Datasets cited

Data availability

The datasets generated during and/or analysed during the current study are available in the Multicenter intracranial EEG dataset for classification of graphoelements and artifactual signals repository, https://doi.org/10.6084/m9.figshare.11734575.

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

Recorded: type, journal, dates, 9 authors, 4 keywords, 1 funder, 48 references.

Cite

This paper

Silveira, I., Silva, L., Furk, D., Marques, B., Ao, N., Hoogteijling, S., Heijink, I., Zijlmans, M., & Gamboa, H. (2026). Interpretable metrics for evaluating fidelity, diversity, and privacy in synthetic EEG data. Research Square (preprint). https://doi.org/10.21203/rs.3.rs-9010375/v1

BibTeX

@article{silveira2026interpretable,
author = {Silveira, Inês and Silva, Luís and Furk, Dania and Marques, Beatriz and Ao, Nianfei and Hoogteijling, Sem and Heijink, Irene and Zijlmans, Maeike and Gamboa, Hugo},
title = {{Interpretable metrics for evaluating fidelity, diversity, and privacy in synthetic EEG data}},
journal = {Research Square (preprint)},
year = {2026},
month = apr,
publisher = {Research Square},
issn = {2693-5015},
doi = {10.21203/rs.3.rs-9010375/v1},
url = {https://doi.org/10.21203/rs.3.rs-9010375/v1}
}

RIS

TY - JOUR
AU - Silveira, Inês
AU - Silva, Luís
AU - Furk, Dania
AU - Marques, Beatriz
AU - Ao, Nianfei
AU - Hoogteijling, Sem
AU - Heijink, Irene
AU - Zijlmans, Maeike
AU - Gamboa, Hugo
TI - Interpretable metrics for evaluating fidelity, diversity, and privacy in synthetic EEG data
T2 - Research Square (preprint)
J2 - Res Sq
PY - 2026
DA - 2026/04/16
SN - 2693-5015
PB - Research Square
DO - 10.21203/rs.3.rs-9010375/v1
UR - https://doi.org/10.21203/rs.3.rs-9010375/v1
ER -

CSL-JSON

{
"id": "10.21203/rs.3.rs-9010375/v1",
"type": "article",
"title": "Interpretable metrics for evaluating fidelity, diversity, and privacy in synthetic EEG data",
"container-title": "Research Square (preprint)",
"author": [
{
"family": "Silveira",
"given": "Inês"
},
{
"family": "Silva",
"given": "Luís"
},
{
"family": "Furk",
"given": "Dania"
},
{
"family": "Marques",
"given": "Beatriz"
},
{
"family": "Ao",
"given": "Nianfei"
},
{
"family": "Hoogteijling",
"given": "Sem"
},
{
"family": "Heijink",
"given": "Irene"
},
{
"family": "Zijlmans",
"given": "Maeike"
},
{
"family": "Gamboa",
"given": "Hugo"
}
],
"container-title-short": "Res Sq",
"DOI": "10.21203/rs.3.rs-9010375/v1",
"ISSN": "2693-5015",
"publisher": "Research Square",
"URL": "https://doi.org/10.21203/rs.3.rs-9010375/v1",
"issued": {
"date-parts": [
[
2026,
4,
16
]
]
}
}

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.7554/elife.110588 [code]
Opening the black box toward a modular approach to spike sorting.
Journal: eLife
In common: UMAP, Numba, scikit-image, 6 other tools
[2] doi:10.1038/s42003-026-10957-8 [code]
Brain defence by the extracellular matrix protein Cochlin.
Journal: Communications biology
In common: UMAP, Numba, scikit-image, 6 other tools
[3] doi:10.1093/nar/gkag706 [code]
scDifformer: diffusion-based post-training for virtual cell modeling across large-scale single-cell data.
Journal: Nucleic acids research
In common: UMAP, Numba, scikit-image, 6 other tools
[4] doi:10.1162/imag.a.1276 [code]
High-resolution whole-brain magnetic resonance spectroscopic imaging in youth at risk for psychosis.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: UMAP, Numba, scikit-image, 6 other tools
[5] doi:10.1016/j.xcrm.2026.102766 [code]
A longitudinal single-cell and spatial multiomic atlas of pediatric high-grade glioma.
Journal: Cell reports. Medicine
In common: UMAP, Numba, scikit-image, 6 other tools
[6] doi:10.1016/j.isci.2026.116825 [code]
Social hierarchy shapes behavioral and transcriptional responses to chronic stress and ketamine in male mice.
Journal: iScience
In common: UMAP, Numba, scikit-image, 6 other tools
[7] doi:10.1371/journal.pbio.3003915 [code]
Noise-invariant representations of sound emerge along the canonical cortical hierarchy.
Journal: PLoS biology
In common: UMAP, Numba, scikit-image, 6 other tools
[8] doi:10.3389/fnsys.2026.1822122 [code]
Convergence-divergence circuits for multimodal integration of innate and learned opponent valences.
Journal: Frontiers in systems neuroscience
In common: UMAP, Numba, scikit-image, 6 other tools
[9] doi:10.1038/s41467-026-72057-9 [code]
Sex-specific behavioral feedback modulates sensorimotor processing and drives flexible social behavior.
Journal: Nature communications
In common: UMAP, Numba, scikit-image, 6 other tools
[10] doi:10.3390/s26154773 [code]
EEG-Based Supported Diagnosis of ADHD Using Subject-Specific HMMs and Stationary RKHS Embeddings.
Journal: Sensors (Basel, Switzerland)
In common: Numba, seaborn, scikit-learn, 4 other tools, EEG, 1 reference

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.