LLNL / macc

Robust neural network surrogate for inertial confinement fusion
MIT License
26 stars 9 forks source link

Using CycleGAN with physical inconsistency loss for a numerical problem #2

Open diliprk opened 4 years ago

diliprk commented 4 years ago

Hi Rushil, Greetings. I am trying to use your CycleGAN architecture with physical inconsistency loss in my master thesis at Airbus. For this project, we have to generate a large nr. of synthetic samples (basically transform the output from a CFD Solver) that match the distribution of some real-world lab test points (which are very sparse and limited). The data points are numerical values and there are no images to generate here for the CycleGAN. This idea is explained in the image below where the dotted green line was drawn by hand. CycleGAN_ToyProblem_ExpectedOutput

We made a small toy problem where I use normal CycleGAN and documented some notes and observations. You can find the toy problem and the notes in the links below, in case you want to know additional details. i.) CycleGAN - Toy Problem ii.) CycleGAN - Notes

I have a few clarifications for which I would like to request your kind feedback: 1.) Do you think your CycleGAN architecture with physical inconsistency loss will help in my case to achieve the intended goal (as in the above image) of transforming the simulation points to look like real-world lab test points? 2.) Would it be possible for you to share the tensorflow implementation of your CycleGAN in Keras or at least give me pointers for translating your tensor flow code for the discriminator, generator and your def_run() function with physical inconsistency loss into the Keras style code as in my Toy Problem?

Best Regards, Dilip

rushilanirudh commented 4 years ago

Hi Dilip,

Sorry for the late response. I tried looking at some of your plots; here are my thoughts. My architecture we have here is specifically for surrogate modeling -- i.e. we have a set of inputs (typically a uniform grid) and a set of outputs (like scalars, images etc. here). The core problem we are trying to answer is -- what makes a good surrogate? We are studying (A) if finding a "physics manifold" for all the outputs helps and (B) if including the inverse model (outputs --> inputs) helps in any way to improve the forward model.

I am not sure how your problem translates to this one since it seems more of a domain adaptation : you have a set of simulation outputs, which you want to 'correct' using a few sparsely sampled real data points. Correct me if I'm mistaken here..

diliprk commented 4 years ago

Hi Rushil, Thank you for your reply. Yes your observation is quite correct. But to be more precise, we were aiming for 'Physically consistent style transfer', like CycleGANs were built for style transfer, i.e transferring the distribution and properties from one datasetA (in our case sparse LabTest data) to another datasetB (simulation data), but we want to add a 'physically consistent touch' to this and control the style transfer process in order to make the end results having the transferred properties from lab test data but at the same time also remaining physically consistent. How do you think this can be achieved? 1.) Do you think by adding a customized loss function like your physical consistency loss in your CycleGAN implementation can help enforce the physical consistency we are seeking? 2.) Or perhaps you would suggest exploring other alternatives leaving CycleGANs?