- The paper introduces a dynamic neural graph that mirrors the temporal sequence of neural network inference, effectively reducing static graph limitations.
- It leverages a recurrent GNN with conditional scaling to simulate accurate layer-wise computations during the feedforward pass.
- Empirical results on INR classification and CNN generalization demonstrate significant accuracy and efficiency improvements over static approaches.
Dynamic Neural Graph Encoding of Inference Processes in Deep Weight Space
Introduction and Motivation
The study addresses the challenge of analyzing and processing high-dimensional deep neural network (DNN) weight spaces by explicitly modeling the temporal dynamics of neural network inference. Recent work in weight-space learning models DNN parameters as graphs, treated with graph neural networks (GNNs), often prioritizing permutation symmetry. However, prior approaches predominantly use static graph representations, thereby misaligning with the true sequential, layer-wise processing inherent in network inference. This mismatch induces an "inverse problem" that complicates the approximation of deep network computation using standard static GNNs.
The central innovation of the paper is the introduction of dynamic neural graphs for representing neural network weights, capturing the temporal evolution and order-dependency of inference. Building on this, the Dynamic Neural Graph Encoder (DNG-Encoder) leverages recurrent GNNs to directly model the sequential computation performed during a neural network's forward pass, sidestepping limitations and ill-posed inverse problems observed in static graph approaches.
Limitations of Static Neural Graph Representations
Static neural graphs encode all neurons and connections as one fixed structure, enabling conventional MPNN-based GNN processing. While such encoders respect permutation symmetry via appropriate graph design, they disregard the temporal and compositional dependencies intrinsic to inference.
Notably, as the paper demonstrates, multi-layer message passing on static graphs inclines towards the erroneous blending of information, particularly problematic in deeper architectures. This leads to an accumulation of terms that, due to the sequential nature of actual forward passes, are ill-posed to extract without access to intermediate state—a problem formalized as an inverse mapping bottleneck.

Figure 1: An illustration of the limitations of static neural graph processing. In deeper layers, updated nodes may incorporate undesired information, such as W2b1.
Dynamic Neural Graph Construction
To resolve these issues, the authors propose converting DNN architectures (both MLPs and CNNs) into dynamic neural graphs: time-indexed graphs whose structure evolves stepwise to faithfully mirror sequential neural computation. At each timestep, nodes and edges representing the relevant layer and its incoming connections are instantiated, and earlier, no-longer-relevant nodes/edges are deleted—a “layer snapshot” consistent with the current inference stage.

Figure 2: Left: static neural graph. Right: dynamic neural graph. A static neural graph has a fixed structure and set of connections, while dynamic neural graph evolves over time, with changes in its structure and node connections.
This paradigm enables each step of message passing to correspond directly to a layer's forward computation, with nodes only aggregating information relevant to the current and immediately previous layers, in alignment with the actual data-dependency graph of inference.
Dynamic Neural Graph Encoder (DNG-Encoder) Architecture
The DNG-Encoder is a recurrent GNN tailored for processing dynamic neural graphs. At each timestep, for each node in the newly added layer, messages from nodes in the previous timestep (layer) are passed using a conditional scaling mechanism inspired by FiLM, then aggregated and used to update node state with a shared GRU/LayerNorm block. For CNN-converted graphs (multiple edges per node-pair), a multi-head message function is employed to parallelize feature extraction across filters.

Figure 3: An illustration of multi-head message function, formalized in Equation (MFmultihead).
The architecture’s design guarantees that the updates simulate the true local computations of feedforward neural networks, thus resolving the inverse problem that hinders static graph encoders.
INR2JLS: Learning a Joint Latent Space Between Deep Weights and Data
Leveraging the DNG-Encoder, the paper proposes INR2JLS (Implicit Neural Representation to Joint Latent Space), addressing key limitations in previous INR classification frameworks (e.g., INR2VEC, INR2ARRAY). Rather than reconstructing weights from latent codes (a high-dimensional, poorly-constrained task), INR2JLS learns a joint latent space in which weight-derived representations can be directly decoded into the original data (e.g., the image for an INR).
This is achieved by processing network weights via the DNG-Encoder, combining the resulting memory vector with learnable spatial coordinates in a latent generator, and then decoding to pixel space via a transposed convolutional decoder.

Figure 4: An overview of INR2JLS. Given the weights of a neural network, the DNG-Encoder processes the weights as a dynamic neural graph to obtain the last recurrent memory. This memory state is combined with learnable spatial vectors in the Latent Generator to produce latent vectors, which are decoded into images using a transposed convolutional Decoder.
The approach supports robust downstream applications—most notably, permutation-invariant feature extraction for INR classification.
Empirical Evaluation
Static vs Dynamic Graphs: Expressiveness
The authors conduct ablation studies comparing static-graph MPNNs (NG-GNN, NG-T) versus DNG-Encoder in fitting layer-wise activations of randomly generated MLPs. Dynamic graph–based models maintain consistently low MSE across all layers, whereas static-graph models degrade rapidly with depth, confirming the theoretical limitations previously outlined.

Figure 5: The Mean Squared Error (MSE) for fitting the activations of each layer of an MLP using the static neural graph-based model and the dynamic neural graph-based model, respectively.
On the INR classification benchmark (CIFAR-10-INR, CIFAR-100-INR, etc.), INR2JLS yields strong improvements over prior state-of-the-art, surpassing the best alternatives by a margin that grows with task complexity: +9–10% accuracy advantage on the hardest datasets.
| Task |
SOTA (NG-GNN/NG-T) |
INR2JLS |
| CIFAR-10-INR |
57.7% |
73.2% |
| CIFAR-100-INR |
31.7% |
42.4% |
On CNN generalization prediction (Small CNN Zoo / CNN Wild Park), the DNG-Encoder demonstrates robustness across both homogeneous and heterogeneous architectures, outperforming baselines especially in the presence of structural diversity.
Efficiency
INR2JLS achieves lower inference latency and computational cost compared to all baselines, with only marginally higher memory use than the most efficient static GNN variants.
Data Augmentation and Latent Space Analysis
The paper also investigates data augmentation strategies within INR2JLS, such as rotation and flipping at the image level, confirming substantial further gains in representation quality and classification accuracy (e.g., additional boosts of 7–9% on complex datasets).

Figure 6: Data augmentation (rotation and flipping) for the INR2JLS framework.
Ablation studies exclude the latent generator, decoder, and augmentations, revealing their necessity for optimal performance: direct image reconstruction via joint latent space and explicit spatial embedding both prove critical.
Theoretical Properties: Equivariance and Simulatability
Formal results are provided, ensuring that the dynamic graph model and DNG-Encoder are equivariant to neuron permutations, thus respecting the inherent weight symmetry of deep networks without requiring explicit architectural adaptation or design compromises. The construction is shown to simulate DNN inference exactly under recurrent message passing, thus guaranteeing maximum representational fidelity.

Figure 7: An illustration of how dynamic neural graphs and the DNG-Encoder simulate the forward pass of a neural network while addressing the limitations present in static neural graphs.
Broad Applicability: Beyond MLPs and CNNs
The proposed DNG-based dynamic graph construction is demonstrated to generalize to flatten, skip connections (e.g., for residual networks), and Transformers, underscoring its architecture-agnostic robustness.
Implications and Future Directions
Practical Implications:
The work enables more faithful and expressive processing of neural network weights, unlocking robust, architecture-invariant feature extraction and meta-modeling capabilities. INR2JLS’s permutation invariance and flexibility position it for weight-based model analysis, including model classification and generalization prediction, across heterogeneous model zoos.
Theoretical Implications:
By revealing the inadequacy of static weight-space approaches for simulating deep inference, the study realigns symmetry-driven GNN methods to capture the temporal structure of neural computation. The design establishes dynamic neural graphs as a superior formal abstraction for DNN weight space learning, resolving expressivity bottlenecks inherent to static MPNNs.
Outlook for AI Research:
Future research will likely focus on extending dynamic neural graph methods to generative weight modeling, weight editing, model attribution and robust watermarking. While dynamic graphs are superior for discriminative and representation tasks, the paper acknowledges that static or tokenized models remain useful for some generative or editing workflows. Moreover, as weight space analysis becomes more powerful, privacy and dual-use concerns such as model reverse-engineering and unauthorized attribution will need to be addressed by defensive mechanisms.
Conclusion
The paper establishes dynamic neural graph encoding as a fundamentally improved methodology for processing deep neural network weight spaces. Through formal characterization and empirical validation, DNG-Encoder and INR2JLS outperform the previous state-of-the-art both in effectiveness and efficiency, while maintaining robust symmetry properties. The presented framework generalizes across architectures and tasks, and lays the foundation for more advanced dynamic GNNs for meta-modeling in AI. Further improvements could close the remaining gap between INR-based and image-based model performance and stimulate development of specialized temporal GNN variants.