Repository navigation
I built an inverse-design engine for silicon photonics from scratch, looking for feedback #3377
Replies: 2 comments 4 replies
|
@momchil-flex hope it's ok to tag you directly. I saw legume, and that you are Bulgarian too (wordle-bg made me smile), so you feel like the right person to ask. Quick follow up to my own post. I tried to speed up the forward solve with an ML surrogate and hit a data wall. R2 around 0.45 at 60k samples, extrapolating to about a million samples for 0.7, even though 16 Fourier modes already reconstruct the transmission to R2 0.999. So it is a learning problem, not a capacity problem. Meanwhile legume gets its speed a totally different way, by exploiting physics structure instead of learning from data. My question is: in your experience building both legume and Tidy3D, has an ML surrogate ever actually earned its place inside a real inverse design loop, or does adjoint plus a fast solver basically always win? And is structure exploitation, the way legume does it, the real path to speed rather than a data driven model? Cheers, Vasil |
|
Hey, What you've done is a great exercise in understanding how everything works, and quite similar to what Tyler, I, and others used to do back in the day at Stanford. You mention legume, but more notably ceviche is the project that seems very similar to what you have implemented, and that can be counted as a very early precursor to Tidy3D.
Right, that's the million-dollar question that we're also trying to solve. :) Only thing is we are not actually designing photonics, so we have to ask the same question to our customers. This can be a long discussion, but the absolutely most important things are accuracy/trust in the solver (I don't care if you can run 1000 times faster if I can't trust the result) and fabricability. The latter is a giant pain still and the usual adjoint "fabrication constraints" are nice for prototyping but hugely insufficient in practice.
Given my answer above, I think a hint emerges - do not try to speed up the solver with AI. This has been pursued already by various people, and there's some moderate success here and there, but at the end of the day (my opinion is that) if we accept accuracy comes first then an AI replacement is a no-go (even if you do well you'll only get 90% of the results right and that's still not good). The other issue is that these are usually really bad at generalizing, so you might get something good on one problem but it will be way overfit and then you have to run 10,000 simulations on your different problem just to train the new model. On the other hand, there's quite a promise in AI for fabricability, both in terms of ensuring simulation to experiment match, and in terms of just making sense of the giant amounts of data we can be getting nowadays both from simulation and from experiment. Once again, people (including us) are working in various directions along those lines. So basically there's a place for ML, and even for surrogate models, just not in replacing the solver itself (again, this is my opinion, others might disagree). My colleagues even recently published a preprint with one example of that.
Yeah basically different computational methods have different advantages. *technically the computational time is slightly super-linear, because you need to simulate more time steps in larger systems |
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I am a physics student in Bulgaria. Over the last months I built a small inverse design engine for silicon photonics from scratch: a 2D FDFD Maxwell solver, a mode solver, and adjoint topology optimization (basically a hand rolled tiny version of what Tidy3D and its adjoint plugin do properly). All validated against known physics. I used it to inverse design a wavelength demux (1550 nm to one port, 1310 nm to the other, around 95% each).
Then I ran an honest experiment: can an ML surrogate speed up the design loop? I tried a scalar CNN and a Fourier neural operator, and both came out negative. I think I understand why: transmission depends on a tiny output-port region that a global field loss ignores, and a spectral check showed the metric only needs the lowest ~16 Fourier modes, so it is a learning problem, not a capacity one.
Code and honest write up: https://github.com/vasildev4/lightforge
I am not selling anything. I am trying to learn from people who actually design and simulate photonics: what part of device design eats the most of your time, the part you most wish a tool just did for you?
Thanks,
Vasil
All reactions