5D Library › Finger–Brain Cortical Magnification, Distal Microneedle Afference and Computational Neurology of Post-Stroke Cognitive Network Reconstruction · 中文
Chapter 4. Alpha Oscillations: the Welch Estimate, the Jansen–Rit Model and Six EEG Recordings
The EEG study of the thesis
Evidence
Study 3 (Chapter 3 of the thesis). Six patients with post-stroke mild cognitive impairment were recruited openly between September and December 2023, in a before–after design without a control group. Equipment: a Neuroscan system with a 64-channel Quik-Cap (10-10 layout), sampling at 1,000 Hz. Procedure: 5 minutes of eyes-closed rest and 5 minutes of eyes-open rest; press-needle stimulation of bilateral Shaoshang, Shangyang, Zhongchong, Guanchong, Shaochong and Shaoze for 60 s each; then 5 minutes eyes closed and 5 minutes eyes open. Preprocessing included average reference, epochs “from 0.5 s before to 1 s after the stimulation point”, independent component analysis to remove artefacts and baseline correction; the main outcome was the Welch power spectrum (sections 3.2.4–3.2.6). The results show the spectrum of one participant and describe in words that before stimulation the alpha wave “showed a declining state”, that after stimulation “alpha energy rose clearly with eyes open”, and that frontal alpha “peaked at around 10 Hz” while other bands lost energy; no group-level numbers or statistical tests are reported (section 3.3) (Lu 2024).
The thesis itself lists “the EEG sample needs to be enlarged” among its limitations (section 4.4). The text has further problems: the data-collection section says participants “kept their eyes closed”, yet the procedure includes two eyes-open recordings; epochs from 0.5 s before to 1 s after a stimulus with baseline correction are an event-related-potential procedure, and for 5-minute resting recordings the “stimulation point” is not defined; if “alpha declining before, rising with eyes open after” compares eyes closed before with eyes open after, it mixes in the strongest known effect, the Berger effect of eye opening; and it is not said whether these six patients also took part in the trial.
The thalamocortical alpha rhythm
When Berger first recorded the human EEG in 1929 he already described a rhythm of about 10 Hz that appears with the eyes closed and weakens when they open (Berger 1929). It is now generally thought that the rhythm arises from thalamocortical and intracortical circuits together; Lopes da Silva and colleagues (1974) reproduced the alpha rhythm with a model of thalamic neuronal populations (Lopes da Silva et al. 1974). Alpha power and peak frequency are related to cognitive performance, but in a complicated way: higher resting alpha power goes with better performance, while alpha decrease (desynchronisation) during a task marks cortical engagement (Klimesch 1999). In ischaemic stroke, “slowing” of the quantitative EEG (more delta and theta, less alpha) relates to outcome, and indices such as the delta/alpha ratio have prognostic value in the acute and subacute phases (Finnigan and Putten 2013). Barry and colleagues (2007) compared eyes-closed and eyes-open rest systematically and found that alpha power falls significantly across the whole scalp with the eyes open, along with changes in other bands (Barry et al. 2007).
So “less alpha after stroke, alpha returning with recovery” is a grounded overall trend; but comparing alpha within a 20-minute recording requires separating eyes open from eyes closed, allowing for changes in vigilance, and a control that receives no stimulation.
The exact Welch estimate
Section 3.2.6.1 of the thesis says that the Welch method divides the N samples into k segments, which may overlap (50 % or 0 %), windows them, computes periodograms and averages them, and that “the variance of the spectral estimate obtained by the Welch method is 1/k of the variance of the periodogram estimate”. Welch’s 1967 paper discussed exactly the variance of overlapping segments (Welch 1967). For white noise, the correlation between the periodograms of segments and at the same frequency (away from zero and the Nyquist frequency) is approximately , where
and is the shift between neighbouring segments. Hence
This is a standard result of spectral analysis (Percival and Walden 1993). Only when the segments do not overlap, , is the variance exactly .
Calculation
# Chapter 4. Variance of the Welch estimate. Lu (2024, 3.2.6.1) says it is 1/k of the
# periodogram's; that holds for NON-overlapping segments. For white noise with overlap,
# Var / E^2 = (1/K) [1 + 2 sum_{j=1}^{K-1} (1 - j/K) rho(j)^2],
# rho(j) = sum_n w[n] w[n + jD] / sum_n w[n]^2 (Welch 1967; Percival & Walden 1993),
# checked by simulation (N = 4,096, segments of 256, bin 20, 500 replicates each).
import math, random
M, N, BIN, REPS = 256, 4096, 20, 500
W = [0.5 * (1 - math.cos(2 * math.pi * n / M)) for n in range(M)] # Hann
U = math.fsum(w * w for w in W)
C = [W[n] * math.cos(2 * math.pi * BIN * n / M) for n in range(M)]
S = [W[n] * math.sin(2 * math.pi * BIN * n / M) for n in range(M)]
def theory(D):
K = (N - M) // D + 1
rho = [math.fsum(W[n] * W[n + j * D] for n in range(M - j * D)) / U
for j in range(1, K) if j * D < M]
return K, (1 + 2 * math.fsum((1 - j / K) * r * r for j, r in enumerate(rho, 1))) / K
def welch_once(x, D):
vals = []
for s0 in range(0, N - M + 1, D):
re = math.fsum(C[n] * x[s0 + n] for n in range(M))
im = math.fsum(S[n] * x[s0 + n] for n in range(M))
vals.append((re * re + im * im) / U)
return math.fsum(vals) / len(vals)
def simulate(D, seed):
rng = random.Random(seed); est = []
for _ in range(REPS):
x = [rng.gauss(0.0, 1.0) for _ in range(N)]
est.append(welch_once(x, D))
m = math.fsum(est) / REPS
return math.fsum((e - m) ** 2 for e in est) / (REPS - 1) / (m * m)
if __name__ == "__main__":
print(f"(simulation s.e. about {math.sqrt(2 / (REPS - 1)):.0%} of the value)")
print("overlap K 1/K theory simulated theory x K")
for lab, D in (("0 %", M), ("50 %", M // 2), ("75 %", M // 4)):
K, th = theory(D)
print(f"{lab:6s} {K:4d} {1 / K:8.4f} {th:9.4f} {simulate(D, 1967 + D):10.4f}"
f" {th * K:10.3f}")
rho1 = math.fsum(W[n] * W[n + M // 2] for n in range(M // 2)) / U
print(f"Hann, 50 % overlap: rho(1) = {rho1:.4f} (exactly 1/6),"
f" rho(1)^2 = {rho1 ** 2:.4f}")
K = (300_000 - 2000) // 1000 + 1
K2, th2 = K, (1 + 2 * (1 - 1 / K) * rho1 ** 2) / K
print("EEG case, 5 min at 1,000 Hz, 2-s Hann windows, 50 % overlap:"
f" K = {K2},"
f"\n relative s.d. of each spectral value sqrt({th2:.5f}) ="
f" {math.sqrt(th2):.3f}")
# (simulation s.e. about 6% of the value)
# overlap K 1/K theory simulated theory x K
# 0 % 16 0.0625 0.0625 0.0552 1.000
# 50 % 31 0.0323 0.0340 0.0345 1.054
# 75 % 61 0.0164 0.0313 0.0319 1.909
# Hann, 50 % overlap: rho(1) = 0.1667 (exactly 1/6), rho(1)^2 = 0.0278
# EEG case, 5 min at 1,000 Hz, 2-s Hann windows, 50 % overlap: K = 299,
# relative s.d. of each spectral value sqrt(0.00353) = 0.059For the Hann window with 50 % overlap, is exactly 1/6, , and the variance is 1.054 times ; with 75 % overlap three neighbouring segments are correlated and the variance is 1.909 times . The simulation (500 runs each, standard error about 6 % of the value) agrees with the formula: 0.0345 against 0.0340 at 50 % overlap and 0.0319 against 0.0313 at 75 %; without overlap the simulated 0.0552 is about two standard errors below the theoretical 0.0625, which is sampling variation. Note that for a fixed total length, 50 % overlap is still better than none: the variance falls from 0.0625 to 0.0340, only not to . The thesis’s statement should therefore read: “without overlap the variance is 1/k of the periodogram’s; with 50 % overlap and a Hann window it is about 1.05/K, still lower than without overlap.”
The last line of the program puts this back into the thesis’s data: a 5-minute recording at 1,000 Hz with 2-s Hann windows and 50 % overlap gives 299 segments and a relative standard deviation of about 5.9 % at each frequency. In other words, the noise of the spectral estimate within one recording is small; the problem of the thesis’s EEG study is not the variance of the spectral estimate but six participants, no control and no statistical test.
The Jansen–Rit neural-mass model
The author’s framework wants a model of “the alpha peak collapsing after stroke and returning after stimulation”. The usual tool is the neural-mass model of Jansen and Rit (1995): a cortical column consists of a pyramidal population, an excitatory interneuron population and an inhibitory interneuron population, coupled through sigmoid firing-rate functions and second-order synaptic kernels, driven by random external pulse density (Jansen and Rit 1995). With the standard parameters of the paper, the model output shows a rhythm of about 10 Hz. Below it is solved with the fourth-order Runge–Kutta method while the overall connectivity , the excitatory synaptic gain , the mean external input and the inhibitory time constant are varied, to see how the alpha peak changes. These are the author’s model scenarios; the parameter changes correspond to no measured pathology.
Calculation
# Chapter 4. Jansen-Rit (1995) neural mass, RK4 with dt = 1 ms (input fixed per step):
# y0'' = A a S(y1 - y2) - 2a y0' - a^2 y0
# y1'' = A a [p + C2 S(C1 y0)] - 2a y1' - a^2 y1
# y2'' = B b C4 S(C3 y0) - 2b y2' - b^2 y2
# S(v) = 2 e0 / (1 + exp(r (v0 - v))). Standard: A 3.25, B 22, a 100, b 50, C 135
# (C1..C4 = C, 0.8C, 0.25C, 0.25C), e0 2.5, v0 6, r 0.56, p ~ U[120, 320]. Output y1 - y2;
# Welch spectra (2-s Hann, 50 % overlap) of 10 s after a 2-s transient.
import math, random
STD = dict(A=3.25, B=22.0, a=100.0, b=50.0, C=135.0, pmin=120.0, pmax=320.0)
def S(v):
return 5.0 / (1 + math.exp(0.56 * (6.0 - v)))
def simulate(par, seed, T=12.0, dt=0.001):
A, B, a, b, C = par["A"], par["B"], par["a"], par["b"], par["C"]
C1, C2, C3, C4 = C, 0.8 * C, 0.25 * C, 0.25 * C
rng = random.Random(seed); y = [0.0] * 6; out = []
def f(y, p):
return [y[3], y[4], y[5],
A * a * S(y[1] - y[2]) - 2 * a * y[3] - a * a * y[0],
A * a * (p + C2 * S(C1 * y[0])) - 2 * a * y[4] - a * a * y[1],
B * b * C4 * S(C3 * y[0]) - 2 * b * y[5] - b * b * y[2]]
for k in range(int(T / dt)):
p = rng.uniform(par["pmin"], par["pmax"])
k1 = f(y, p)
k2 = f([y[i] + dt / 2 * k1[i] for i in range(6)], p)
k3 = f([y[i] + dt / 2 * k2[i] for i in range(6)], p)
k4 = f([y[i] + dt * k3[i] for i in range(6)], p)
y = [y[i] + dt / 6 * (k1[i] + 2 * k2[i] + 2 * k3[i] + k4[i]) for i in range(6)]
if k * dt >= 2.0:
out.append(y[1] - y[2])
return out
def spectrum(x, fs=1000, seg=2000, freqs=None):
freqs = freqs or [0.5 * k for k in range(2, 61)]
w = [0.5 * (1 - math.cos(2 * math.pi * n / seg)) for n in range(seg)]
tabs = [([w[n] * math.cos(2 * math.pi * f * n / fs) for n in range(seg)],
[w[n] * math.sin(2 * math.pi * f * n / fs) for n in range(seg)])
for f in freqs]
P = [0.0] * len(freqs); K = 0
for s0 in range(0, len(x) - seg + 1, seg // 2):
xs = x[s0:s0 + seg]; m = math.fsum(xs) / seg; xs = [v - m for v in xs]; K += 1
for i, (c, s) in enumerate(tabs):
re = math.fsum(c[n] * xs[n] for n in range(seg))
im = math.fsum(s[n] * xs[n] for n in range(seg))
P[i] += re * re + im * im
return freqs, [v / K for v in P]
def describe(par, seed=1995):
x = simulate(par, seed)
f, P = spectrum(x)
tot = math.fsum(P); alpha = math.fsum(p for fr, p in zip(f, P) if 8 <= fr <= 13)
k = max(range(len(P)), key=lambda i: P[i])
m = math.fsum(x) / len(x); sd = math.sqrt(math.fsum((v - m) ** 2 for v in x) / len(x))
return f[k], alpha / tot, sd, f, P
CASES = [("standard (C = 135)", {}), ("C x 0.8 = 108", {"C": 108.0}),
("C x 0.7 = 94.5", {"C": 94.5}), ("C x 0.5 = 67.5", {"C": 67.5}),
("C x 0.5, input mean + 60", {"C": 67.5, "pmin": 180.0, "pmax": 380.0}),
("C x 0.5, A = 4.5 mV (+38 %)", {"C": 67.5, "A": 4.5}),
("C x 2 = 270", {"C": 270.0}), ("b = 40/s (slower inhibition)", {"b": 40.0})]
if __name__ == "__main__":
print("case peak Hz 8-13 Hz share"
" s.d. of y1-y2 (mV)")
for lab, ch in CASES:
par = dict(STD); par.update(ch)
pk, sh, sd, _, _ = describe(par)
print(f"{lab:33s} {pk:7.1f} {sh:15.2f} {sd:16.2f}")
# case peak Hz 8-13 Hz share s.d. of y1-y2 (mV)
# standard (C = 135) 10.5 0.97 1.23
# C x 0.8 = 108 8.5 0.64 0.36
# C x 0.7 = 94.5 8.0 0.45 0.31
# C x 0.5 = 67.5 1.0 0.28 0.31
# C x 0.5, input mean + 60 1.0 0.29 0.31
# C x 0.5, A = 4.5 mV (+38 %) 1.0 0.30 0.42
# C x 2 = 270 5.0 0.18 11.83
# b = 40/s (slower inhibition) 4.5 0.10 4.80These are single 10-second realisations, so peak positions and alpha shares vary with the random input (an independent check averaging many seeds reached the same qualitative conclusions). With standard parameters the spectral peak is at 10.5 Hz and 8–13 Hz power is 97 % of total 1–30 Hz power. Lowering to 0.8 times moves the peak to 8.5 Hz and the alpha share to 64 %; at 0.7 times it is 8.0 Hz and 45 %; at half, the alpha peak disappears and power gathers at the lowest frequencies (share 28 %). With halved, raising the mean external input (+60 pulses per second) or raising the excitatory synaptic gain by 38 % does not restore alpha; only restoring itself to 0.8 times or more brings it back. Doubling puts the model into large spike-like oscillations (standard deviation 11.83 mV, peak at 5 Hz); lowering the inhibitory rate constant from 50 to 40 per second moves the peak to 4.5 Hz.
Two points follow. In this model, collapse and restoration are one parameter falling and rising, while more external input — the operation closest to “adding sensory stimulation” — does not restore alpha. And the same peak can come from different parameter combinations, so inferring model parameters from a scalp spectrum is ill-posed. Books 8 and 44 discussed synchrony of coupled oscillators, which is not repeated here. “Restoration” in the model shows only that the model can write such a trajectory, not that press needles can produce it.
What six people can show
Finally, back to the design of the thesis itself. The program below generates synthetic data with no treatment effect at all: six people, each with their own alpha level; eyes closed about 2.8 times eyes open (the Berger effect); random variation between the two recordings before and after stimulation, possibly with a time drift common to everyone (for example, vigilance changing over time).
Calculation
# Chapter 4. Six participants, before and after, eyes open and eyes closed: what can
# such a design show? Synthetic log10 alpha power, NO treatment effect anywhere:
# subject level u_i ~ N(0, 0.25^2); eyes-closed minus eyes-open (Berger effect)
# b_i ~ N(0.45, 0.15^2), i.e. about 2.8 times; session-to-session change in each
# state d ~ N(drift, 0.12^2), where drift is a common time effect (0 or +0.06).
# Questions: how often do 5 or 6 of 6 subjects show "more eyes-open alpha after"? How
# large is the Berger contrast compared with such changes? What effect size would a
# paired t test with n = 6 detect with 80 % power? All numbers are illustrative.
import math, random
T975_5 = 2.5706 # t quantile, 5 df, two-sided 0.05
def study(rng, drift):
ups, ratio = 0, []
for _ in range(6):
u = rng.gauss(0, 0.25); b = rng.gauss(0.45, 0.15)
eo_pre = u + rng.gauss(0, 0.05); ec_pre = eo_pre + b
eo_post = eo_pre + rng.gauss(drift, 0.12)
ups += eo_post > eo_pre; ratio.append(10 ** (ec_pre - eo_pre))
return ups, sorted(ratio)[3]
def power(dz, rng, reps=4000):
hit = 0
for _ in range(reps):
d = [rng.gauss(dz, 1.0) for _ in range(6)]
m = math.fsum(d) / 6; s = math.sqrt(math.fsum((x - m) ** 2 for x in d) / 5)
hit += abs(m / (s / math.sqrt(6))) > T975_5
return hit / reps
if __name__ == "__main__":
rng = random.Random(2023)
for drift in (0.0, 0.06):
res = [study(rng, drift) for _ in range(20000)]
p6 = sum(u == 6 for u, _ in res) / len(res)
p5 = sum(u >= 5 for u, _ in res) / len(res)
print(f"common time drift {drift:+.2f} log10 units ({10 ** drift - 1:+.0%}):"
f" all 6 up {p6:.3f}; at least 5 up {p5:.3f}")
print(f" theory without drift: 1/64 = {1 / 64:.3f}; 7/64 = {7 / 64:.3f}")
rat = [study(rng, 0.0)[1] for _ in range(2000)]
print("Berger contrast, eyes closed / eyes open alpha power, median of study"
f" medians: {sorted(rat)[1000]:.2f}")
print("sign test, n = 6: smallest attainable two-sided p =", f"{2 / 64:.4f}")
print("paired t test, n = 6, two-sided 0.05: power by standardised effect dz")
print(" " + " ".join(f"dz={dz:g}: {power(dz, rng):.2f}"
for dz in (0.5, 1.0, 1.5, 2.0)))
# common time drift +0.00 log10 units (+0%): all 6 up 0.017; at least 5 up 0.110
# common time drift +0.06 log10 units (+15%): all 6 up 0.109; at least 5 up 0.402
# theory without drift: 1/64 = 0.016; 7/64 = 0.109
# Berger contrast, eyes closed / eyes open alpha power, median of study medians: 3.02
# sign test, n = 6: smallest attainable two-sided p = 0.0312
# paired t test, n = 6, two-sided 0.05: power by standardised effect dz
# dz=0.5: 0.17 dz=1: 0.50 dz=1.5: 0.83 dz=2: 0.97Without common drift, the probability that all six show “more eyes-open alpha after stimulation” is 0.017 (theory 1/64) and that at least five do is 0.110 (theory 7/64). A common time drift of only about 15 % raises these probabilities to 0.109 and 0.402. By comparison, under the settings of this simulation (of the order reported by Barry and colleagues (Barry et al. 2007)), the ratio of alpha power with eyes closed to eyes open is about 3.02, far larger than any plausible stimulation effect, so any comparison across eyes-open and eyes-closed states is swamped by it. Even with a statistical test, the smallest attainable two-sided p value of a sign test with six people is 0.031; a paired t test needs a standardised effect of about 1.5 for 80 % power (power is 0.83 at in the program). The thesis showed one participant’s spectrum and no group numbers, so none of these tests can be done.
Hypothesis · not established · Alpha changes during stimulation are arousal changes
The author’s hypothesis (not established): Changes in frontal alpha power during and for a few minutes after rubbing press needles mainly reflect changes in arousal and vigilance; after controlling for simultaneously recorded arousal indices (skin conductance, heart rate), the alpha difference between genuine and sham press needles is no longer significant. What would show it wrong: in a pre-registered crossover design, after controlling for arousal indices, a 95 % confidence interval for the difference in eyes-open frontal alpha power between genuine and sham press needles that still excludes zero, replicated in an independent sample.
Chapter summary
The EEG part of the thesis is a six-person before–after comparison without control that shows one participant’s spectrum and a qualitative description; the text also contradicts itself on eyes-closed and eyes-open recording and leaves the epoching unclear. “The variance of the Welch estimate is 1/k of the periodogram’s” holds only for non-overlapping segments; with 50 % overlap and a Hann window it is 1.054 times 1/K and with 75 % overlap 1.909 times; but the spectrum of a single 5-minute recording is already stable, and the problem is the sample and the design. The Jansen–Rit model can write the trajectory “connectivity falls, alpha collapses, connectivity returns, alpha returns”, but more external input does not restore alpha, and the spectral shape does not determine the parameters uniquely. Without any treatment effect, the probability that at least five of six people show “more alpha” can reach about 40 % with a common time drift, and the Berger effect is about threefold under the simulation’s settings. “Alpha restored after stimulation” was not tested in the thesis.
References
Fan, Y. (2026). Finger–Brain Cortical Magnification, Distal Microneedle Afference and Computational Neurology of Post-Stroke Cognitive Network Reconstruction: From Complex-Network Pinning Control and Thalamocortical 10 Hz Alpha Restoration to Drift-Diffusion Models, Read Beside the Twelve Jing-Well Points of the Lingshu [指—脑皮层放大、远端微针传入与卒中后认知网络重建的计算神经学] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23839915 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).