botorch icon indicating copy to clipboard operation
botorch copied to clipboard

[FEATURE REQUEST]: TabPFN2 Wrapper

Open jduerholt opened this issue 10 months ago • 7 comments

Motivation

TabPFN2 shows impressive results, also for Regression (https://github.com/PriorLabs/TabPFN). The model is fully differentiable and can also quantify its uncertainty, so it should be also suitable for BO (there is also already one publication from 2023 on this: https://proceedings.mlr.press/v202/muller23a/muller23a.pdf). I propose to implement a botorch wrapper for TabPFN (and finetuned versions of it). Is there already somebody working on it? If not, is there interest in it?

Describe the solution you'd like to see implemented in BoTorch.

Implement a TabPFN wrapper, so that a TabPFN model can be used in botorch as native as a SingleTaskGP.

Describe any alternatives you've considered to the above solution.

No response

Is this related to an existing issue in BoTorch or another repository? If so please include links to those Issues here.

No response

Pull Request

None

Code of Conduct

  • [x] I agree to follow BoTorch's Code of Conduct

jduerholt avatar Jan 15 '25 10:01 jduerholt

cc @jelena-markovic

saitcakmak avatar Jan 15 '25 14:01 saitcakmak

@yucenli and @sdaulton have worked on this in the past.

Balandat avatar Jan 15 '25 14:01 Balandat

Nice, is there are already something available open source? How was your impression of it? Do you see value there?

jduerholt avatar Jan 15 '25 15:01 jduerholt

We don't have anything in OSS yet but shouldn't be too hard to put something together for the community contributions folder or into a PR. @sdaulton, @yucenli do you know what the state of the code is and what would be needed for this?

I'll let Sam+Lily speak about the details, but my tl;dr was that it worked quite well in terms of optimization performance (though not substantially better than GP models), but was quite slow at least for how botorch acquisition function optimization is set up by default b/c we have to backprop through the full Transformer model for each acquisition function evaluation. This can definitely be sped up though.

Balandat avatar Jan 15 '25 15:01 Balandat

We don't have anything in OSS yet but shouldn't be too hard to put something together for the community contributions folder or into a PR.

Just a branch or PR would be sufficient, then we can start playing with it based on this version and we do not need to start from scratch. If we find it useful for our usecases we would then finish the PR and try to fully integrate it.

jduerholt avatar Jan 16 '25 07:01 jduerholt

@yucenli had worked on implementing this. I can clean that up and put up a PR

sdaulton avatar Jan 16 '25 19:01 sdaulton

Sounds great. Thanks!

jduerholt avatar Jan 17 '25 07:01 jduerholt