Normalization, initialization and disability: how deep networks transmit signals

Compare BN with LN with a fixed matrix, and then explain the He initialization and residue path from the variance and the number of guides.

System Chapter . StepCollate in 2 Graphics6 self-measurement4 First-hand sources
Start Body
Learning objectives and first steps4 objectives • 3 first fixes

Try to do it after reading

  • By axis hand BN and LN
  • Deduct initialised scale under ReLU
  • Track the fragments and gradients
  • Statistical differences in diagnostic training and reasoning

Suggested first

  • Average variance
  • Chain law
  • Matrix and ReLU

After a little deeper, why is it getting harder and harder to control the values

When connecting multiple feature branches, the input scales, non-linearity and depth of each branch may vary. One branch is very active and the other is close to zero, so that the integration layer may not be able to use both sides in a stable manner. The depth increase will also multiply the number of reverse guides. Initialization, reclassification and disability intervention are the initial scales, layers of statistics and information circuits, respectively, which are not the three switches that can be replaced by each other.

This chapter sets the calculations on the composite 2D matrix before discussing the deep network. The figures in the figure do not provide a realistic measurement of training achievements. The original BN, LN, He initialization and ResNet from a check of 2026-10-29; The explanation does not follow the title of the paper, claiming that a particular training mechanism has been only proven.

Let's start with what's the axis of the unicode

A shape for the given matrix X as [B,D], B indicates the number of samples, and D indicates the characteristic dimensions of each sample. Take two samples [1,3]、[5,7]I don't know. For ease of calculation, a temporary analogue factor of gamma = 1, beta = 0, and neglect of very small titanium; The real code keeps the platinum to deal with the zero-variety.

If the rows are rounded along the batch axis, the averages are 3 and 5, the difference is 4 and the standard difference is 2 and the result is the first line[-1,-1]Second line[1,1]I don't know. If the average line is 2 and 6, the difference is 1 and the result is both the same as the one in each sample[-1,1]I don't know. The same set of inputs, because of the differences in the homogenization axis, the meaning of the output has changed.

y=γx−μσ2+ε+β

Two statistical axes of the same matrixThe average value is calculated on the left side by column and on the right by row by feature, and for batch in this chapter, for example, for the purposes of reclassification and reclassification.13571357Cross sample: μ = [3,5]Each sample: μ = [2,6]
Only a simplified scene of B x D is drawn here. BN of CNN is also usually trans-space dimensions; LN of the sequence model needs to be clear normalized_shape.

BN uses batch statistics in training and generally maintains operational statistics for reasoning; LN does not rely on the same sample for the characteristics agreed upon in the single sample. The selection is influenced by the small batch, the mixture of samples in different distributions, and the shifting distribution of training and reasoning. When the sequence contains padding, statistics are also affected by invalid content if the homogeneity axis contains the wrong place.

Range control begins with initialization

Linear units z=Σwᵢxᵢ, the output variance is approximately fan_in multiplied by the weight variance multiplied by the input second-order scale on the assumption that the weight is close to the input to independence. ReLU cuts negative sides to zero; If symmetrical distribution approximates, you can select the weight variance by about 2/fan_in, this is one of the bases for the initialization of He, which is commonly used, rather than the same standard deviation for all layers.

If fan_in = 8, the weight difference is 0.25 and the standard difference is 0.5. If even distribution is used, the boundary is also converted to an evenly distributed variance, and 0.5 cannot be considered directly as the upper and lower boundary of the sample. The volume of fan_in shall contain the input channel and the location of the volume core space; The volume of the grouping is calculated separately on the basis of the connection structure. When you change the active function, the initialization assumption should also be re-examined.

Multiple hidden units using exactly the same initial weight may receive the same gradient under symmetric input and loss, learning the same expression on an ongoing basis. Here is the symmetry of de-weighting, not the prohibition of all bias from scratch. Normalization adjusts the activation scale, but does not automatically transform the symmetrical symmetry of unbroken parameters into different characteristics.

There's a lead path for the leftover

Set the debris margin as y=x+F(x), the input output shape must be compatible and require a projection or other explicit change when incompatible. Proxy As dy/dx=1+F′(x); The matrix scenario replaces one with a matrix of units. The constant path allows for an additional route to the information and gradient compared to the normal stacking only through F, but does not guarantee a gradient of 1 for each block.

For example, F(x) = 0.1 x, x = 2, output 2.2, local lead 1.1; If F(x) =-0.9 x, only 0.1 local guides. Disparities form also has offsets. (a) Simplified chain of 0.5 with 10 guides, with a path multiplier of 1/1024; This is just a metric calculation for the gradient ' s decline, not a complete projection of the difficulty of a real network training.

The Hong Kong sidewalk of the debrisEnter a path through F, arc remains constant, etc., and merges at add-on points; The following is a list of the two references to this example, which add up to 1.1.x=2F(x)=0.1x+y=2.2Constant Path: Lead 1Total = 1.1 + 0.1 =
The original damage theory. Whether to use pre-norm, post-norm, project and activate requires a specific network structure.
# 标准 Python:手算归一化与初始化尺度,已执行。
import math
X = [[1.,3.],[5.,7.]]
means = [sum(row[j] for row in X)/2 for j in range(2)]
variances = [sum((row[j]-means[j])**2 for row in X)/2 for j in range(2)]
normalized = [[(row[j]-means[j])/math.sqrt(variances[j]) for j in range(2)] for row in X]
assert normalized == [[-1.,-1.],[1.,1.]]
assert math.sqrt(2/8) == .5
assert .5**10 == 1/1024

Watch scale and state by layer

When training is unstable, the same data records the averages of the layers, standard deviations, non-limited ratios and gradient parameters, which are then reconciled with the unicoded axis, initial scale and residual shape. Do not change all mechanisms just because loss is big. Check the updated scope, mode switch and data distribution of BN running statistics if the training model is performing normally and eval is clearly abnormal; Such problems could not necessarily be solved by the transfer of learning rates.

This chapter uses the overall mean deviation to illustrate that the framework may have different protocols in training statistics and operational estimates and that the small matrix values here cannot be directly considered as all BN API is the state output. Actual use requires checking specific version parameters. The next step is PyTorch: Where the gradient goes, what the model keeps, and each change is validated in the complete training cycle.

Different sources in the same structure, and the scales are to be looked at separately

Assuming that a multi-source model combines statistical features, historical sequences and categories Embedding. The different dimensions of the three branches do not mean that they should have the same rights as nature after an element-by-element variance: the total energy of more branches may be larger and the connection and initialization of the integration layer will continue to change scales. The output distribution and gradient of each branch shall be observed, and not only the average value of the final integration matrix shall be checked.

Normalization also changes the recognizable scope of information. If a mission did rely on absolute ranges, it might be useful to eliminate some of the differences by dividing the standard deviations by reducing the average value of each sample. The original level of magnitude may be retained as another input, or may be determined by controlled digestion; It is not more appropriate to use "better values" as representation. The difference provides a different information path and should be presented separately on the basis of a specific calculation chart.

Self-measurement and interpretation

After the case has been re-aligned, why not the first sample [-1,1]?

Both columns are below the average of each column, with a margin of -2, divided by the standard difference of -1. [-1,1] is the result of a process-by-line standardization.

The line is identical. What happens when you divide it by standard?

The standard deviation is zero and no calculation is defined. Achieving stabilization measures, such as the use of haemorrhoids; It is also to be judged whether the characteristic does not contain any distinguishing information.

fan_in doubled and He standard deviation changed?

(a) To reduce the knowledge from sqrt(2/fan_in) to the original 1/ § 2; Not directly halved.

Can BN automatically fix exactly the same hidden weight?

It cannot be relied upon to break the full symmetry. Normalization changes the scale and initialization still requires differentiated learning paths for the different modules.

Does the gradient of the debris always mean at least one?

No, it's not. F can be negative. This case -0.9 makes the total lead of 0.1; The high-dimensional situation also takes into account the direction and spectra of a comparable level.

The difference between training and reasoning is suddenly large. Should we change the initials?

The models, running statistics and data ranges are checked first. Initialization describes only the starting point of training and does not directly explain any later statistical deviations.

The four original papers supported the statistical axis, the initialization assumptions and the debris structure; Figures and values are original teaching designs. Arithmetic has been standardized Python recalculated and no framework or real depth training has been performed.

Sources and reconciliations

Definitions, methods and interfaces are available.

  1. Batch Normalization
  2. Layer Normalization
  3. Delving Deep into Rectifiers
  4. Deep Residual Learning for Image Recognition

Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.

← Back to the knowledge directory
Ask Max Ask about this site
Ask Max ↗

Opening the assistant…

Paper figure

Photo comments

LEAVE A NOTE

About this photograph

Connecting to the discussion board…

    Comments become public after moderation. You can delete your own comments from this browser.
    No email is required. Clearing cookies prevents this browser from claiming earlier comments.

    MAX WANG / INDEX

    Find something

    Enter a keyword, or explore the directory below.