Neural memory enables fast adaptation to new tasks with just a few training samples. Existing memory models store features only from the single last layer, which does not generalize well in presence of a domain shift between training and test distributions. Rather than relying on a flat memory, we propose a hierarchical alternative that stores features at different semantic levels. We introduce a hierarchical prototype model, where each level of the prototype fetches corresponding information from the hierarchical memory. The model is endowed with the ability to flexibly rely on features at different semantic levels if the domain shift circumstances so demand. We meta-learn the model by a newly derived hierarchical variational inference framework, where hierarchical memory and prototypes are jointly optimized. To explore and exploit the importance of different semantic levels, we further propose to learn the weights associated with the prototype at each level in a data-driven way, which enables the model to adaptively choose the most generalizable features. We conduct thorough ablation studies to demonstrate the effectiveness of each component in our model. The new state-of-the-art performance on cross-domain and competitive performance on traditional few-shot classification further substantiates the benefit of hierarchical variational memory.
翻译:现有的内存模型只从最后一个层中存储特性, 而在培训和测试分布之间发生域变换时, 仅从最后一个层中并不全面。 我们不依靠平坦的内存, 而是建议一个以不同语义级别存储特征的等级替代方案。 我们引入一个等级原型模型, 使每个等级的原型都能从等级内存中获取相应的信息。 该模型被赋予了在域变换情况需要时灵活依赖不同语义级别特征的能力。 我们通过一个新衍生的等级变异框架将模型元化, 使等级内存和原型得到共同优化。 为了探索和利用不同语义级别的重要性, 我们进一步提议以数据驱动的方式学习与每一级别原型相关的重量, 使模型能够适应性地选择最一般的内存特征。 我们进行了彻底的对比研究, 以展示模型中每个组成部分的有效性。 在传统的几发式分类中, 新的横向和竞争性性能表现进一步证实了等级内存的效益。