Tracing Hyperparameter Dependencies for Model Parsing via Learnable Graph Pooling Network

Xiao Guo, Vishal Asnani, Sijia Liu, Xiaoming Liu

In the rapidly evolving world of Artificial Intelligence Generated Content (AIGC), the ability to distinguish real from fake is no longer enough. To truly defend against misinformation and understand the provenance of an image, we need to know how it was made. This task, known as Model Parsing, involves predicting the specific hyperparameters—such as loss functions, layer counts, and filter numbers—of the generative model that produced a given image.

At NeurIPS 2024, researchers from Michigan State University presented a significant leap forward in this field with their paper: "Tracing Hyperparameter Dependencies for Model Parsing via Learnable Graph Pooling Network."

Overview of Model Parsing and Hyperparameter Dependencies

TL;DR

The authors introduce LGPN, a framework that treats model parsing as a graph classification problem to capture the inherent dependencies between hyperparameters (e.g., more layers usually imply more parameters). By combining a high-resolution feature extractor with a learnable graph pooling mechanism, they achieve state-of-the-art results in reverse-engineering model settings and detecting "coordinated attacks" where multiple images originate from the same unknown source.

What Problem Does This Paper Address?

Current image forensics can often tell you if an image is "synthetic," but Model Parsing goes deeper, attempting to reconstruct the architecture and training logic of the generator.

The challenge is twofold:

  1. Subtle Traces: Generative models leave behind incredibly faint "fingerprints" or artifacts. Standard neural networks (like ResNet) are designed to discard high-frequency noise to focus on object semantics (e.g., "is this a cat?"). In forensics, that "noise" is exactly what contains the generation traces.
  2. Hyperparameter Dependencies: Hyperparameters aren't independent. If a model has a high number of convolutional layers, it almost certainly has a high total parameter count. Previous methods ignored these correlations, predicting each setting in a vacuum and leading to sub-optimal accuracy.

Methods

The authors propose two novel components to solve these issues:

The LGPN Architecture Pipeline

1. Generation Trace Capturing Network (GTC)

To avoid losing subtle artifacts, the GTC uses a dual-branch backbone. While one branch processes the image normally, a High-res branch maintains the original image resolution throughout the network. By avoiding aggressive downsampling (pooling), the GTC preserves the high-frequency details necessary to identify the model's signature.

2. Learnable Graph Pooling Network (LGPN)

The authors formulate model parsing as a graph node classification task.

  • Nodes: Represent 37 different hyperparameters (e.g., ReLU activation, L1 loss, Batch Norm).
  • Edges: Represent the statistical dependencies between them, learned from a large dataset of known models.

The "Learnable" part comes from a pooling-unpooling mechanism. The network adaptively merges related hyperparameter nodes into "supernodes" to understand high-level architectural patterns and then unfolds them to make specific predictions. This allows the model to "reason" about the model structure—for instance, knowing that if it detects a certain type of GAN loss, it should look for specific architectural cues associated with that loss.

Datasets

The study utilizes and expands upon the RED (Reverse Engineering Dataset):

  • RED140: An augmented version of the previous RED116. It includes 140 different Generative Models (GMs) across categories like GANs, VAEs, Flow models, and—crucially—modern Diffusion Models (like Stable Diffusion and ADM).
  • Scale: The dataset contains 140,000 images (1,000 per model), covering a wide range of semantics from human faces to objects and handwritten digits.

Key Insights and Ideas

  • The "Logic" of Architecture: The most significant "aha moment" is that modeling the relationship between parameters is more effective than modeling the parameters themselves. By enforcing hierarchical constraints (e.g., grouping all pixel-level loss functions together), the model becomes much more robust.
  • Forensics requires High-Res: The paper confirms that standard "ImageNet-trained" backbones are actually poorly suited for forensics because they are too good at ignoring the "artifacts" that reveal a model's identity.
  • Generalization to the Unknown: Because the LGPN learns the patterns of how models are built, it performs remarkably well on "unseen" models—generators that weren't in its training set.

Key Results

  • Superior Parsing: LGPN outperformed the previous state-of-the-art (FEN-PN) across the board. On the RED140 dataset, it achieved an 84.6% F1 score for predicting loss functions and 79.5% for discrete architecture parameters.
  • Coordinated Attack Detection: In a scenario where a defender needs to know if two different images came from the same (potentially unknown) malicious generator, LGPN achieved a 95.7% AUC, a massive jump over prior methods.
  • Artifact Detection: The GTC backbone alone proved highly effective for simple "Real vs. Fake" detection, outperforming several specialized forensics baselines.

Limitations and Future Work

The authors identify two main hurdles for the future:

  1. Closed-set Constraints: The model currently predicts from a pre-defined list of 37 hyperparameters. If a new model uses a completely novel, "undefined" hyperparameter (like a brand-new activation function), the system can't currently identify it.
  2. Dataset Scope: While 140 models is a lot, the world of open-source AI is vast. Expanding the "graph" to include more diverse and exotic model architectures remains a challenge.

The researchers suggest that future versions could include "undefined" nodes in the graph to help flag when a model is using a setting the system hasn't encountered before.

Summary updated

BibTeX
@inproceedings{guo2024tracing,
  author = {Xiao Guo and Vishal Asnani and Sijia Liu and Xiaoming Liu},
  title = {{Tracing Hyperparameter Dependencies for Model Parsing via Learnable Graph Pooling Network}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=Y1edWJH9qB},
}
Figure