Abstract
Formopt-AI is a graph neural network (GNN)-based workflow intended to fast-track the iteration process of design to adhere to environmental and context response considerations. The program system explored in this research generates residential buildings through parametric options to later optimize intended factors to a specific target. The explored workflow starts with a Grasshopper script in Rhinoceros 3D with environmental simulation data using Ladybug Tools and geospatial data using the Urbano plugin. Graphical representation was achieved through the TopologicGh plugin in addition to the TT-Toolbox plugins for CSV export. The FormOpt-AI repository is also needed to run the GNN training and reach the end result. A link to the GitHub repository is down below alongside instructions on the needed Python installs, like Torch-geometric, Networkx, Pandas, matplotlib, etc.
Link to the FormOpt-AI Repo :
https://github.com/kHALIFA-AFK/FormOpt-AI
FormOpt-AI aims to accelerate performance-driven design by embedding predictive optimization directly into the workflow and process, with the intended user to be able to easily adapt, like housing authorities and design education or development offices.
Introduction
Over the past decade, negligence and shortcomings in the development of architectural design and the overlooking of climate and context response considerations
have contributed to the rapid increase of the urban heat island effect around the globe. This rise has contributed to an increase in drought stress on water resources, a decrease in air quality, and more frequent heat wave occurrences, among other effects on the environmental level. In addition to that, human factor level effects like disrupting sleep cycles and putting the elderly at greater risk of heat strokes are becoming more frequent. Poorly designed housing development was identified as a critical factor in this context by a recent analysis by The Guardian (Harvey, 2025), based on the UK Climate Change Committee’s findings. It highlights that poorly designed residential buildings intensify overheating risks with no additional efforts enforced by the British government on new residential developments despite multiple warnings by the committee. New residential buildings continue to be built without proper consideration of the surrounding context and the environment’s relation to them, disproportionately impacting lower-income neighborhoods the most (Harvey, 2025). All the while, an industry-wide online survey consisting of 448 respondents
made up of, but not limited to, housebuilders, developers, and contractors conducted by Futurebuild (2024) shows that cost was the number one factor for not moving
forward with sustainable development, as 54% of respondents agree with the statement. Other factors highlighted in the survey include lack of knowledge about the
topic. Only 19% of responses showed knowledge of the sustainable development process with a pursuit of interest in net zero development.
These challenges underline the need for design tools that are capable of embedding environmental responsiveness into the early stages of residential architecture
design. Manual workflows are heavy in simulation, limiting the trial and error process. They are time and resource-intensive too, as they require heavy computing
power and processing time.
This research aims to develop a GNN-based machine learning framework for optimizing residential building form in response to environmental analysis and surrounding context. The specific objectives to achieve the set goal are:
- Generate residential building iterations by converting parametric geometry into graph structures that hold geometric and environmental features and convert it to a CSV file/tubular format.
- Train predictive models using GNNs to estimate environmental performance metrics from the tubular form (CSV) of building iterations and data.
- Implement an optimization model that improves building surface elements (e.g. unit types and distribution) and façade configurations (e.g. window size, green
façade panels) to enhance environmental performance and residents’ comfort
State of the Art
Machine Learning in Architecture
Advancements in processing and computing powers alongside its adaptation to architecture, through Computer-Aided Design (CAD), Building Information Modeling (BIM), or Parametric Architecture Design, have allowed the field to move past strictly rule-based design. It opened the door to data-driven methodologies. The advancements allowed the incorporation of machine learning at different phases of design. According to an article by Tamke, Nicholas, and Zwierzycki, these new methodologies create a connection between design intent, performance metrics, and learning outcomes, enabling designers to better utilize data-rich settings (Tamke et al.,2018). Their work looked into how architectural practices can benefit from the application of machine learning techniques, including complex modeling, to improve feedback loops and performance-based design.
Other applications of Machine Learning in Architecture indicates a rising trend in environmental performance evaluation use. Some applications used supervised learning to predict energy use, daylighting, or thermal comfort from datasets generated through simulation. Other studies have employed deep learning methods, such as convolutional neural networks, to analyze metrics for classification purposes. These applications are a few in a growing sector. They have shown the potential of machine learning to accelerate iterations and performance feedback aspects of design exploration. Though they often rely on a single table representation of data, which struggles to capture the proximity and topological complexity of building geometry. This limitation constrains their scalability and their ability to generalize across different design contexts.
Graphical Representation & Graph Neural Networks
A graph is a type of data structure that contains nodes and edges, representing an abstract of interlinked connections. A node can be a person, place, or anything
the code determines, while the edges connecting them define the relationship between the nodes. Edges can be directed or undirected based on directional dependencies, adding directional information to the graph representation. Graphs are excellent in dealing with complex problems regarding relationships and interactions. They are used in pattern recognition, social network analysis, recommendation systems, and semantic analysis. Creating graph-based solutions is on the rise
and offers rich insights into complex and interlinked datasets. (Awan, 2022). Graph neural networks are special types of neural networks capable of working
with a graph data structure. They are highly influenced by Convolutional Neural Networks (CNNs) and graph embedding. GNNs are used in prediction and optimization
tasks on both the node, edge, and graph-based levels.
Graph neural networks extend the capabilities of conventional machine learning by operating directly on graph-structured data. They have been used across different industries such as chemistry, urban analysis, and network modeling. In architectural design, the accurate representation of spatial and structural relationships like adjacency is critical for modeling performance outcomes. TopologicPy, an open-source Python library derived from Topologic, offers tools for generating hierarchical and topological representations of 3D architectural models. It enables architects to code and represent geometry into graph representation (Jabi, 2021). It makes integrating GNNs into architectural workflows possible, enabling machine learning models to reason over complex geometry data rather than individual numbers. Despite these advances, the use of GNNs for early-stage residential building optimization and with environmental simulation data remains underexplored. Utilizing graph representations for GNN-driven design optimization is a key innovation of this research.
Methodology and Process
Geometry & Graph Preperation
Through FormOpt-AI, the user starts the process with the provided Grasshopper (.gh) script. This script handles the main task of setting up the geometry of the
building using set parameters, allowing the user to get a wide range of options for customizing the building to their desire and achieving the intended functionality
they seek. The parameters range through different categories. The categories are surface/interior element parameters, facade element parameters, and context element parameters. All these parameters set up FormOpt-AI to continue the work in the next steps and allow the user to create a digital twin of the conditions of the developments and for FormOpt-AI to simulate the environment accurately.
For each generated iteration of the building, environmental performance simulations were conducted using Ladybug tools and Honeybee, after geolocating the
building context using Urbano. The use of Urbano extends to locating the burning in a city around the world and specifying the site in detail. These steps are part of the
geometric parameters but are not targeted by the optimizer, i.e., the context is set and not changed.
Metrics such as solar radiation, daylight autonomy, and sun hours were simulated and recorded in tabular (.csv) format as features to feed the dataset. These results established a dataset linking geometric variations to environmental performance. However, to achieve the optimum effect, environmental metrics were derived from facade element simulations and surface element simulations. Why does this matter? This way each geometric element becomes an influencer to the optimization. Facades influence environmental exposure (sun hours, radiation); floor plans influence comfort & spatial metrics (daylight autonomy). Together, they form cohesive data for AI-driven optimization. The parametric models and their information, both geometric and environmental, were transformed into graph structures using TopologicGh, a Grasshopper plugin by Wassim Gabi based on his Python library for topological. This graph became a representation of building geometry. In this representation:
Nodes correspond to spatial entities (rooms, façade panels, circulations). Edges represent connectivity relationships (adjacency). This graph-based encoding allowed environmental simulation results to be attached directly to geometric entities as node features
GNN Training
The resulting graph datasets were exported into tabular format (.csv) using TT-Toolbox, preparing them for ingestion into GNN models. Through countless iterations, we have experienced the tabular format to be the most organized in transporting iterations to the GNN code; consistency in naming had to be hardwired to ensure
an adequate flow of information.
Some examples of this include the naming of data trees of geometric and environmental features to transform into tubular format (.csv) using the TT-Toolbox
plugin, which MUST be consistent, as in code they are recognized by name.
list_of_networkx_graphs = []
feature_columns = [‘Node_Nos.’, ‘X_Co-ordinate’, ‘Y_Co-ordinate’, ‘Z_Co-ordinate’]
env_columns = [‘Sunhour_Per_Sqmt_Facad’, ‘Solar_Radiatiion_Per_Sqmt_Facad’]
Same thing with the final (.csv) file of each building iteration. Nodes and Edges
files had consistent names with a code setting up the range of iterations.
for i in range(1):
try:
node_df = pd.read_csv(f”building_{i}nodes.csv”) try: edge_df = pd.read_csv(f”building{i}_edges.csv”)
except FileNotFoundError:
edge_df = pd.DataFrame(columns=[‘source’, ‘target’])
except Exception as e:
The development of FormOpt-AI has now led to the crucial part: the GNN training.
The code, which can be accessed by the provided GitHub repository, pipeline begins with the data preparations from the prepared (.csv) file. These (.csv) files are transformed into NetworkX graphs, where each node contains both spatial and performance features. By using the from_networkx utility from PyTorch Geometric, the
graphs are converted into Data objects, making them suitable for neural network training. This creates a connection between the architectural design and the ML
possibilities. the code application lies in the FormGCN model , which applies graph convolutional operations to extract meaningful patterns from building graphs. The model consists of two GCNConv layers that progressively transform node-level features into higher-level embeddings that capture structural relationships between different building components, integrating both geometry and performance context. A global mean pooling layer is then applied to aggregate node embeddings into a graph-level representation, which acts as a compressed summary of the entire building’s form. Then after that, a linear layer outputs a scalar prediction, representing a performance metric such as overall building efficiency or solar performance. This format allows FormOpt-AI model to move beyond isolated feature analysis and instead
focus on the connections of building elements, which is needed for our form related outcome. Then visualization comes in to play as it is taking a dual role in this framework:
it not only validates the training process but also provides interpretability for architectural applications. The loss curve visualization allows researchers to see how
effectively the model learns over time, confirming whether the training process is stable or requires adjustments. More importantly, the node embedding visualization highlights how the GNN internally represents building components. By projecting node embeddings onto their spatial positions, the user can see color-coded representations of how the model interprets different parts of the building. These embeddings are a critical to reveal how performance information is distributed across geometry and to later optimize on it
End Result
The ultimate outcome of this workflow is an optimized building form that balances geometric design with environmental performance effectively and efficiently
without heavy computing power. By training the GNN on simulation-informed data, the model learns to recognize patterns that relate to the set spatial configurations
with set target outcomes, like reduced radiation exposure. Once the optimization loop is applied, the framework can propose the most needed panels for green facades or how to locate solar panels. The end result of Formopt-AI is not just a predictive evaluation but a generative optimization process where form evolves under the iteration of machine learning. Like it was stated in our initial problem finding, this means that complex design explored through trial-and-error or costly simulations can now be achieved more efficiently. The optimized form now represents a collaboration of architectural creativity and computational design technicality.