Directed Acyclic Graphs (DAGs) are the hidden scaffolding of modern machine learning. Whether you are looking at the layer-by-layer flow of a neural network or the conditional dependencies in a Bayesian network, you are looking at a DAG. However, optimizing these structures—finding the "perfect" architecture—is notoriously difficult because graphs are discrete, combinatorial objects.
In this NeurIPS 2019 paper, researchers introduce D-VAE (DAG Variational Autoencoder). By rethinking how neural networks "read" graphs, they’ve created a way to embed these complex discrete structures into a smooth, continuous latent space, making it possible to use powerful optimization tools like Bayesian Optimization to find better models.
TL;DR
D-VAE is a specialized variational autoencoder that maps Directed Acyclic Graphs into a continuous latent space by using a novel asynchronous message passing scheme. Unlike standard graph neural networks, D-VAE captures the actual computation flow of a graph, allowing researchers to optimize architectures and Bayesian networks far more effectively than with traditional discrete search methods.
What Problem Does This Paper Address?
Optimizing a DAG is a "black-box" problem: you change a connection, train the model, and see if it gets better. This is slow and computationally expensive.
The core challenge is discreteness. Standard optimization algorithms (like gradient descent or Bayesian Optimization) love continuous spaces where you can move "a little bit to the left" and see a predictable change. You can't do that with a graph; you either have an edge or you don't.
Existing Graph Neural Networks (GNNs) often fail here because they use "simultaneous message passing," where every node talks to its neighbors at once. This is great for identifying local patterns (like a molecule's functional groups) but terrible for understanding a DAG’s global "flow"—the sequence of operations that actually defines what the graph does.
Methods
The authors propose a VAE architecture specifically tailored for the "partial order" of DAGs:
- Asynchronous Message Passing (Encoder): Instead of updating all nodes at once, D-VAE follows a topological sort. A node only computes its hidden state once all its predecessors have finished. This mimics how data actually flows through a neural network or a circuit.
- Injective Encoding: The authors prove mathematically that their encoder can injectively encode computations. This means that if two different-looking graphs represent the exact same mathematical operation, D-VAE can recognize them as the same and map them to the same point in latent space.
- Sequential Decoding: The decoder generates the graph node-by-node. Crucially, it maintains the hidden states of all previously generated nodes to decide where to add new edges, ensuring the resulting graph is always a valid, acyclic structure.
- Gated Updates: They use Gated Recurrent Units (GRUs) and gated sums to handle the aggregation of multiple inputs to a single node, allowing the model to learn complex dependencies between operations.
Datasets
The model was evaluated on two distinct tasks:
- Neural Architecture Search (NAS): A dataset of 19,020 neural architectures generated by the ENAS software. These were evaluated based on their "weight-sharing" accuracy on the CIFAR-10 image dataset.
- Bayesian Network Structure Learning (BNSL): A dataset of 200,000 random 8-node Bayesian networks. Performance was measured using the Bayesian Information Criterion (BIC) score on the well-known Asia dataset.
Key Insights and Ideas
- Computation over Structure: The most profound insight is that for DAGs, the computation matters more than the topology. D-VAE focuses on how information transforms as it moves through the graph, which leads to a much more meaningful latent space for optimization.
- Smoothness Facilitates Search: By mapping graphs to a continuous space, the "performance landscape" becomes smoother. The paper shows that points close together in D-VAE’s latent space tend to have similar performance scores, which is the "holy grail" for Bayesian Optimization.
- The Power of Asynchrony: Moving away from the standard GNN "all-at-once" update to a "wait-for-your-turn" approach is what allows the model to capture the inherent directionality of DAGs.
Key Results
- High Fidelity: D-VAE achieved near-perfect reconstruction accuracy (99.96% for NAS and 99.94% for BNSL), meaning it can map a graph to a vector and back without losing any information.
- Superior Optimization: In the NAS task, Bayesian Optimization in D-VAE’s latent space found an architecture with 94.80% accuracy on CIFAR-10, significantly outperforming the S-VAE baseline (92.79%).
- Discovering the "True" Network: In the Bayesian network task, D-VAE found structures that outperformed all 180,000 networks in the training set, reaching a BIC score (-11125.75) very close to the "true" generating network (-11109.74).
- Predictive Latent Space: The latent embeddings showed a high Pearson correlation (up to 0.96) with the actual performance of the graphs, confirming that the space is organized logically by "quality."
Limitations and Future Work
- Vertex Semantics: Currently, D-VAE treats node types (like "3x3 Convolution" vs "5x5 Convolution") as simple one-hot labels. It doesn't inherently know that two different convolutions are more similar than a convolution and a pooling layer. The authors suggest using pretrained embeddings to fix this.
- Scalability: The experiments focused on relatively small graphs (6-layer NAS, 8-node BNs). Scaling this asynchronous approach to massive graphs with thousands of nodes may require further architectural optimizations.
- Dynamic Graphs: The current model assumes the set of possible operations is fixed. Extending this to open-ended sets of operations remains a challenge.
Summary updated