5D Library › Embodied Cognition, Bernstein's Degrees-of-Freedom Problem and the Control Theory of Motor Synergies · 中文
Chapter 5 Muscle Synergies: Non-Negative Matrix Factorisation and the Biomechanical-Constraint Dispute
From EMG to synergies
Below the joints lie the muscles. If the nervous system really had to control dozens of muscles one by one, the problem would be larger still than controlling the joints. A popular hypothesis is that it does not: it calls on a few muscle synergies — each a group of muscles activated together in fixed proportions — and builds movements by superimposing them with different time courses (Bizzi et al. 2008).
The simplest form is the synchronous synergy: the EMG envelopes of muscles at time points are arranged in a non-negative matrix () and approximated with synergies, where each column of is a synergy (the weights of the muscles) and each row of its activation over time. The non-negativity comes from physiology: muscles can only pull, not push, and EMG envelopes are never negative. In 1999 Lee and Seung used this non-negative matrix factorisation (NMF) in Nature to decompose images of faces into “parts” (Lee and Seung 1999), and in 2001 they gave simple multiplicative update algorithms (Lee and Seung 2001).
Evidence
Kicking frogs. d’Avella, Saltiel and Bizzi in 2003 recorded EMG from several hind-limb muscles of intact (not deafferented) frogs kicking in different directions, and analysed it with time-varying synergies: each synergy is a spatiotemporal pattern of muscle activation that can be scaled by one amplitude and shifted by one time delay in each movement, and several synergies are summed to reconstruct the EMG; the extraction algorithm is a generalisation of non-negative matrix factorisation (d’Avella et al. 2003). In 2005 d’Avella and Bizzi found, in jumping, swimming and walking of bullfrogs recorded from 13 hind-limb muscles, that some synergies were shared by several behaviours and others specific to one (d’Avella and Bizzi 2005). Cheung and colleagues in 2005 compared synergies extracted from the same frogs before and after deafferentation to separate central and sensory contributions to synergies (Cheung et al. 2005). In a postural task in cats, Ting and Macpherson in 2005 found that a few synergies could account for the muscle responses to support-surface translations and the production of force (Ting and Macpherson 2005).
The framework links the 2003 work of d’Avella and colleagues directly with NMF. It should be noted that that study used time-varying synergies and a dedicated algorithm, whereas the standard Lee–Seung NMF extracts synchronous synergies; they are different models of the same idea, and their conclusions are not interchangeable.
The trouble with VAF thresholds
The commonest problem in extracting synergies with NMF is “how many”. The usual practice looks at variance accounted for (VAF, ; note the uncentred sum of squares in the denominator) and picks the smallest whose VAF exceeds a threshold (such as 90 %), or the “elbow” of the VAF curve. Tresch, Cheung and d’Avella in 2006 compared several matrix factorisation algorithms, NMF among them, at identifying synergies in simulated and experimental data (Tresch et al. 2006). The program below checks these rules on an example whose answer is known.
Calculation
The program generates synthetic EMG of 12 muscles × 120 time points: four known non-negative synergies multiplied by smooth non-negative activations, plus noise with SD 10 % of the mean signal (negative values clipped to zero). For to 6 it finds , and the VAF with Lee–Seung multiplicative updates (150 iterations, best of 3 random starts); for it pairs the estimated synergies with the true ones in the best permutation and computes cosine similarities.
# Synchronous muscle synergies by non-negative matrix factorisation (Lee & Seung's
# multiplicative updates, Frobenius cost). Synthetic EMG: 12 muscles x 120 samples
# built from 4 known non-negative synergies with smooth non-negative activations, plus
# rectified noise (SD 10 % of the mean signal). For k = 1..6: variance accounted for
# (VAF, uncentred), best of 3 random starts; for k = 4: recovery of the true synergies.
import math, random
from itertools import permutations
def nmf(V, k, rng, iters=150):
m, n = len(V), len(V[0]); eps = 1e-12
W = [[rng.random() for _ in range(k)] for _ in range(m)]
H = [[rng.random() for _ in range(n)] for _ in range(k)]
for _ in range(iters):
WtV = [[sum(W[i][a] * V[i][j] for i in range(m)) for j in range(n)]
for a in range(k)]
WtW = [[sum(W[i][a] * W[i][b] for i in range(m)) for b in range(k)]
for a in range(k)]
H = [[H[a][j] * WtV[a][j] / (sum(WtW[a][b] * H[b][j] for b in range(k)) + eps)
for j in range(n)] for a in range(k)]
VHt = [[sum(V[i][j] * H[a][j] for j in range(n)) for a in range(k)]
for i in range(m)]
HHt = [[sum(H[a][j] * H[b][j] for j in range(n)) for b in range(k)]
for a in range(k)]
W = [[W[i][a] * VHt[i][a] / (sum(W[i][b] * HHt[b][a] for b in range(k)) + eps)
for a in range(k)] for i in range(m)]
return W, H
def vaf(V, W, H):
k = len(H); sse = sst = 0.0
for i, row in enumerate(V):
for j, v in enumerate(row):
r = v - sum(W[i][a] * H[a][j] for a in range(k)); sse += r * r; sst += v * v
return 1 - sse / sst
def best_fit(V, k, rng, starts=3):
return max((nmf(V, k, rng) for _ in range(starts)), key=lambda f: vaf(V, *f))
def unit(v):
s = math.sqrt(sum(x * x for x in v)); return [x / s for x in v]
def synthetic(rng, m=12, n=120, k=4, noise=0.10):
W = [[max(0.0, rng.gauss(0, 1)) ** 2 for _ in range(k)] for _ in range(m)]
H = []
for a in range(k): # smooth bumps of activation
c = [rng.uniform(0, n) for _ in range(3)]
H.append([sum(math.exp(-0.5 * ((j - ci) / 8) ** 2) for ci in c)
for j in range(n)])
V = [[sum(W[i][a] * H[a][j] for a in range(k)) for j in range(n)] for i in range(m)]
mean = sum(map(sum, V)) / (m * n)
return W, [[max(0.0, v + rng.gauss(0, noise * mean)) for v in row] for row in V]
if __name__ == "__main__":
rng = random.Random(2003); Wtrue, V = synthetic(rng)
print("k VAF (synthetic EMG generated from 4 synergies + 10 % noise)")
fits = {}
for k in range(1, 7):
fits[k] = best_fit(V, k, rng); print(f"{k} {vaf(V, *fits[k]):.4f}")
pick = next(k for k in range(1, 7) if vaf(V, *fits[k]) >= 0.90)
pick95 = next(k for k in range(1, 7) if vaf(V, *fits[k]) >= 0.95)
gain = next(k for k in range(1, 6)
if vaf(V, *fits[k + 1]) - vaf(V, *fits[k]) < 0.01)
print(f"smallest k with VAF >= 0.90: {pick}; >= 0.95: {pick95};"
f" next synergy adds < 1 point: {gain}")
W = fits[4][0]
est = [unit([W[i][a] for i in range(12)]) for a in range(4)]
true = [unit([Wtrue[i][a] for i in range(12)]) for a in range(4)]
def score(p):
return sum(sum(x * y for x, y in zip(true[a], est[p[a]])) for a in range(4))
perm = max(permutations(range(4)), key=score)
sims = [sum(x * y for x, y in zip(true[a], est[perm[a]])) for a in range(4)]
print("k = 4: cosine similarity of each true synergy with its best-matched estimate:")
print(" " + " ".join(f"{s:.3f}" for s in sims))
# k VAF (synthetic EMG generated from 4 synergies + 10 % noise)
# 1 0.8196
# 2 0.9653
# 3 0.9937
# 4 0.9980
# 5 0.9980
# 6 0.9985
# smallest k with VAF >= 0.90: 2; >= 0.95: 2; next synergy adds < 1 point: 3
# k = 4: cosine similarity of each true synergy with its best-matched estimate:
# 0.992 0.925 0.999 0.893The true number of synergies is four, yet the VAF is already 0.820 at and 0.965 at . Both the “VAF ≥ 0.90” and the “≥ 0.95” rules choose only two; the rule “stop when one more synergy adds less than one percentage point” chooses three. Only a threshold of about 0.995 picks out four, and the right threshold then depends on the noise level. At the cosine similarities between estimated and true synergies are 0.992, 0.925, 0.999 and 0.893: the shapes are broadly recovered, but not perfectly. The number of synergies given by a VAF threshold mainly reflects the threshold itself and the noise level; it cannot be read directly as the number of modules the nervous system uses. Figure 5 (left) also shows the data with each muscle shuffled in time: its VAF curve is just as high, only slightly below the original — the baseline problem of uncentred VAF, which program p09 meets again below.
Are synergies neural?
Is low-dimensional EMG evidence of neural synergies, or the product of something else? In 2009 Tresch and Jarc discussed the arguments for and against muscle synergies in Current Opinion in Neurobiology (Tresch and Jarc 2009). The sharpest objection comes from biomechanics.
Evidence
Kutch and Valero-Cuevas 2012. They pointed out that even if every muscle is controlled independently by the nervous system, biomechanical and task constraints by themselves make EMG low-dimensional (Kutch and Valero-Cuevas 2012). Two kinds of constraint are discussed separately. In movement tasks there are far fewer joints than muscles, so limb movement can change muscle lengths only within a low-dimensional subspace; if each muscle independently resists being stretched, the simulated EMG is low-dimensional too. In force tasks, if the experiment varies only the direction of a force of fixed magnitude, the feasible patterns of muscle activation are confined to a low-dimensional set. In force tasks with cadaveric fingers (seven tendons), two “synergies” explained more than 80 % of the variance; in a 14-muscle leg model, seven were needed. They state explicitly that these results do not disprove the neural synergy hypothesis, and propose a procedure: first decide whether the task is mainly about movement or force, then use a biomechanical model to test whether the observed low dimensionality can be explained by the constraints; only low dimensionality that remains after the full feasible force set (all directions and magnitudes) has been sampled can be attributed to the nervous system.
Evidence
Which muscles are recorded matters too. Steele, Tresch and Perreault in 2013 simulated isometric force tasks with a 30-muscle upper-limb model and found that when only a few muscles are recorded, the extracted synergies differ greatly from those extracted from all muscles: with five muscles the normalised similarity averaged 0.57, and it exceeded 0.8 only with about eleven or more; VAF, conversely, was overestimated (on average 0.98 with five muscles against 0.88 with all 30), so relying on VAF alone selects too few synergies (Steele et al. 2013).
The program below builds, following Kutch and Valero-Cuevas, an example with “no neural synergy at all”: eight planar muscles with fixed pulling directions and maximal forces produce an end-point force of fixed magnitude 0.5 in 16 directions (10 trials each). Every muscle is controlled independently, with activations from two sources: (a) the minimum-effort solution (smallest sum of squared activations) plus 5 % noise; (b) random samples from the whole set of feasible solutions (hit-and-run sampling). As baselines, each muscle’s data are shuffled independently across trials (destroying the task structure), and only five of the eight muscles are “recorded”.
Calculation
# Can "synergies" appear without any neural synergy? (After Kutch & Valero-Cuevas 2012.)
# Eight planar muscles with fixed pulling directions and strengths produce an isometric
# endpoint force of fixed magnitude 0.5 in 16 directions (10 trials each). Every muscle
# is controlled INDEPENDENTLY. (a) minimum-effort activations + 5 % noise; (b) random
# feasible activations (hit-and-run sampling of the whole solution set, 0 <= a <= 1).
# Baselines: each muscle shuffled across trials (task structure destroyed), and data
# recorded from only 5 of the 8 muscles. NMF code as in p08.
import math, random
ANG = (10, 55, 100, 150, 200, 240, 290, 330); FMAX = (1.0, .8, .9, .7, 1.0, .6, .8, .9)
MM = [[f * math.cos(math.radians(a)) for a, f in zip(ANG, FMAX)],
[f * math.sin(math.radians(a)) for a, f in zip(ANG, FMAX)]]
def nmf(V, k, rng, iters=150):
m, n = len(V), len(V[0]); eps = 1e-12
W = [[rng.random() for _ in range(k)] for _ in range(m)]
H = [[rng.random() for _ in range(n)] for _ in range(k)]
for _ in range(iters):
WtV = [[sum(W[i][a] * V[i][j] for i in range(m)) for j in range(n)]
for a in range(k)]
WtW = [[sum(W[i][a] * W[i][b] for i in range(m)) for b in range(k)]
for a in range(k)]
H = [[H[a][j] * WtV[a][j] / (sum(WtW[a][b] * H[b][j] for b in range(k)) + eps)
for j in range(n)] for a in range(k)]
VHt = [[sum(V[i][j] * H[a][j] for j in range(n)) for a in range(k)]
for i in range(m)]
HHt = [[sum(H[a][j] * H[b][j] for j in range(n)) for b in range(k)]
for a in range(k)]
W = [[W[i][a] * VHt[i][a] / (sum(W[i][b] * HHt[b][a] for b in range(k)) + eps)
for a in range(k)] for i in range(m)]
sse = sum((V[i][j] - sum(W[i][a] * H[a][j] for a in range(k))) ** 2
for i in range(m) for j in range(n))
return 1 - sse / sum(v * v for row in V for v in row)
def min_effort(f, lo=0.0, hi=1.0): # min |a|^2 s.t. M a = f, lo <= a <= hi
lam = [f[0] * 2, f[1] * 2]
for _ in range(60):
z = [MM[0][i] * lam[0] + MM[1][i] * lam[1] for i in range(8)]
a = [min(hi, max(lo, v)) for v in z]
act = [lo < v < hi for v in z]
r = [sum(MM[k][i] * a[i] for i in range(8)) - f[k] for k in range(2)]
J = [[sum(MM[p][i] * MM[q][i] for i in range(8) if act[i]) for q in range(2)]
for p in range(2)]
det = J[0][0] * J[1][1] - J[0][1] * J[1][0]
lam = [lam[0] - (J[1][1] * r[0] - J[0][1] * r[1]) / det,
lam[1] - (-J[1][0] * r[0] + J[0][0] * r[1]) / det]
return a
def null_basis():
G = [[sum(MM[p][i] * MM[q][i] for i in range(8)) for q in range(2)] for p in range(2)]
d = G[0][0] * G[1][1] - G[0][1] ** 2
Gi = [[G[1][1] / d, -G[0][1] / d], [-G[1][0] / d, G[0][0] / d]]
P = [[float(i == j) - sum(MM[p][i] * Gi[p][q] * MM[q][j] for p in range(2)
for q in range(2)) for j in range(8)] for i in range(8)]
basis = []
for col in zip(*P):
v = list(col)
for b in basis:
c = sum(x * y for x, y in zip(v, b)); v = [x - c * y for x, y in zip(v, b)]
s = math.sqrt(sum(x * x for x in v))
if s > 1e-8:
basis.append([x / s for x in v])
return basis
def hit_and_run(a, basis, rng, steps):
for _ in range(steps):
z = [rng.gauss(0, 1) for _ in basis]
d = [sum(zk * b[i] for zk, b in zip(z, basis)) for i in range(8)]
lo, hi = -math.inf, math.inf
for ai, di in zip(a, d):
if abs(di) > 1e-12:
t1, t2 = (0 - ai) / di, (1 - ai) / di
lo, hi = max(lo, min(t1, t2)), min(hi, max(t1, t2))
t = rng.uniform(lo, hi); a = [ai + t * di for ai, di in zip(a, d)]
return a
if __name__ == "__main__":
rng = random.Random(2012); basis = null_basis()
dirs = [2 * math.pi * j / 16 for j in range(16)]
me, rnd = [], []
for th in dirs:
f = [0.5 * math.cos(th), 0.5 * math.sin(th)]
a0 = min_effort(f)
a = min_effort(f, 0.02, 0.98) # interior start point
for _ in range(10):
me.append([max(0.0, v * (1 + rng.gauss(0, 0.05))) for v in a0])
a = hit_and_run(a, basis, rng, 25); rnd.append(a)
def shuffled(D):
return [list(c) for c in zip(*[rng.sample([r[i] for r in D], len(D))
for i in range(8)])]
sets = {"(a) minimum effort": me, "(a) shuffled": shuffled(me),
"(a) 5 muscles only": [r[:5] for r in me], "(b) random feasible": rnd,
"(b) shuffled": shuffled(rnd)}
print("VAF by number of NMF components k (best of 2 starts), 160 trials")
print("data k=1 k=2 k=3 k=4")
for name, D in sets.items():
V = [list(c) for c in zip(*D)]
v = [max(nmf(V, k, rng) for _ in range(2)) for k in (1, 2, 3, 4)]
print(f"{name:22s} " + " ".join(f"{x:.3f}" for x in v))
print(f"solution set per force: 8 muscles - 2 force components ="
f" {len(basis)} dimensions")
# VAF by number of NMF components k (best of 2 starts), 160 trials
# data k=1 k=2 k=3 k=4
# (a) minimum effort 0.424 0.693 0.853 0.950
# (a) shuffled 0.483 0.594 0.689 0.778
# (a) 5 muscles only 0.551 0.816 0.959 0.992
# (b) random feasible 0.793 0.837 0.869 0.899
# (b) shuffled 0.784 0.825 0.860 0.892
# solution set per force: 8 muscles - 2 force components = 6 dimensionsIn the minimum-effort data three components explain 85.3 % and four explain 95.0 %: with a 90 % threshold one would report “four synergies”, although these eight muscles are in fact controlled independently. The low dimensionality comes from the task (a force of fixed magnitude in 16 directions) together with the cost function (minimum effort); after shuffling, four components explain only 77.8 %. With only five muscles recorded, three components explain 95.9 % — as Steele and colleagues found, recording fewer muscles makes the data look more “synergistic”. The random feasible solutions are different: each force corresponds to a six-dimensional solution set, and randomly sampled data look almost the same as shuffled data (0.899 against 0.892 with four components). Mechanical constraint alone, then, does not necessarily produce low-dimensional structure; it is the constraint plus some rule of choice (such as minimum effort) that produces it. Note also how high the baseline of uncentred VAF is: shuffled random data already give 0.784 with one component.
Note
What these programs show. They do not show that muscle synergies do not exist; they show only that a VAF above some threshold and fewer synergies than muscles are not, by themselves, enough to prove that the nervous system uses fixed synergy modules. Arguing for a neural origin requires ruling out explanations by task constraints and optimisation costs, for example by sampling the full feasible force set (Kutch and Valero-Cuevas 2012), comparing structure before and after deafferentation (Cheung et al. 2005), or testing how synergy structure changes after injury. Clark and colleagues found in 2010 that after stroke fewer modules can be extracted from the affected leg during walking, often appearing as a merging of several healthy modules, and that fewer modules go with poorer walking performance (Clark et al. 2010); such clinical differences also need to be interpreted after biomechanical factors and speed have been controlled for.
Hypothesis · not established · Synergies as solutions to a cost, not fixed modules
The author’s interpretation: at least in some tasks, “synergies” may be the result of the nervous system solving a particular task under a particular cost (such as minimum effort), rather than fixed modules stored in advance and called up only in proportion. Predictions that can tell the two apart: if synergies are fixed modules, changing the task constraints (for example from forces of fixed magnitude to forces of varying magnitude, or changing limb posture) should leave the muscle composition of the synergies unchanged and alter only their time courses; if synergies are solutions to a cost, the composition should change systematically with the constraints and should be computable in advance from a biomechanical model. What would refute it: in experiments that sample the full feasible force set and vary posture, the same fixed synergies recur with high similarity, and the changes in composition predicted by biomechanical optimal solutions do not appear.
Summary
The muscle-synergy hypothesis holds that movements are built by superimposing a few groups of muscles activated in fixed proportions, usually extracted from EMG by non-negative matrix factorisation; d’Avella and colleagues in 2003 analysed time-varying synergies in kicking frogs with a generalisation of NMF. The number of synergies given by a VAF threshold mainly reflects the threshold and the noise: with four true synergies, a 90 % threshold picks only two. Kutch and Valero-Cuevas showed that task and biomechanical constraints alone can produce low-dimensional EMG: eight independently controlled muscles with minimum-effort solutions need only four components for 95.0 %, and with only five muscles recorded three components reach 95.9 %. These results do not refute neural synergies, but they require constraint-and-cost explanations to be ruled out before concluding. The next chapter turns to learning: how practice changes the use of degrees of freedom, and what the direction of attention does.
References
Fan, Y. (2026). Embodied Cognition, Bernstein's Degrees-of-Freedom Problem and the Control Theory of Motor Synergies: From the Uncontrolled Manifold Hypothesis and Internal Forward Models to Fitts's Law, Read Beside Classical Chinese Thought on Skill and the Way [具身认知、伯恩斯坦自由度问题与运动协同的控制理论] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23828057 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).