Gradient Analysis Results
Detected conditions
- No analysis yet.
Suggested actions
- Recommendations appear after analysis.
Interactive Gradient Flow Plot
Processed Gradient Data
| Layer | Type | Step | Mean | Maximum | L1 estimate | L2 | RMS | Variance | Max/mean | Bias | Weight | Std. | Status |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| No processed data yet. | |||||||||||||
Formula Used
Mean absolute gradient: mean(|gᵢ|)
L1 norm: Σ|gᵢ|
L2 norm: √Σ(gᵢ²)
Root mean square gradient: √mean(gᵢ²)
Z-score: (x − μ) / σ
How to Use
- Enter one row for every neural network layer.
- Select a plot type and transformation method.
- Adjust warning thresholds for your model scale.
- Choose excluded layers and optional smoothing controls.
- Select Analyze Gradient Flow to update results.
- Review warnings, recommendations, and processed values.
- Export the chart, data, or printable PDF report.
Example Gradient Data
| Layer | Type | Mean Absolute Gradient | Maximum Gradient | L2 Norm |
|---|---|---|---|---|
| Input Dense | Dense | 0.00008 | 0.00031 | 0.0012 |
| Hidden 1 | Dense | 0.00045 | 0.00210 | 0.0084 |
| Hidden 2 | Dense | 0.00320 | 0.01800 | 0.0410 |
| Output | Dense | 0.02100 | 0.09500 | 0.1840 |
Gradient Flow Interpretation Guide
Gradient flow reveals how strongly each layer receives learning signals. Very small values may indicate vanishing gradients. Very large values may indicate unstable optimization.
Mean gradients describe typical behavior across parameters. Maximum gradients reveal sharp spikes or isolated instability. Comparing both values gives a clearer diagnosis.
Gradient norms summarize total update strength for each layer. Normalization and residual connections can improve difficult flows. Always interpret thresholds using model scale.
Frequently Asked Questions
What is a gradient flow plot?
It displays gradient magnitudes across model layers. The plot helps reveal weak, unstable, or missing training signals.
What indicates vanishing gradients?
Gradients consistently below a meaningful threshold may indicate vanishing behavior. The correct threshold depends on model scale.
What indicates exploding gradients?
Large gradient spikes or excessive norms may indicate instability. Gradient clipping and learning-rate changes may help.
Should bias gradients be included?
Bias gradients can reveal unusual imbalance. They may be excluded when focusing only on weight updates.
Why use a logarithmic scale?
A logarithmic scale makes very small and large gradients visible together. Zero values cannot appear directly.
What does L2 norm show?
L2 norm summarizes total gradient energy. It is useful for detecting unusually strong or weak layers.
Can runs be compared?
Yes. Paste a second run and select a comparison metric. Matching layer names are overlaid.
How does smoothing help?
Smoothing reduces visual noise across layers or steps. Excessive smoothing may hide important spikes.
What causes zero gradients?
Detached tensors, frozen layers, dead activations, or incorrect loss connections can produce zero gradients.
Can the data be exported?
Processed rows can be exported as CSV or JSON. The chart can be downloaded as PNG.
Does this replace framework debugging tools?
No. It supports diagnosis and reporting. Framework hooks remain necessary for collecting real training gradients.
Copyable Analysis Output
No analysis yet.