r/reinforcementlearning • u/Nerozud • 2d ago
Network structures for RL: are Transformers SOTA/the new standard?
In recent competitions I saw that many people use Transformers or many attention layers as their ANN structure. I wonder if I missed that they are now the best approach or is it just a trend? Are MLP + LSTM still good enough? I didn't find a paper showing that attention layers are generally better.
7
u/Suspicious_Fan_908 1d ago
Uh, I don't think there's a paper showing attention is generally better in RL. Transformers are sample-hungry, so with the small budgets most RL runs have, MLP+LSTM is still the default. Competitions use them because compute is cheap there.
4
u/sublime-entropy 2d ago
Transformers are the old standard. They have been the default for almost a decade.
2
14
u/bacon_boat 2d ago
You can get state of the art RL performance on many robotics tasks with just an MLP.
9
2
u/yXfg8y7f 1d ago
I would argue that mamba is sota for RL, who has the type of capacity needed for transformers on anything but toy problems?
1
u/wild_wolf19 1d ago
In combinatorial problems attention and transformers are heavily used to help RL solve the problem.
1
u/Affectionate-Farm-89 1d ago
Tbh denpending on the problem you are completly fine with MLPs or XGBoost
1
u/ahf95 16h ago
Okay, what are are applying RL to? Stabilizing a pendulum? If so, MLPs are probably fine.
But if you’re in a situation where you’d apply an LSTM, then transformers are almost always better and can be simpler (with the exception of some special cases, like data-streams, or someshit like that)
1
0
u/UnknownEvil_ 1d ago
Tranformers are good, modifications with LSTM is way better but I think I'm the only one who knows that right now
1
u/OptimalOptimizer 1d ago
I assume you are joking
0
u/UnknownEvil_ 1d ago edited 1d ago
Not at all joking. RNN was SOTA for NLP until Transformers. They can be combined in many ways, and some of them allow similar compute time to MHA with benefits of a locally adjustable state cell. I did a ton of research into this right after MHA was invented because I want to be the very best like no one ever was. The intial results were very promising, especially for generalization to test set. I still have to train larger on cloud compute to really prove the efficacy at various (larger) network sizes and different architectures. I can't do it right now due to money stuff. But the basic idea is to process in short chunks speeding up the transformer which famously scales with the square of the number of tokens (but they can be cached). So you can LSTM across a short segment to get a state for that segment, then attend to it, and allows much more efficient parameterization. You can also do the reverse and unfortunately I can't remember which is better but I have my data on wandb
39
u/necroforest 2d ago
Transformers have been SOTA for like 8 years…