QData/spacetimeformer

Question: Can we use Spacetimeformer for Recommendation?

swami-venkatesan opened this issue · 1 comments

Hi,
I read your paper last year and was really impressed on the model and its results. Thanks for your contribution. I am working on recommendation engine models and I was wondering if we could use this model architecture for sequential recommendations (especially short session where we have no previous user history or user information)?

Thanks!

I am not super familiar with recommendation systems research in general, but I imagine it would be tricky to convert recommendation sequences into a pure supervised problem like the ones in our paper. It would be possible to use spacetimeformer as a general purpose encoder for sequences in a decision making problem though. You could generate a spatiotemporal representation of your sequence with a spacetimeformer encoder that looks at past timesteps and a decoder with a target sequence that is 1 token long (the current timestep). If you customized the out_dim, the output could then be an input to another system (shape (batch_size, 1, out_dim))

out_dim = 2 if self.embed_method == "spatio-temporal" else 2 * d_y
self.forecaster = nn.Linear(d_model, out_dim, bias=True)
self.classifier = nn.Linear(d_model, d_y, bias=True)