Turing-complete malware can run in PyTorch's backward pass via a zero-valued loss

retr0jirachi · x · 2026-10-26

Elon Litman demonstrates that a loss term evaluating to zero can run Turing-complete programs inside any PyTorch network's backward pass: loss.item() logs 0.0 and training curves look normal, while gradient descent executes arbitrary cellular automata or stages malicious payloads in the weights. The exploit exploits the mismatch between IEEE 754 arithmetic and symbolic autodiff rules on whether a function is constant.

Threat model: you verify the .safetensors SHA-256, skim modelingllama.py for backdoors, then pip-install an 'UltraLoss' spectral regularizer promising faster 8-bit fine-tuning — the payload hides inside the loss function, invisible to all standard checks.

Original post →

More from Safety

Safety channel →