EventsThe 2nd International Online Conference on Mathematics and Applications
Published
This submission belongs to the session S6. Mathematics, Computer Science and Artificial Intelligence of the event The 2nd International Online Conference on Mathematics and Applications
Published date
04 Jun, 2026
Academic Editor
author-avatarMarjan Mernik
Citation
Luigi Altieri, Matteo Torzoni, Stefano Mariani, Topology optimization of planar truss structures with Large Language Models, in Proceedings of The 2nd International Online Conference on Mathematics and Applications, 10 June–12 June 2026, MDPI: Basel, Switzerland
Share
Email
Facebook
Twitter
LinkedIn

Topology optimization of planar truss structures with Large Language Models

image
image
1. Department of Civil and Environmental Engineering, Politecnico di Milano, Piazza L. da Vinci 32, 20133 Milano, Italy, Italy
Abstract

Large Language Models (LLMs) have demonstrated remarkable capabilities in modeling complex sequential data by learning long-range dependencies. Although originally developed for natural language processing, their autoregressive architecture is inherently domain-agnostic, making them suitable for applications well beyond text generation. This observation opens new opportunities for leveraging LLMs in engineering design and optimization. This work investigates a GPT-based framework, built on the GPT-2 architecture, for the topology optimization of planar truss structures. The classical design problem is reformulated as a sequential construction process, where design actions are governed by predefined grammar rules that ensure structural feasibility. These actions are encoded symbolically and mapped into text-like strings, allowing each truss configuration to be represented as a tokenized sequence. Using this formulation, a pretrained model is fine-tuned on a dataset of structurally meaningful designs. Structural performance is accounted for through a mechanically informed loss function, weighting training according to structural stiffness. This strategy effectively biases the model toward high-performing configurations while preserving diversity in the design space. The proposed approach is validated across six benchmark cases, achieving performance levels ranging from 82% to 100% of the corresponding global optima. The model also demonstrates the ability to generate novel, mechanically sound topologies. These results highlight the potential of LLM-based generative frameworks as complementary tools for exploring large and complex design spaces in structural optimization.

Keywords
Large Language Models
GPT
Structural Optimization
Truss Synthesis
Grammar-Based Design
Curvature-guided Graph-to-Hypergraph Structural Lifting Alleviates Over-Squashing in Graph Learning
Machine Learning with Eigenvector-Based Feature Representation: A Mathematical Analysis Using SVM for Robust Face Recognition