今日已更新 211 条资讯 | 累计 29353 条内容
关于我们

I Compressed Bad Apple into a 3MB Neural Network [P]

/u/Which_Lie_8932 2026年08月05日 08:01 4 次阅读 来源:Reddit r/MachineLearning

I trained a small MLP to memorize the classic Bad Apple animation, ~2.7 billion pixels of video compressed into 790k parameters (3.2 MB float32, 1.6 MB float16). The network takes a 3D coordinate (t, y, x)- frame index and pixel position- and outputs a grayscale value between 0 and 1. To "play" the video, you can evaluate the function over the full grid. The "video" is stored implicitly in 5 linear layers of sine activations (Sitzmann et al.'s SIREN) with 512 hidden units, ω₀ = 30, and sigmoid output. The source bad_apple.mp4 is 6524 frames at 854×480; I subsampled to 1620 frames × 384×384, about 1/10 of the original pixels (2.8x spatial + 4x temporal reduction). At first, I used a ReLU MLP with low-frequency Fourier features, which plateaued around MSE 0.12. SIREN's sine activations add higher frequency for free, so the network was capable of outputting fine details. Unfortunately, that model had an issue, which was that it could only shift the information slowly, so quick motion came out blurry. To fix this, I made two changes: Time-stretch: I scaled the time coordinate by 4x relative to the space before the first layer, giving it 4x more temporal capacity. Motion-focused sampling: Bad Apple is ~90% static black, so uniform pixel sampling starved the moving edges of the gradient. Now half of each training batch is drawn from pixels that changed between neighboring frames. For the training pipeline, I had a single shared network on the whole volume (no per-frame latents; initially, I used per-frame finetuning, but that caused catastrophic forgetting) with a cosine-scheduled Adam + weight EMA, then a low-LR "polish" pass over the whole video. The new model had these improvements: Validation MSE dropped from 0.0795 to 0.0090 (~9x better). Compared to the old model, high-motion frames were 3.6x closer to ground truth, and static frames were almost 15x closer. 398/400 sampled frames improved. Edit: Some people are a little confused about the compressed part. The subsam

本文内容来源于互联网,版权归原作者所有
查看原文