The computational design process in mechanical engineering often begins with a problem or goal, followed by an evaluation of the literature, resources, and systems available to address the problem. Instead, MIT's Computing Design and Digital Engineering (DeCoDE) Lab explores the limits of what's possible.
Working with the MIT-IBM Watson ai Lab, group leader ABS Career Development Assistant Professor Faez Ahmed and graduate student Amin Heyrani Nobari in the Department of Mechanical Engineering are combining machine learning and ai techniques generative, physical modeling, and engineering principles to address design challenges and improve the creation of mechanical systems. One of his projects, Linksinvestigates ways in which flat bars and joints can be connected to trace curved paths. Here, Ahmed and Nobari describe their recent work.
Q: How does your team consider approaching mechanical engineering questions from an observational point of view?
ahmed: The question we have been thinking about is: How can generative ai be used in engineering applications? A key challenge is incorporating precision into generative ai models. Now, in the specific work that we've been exploring there, we're using this idea of self-supervised contrastive learning approaches, where we're effectively learning these links and curved representations of the design, or what the design looks like and how it works. .
This is closely related to the idea of automated discovery: can we really discover new products with ai algorithms? Another comment on the bigger picture: one of the key ideas, specifically with links, but generally around generative ai and large language models: these are all the same family of models that we're looking at, and the Accuracy really plays an important role in all. So the learnings that we have from these types of models, where you have, in some form of data-driven learning, assisted by engineering simulators and joint design and performance incorporations, can potentially translate to other engineering domains as well. What we are showing is a proof of concept. Then people can take it and design ships and airplanes, and precise imaging problems, etc.
In the case of links, their design looks like a set of bars and how they are connected. How it works is basically the path that they would transcribe as they move, and we learn these joint representations. So there's your main input (someone will come and draw some path) and you're trying to generate a mechanism that can track it. That allows us to solve the problem much more accurately and significantly faster, with 28 times less error (more precise) and 20 times faster than previous state-of-the-art approaches.
Q: Tell me about the link method and how it compares to other similar methods.
Nobari: Contrastive learning occurs between mechanisms, which are represented as graphs, so basically each joint will be a node in a graph and the node will include some features. The characteristics are the position, space and type of joints, they can be fixed joints or free joints.
We have an architecture that takes into account some of the basic underlying things when it comes to describing the kinematics of a mechanism, but it is essentially a graph neural network that computes embeddings for these graphs of mechanisms. Then we have another model that takes these curves as input and creates an integration for that, and we connect these two different modalities using contrastive learning.
Then this contrastive learning framework that we train is used to find new mechanisms, but obviously we also care about accuracy. In addition to any candidate mechanisms being identified, we also have an additional optimization step, where these identified mechanisms will be further optimized to get as close as possible to those target curves.
If you have the combinatorial part right and you're pretty close to where you need to be to get to the target curve you have, you can do direct gradient-based optimization and adjust the position of the junctions to get super precise performance on it. That is a very important aspect for it to work.
These are examples of the letters of the alphabet, but they are very difficult to achieve traditionally with existing methods. Other machine learning-based methods are often not even capable of doing this kind of thing because they are only trained on four or six bars, which are very small mechanisms. But what we've been able to show is that even with a relatively small number of joints, it's possible to get very close to those curves.
Before this, we didn't know what the limits of design capabilities were with a single binding mechanism. It is a very difficult question to know. You can really write the letter M, right? No one has ever done that, and the mechanism is so complex and so rare that it is a needle in the haystack. But with this method we show that it is possible.
We have studied the use of generative models available for graphs. Generally, generative models for graphs are very difficult to train and are generally not very effective, especially when it comes to mixing continuous variables that have a very high sensitivity to what the actual kinematics of a mechanism will be. At the same time, there are all these different ways to combine joins and links. These models simply cannot generate effectively.
I think the complexity of the problem is more obvious when you look at how people approach it with optimization. With optimization, this becomes a nonlinear mixed integer problem. Using some simple two-level optimizations or even simplifying the problem, they basically create approximations of all the functions, so that they can use mixed-integer conical programming to address the problem. The combinatorial space combined with the continuous space is so large that it can basically reach up to seven unions. Beyond that, it becomes extremely difficult and takes two days to create a mechanism for a specific goal. If you did this exhaustively, it would be very difficult to cover the entire design space. This is where you can't just throw deep learning at it without trying to be a little smarter about how to do it.
State-of-the-art approaches based on deep learning use reinforcement learning. They, given a target curve, start building these mechanisms more or less randomly, basically a Monte Carlo optimization approach. The measure for this is to directly compare the curve that a mechanism plots and the target curves that are input to the model, and we show that our model performs 28 times better than that. Our approach takes 75 seconds and the reinforcement learning based approach takes 45 minutes. The optimization approach runs it for more than 24 hours and does not converge.
I think we've gotten to the point where we have a very strong proof of concept with linking mechanisms. It's a complicated enough problem that we can see that conventional optimization and conventional deep learning alone are not enough.
Q: What is the big picture behind the need to develop techniques such as linkages that enable the future of human-ai co-design?
ahmed: The most obvious is the design of machines and mechanical systems, which is what we have already shown. That said, I think a key contribution of this work is that it is a discrete and continuous space in which we are learning. So if you think about the links that exist and how they connect to each other, that's a discrete space. Either you are connected or you are not: 0 and 1, but the place where each node is is a continuous space that can vary; you can be anywhere in space. Learning for these discrete and continuous spaces is an extremely challenging problem. Most of the machine learning we see, such as in computer vision, is continuous or language is mostly discrete. By showing this discrete and continuous system, I think the key idea generalizes to many engineering applications, from metamaterials to complex networks, other types of structures, etc.
There are steps we're thinking about right away, and a natural question has to do with more complex mechanical systems and more physics, such as starting to add different forms of elastic behavior. Then, you can also think about different types of components. We're also thinking about how precision can be built into large language models, and some of the learnings will transfer there. We are thinking about making these models generative. Right now, in a sense, they are recovering mechanisms and then optimizing them from a data set, whereas generative models will generate these methods. We are also exploring that end-to-end learning, where optimization is not necessary.
Nobari: There are some places in mechanical engineering where they are used, and there are very common applications of systems for this type of inverse kinematic synthesis, where this would be useful. Some that come to mind are, for example, automotive suspension systems, where you want a specific motion path for your overall suspension mechanism. They usually model it in 2D with general suspension mechanism planning models.
I think the next step, and what will ultimately be very useful, is to demonstrate the same or similar framework for other complicated problems involving combinatorial and continuous values.
These issues include one of the things I've been researching: compatible mechanisms. For example, when you have the mechanics of continuous rigid links, instead of these discrete ones, you would have a distribution of materials and motion, and one part of the material deforms the rest of the material to give you a different type of motion.
With compatible mechanisms, they are used in many different places, sometimes in precision machines for clamping mechanisms, where you want a specific part to be held in place, using a mechanism that clamps it, which can do so consistently and with very high precision. If you could automate a lot of that with this type of framework, it would be very helpful.
These are all difficult problems involving both combinatorial design variables and continuous design variables. I think we are very close to that and ultimately that will be the final stage.
This work was supported, in part, by the MIT-IBM Watson ai Lab.