Optional numerical evidence
Connect stored values and recorded activations to model structure.
Default inspection remains static. Weight IR reads numeric payloads only when requested. Activation IR imports an explicit execution capture. Neither changes the existing Model IR schema or its hash.
One structure, separate evidence
Model IR identifies operations, ports, logical values and serialized storage. Weight IR references those storage and binding IDs. Activation IR references logical values and records the input, runtime, collector, execution configuration and capture scope. A numerical evidence bundle references the independent document hashes without a circular dependency.
For a weight shared by several operations, the binding list preserves every use. Tensor containers without a serialized graph retain their numeric inventory; names do not create layers or connections.
Inspect weights
npx -y deepbom@1.106.0 audit model.onnx --weight-analysis --output-format json --section weight_ir -o weight-ir.jsonIn the web workspace, choose Analysis palette → Weight, then Analyze weights. The distribution map compares stored tensors; selecting a tensor reveals its histogram, exact counts, summary statistics and serialized operation connections. Search by tensor or operation, filter by encoding and assessment status, and switch between linear and logarithmic count axes. Save the selected distribution as SVG or PNG, or save the complete numerical evidence JSON. Imported activations uses the same visual workspace for a hash-bound execution capture. Distribution-map color is relative to each row’s peak, and equal-width screen columns represent fixed, unequal-width numeric bins. ChatGPT's widget also provides Analyze weights · JSON; use its existing Save via ChatGPT control if local downloads are blocked.
| Format | Available numeric evidence | Explicit limits |
|---|---|---|
| ONNX | Embedded dense initializer and attribute payloads using the existing scalar and packed dtype decoders. | Unbound external data remains unassessed. Nested payloads are inventoried, with no fabricated storage binding. Sparse values and indices describe their stored components, not a synthesized dense tensor. |
| TFLite | Stored scalar and packed INT4 values with exact serialized ranges, including nested subgraph storage. | Integer statistics describe stored codes; they are not automatically dequantized. Sparse or unsupported layouts remain unassessed. |
| GGUF | Scalar and supported source-pinned GGML block decoders; block formats report dequantized values. | Unsupported or invalid encodings remain visible. A tensor directory alone does not establish a runtime graph. |
| SafeTensors | Supported scalar, float8 and packed float4 encodings; exact integer extrema for int64/uint64. | Producer-specific packing and incomplete quantization contracts remain unassessed. Stored codes are not a claim about dequantized weights. |
| Core ML | Legacy float32/float16 weights and validated linear/LUT/int8-dynamic dequantization; available complete MIL immediate values. | Blob-backed or unavailable parameter values remain unassessed in this optional layer. This does not imply missing static Core ML support. |
| ExecuTorch | Inline/segmented PTE constants and typed PTD payloads with explicit ranges. | Opaque delegate payloads, unresolved external data, nonzero storage offsets and unknown layouts are not decoded as numeric weights. |
The first version accepts one serialized artifact at a time. The default limit is 100 million decoded weight values. ONNX/Core ML/ExecuTorch source reparsing and individual byte-range decoding have a 512 MiB memory bound. The ChatGPT widget has a 128 MiB source limit. GGUF and SafeTensors use chunked payload reads. A limit produces a visible unassessed row, never a zero-valued statistic.
Advanced Weight IR analysis
--weight-analysis now produces both the unchanged weight_ir and a hash-bound weight_analysis document. In the Weight workspace, the Inspection menu provides Channels, Kernel slice, Similarity, Singular spectrum, Sparsity, Quantization, and Original / candidate views. SVG and PNG export the selected view. Evidence JSON includes the complete advanced results and explicit coverage.
npx -y deepbom@1.106.0 audit candidate.onnx --weight-analysis --output-format json --section weight_ir,weight_analysis -o weights.json
npx -y deepbom@1.106.0 audit candidate.onnx --weight-baseline original.onnx --output-format json --section weight_analysis,weight_comparison -o comparison.jsonIn Web, choose Choose original model, then Analyze weights. Both files stay in the browser. Automatic comparison requires a unique matching name and exact shape; that is a correspondence heuristic, not proof of semantic equivalence. Cross-format comparison is supported when decoded representations and aligned shapes agree. Explicit CLI mapping uses --weight-mapping mapping.json:
[{"baseline":"weight:0","candidate":"weight:2","candidate_axis_permutation":[1,0]}]| Analysis | Computation and interpretation |
|---|---|
| Channels and kernel slices | Complete per-axis statistics, channel norm/variance/zero count, selected native slice. Declared Conv/MatMul contracts identify output axes where supported; other axes are generic slices. Kernel image cells aggregate all values in their area, with counts and extrema. |
| Similarity | Complete signed cosine matrix within the budget. Zero-norm comparisons are null. Connected components of cosine ≥ 0.95 are candidate groups, not proof of functional redundancy. |
| Spectrum | Closed-form diagonal spectra or scaled one-sided Jacobi SVD, numerical rank with an explicit tolerance, condition number, cumulative energy and relative Frobenius residual by retained rank. Columns retain separate scale exponents during rotation. Numerical-null deflation discards a column only below machine epsilon squared times the smallest nonzero normalized input magnitude, far below the reported numerical-rank tolerance. Nonconvergence, unrepresentable normalization or an exhausted budget produces no asserted spectrum. A kernel unfolding is not a full convolution operator. |
| Sparsity | Exact zeros, contiguous 16-value blocks and 2:4 groups along a declared axis. Incomplete groups are counted separately. A pattern match does not establish backend eligibility or speed. |
| Quantization | Complete ONNX affine bindings and TFLite scale/zero-point arrays reconstruct real values. Per-tensor, per-axis, and validated ONNX blocked affine contracts are supported. GGUF/Core ML decoders may already return dequantized values; absent block parameters remain explicit. Endpoint occupancy is not proof of clipping. |
| Comparison | Aligned value differences, MAE/RMSE/MSE, relative L2, signed cosine, SQNR and compatible spectra. A compatible original reference is required for reconstruction error. No synthetic reference is invented. |
Advanced defaults: 8 million values in total; 2 million per tensor; 4,096 channel-statistic rows in total; 128 channels per similarity matrix and 1 million similarity cells in total; 30 million SVD work units in total (Jacobi pair-row operations or diagonal input values). Basic Weight IR keeps its independent 100-million-value budget. Similarity also has a 20-million pair-row work bound per tensor. SVD has an explicit total work budget and a convergence bound; rank is numerical at the reported tolerance, not exact algebraic rank. Values lost during SVD normalization cause an explicit precision gap. These limits produce feature-specific gaps, never sampled results labeled complete. The Advanced analysis coverage table lists completed tensors and reasons for each calculation, separately from payload decoding. Use tensor selection to reserve the budget for the tensors of interest.
{"tensor_ids":["weight:0"],"axes":{"weight:0":{"channel_axis":0,"sparsity_axis":1,"kernel_channel":3}},"max_values":8000000,"max_tensor_values":2000000,"max_svd_work":30000000}Pass this JSON with --weight-options options.json, or import it through Analysis options. Web also accepts {"analysis":{...},"mapping":[...]}. Axis permutations apply to the candidate's native declared axes. GGUF uses its first-axis-fastest order; other supported scalar tensor layouts use their documented native order. Axis meanings are never inferred from a filename.
Counts are exact within the declared inventory; floating computations are rounded binary64. Graph-free tensor files do not acquire a fictitious graph. Exact-cell images may reveal individual weights; numerical exports should be handled with the same confidentiality as their source. Advanced analysis and comparison schema.
Explore pruning interactively
After Analyze weights, select Interactive pruning. Compare tensors using the distribution, RMS or zero-fraction overview, then move the target-zero slider. The workbench updates the complete-tensor magnitude mask, retained squared weight norm, RMSE, per-channel response and original/candidate heatmaps together. Select a channel to inspect its slice; this changes the view, not the tensor-wide experiment. Switch the right-hand map to removed positions or differences, zoom and pan, and inspect cells for exact counts and extrema. Expand workspace opens a focused full-screen view where supported. Keyboard controls and reduced-motion preferences are supported.
Preview computation is bounded to two million finite decoded values and 4,096 channels per tensor. Integer codes require a proven dequantization contract. The target is the total zero fraction, including existing zeros; the requested zero count is rounded down to an integer, and existing zeros are never filled. Equal magnitudes are ordered by their position in the declared channel-axis unfolding. Each result records the original identity, mask hash, method, actual counts, coverage and numeric changes in deepbom.pruning_preview.v1. SVG, PNG and the numerical evidence JSON can be saved.
The preview does not write a pruned model or shrink tensor dimensions. Retained weight energy is not retained accuracy, and zero patterns do not establish sparse execution or speed. The original artifact and basic Weight IR remain unchanged. Native model export, fine-tuning, calibration and measured task/runtime evaluation require their respective transformation and execution paths.
Record actual activations
The separate Python collector executes ONNX or TFLite only with --allow-execution. It requires locally installed runtime packages; static CLI and MCP audit do not install or launch them. Use a virtual environment and an artifact you intend to execute.
npx -y deepbom@1.106.0 audit model.onnx --output-format json --section model_ir -o model-ir.json
python -m pip install onnx==1.20.1 onnxruntime==1.24.4 numpy==2.4.3
python scripts/capture-activation-evidence.py model.onnx --model-ir model-ir.json --probe ones --allow-execution --output capture.json
npx -y deepbom@1.106.0 audit model.onnx --activation-evidence capture.json --output-format json --section activation_ir -o activation-ir.jsonThe collector is available in the source repository and as bin/capture-activation-evidence.py inside the npm package. With a global npm installation, locate it under npm root -g, in deepbom/bin/. For TFLite, install ai-edge-litert==2.2.0 and use the same capture command with a .tflite artifact. Other instrumented runtimes can emit the common activation capture contract.
Use --inputs-npz inputs.npz to provide exact named numeric inputs; pickle loading and implicit dtype casts are disabled. Use --outputs-only to reduce capture scope. The collector caps decoded values at one million and the capture at 16 MiB. Missing values and unrequested graph values are listed separately.
ONNX capture disables graph optimization and exposes selected intermediate tensors as outputs. It records the instrumented artifact hash separately. TFLite preserves tensors with default delegates disabled. These are inspection runs, not production latency benchmarks. Configured providers alone do not prove per-operation device placement.
Interpret the numbers
Counts, histogram bins and integer extrema use decimal integer strings. Floating mean, population standard deviation, RMS and L2 norm accumulate exact sums and squared sums of decoded finite binary64 values, then round the final result to binary64. Heatmap cell means use the same exact accumulation. Signed cosine uses exact dot products and squared norms. These guarantees apply to decoded values; they do not restore precision already lost in the source encoding or dequantization. Overflow is represented by null with an explicit reason. Large int64/uint64 values are never silently rounded to produce a distribution: unsafe floating statistics are withheld while exact extrema and counts remain available. Complex payloads currently expose magnitude statistics with that representation stated.
Histograms use common fixed logarithmic value bins and exact bin counts, with no sampled percentiles. Basic histograms are tensor-wide summaries. Singular spectrum is a separate advanced calculation with its own method, tolerance and coverage; no eigenvectors or exact algebraic rank are inferred from a histogram. Ones, zeros and identity matrices are synthetic probes: nonlinear activations, biases, quantization and normalization mean they cannot by themselves establish layer importance, causal relations or representative activation distributions.
Imported execution evidence is checked for consistency and identity; a hash does not attest that a claimed runtime actually executed. Numeric-value hashes preserve the recorded values; they do not preserve distinct NaN payload bit patterns. The collector separately hashes a supplied NPZ input file and records its dependency versions. The raw input and activation values are omitted from Activation IR. Keep the capture privately when reproducibility requires those values.
Use with an AI agent
{"path":"/models/model.onnx","output_format":"json","weight_analysis":true,"weight_baseline":"/models/original.onnx","section":"weight_analysis,weight_comparison"}
{"path":"/models/model.onnx","output_format":"json","activation_evidence":"/models/capture.json","section":"activation_ir"}These are optional deepbom_audit arguments for the local MCP server. Baseline, options, mapping and activation capture paths must be inside its allowed roots. The same shared numerical modules run in the Web worker, CLI and local MCP. The hosted ChatGPT tool retains its static-analysis contract; execution collection happens explicitly in your local environment.