{
  "schema_version": 1,
  "experiment_id": "catnip_fp8_outlier_statistics_v1",
  "key_metrics": {
    "selected_modules": 576,
    "selected_weight_elements": 13690208256,
    "activation_calls": 63360,
    "production_global_relative_l2": 0.02649727306907663,
    "channel_global_mse_gain": 0.004763669712160579,
    "weighted_production_underflow": 9.601306661635195e-05,
    "weighted_channel_underflow": 5.869056182104899e-06,
    "channel_underflow_reduction": 0.9388723182277219,
    "dense_improved_fraction": 0.5625,
    "dense_alpha_one_fraction": 0.5746527777777778,
    "weight_skew_underflow_rho": 0.812298099043934,
    "weight_tail_l2_rho": -0.04594150028870141,
    "activation_tail_error_rho": 0.379846334275848,
    "activation_top1_jaccard_median": 0.5471698113207547,
    "activation_channel_rho_median": 0.9128367679598998,
    "activation_argmax_same_fraction": 0.625,
    "sparse_alpha025_mse_gain": 0.029947691093950124,
    "sparse_alpha025_compression": 1.9581202378585871,
    "activation_cell_median_wilcoxon_p": 0.7413292858178809,
    "activation_cell_module_spearman": 0.4356695853333234
  },
  "global_strategies": [
    {
      "strategy": "Production tensorwise FP8",
      "global_relative_l2": 0.02649727306907663,
      "mse_ratio_vs_production": 1.0,
      "mse_reduction_vs_production": 0.0,
      "bytes_per_weight": 1.0,
      "compression_vs_bf16": 2.0,
      "note": "one FP32 scale per tensor"
    },
    {
      "strategy": "Output-channel FP8",
      "global_relative_l2": 0.026434085599599103,
      "mse_ratio_vs_production": 0.9952363302878394,
      "mse_reduction_vs_production": 0.004763669712160579,
      "bytes_per_weight": 1.000832950367647,
      "compression_vs_bf16": 1.9983354857224855,
      "note": "exact existing audit; one FP32 scale per output channel"
    },
    {
      "strategy": "Per-layer best dense clip",
      "global_relative_l2": 0.026477672866819447,
      "mse_ratio_vs_production": 0.998521134381741,
      "mse_reduction_vs_production": 0.001478865618259051,
      "bytes_per_weight": 1.0,
      "compression_vs_bf16": 2.0,
      "note": "optimistic best of the fixed alpha grid"
    },
    {
      "strategy": "FP8 + exact FP32 sparse residual (alpha=0.5)",
      "global_relative_l2": 0.02647942046750993,
      "mse_ratio_vs_production": 0.9986529491239707,
      "mse_reduction_vs_production": 0.0013470508760292654,
      "bytes_per_weight": 1.0003042320410411,
      "compression_vs_bf16": 1.9993917209758867,
      "note": "counterfactual upper bound; uint32 index plus FP32 residual"
    },
    {
      "strategy": "FP8 + exact FP32 sparse residual (alpha=0.25)",
      "global_relative_l2": 0.026097491106692475,
      "mse_ratio_vs_production": 0.9700523089060499,
      "mse_reduction_vs_production": 0.029947691093950124,
      "bytes_per_weight": 1.021387737755682,
      "compression_vs_bf16": 1.9581202378585871,
      "note": "counterfactual upper bound; uint32 index plus FP32 residual"
    },
    {
      "strategy": "FP8 + exact FP32 sparse residual (alpha=0.125)",
      "global_relative_l2": 0.023477462535814043,
      "mse_ratio_vs_production": 0.7850547570775745,
      "mse_reduction_vs_production": 0.21494524292242545,
      "bytes_per_weight": 1.2462685844477486,
      "compression_vs_bf16": 1.6047905122203237,
      "note": "counterfactual upper bound; uint32 index plus FP32 residual"
    },
    {
      "strategy": "FP8 + exact FP32 sparse residual (alpha=0.0625)",
      "global_relative_l2": 0.017045275912318116,
      "mse_ratio_vs_production": 0.41381450389309554,
      "mse_reduction_vs_production": 0.5861854961069044,
      "bytes_per_weight": 2.140773167797163,
      "compression_vs_bf16": 0.9342419038528882,
      "note": "counterfactual upper bound; uint32 index plus FP32 residual"
    }
  ],
  "scale_curve": [
    {
      "alpha": 1.0,
      "dense_mse_ratio": 1.0000000092826697,
      "sparse_mse_ratio": 1.0000000092826697,
      "clip_fraction": 0.0,
      "sparse_bytes_per_weight": 1.0,
      "sparse_compression_vs_bf16": 2.0
    },
    {
      "alpha": 0.875,
      "dense_mse_ratio": 1.0015304686945852,
      "sparse_mse_ratio": 0.9997295782145984,
      "clip_fraction": 1.6734588379953422e-07,
      "sparse_bytes_per_weight": 1.0000013387670703,
      "sparse_compression_vs_bf16": 1.999997322469444
    },
    {
      "alpha": 0.75,
      "dense_mse_ratio": 1.0089302789881849,
      "sparse_mse_ratio": 0.999618473490232,
      "clip_fraction": 7.956051358989641e-07,
      "sparse_bytes_per_weight": 1.0000063648410873,
      "sparse_compression_vs_bf16": 1.9999872703988473
    },
    {
      "alpha": 0.625,
      "dense_mse_ratio": 1.030611830809291,
      "sparse_mse_ratio": 0.9993269690504692,
      "clip_fraction": 5.026293151518878e-06,
      "sparse_bytes_per_weight": 1.0000402103452122,
      "sparse_compression_vs_bf16": 1.9999195825431892
    },
    {
      "alpha": 0.5,
      "dense_mse_ratio": 1.102036373924164,
      "sparse_mse_ratio": 0.9986529491239707,
      "clip_fraction": 3.802900513013204e-05,
      "sparse_bytes_per_weight": 1.0003042320410411,
      "sparse_compression_vs_bf16": 1.9993917209758867
    },
    {
      "alpha": 0.375,
      "dense_mse_ratio": 1.4204030678289614,
      "sparse_mse_ratio": 0.9942878111734048,
      "clip_fraction": 0.0003179632419464635,
      "sparse_bytes_per_weight": 1.0025437059355717,
      "sparse_compression_vs_bf16": 1.9949254961743579
    },
    {
      "alpha": 0.25,
      "dense_mse_ratio": 3.711204549188063,
      "sparse_mse_ratio": 0.9700523089060499,
      "clip_fraction": 0.0026734672194602444,
      "sparse_bytes_per_weight": 1.021387737755682,
      "sparse_compression_vs_bf16": 1.9581202378585871
    },
    {
      "alpha": 0.1875,
      "dense_mse_ratio": 9.673783883257416,
      "sparse_mse_ratio": 0.9215641229443466,
      "clip_fraction": 0.00852613881522534,
      "sparse_bytes_per_weight": 1.0682091105218028,
      "sparse_compression_vs_bf16": 1.8722925879400454
    },
    {
      "alpha": 0.125,
      "dense_mse_ratio": 34.881079918127284,
      "sparse_mse_ratio": 0.7850547570775745,
      "clip_fraction": 0.030783573055968565,
      "sparse_bytes_per_weight": 1.2462685844477486,
      "sparse_compression_vs_bf16": 1.6047905122203237
    },
    {
      "alpha": 0.0625,
      "dense_mse_ratio": 175.253942561086,
      "sparse_mse_ratio": 0.41381450389309554,
      "clip_fraction": 0.14259664597464541,
      "sparse_bytes_per_weight": 2.140773167797163,
      "sparse_compression_vs_bf16": 0.9342419038528882
    }
  ],
  "statistical_tests": {
    "correlations": [
      {
        "label": "Weight channel skew vs underflow",
        "x": "output_amax_skew",
        "y": "prod_underflow",
        "n": 576,
        "spearman_rho": 0.812298099043934,
        "p_value": 1.6203374254531687e-136,
        "bootstrap_ci95": [
          0.7732686069245892,
          0.8460783511978051
        ],
        "bootstrap": "family-stratified percentile interval on fixed marginal ranks"
      },
      {
        "label": "Weight amax/p99.99 vs relative L2",
        "x": "amax_to_p9999",
        "y": "prod_rel_l2",
        "n": 576,
        "spearman_rho": -0.04594150028870141,
        "p_value": 0.27099150255913984,
        "bootstrap_ci95": [
          -0.12943355023446151,
          0.03745939942104084
        ],
        "bootstrap": "family-stratified percentile interval on fixed marginal ranks"
      },
      {
        "label": "Weight channel skew vs channelwise MSE gain",
        "x": "output_amax_skew",
        "y": "channel_mse_gain",
        "n": 576,
        "spearman_rho": 0.20002176111194148,
        "p_value": 1.3044172093388731e-06,
        "bootstrap_ci95": [
          0.1224384943165013,
          0.2797269443072381
        ],
        "bootstrap": "family-stratified percentile interval on fixed marginal ranks"
      },
      {
        "label": "Weight amax/p99.99 vs dense clipping gain",
        "x": "amax_to_p9999",
        "y": "best_dense_mse_gain",
        "n": 576,
        "spearman_rho": -0.06469495857032799,
        "p_value": 0.12091818210992523,
        "bootstrap_ci95": [
          -0.14436699391582214,
          0.012786753504740277
        ],
        "bootstrap": "family-stratified percentile interval on fixed marginal ranks"
      },
      {
        "label": "Activation tail vs tensorwise relative L2",
        "x": "act_tail_p95",
        "y": "act_tensor_rel_p95",
        "n": 576,
        "spearman_rho": 0.379846334275848,
        "p_value": 3.2888632055798573e-21,
        "bootstrap_ci95": [
          0.3165110992387452,
          0.4462891648301316
        ],
        "bootstrap": "family-stratified percentile interval on fixed marginal ranks"
      },
      {
        "label": "Activation tail vs rowwise MSE gain",
        "x": "act_tail_p95",
        "y": "act_row_gain_median",
        "n": 576,
        "spearman_rho": 0.44168781761016884,
        "p_value": 6.666438253997563e-29,
        "bootstrap_ci95": [
          0.3898034435906903,
          0.49335507483891233
        ],
        "bootstrap": "family-stratified percentile interval on fixed marginal ranks"
      },
      {
        "label": "Weight tail vs activation tail",
        "x": "amax_to_p9999",
        "y": "act_tail_p95",
        "n": 576,
        "spearman_rho": 0.08496521820223747,
        "p_value": 0.041507674069801444,
        "bootstrap_ci95": [
          0.013569073349652534,
          0.15923541545625064
        ],
        "bootstrap": "family-stratified percentile interval on fixed marginal ranks"
      }
    ],
    "kruskal_wallis": [
      {
        "label": "Weight channel skew differs by family",
        "metric": "output_amax_skew",
        "n": 576,
        "groups": 12,
        "H": 201.6717110876575,
        "p_value": 3.346385433499107e-37,
        "epsilon_squared": 0.3380704097298892
      },
      {
        "label": "Weight underflow differs by family",
        "metric": "prod_underflow",
        "n": 576,
        "groups": 12,
        "H": 280.2845328137285,
        "p_value": 1.2352670009080563e-53,
        "epsilon_squared": 0.47745484541441224
      },
      {
        "label": "Activation tail differs by family",
        "metric": "act_tail_p95",
        "n": 576,
        "groups": 12,
        "H": 382.0066526981147,
        "p_value": 4.021939526960514e-75,
        "epsilon_squared": 0.6578132140037495
      },
      {
        "label": "Activation rowwise gain differs by family",
        "metric": "act_row_gain_median",
        "n": 576,
        "groups": 12,
        "H": 398.4847855421557,
        "p_value": 1.28339283940711e-78,
        "epsilon_squared": 0.6870297615995669
      }
    ],
    "activation_cell_pair": {
      "cells": [
        "person_car_seed12345",
        "person_ceramics_seed12345"
      ],
      "module_median_wilcoxon_statistic": 81769.0,
      "module_median_wilcoxon_p": 0.7413292858178809,
      "module_median_spearman": 0.4356695853333234,
      "module_median_spearman_p": 4.41286258722464e-28
    }
  },
  "activation_bundle_metadata": {
    "person_car_seed12345": {
      "module_count": 576,
      "group_count": 31680,
      "geometry": {
        "requested_duration_s": 20.0,
        "width": 832,
        "height": 480,
        "frames": 489,
        "latent_frames": 62,
        "nfe_per_chunk": 4
      },
      "split_role": "calibration"
    },
    "person_ceramics_seed12345": {
      "module_count": 576,
      "group_count": 31680,
      "geometry": {
        "requested_duration_s": 20.0,
        "width": 832,
        "height": 480,
        "frames": 489,
        "latent_frames": 62,
        "nfe_per_chunk": 4
      },
      "split_role": "calibration"
    }
  },
  "provenance_sha256": {
    "/workspace/catnip-fp8-outlier-statistics/config/experiment.json": "e196c9ec83af35dac766e09c0ae602e7a9adf636b5ae11fbc419d197a5e634f2",
    "/workspace/catnip-fp8-outlier-statistics/data/raw/weight_outlier_records.jsonl": "9346a7013b56ba49724e1b7372756057ccdee4ff8f8ae7f225903a2be5a1add5",
    "/workspace/week2-improved-fp8_scaled/experiments/split_fp8_dit_vae_profile/manifests/fp8_scaled_mm_attn1_kv_o5_cuda1.json": "c085f53dbdac584a6f53b000ba5efb59892d512dcd9b42a4a8f8f53eb87acdf9",
    "/workspace/week4-fp8-accuracy/results/weight_quantization_all.json": "2729495f8cb6457426d70fbbf64a4e42b8ef860363c67f9424d9cb01896a731e",
    "/workspace/week4-fp8-accuracy/results/activation_calibration/person_car_seed12345/bundle/activation_stats.json": "45cecce30dcd8c24fb084795cb38717bf3fd5462eb177339e55517a28f73ab01",
    "/workspace/week4-fp8-accuracy/results/activation_calibration/person_ceramics_seed12345/bundle/activation_stats.json": "97c7ae4f1cca759160aab6d2d34d4c025cc6186c0444324739226fe6f575a118",
    "/workspace/week4-fp8-accuracy/results/activation_calibration/person_car_seed12345/bundle/channel_amax.safetensors": "64c858093533200dd498c2b2b7da24b4e2a2fa318dab5b5351dfed1619536659",
    "/workspace/week4-fp8-accuracy/results/activation_calibration/person_ceramics_seed12345/bundle/channel_amax.safetensors": "1ade095a2f72ef695a13cb79bc8e4a4b1558e5beae8792a03c87470eea349b72"
  },
  "limitations": [
    "Weight quantile and kurtosis descriptors use 262,144 deterministic evenly spaced samples per tensor; amax, channel maxima, production errors, and every FP8 scale-grid error use all elements.",
    "Activation quantization errors are deterministic probes of at most 64 rows per call, while activation amax is observed over the full call tensor.",
    "Only two prompt/seed calibration cells are available; cross-cell stability does not establish population-wide prompt generalization.",
    "Sparse residual results assume exact FP32 residual values with uint32 indices and are counterfactual upper bounds, not an implemented Catnip kernel.",
    "Layer-local reconstruction errors and isotropic L2 proxies do not prove end-to-end video or audio quality causality."
  ]
}
