Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the difference between variable importance for the encoder and decoder in TFTExplainer? #2370

Closed
chododom opened this issue May 4, 2024 · 1 comment
Labels
question Further information is requested

Comments

@chododom
Copy link

chododom commented May 4, 2024

I am not completely sure from the documentation how to interpret the results of the TFTExplainer.
When I pass a certain series to the explainer and plot variable selection, I get a graph of variable importance for encoder and decoder, where encoder contains all my target variables as well as time-varying covariates.

The decoder has only the time-varying covariates.

Is it correct to understand that the encoder is the encoding of the past (so one of the targets could be relevant), but the decoder only makes the forecast without having the actual previous values, so only the time-varying covariates that are known are shown?

I am trying to think of a good way to explain the results.

@chododom chododom added the triage Issue waiting for triaging label May 4, 2024
@madtoinou madtoinou added question Further information is requested and removed triage Issue waiting for triaging labels May 6, 2024
@dennisbader
Copy link
Collaborator

Hi @chododom and sorry for the late response. We describe this here

plot_variable_selection() plots the variable selection weights for each of the input features. - encoder importance: historic part of target, past covariates and historic part of future covariates - decoder importance: future part of future covariates - static covariates importance: the numeric and catageorical static covariates importance

So:

  • the encoder importance shows the importance of the encoder Variable Selection Network (VSN, see dashed green circle in figure below) : it contains all features in the input/past/lookback/history window (input_chunk_length). This includes the target series, past_covariates, and the historical part of future_covariates (the time steps that fall into the input/lookback window)
  • the decoder importance shows the importance of the decoder VSN (see dashed blue circle in figure below): it contains all features in the output/lookahead/forecast window (output_chunk_length). This includes only the future part of the future_covariates (the time steps that fall into the output/lookahead window)
image source: https://arxiv.org/pdf/1912.09363 (figure 2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants