Giter VIP home page Giter VIP logo

Comments (3)

WenWeiTHU avatar WenWeiTHU commented on May 23, 2024

您好,感谢您的关注!

您的理解是正确的。在实现上,Transformer是可以接受变长Token输入的,除了在Embedding和FFN层,在Attetion中的W_k, W_q, W_v也是独立做在每个Token上的(映射:d_model -> d_k),和Token个数N无关。

您可以尝试Encoder-only的传统Transformer,其在推理时就可用不同于训练时的时间步(Time Step as Token)。

在Inverted Transformer中,这种推理任意Token的能力则反映在了变量维(Variate as Token)。实际上Attetion中的W_k, W_q, W_v旨在从各种Token中学习如何提取特征,服务Token之间的相关性建模,这是一种变量无关的学习能力,从而这些参数具有泛化到未知的变量上的潜力,我们的实验正是验证了这一点!

代码实现可以参考scripts/variate_generalization下的脚本,其中训练时用到的enc_in都是小于这个数据集的变量数的。而在推理时,推理的是全量变量。

image image

from itransformer.

WenWeiTHU avatar WenWeiTHU commented on May 23, 2024

您还提到一个更高维度的问题,这也是目前我们正在尝试的的方向!这个问题的关键一般是如何组织这些Token以及利用他们的先验,或许可以借鉴一时空预测模型的思路,例如 Corrformer

from itransformer.

yangguang760 avatar yangguang760 commented on May 23, 2024

明白了,感谢解惑!

from itransformer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.