9/31
Part 2 of 6 · How A and B startLearn and do

Divide A by sqrt(in), and the signal keeps its size

A starts random, and the scale of that randomness matters.

torch.manual_seed(0)
# inputs of typical size 1
xs = torch.randn(1000, 400)
plain = torch.randn(8, 400)
scaled = torch.randn(8, 400) / math.sqrt(400)
print(round((xs @ plain.T).std().item(), 1))
print(round((xs @ scaled.T).std().item(), 1))
19.7
1.0
The typical size of one entry, with in = 400
x
about 1
x @ A.T, A = randn
about 20
x @ A.T, A = randn / 20
about 1

The paper only says Gaussian. Dividing by in\sqrt{\text{in}} is a sensible scale: the bottleneck then neither blows up the signal nor shrinks it.

In the editor, xs holds 1,000 inputs of typical size 1, each with d_in = 1600 numbers. Set plain: the spread, .std(), of xs @ A.T for an A of 8 rows from torch.randn. Set scaled: the same spread, with A divided by math.sqrt(d_in).