How to develop an inverse design model using MATLAB's neural network toolbox?

4 views (last 30 days)
Hello,
I want to develop an inverse design model using MATALB's neural network toolbox. Following are the details about it.
1) Firstly I want to develop a neural network model between my inputs(X) & outputs (Y) such that.......(Y1,Y2) = f (X1,X2,X3)
2) Once above model is created with the help of that trained function "f" I want to predict X1 for new inputs such that........X1 = f_inverse (Y1,Y2,X2,X3)
Is it possible to develop such model? If yes then how it is done?
Thank you for the help.

Answers (1)

Abhas
Abhas on 9 Jun 2025
Yes, we can build an inverse design model in MATLAB’s Neural Network Toolbox, though it requires additional setup since MATLAB’s "fitnet" or "feedforwardnet" handle direct mapping "Y = f(X)" natively, but not inverse functions automatically.
We can achieve it in the below steps:
  • Train forward model: Inputs: X = [X1, X2, X3], Targets: Y = [Y1, Y2]
net_forward = fitnet(hiddenLayerSize);
net_forward = train(net_forward, X, Y);
  • Build inverse model: Prepare inverse training data: Inputs: [Y1, Y2, X2, X3], Targets: X1
net_inverse = fitnet(hiddenLayerSize);
net_inverse = train(net_inverse, [Y; X(2:3,:)], X(1,:));
  • We can also use optimization to solve for X1: For new values ("Y1_new", "Y2_new", "X2_new", "X3_new"), use optimization:
objective = @(x1) norm(net_forward([x1; X2_new; X3_new]) - [Y1_new; Y2_new]);
x1_opt = fmincon(objective, initial_guess, [], [], [], [], lb, ub);
You may refer to the below resources to know more about the same:
  1. feedforwardnet: https://www.mathworks.com/help/deeplearning/ref/feedforwardnet.html
  2. fitnet: https://www.mathworks.com/help/deeplearning/ref/fitnet.html
  3. https://www.mathworks.com/matlabcentral/answers/460160-is-it-possible-to-perform-inverse-prediction-using-a-neural-network-using-the-matlab-deep-learning-t
I hope this resolves your query!

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!