Published January 12, 2026 | Version v1
Preprint Open

White Paper: A Dynamic Gray-Box Methodology for Analyzing and Simplifying PyTorch Models

Authors/Creators

Description

Machine learning researchers and practitioners often face challenges when analyzing, interpreting, and repurposing deep learning models, particularly those built with popular, highly dynamic frameworks such as PyTorch. Existing static analysis and tracing techniques offer limited support for the breadth of constructs found in real-world codebases. This work-in-progress proposes a dynamic, gray-box methodology for systematically analyzing PyTorch models, extracting human-interpretable module hierarchies, and automatically synthesizing minimal, skeletal module classes that preserve functional equivalence and remain compatible with the original model weights. This document outlines a general strategy, open to further extensions, for approaching these challenges in a principled manner.

Files

White_Paper__A_Dynamic_Gray_Box_Methodology_for_Analyzing_and_Simplifying_PyTorch_Models.pdf