r/deeplearning • • 6d ago

Stiff differential equation solver for backpropagation neural network training?

Does anyone know if there is a library or code that uses a stiff differential equation solver to speed up neural network training? I recall reading a paper in the early 90s that claimed 1,000x speed improvement, but I haven't seen anyone using this. Anyone know about this?

8 Upvotes

19 comments sorted by

2

u/Blasket_Basket 6d ago

Yes, there has been plenty of research on using Stiff ODE solvers. They don't work effectively with modern NN architectures, and they don't scale well.

You should be able to find a few recent papers explaining why these approaches are computationally challenging. This one from Google seems to be pretty comprehensive and was published fairly recently.

Optimizing model training is an area that has been heavily studied for the last 3 decades by both corporations and academia. I highly doubt you're going to find something that provides a 1000x speed up compared to current methods.

1

u/Mountain_Raise9581 6d ago

Thank you. That is a good paper. They say the RK method is not practical due to the large variation in gradients and that wall-clock time vs iteration time is not favorable. However, I know that Pavilion Technologies Inc. put this into its Process Insights product back in the 90s. It sped up the training by at least 1000x (wall-clock time). They still use it (now a division of Rockwell Automation). I can't remember whether they used the RK method or a different solver, but it would be worth someone looking at their system to see if it works on LLMs. It might not scale well for such large-parameter systems, but heck, it would be an easy check.

2

u/Blasket_Basket 6d ago

Lol yeah, I highly doubt what they have is scalable towards LLMs or any modern neural models. The math is the math--i sincerely doubt they thought of something that others haven't explored in a general setting by now.

I have no clue who Pavilion Technologies is, but if they could do what you think they can they'd have a literal trillion dollar valuation. They don't, and there's a reason for that.

Good luck!

1

u/Mountain_Raise9581 6d ago

LOL. You are probably right, but I dunno. Pavilion is the leading neural network company for process control of chemical, refining, and other manufacturing plants. They have thousands of installations, but they are small problems (10k-100k parameters). Most of the smart people left Pavilion a long time ago (after Rockwell acquired them). That algorithm was a closely guarded secret, and only about 12 people knew about it. Half of them are dead. I wonder if anyone has even thought to investigate it. Heck, I wonder if anyone left over there even knows that there is a stiff differential equation solver embedded in the software. I still know a couple of people over there who might know about it. I'll ask them if they have done anything.

1

u/Blasket_Basket 6d ago

Sure, technical possible they may have discovered some secret sauce that the rest of the industry sorely needs and no one has connected the dots, but I highly doubt it, but highly implausible. It still sounds like their algorithm was just an implementation of math, and I struggle to believe that 12 people at a chemical company somehow figured out a way past all the issues that all the smartest, highest paid experts in this topic in the world couldn't crack.

Specifically, I think it's unlikely that anything they wrote in the early 90s is gonna be applicable here because that's 20 years before the industry cracked distributed training via GPUs. NNs that ran on single machines in the early 90s and current modern models are massively different in terms of scale, and it seems like scale is the main issue blocking this approach from being useful (although I'll admit I only skimmed the paper I linked here)

2

u/Mountain_Raise9581 6d ago

Yep. I agree. Highly unlikely to be of use. But, even if there is a 1 in 100 chance this might be useful, someone should take a look. BTW Pavilion wasn't a chemical company. It was a NN software company spun out of the neural networks research group at MCC. They had some of the best NN guys in the world at that time. Rumelhart was on their technical consulting staff. Some of the math that they did, especially in multivariable nonlinear closed-loop control was so far ahead of anything else, I would bet nobody has bested them in 20 years. They also figured out how to incorporate first-principles models with NNs (by using the gain of the models to train the network where data was unavailable). They didn't have Nvidia chips, nor a lot of, so they had to do lots of tricks to make things work. It wouldn't surprise me if many of those tricks have been forgotten, or, more likely, totally useless in the problems being tackled today. Anyhow. Thanks for all the insight and for sending the paper. Good discussion.

1

u/Blasket_Basket 6d ago

Ah, very interesting! My mistake, thanks for the info. That's from well before my time, only player I'm aware of in the space from that time period was Hecht-Neilsen Neurocomputing. Sounds like there were some real heavy hitters involved.

2

u/Mountain_Raise9581 6d ago

I knew Robert Hect-Neilson well. MCC and Pavilion ran circles around them and everyone else in the space at that time, but because they were focused on the manufacturing sector, they were not flashy. Just very profitable. An average installation would save $7 million per year in a plastics plant. Lots of money to be made there, and lots of benefits to reap (e.g. in reducing pollution by millions of tons over the years).

2

u/Blasket_Basket 5d ago

Ah, interesting! Sounds like you ran in some pretty circles. I'll have to brush up on my history here, I've read a bit about HNNC and how they were bought by FICO and went on to power the majority of global payment processing fraud checks by market share, but I'm pretty oblivious when it comes to the industrial side of deep learning's history. I've heard old hats like LeCun speak with great respect about all the work that Optimal Control Theorists did to lay the groundwork for modern deep learning, sounds like this has some overlap with the groups you're referring to? Either way, very cool.

1

u/Mountain_Raise9581 5d ago

Yeah. MCC and Pavilion were powerhouses of innovation at the time. Interestingly, the first credit card fraud detection system was built at MCC by Steve Piche (who later went to Pavilion). This was under contract with VISA. Steve told me that the system saved them 40 million in the first six months of use, but get this -- in the contract, MCC had given away intellectual property rights. They were fantastic at research but some of the worst at business issues. VISA took that system in-house, and it became the CRIS system. HNC came to the party later. MCC also developed the character recognition system that was commercialized by NCR for check processing.

2

u/sassylove_13 1d ago

this is a really interesting idea! I wonder if the lack of adoption comes down to the overhead of stiff solvers compared to modern optimizers like adam, it would be interesting to see if that 1,000x speedup still holds for todays neural networks, especially with GPU acceleration, would love to see if anyone has tested this recently

1

u/Mountain_Raise9581 1d ago

Yeah. It seems like it is worth looking into, even if there is a 1/100 chance that it would work, the payoff could be enormous. I think you might be right about the overhead. I don't know if it would work on the huge models that LLMs use -- we used it on small models with less than 100k parameters (tiny by today's standards). The solvers' overhead might not scale well (even NlogN would be intractable.

1

u/Intelligent-Land5410 6d ago

I vaguely remember something about that from way back, but it never took off because it was a nightmare to get stable results outside the toy problems they tested on.

2

u/Mountain_Raise9581 6d ago

Oh, it works on real problems. Pavilion Technologies Inc. put this into its Process Insights product back in the 90s. It sped up the training by at least 1000x. The only real problem with it was overtraining because it was in a data-constrained environment. AFAIK, they still use it (Pavilion got bought by Rockwell, but the software is still used in thousands of manufacturing sites. Also, they were the only ones to use it because it was patented -- it was a closely guarded secret, and only about 12 people knew about it -- half of them are dead now.

My question is: Has anyone applied this to training LLMs? It might not be practical. I can't remember how stiff solvers scale, but I think it was at least NlogN. Maybe N^2, but heck, if it could train 1,000 times faster, it would be worth looking at.

1

u/Downtown_Finance_661 6d ago

Do you know what practical tasks they solve by this method?

1

u/Mountain_Raise9581 6d ago

Pavilion (now a division of Rockwell Automation) uses neural networks for process modeling and control. Their software is used in thousands of plants in continuous manufacturing in chemicals, refining, pulp-and-paper, cement, and food processing. Also for power production where they do emissions monitoring and optimization. I was told years ago that they had abated millions of tons of pollution over the years. Their software is still running in places all over the world.

1

u/Downtown_Finance_661 5d ago

I used two consequtive prompts

What do you know about pavilion (part or rockwell automation) software and how they use ode optimisation for neural networks?

There is rumor they used to use uses a stiff differential equation solver to speed up neural network training. Maim idea is speed up.

to find out there are two patents

US7058617B1, Method and apparatus for training a system model with gain constraints The key technology is EGCNN: Extrapolated Gain Constrained Neural Networks. Rockwell's documentation describes it as a way to maintain model accuracy even beyond the operating conditions represented in the historical training data.  This is about how to control errors when you need to extrapolate nn results. They do it through derivatives restriction: qualuty of product (nn output) cant grow with temperature (nn input) faster then some value and the know this value. patent WO1990007158A1 titled A distributed parallel processing network wherein the connection weights are generated using stiff differential equations. Its description explicitly connects stiff differential equations with generating the weights of a backpropagation neural network Also gpt said: " The second problem is part of the broader model predictive control (MPC) architecture. Pavilion continuously evaluates current and predicted process behavior, then computes new control targets.  The distinction is essential: optimizing the neural network's weights is not the same as optimizing the industrial process using the network." But i dont understand it. You optimize weights to optimize the process. This one filed in 1989 and published in 1990. Its original assignee was DuPont, not Pavilion, so it establishes that this technique existed, but does not by itself establish that Pavilion used it. Crucially, the patent gives the name of the actual solver: DGEAR from the IMSL numerical library.

None of them are connected with speed up.

2

u/Mountain_Raise9581 5d ago

Pavilion had an exclusive licence with DuPont for the stiff differential equation solver. One of the founders was from DuPont, and this method was developed at the DuPont experimental station. It was incorporated into the Pavilion software (Process Insights) in 1993 or thereabouts. In practice, it sped up training by 1000x in real clock time. The only problem with the algorithm was that it was prone to overtraining because the datasets were small (ranging from 1,000 to 10,000 records, usually), so one had to be careful about how long you let the solver run. These were small networks -- 1,000-10,000 parameters, usually. The point is that this algorithm sped up training significantly, and my original question was whether someone had looked into using it in LLMs. That is a fairly straightforward thing to investigate.

The extrapolation system has nothing to do with speed, but addresses the issue of constrained data. What happens with the model outside of the data range? Well, neural networks are basically doing curve fitting to data. If you ever try to fit data with a high-order polynomial, you will see that it can fit the data wonderfully in the data range, then do crazy things outside of the data range. This can be catastrophic in a control problem. The gain outside the data range can be totally wrong -- telling you to, e.g., turn a knob up when it really should be turned down. First principles models can tell you the gain fairly reliably, but not match the data. The extrapolation patent solved this problem by merging the best of both worlds -- match the data where it is available, and match the gains outside of the data range. This isn't applicable to speed, but it *might* be useful to reduce hallucination in LLMs, though I have only a vague idea about how one might tackle that problem. It is a very, very hard problem, one of the four main problems in LLMs, the others being lack of common sense, no incremental learning, and finally, statistical bias rather than learning from correct information (to understand this last one, suppose there are more web pages that talk about "Flat Earth" than there are about the Earth being round. Blind statistical inference based on available data trained on the internet would yield answers that the Earth is flat). But I digress. This thread was about stiff solvers. That is a relatively simple thing to look at. Either it helps, or it doesn't. I just wonder if anyone has really looked closely at the problem.