We present RoofDiT, a generative framework for 2D roof graph synthesis and reconstruction. Roofs are compactly described as planar graphs of junctions and structural edges, but existing methods often rely on fixed geometric rules or direct reconstruction objectives. RoofDiT instead models roof structures directly as vertex-edge graphs and learns a conditional generative prior over their geometry and connectivity. Our framework follows a two-stage design: a diffusion transformer generates roof vertices, and an edge prediction module infers the corresponding graph topology. To improve geometric fidelity, RoofDiT combines relative geometry-aware attention with footprint and aerial-image conditioning, while using an alignment regularizer to encourage common horizontal, vertical, and diagonal roof patterns. The same model supports unconditional generation, footprint-conditioned synthesis, and image-guided reconstruction by changing the conditioning signal. Experiments show improved graph generation quality over a diffusion baseline, favorable performance against a straight-skeleton prior in the footprint-conditioned setting, and the highest edge F1 among compared methods for image-guided reconstruction.
Figures & tables
Figure 2: Overall pipeline used in our method. Following GSDiff, the framework decomposes roof graph generation into two stages: node generation and edge prediction. In the first stage, a conditional diffusion transformer starts from noisy node states and iteratively denoises them to generate roof vertices, optionally conditioned on footprint vertices, pretrained aerial image features, or both. In the second stage, an edge prediction module takes the generated node set and infers pairwise connectivity to produce the final roof graph.
Metric
GSDiff
RoofDiT
Roof Valid Rate ↑
0.941
0.943
Planar Rate ↑
0.952
0.958
Duplicate Rate@3 ↓
0.004
0.002
FID ↓
53.954
45.329
KID ↓
31.210
23.442
Table 1: Performance on unconditional roof graph generation
Metric
SS
RoofDiT
Node
Count MAE ↓
2.008
1.002
F1@5 ↑
0.849
0.705
Edge
F1 ↑
0.960
0.981
Face
Count Err. ↓
1.430
0.444
F1 ↑
0.840
0.798
F1 best-of-K↑
0.840
0.886
Table 2: Performance on footprint-conditioned roof graph generation. SS denotes the straight skeleton baseline.
Figure 3: Qualitative comparison of unconditional roof graph generation. Samples produced by GSDiff and RoofDiT are shown side by side.
Figure 4: Qualitative comparison for footprint-conditioned roof graph generation
Node
Edge
Face
Geometry
Method
Prec
Recall
F1
Count MAE ↓
Prec
Recall
F1
Prec
Recall
F1
Matched IoU
Count Err. ↓
Valid
Planar
#Comp ↓
Crossings ↓
Dangling ↓
RoofMapNet
27.9
40.8
32.7
7.40
43.6
45.9
44.5
25.5
27.8
26.1
25.9
0.30
20.2
38.1
5.12
3.22
1.51
HEAT
93.3
93.0
93.0
0.30
93.9
94.2
94.0
91.6
89.9
90.2
86.2
0.11
90.6
92.8
1.00
0.11
0.09
RoofDiT aerial
42.7
43.9
42.6
2.23
78.1
80.5
78.4
63.7
66.2
63.5
60.4
1.12
87.4
90.1
1.00
0.13
0.04
RoofDiT aerial+footprint
70.5
70.9
70.3
0.90
98.5
98.5
98.4
81.9
83.8
82.4
71.8
0.48
88.3
90.6
1.00
0.19
0.04
Table 3: Comparison of image-conditioned roof graph reconstruction methods grouped by node, edge, face, and geometry metrics. Node metrics are reported at a 5-pixel matching threshold. RoofDiT aerial uses aerial imagery only, while RoofDiT aerial+footprint additionally uses the building footprint as input.
Figure 5: Qualitative comparison of image-guided roof graph reconstruction. RoofDiT is conditioned on the input image only, while HEAT and RoofMapNet are shown for comparison against the ground-truth roof graph.
Leveraging representation encoders for generative modeling offers a path for efficient, high-fidelity synthesis. However, standard diffusion transformers fail to converge on these representations directly. While recent work attributes this to a capacity bottleneck proposing computationally expensive width scaling of diffusion transformers we demonstrate that the failure is fundamentally geometric. We identify Geometric Interference as the root cause: standard Euclidean flow matching forces probability paths through the low-density interior of the hyperspherical feature space of representation encoders, rather than following the manifold surface. To resolve this, we propose Riemannian Flow Matching with Jacobi Regularization (RJF). By constraining the generative process to the manifold geodesics and correcting for curvature-induced error propagation, RJF enables standard Diffusion Transformer architectures to converge without width scaling. Our method RJF enables the standard DiT-B architecture (131M parameters) to converge effectively, achieving an FID of 3.37 where prior methods fail to converge. Code: https://github.com/amandpkr/RJF
Reconstruct where the images provide evidence, and generate where they do not: recent success of spatial world models such as Atlas (World Labs Team, 2026) highlights the value of unifying reconstruction and generation in one model. Yet the two have long lived in separate paradigms with distinctive failure modes: feed-forward reconstruction averages ambiguity into blur, while conditional generation invents plausible but scene-inconsistent detail. In this work, we present a unified flow-based formulation for reconstruction and generation, where a shared clean-target predictor performs direct reconstruction at its single-step endpoint and unfolds conditional generation through multi-step flow. A controlled toy study reveals the mechanism: with a single step, the predictor collapses to the conditional mean just like feed-forward methods, favoring consistency over diversity. With multi-step inference, the fidelity of generated details grows with context richness: closer observations reduce ambiguity and yield better-matched details. We further instantiate the formulation in appearance and geometry 3D tasks. JiT-LVSM improves perceptual and distributional quality in novel view synthesis, while JUSt3R retains competitive single-step geometry prediction with additional multi-step inference capabilities that reduces veil and flying-pixel artifacts, producing cleaner surface structure with greater test-time compute. Together, they show that reconstruction and generation can share both a formulation and a backbone, with their behavior governed by denoising configuration---making unification surprisingly simple.
Generative modeling of graph-structured data is crucial for tasks ranging from drug discovery to social network simulation. Among these models, denoising diffusion models have achieved great success in graph generation by learning to progressively reverse a process that adds noise to the original graph. However, the standard noise-prediction approach of diffusion models is suboptimal for graph data. The goal for a graph generative model is to learn the clean graphs' topological properties, such as connectivity and degree distribution. Because a diffusion model that predicts noise does not explicitly learn these topological properties, it is challenging for the model to output graphs with the desired structural statistics. To address this challenge, we introduce Direct Graph Flow Matching (DiGFM), a novel graph transformer model guided by two goals: predict clean graphs and improve sampling efficiency. Distinct from the prevailing diffusion approach, DiGFM employs a continuous flow-matching paradigm and integrates direct graph prediction. Specifically, DiGFM maps the prior noise distribution to the clean graph distribution via a multi-step process: the model repeatedly predicts the underlying clean graph, and a transformation is employed to convert the model output to the velocity vector that points in the direction toward the clean graph distribution. This design enables DiGFM to generate high-quality samples using only 2.5% to 15.6% of the steps required by diffusion-based models, which leads to a 5.3x to 257x speedup in wall-clock inference time. Experiments demonstrate that DiGFM outperforms or matches prior state-of-the-art models across general graph benchmarks and molecular datasets, generating graphs with strong adherence to ground-truth structural statistics at significantly faster inference speeds.