The security of modern machine learning models, particularly large language models and other architectures driven by Transformers, has long relied on the opacity of their proprietary weights. While companies guard these parameters fiercely, academic researchers continually test the limits of what can be inferred externally. Until now, however, such cryptanalytic attacks have been limited to isolated components. Previous efforts successfully recovered isolated multi-head attention layers, isolated bias-free Gated Linear Unit feed-forward networks, or drastically simplified network blocks stripped of normalization layers and skip connections.
Real-world, modern Transformer blocks present a significantly more formidable challenge. They tightly couple dual pre-RMSNorm layers, residual connections, multi-head softmax attention mechanisms, and biased ReLU or SwiGLU feed-forward networks. Under this sophisticated architecture, every single query passed into the network traverses both normalization steps and both sublayers simultaneously. This complex coupling has historically prevented prior component-level reductions from applying directly. Furthermore, existing mathematical techniques—such as rational pole-finding methods utilized in earlier estimation approaches—exhibit severe instability when subjected to low-precision arithmetic commonly used in modern computing hardware.
The Tsinghua University research team overcomes these barriers by introducing a comprehensive, precision-agnostic pipeline capable of handling both biased ReLU and bias-free SwiGLU feed-forward networks within a single dual pre-RMSNorm residual Transformer block. Rather than attempting to break the entire interconnected system in one monolithic step, the newly unveiled attack method elegantly decouples the block into four distinct operational stages.
In the first stage, the attack recovers the aggregate attention value map by analyzing the complete-block responses. The second stage then extracts the tightly coupled feed-forward network through a singleton forward bridge. Moving to the third stage, the methodology synthesizes attention outputs via paired opposite-input inversion. This critical step allows the extraction process to recover all effective attention heads without relying on unstable pole-finding algorithms. Finally, the fourth stage refines the entire block jointly across the low-rank head manifold, ensuring high-fidelity parameter recovery.
To prove the robustness and viability of their approach, the researchers evaluated the attack end-to-end across a wide variety of hardware implementations. Their experiments spanned native Double Precision Floating Point (FP64), Single Precision Floating Point (FP32), Half Precision Floating Point (FP16), and Brain Floating Point (BF16) formats. The evaluation tested the attack on blocks scaling up to significant dimensions, specifically handling a token dimension of $d=256$, eight attention heads ($H=8$), and a feed-forward network width of $m=1024$. At this scale, the targeted blocks encompass over one million proprietary parameters.
The empirical results underscore the remarkable efficiency and precision of the attack. At this operational scale, the extraction process requires a remarkably low query budget, demanding only 0.26 to 0.47 queries per parameter. Despite operating entirely as a black-box adversary with access only to input-output pairs, the attack achieves block relative $L_2$ errors that hit the hardware rounding floor of each respective numerical format.
Specifically, the relative $L_2$ error reaches at most $2.20times 10^-15$ in FP64 precision, $5.49times 10^-7$ in FP32 precision, $1.07times 10^-3$ in FP16 precision, and $8.16times 10^-3$ in BF16 precision. These findings indicate that even when models are deployed under lower-precision formats designed to optimize computational speed and memory efficiency in commercial environments, they remain fundamentally vulnerable to sophisticated cryptanalytic extraction when architectural specifications are matched by analytical pipelines.
The work by Zheng, Chen, and Dong marks a significant escalation in the study of neural network security, shifting the boundary of black-box extraction from isolated theoretical components to fully integrated, production-grade architectural blocks. By bridging the gap between theoretical cryptanalysis and practical low-precision floating-point arithmetic, the research provides vital insights for the cryptographic and machine learning communities as they work to secure proprietary artificial intelligence assets against advanced reconstruction threats.

