NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

PACE: A Parallelizable Computation Encoder for Directed Acyclic Graphs

Zehao Dong, Muhan Zhang, Fuhai Li, Yixin Chen

Abstract

PACE (Parallelizable Attention-based Computation structure Encoder) is a novel Transformer-based framework designed to encode Directed Acyclic Graphs (DAGs) into continuous vector spaces. By replacing traditional, slow sequential message-passing with a parallelizable "dag2seq" mapping and masked self-attention, PACE achieves state-of-the-art performance in tasks like Neural Architecture Search (NAS) while being roughly 4x faster than previous methods.

Introduction & Problem Statement

Directed Acyclic Graphs (DAGs) are the backbone of many modern AI challenges, from designing neural network architectures to learning Bayesian networks. To optimize these structures, researchers often map them into a continuous "latent space" where they can perform search and optimization.

However, existing DAG encoders (like D-VAE and DAGNN) have a major bottleneck: they are inherently sequential. They process nodes one by one following a topological order—a node cannot be processed until all its predecessors are finished. This makes them impossible to fully parallelize on modern GPUs. Furthermore, standard Graph Neural Networks (GNNs) often fail to capture the specific "computation flow" or long-range dependencies inherent in a DAG.

Methodology

The authors propose PACE, which breaks the sequential constraint by treating DAG encoding as a sequence modeling problem, but with a twist to preserve graph structure.

  1. The dag2seq Framework: To use a Transformer, you first need a sequence. However, a DAG can have many valid topological orders, and a simple list of nodes loses structural information. PACE uses graph canonization (unique node indexing) and a 1-layer injective GNN to generate "structural positional encodings." This ensures that the mapping from a DAG to a sequence is injective—meaning no two different DAGs result in the same sequence.
  2. Masked Transformer Encoder: Once the DAG is converted into a sequence of node features and structural encodings, it is fed into a Transformer. To respect the DAG's logic, the authors introduce a reachability mask. A node can only "attend" to its predecessors in the graph. This enforces the computation dependency while allowing all nodes to be processed simultaneously.
Illustration of the PACE framework, showing the transition from an input DAG to a sequence via dag2seq, followed by masked Transformer blocks.

Key Insights

  • Parallelism without Information Loss: The core breakthrough is realizing that you don't need to process nodes sequentially to respect their sequential dependencies. By using a reachability mask in the attention mechanism, the model "sees" the dependencies while the hardware computes everything at once.
  • Injective Positional Encodings: Standard Transformers use sine/cosine waves for position. PACE proves that for graphs, you need encodings derived from the graph's own structure (via GNNs) to ensure the encoder can distinguish between complex, non-isomorphic graphs.
  • Capturing Long-Range Dependencies: Sequential models (like GRUs) struggle with long dependency chains. Because PACE uses an attention mechanism, it can link distant nodes in a single step, which is particularly useful for neural architectures that have long "Hamiltonian paths."

Datasets

The model was rigorously evaluated on four major benchmarks:

  • NA (Neural Architecture): ~19,000 architectures generated by ENAS.
  • BN (Bayesian Network): 200,000 networks generated via the bnlearn package.
  • NAS-Bench-101: A massive dataset of ~420,000 neural architectures with pre-computed accuracies.
  • NAS-Bench-301: A surrogate benchmark for DARTS containing ~1 million architectures.

Key Results

PACE consistently outperformed previous state-of-the-art models (D-VAE, DAGNN) across all metrics:

  • Speed: PACE reduced training and inference time by approximately 75% (a 4x speedup) compared to GRU-based encoders.
  • Accuracy: On the NA and BN datasets, PACE achieved the lowest Root Mean Square Error (RMSE) and the highest Pearson correlation for predicting graph properties.
  • Search Performance: In NAS tasks, PACE found better-performing architectures with lower "regret" (the gap between the found model and the theoretical optimum).
Comparison of computational costs, showing PACE's significantly lower training and inference times.

Limitations and Future Work

  • Canonization Complexity: The model relies on graph canonization (using tools like nauty). While the authors found the overhead negligible for the 7-15 node graphs used in NAS, graph canonization is a theoretically difficult problem (NP-intermediate). Its performance on massive graphs with hundreds or thousands of nodes remains an open question.
  • Mask Computation: Generating the reachability mask requires computing the transitive closure of the graph, which can be computationally expensive for very large-scale graphs.
  • Future Directions: The authors suggest exploring PACE for even more diverse graph types and integrating it into more complex end-to-end architecture search pipelines.

Summary updated

BibTeX
@inproceedings{dong2022pace,
  author = {Zehao Dong and Muhan Zhang and Fuhai Li and Yixin Chen},
  title = {{PACE: A Parallelizable Computation Encoder for Directed Acyclic Graphs}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=Tr9CBcc2VJZ},
}
Figure