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

Read full text
Authors: Jifeng Wu
Cited by: 0

Abstract

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.

Fields of Study & Subjects

Explainable Artificial Intelligence (XAI) Software Engineering Research Software Testing and Debugging Techniques

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
12 January 2026
Document type
Preprint