# MechaFormer: Sequence Learning for Kinematic Mechanism Design Automation

arXiv: https://arxiv.org/abs/2508.09005 · HTML: https://mlsanity.com/paper/2508.09005/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 7 of its 27 references that are in the map.
- First posted on arXiv 12 Aug 2025.

## Builds on (most cited first, 7 of 7)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation](https://mlsanity.com/paper/2109.00859/) (2021)
- [LINKS: A dataset of a hundred million planar linkage mechanisms for data-driven kinematic design](https://mlsanity.com/paper/2208.14567/) (2022)
- [Joint Search of Optimal Topology and Trajectory for Planar Linkages](https://mlsanity.com/paper/2109.03392/) (2021)
- [Deep Generative Model for Mechanical System Configuration Design](https://mlsanity.com/paper/2409.06016/) (2024)
- [e-SimFT: Alignment of Generative Models with Simulation Feedback for Pareto-Front Design Exploration](https://mlsanity.com/paper/2502.02628/) (2025)
- [Transformer-Based Interfaces for Mechanical Assembly Design: A Gear Train Case Study](https://mlsanity.com/paper/2504.08633/) (2025)

## Built on by (most cited first, 1 of 1)

- [LinkD: AutoRegressive Diffusion Model for Mechanical Linkage Synthesis](https://mlsanity.com/paper/2601.04054/) (2026)

## Abstract (arXiv)

Designing mechanical mechanisms to trace specific paths is a classic yet notoriously difficult engineering problem, characterized by a vast and complex search space of discrete topologies and continuous parameters. We introduce MechaFormer, a Transformer-based model that tackles this challenge by treating mechanism design as a conditional sequence generation task. Our model learns to translate a target curve into a domain-specific language (DSL) string, simultaneously determining the mechanism's topology and geometric parameters in a single, unified process. MechaFormer significantly outperforms existing baselines, achieving state-of-the-art path-matching accuracy and generating a wide diversity of novel and valid designs. We demonstrate a suite of sampling strategies that can dramatically improve solution quality and offer designers valuable flexibility. Furthermore, we show that the high-quality outputs from MechaFormer serve as excellent starting points for traditional optimizers, creating a hybrid approach that finds superior solutions with remarkable efficiency.
