Zero-Shot Learning across Heterogeneous Overlapping Domains

news2024/9/23 17:26:04

极简论文阅读

摘要

a zero-shot learning approach:零样本学习方法。
natural language understanding domain:自然语言处理域。
a given utterance:给定的话语。
domains at runtime:运行时的域。
utterances and domains 给定话语和域。
the same embedding space :相同的嵌入空间。
domain-specific embedding:特定域嵌入。
a set of attributes that characterize the domain: 一系列表征域的属性。

模型:

  • a neural network trained via ranking loss:排序损失函数训练神经网络。
  • a virtual assistant’s third-party domains:虚拟助手的第三部域。
  • 效果: less storage和new domains。

介绍

virtual assistants: Alexa, Cortana and the Google Assistant
a small and relatively fixed number of domains: 相对固定的域数量。
功能:
(被分组)
are groupings of mutually related user intents, and predicting the right domain for a given utterance could be treated as a multi-class classification problem

new frameworks

**the Alexa Skills Kit, the Cortana Skills Kit, and Actions on Google 域的数量呈现指数级的增长。

  • non-experts :非专家。

  • heterogenous 异构

  • overlapping output label spaces: 重叠的输出标签空间。

  • scratch for every new domain 抓取每一个新域。

  • infeasible 不可行的。

  • at regular intervals 定期

  • the interim period 中期
    学习一个函数将任何域映射到密集向量实现新域的连续可扩展性。

  • this continuous extensibility

  • new domains

  • project any domain into a dense vector

  • a function :generate a domain embedding for any domain

  • attributes of the domain, 域的属性。特征

  • the sample utterances:样本语句

  • generates domain embeddings from domain attributes。
    从域属性哪里产生域嵌入

  • an utterance embedding for any incoming utterance.
    为输入语句产生输入嵌入

  • two functions to use the same embedding space
    两个函数使用相同的嵌入空间

  • list the domains whose embeddings are most similar to the utterance embedding

a neural joint attribute learning framework

神经多任务属性学习框架。
在这里插入图片描述

  • user preferences or past interactions 用户偏好和过去关系。

Zero-Shot Learning

创新点

This paper deals with the case where novel classes (i.e., domains) are added after our model has been trained,

  • we are constrained to not retrain to incorporate these new classes
  • continuously add new domains. (同时补充新域)

Proposed Zero-Shot Architecture

  • Standard classifiers :标准分类器。

learn unique parameters per training class
y ∈ Y t r a i n y \in Y^{train} yYtrain

在测试阶段并不能够预测新类。
标准的神经网络使用一个得分函数,为每个训练类别有一个参数空间。
s ( x , y ; θ , f x ) = h x ( x ; θ x , f x ) ⋅ θ y T s(x,y;\theta,f_x) = h_x(x;\theta_x,f_x)\cdot\theta^T_y s(x,y;θ,fx)=hx(x;θx,fx)θyT

f x f_x fx是一个函数,能够提取输入向量的 x x x的输入属性。
θ x \theta_x θx: 排除最后一层神经网络的参数。

  • h x h_x hx: 是输入的密集嵌入表征,基于属性 f x ( x ) f_x(x) fx(x)
  • θ y \theta_y θy.:与类 y y y相同维度的最终层参数。

再类参数 θ y \theta_y θy 函数是线性的。
在这里插入图片描述
f x ( x ) 和 f y ( x ) f_x(x) 和f_y(x) fx(x)fy(x)是属性。
h x h_x hx and h y h_y hy 是密集嵌入。

  • At test time, new classes can be scored along with classes observed during training.

得分函数

在这里插入图片描述
h y ( y ; θ y , f y ) h_y(y;\theta_y,f_y) hy(y;θy,fy) 是类 y y y的嵌入。基于类属性 f y ( y ) f_y(y) fy(y)

θ y \theta_y θy 是一系列所有类别的共享参数。
框架包含三个成分:

  • an input encoder,
  • an output encoder and
  • a discriminator or scorer module
  • 模块中的每一个都是充分可微的。系统能够使用反向传播进行端到端的训练。

Input Encoder

  • the attributes of an input utterance,: f x ( x ) f_x(x) fx(x)

  • a dense embedding h x ( x ) h_x(x) hx(x)

  • 输入属性包含: all utterance-specific contextual features

  • use 300-dimensional pre-trained word embeddings

  • 初始化:the lookup layer
    This is followed by a mean pooling layer followed by an affine layer with a (tanh) nonlinear activation function

  • s LSTM-based architectures

output Encoder

  • the attributes of a candidate output class f y ( y ) f_y(y) fy(y)
  • computes a dense embedding h y ( y ) h_y(y) hy(y)
  • the output encoder is a 256-dimensional dense layer
    each class y y y is a a natural language understanding (NLU) domain

为each domain y 我们提取以下属性: f y ( y ) f_y(y) fy(y)

  • Category metadata
    Developer-provided metadata such as domain category

  • Mean-pooled word embeddings

  • Gazetteer attributes:
    We have a number of in-house gazetteers,
    . Gazetteer-firing patterns are noisy, and
    some gazetteers are badly constructed, so instead of using
    raw matches against the gazetteers as feature values, we
    normalize them by applying
    applying TF-IDF

Scorer

产生输入和输出的相似性得分。
define the scorer as a vector dot product

替代方案:cosine distance、Euclidean distance、
as a trainable neural network in itself, jointly trained as part of the larger network

Learning and Inference

D t r a i n = { ( x i , y i ) } i = 1 N D^{train} = \left\{\begin{matrix}(x_i,y_i)\end{matrix}\right\}^N_{i = 1} Dtrain={(xiyi)}i=1N

表示可以利用的训练数据 y i ∈ y t r a i n 任 意 : i y_i \in y^{train} 任意:i yiytraini
所谓的得分函数如上图所示:
we coulde define a probility distribution over the training classes y t r a i n y^{train} ytrain
using a softmax layer similiar to a maximum entropy model :
P ( y ∣ x ) = exp ⁡ s ( x , y ) ∑ y ^ ∈ y t r a i n exp ⁡ s ( x , y ^ ) P(y|x) = \frac{\exp s(x,y)}{\sum_{\hat{y} \in y^{train}}\exp s(x,\hat{y})} P(yx)=y^ytrainexps(x,y^)exps(x,y)
通过最小化损失函数:a cross-entropy loss, 可以最优参数 θ x 和 θ y \theta_x和\theta_y θxθy
the training classes y t r a i n y^{train} ytrain
the test classes y t e s t i s , n o t , w e l l , m o t i v a t e d y^{test} is,not,well,motivated ytestis,not,well,motivated

替代方案

  • using an SVM-like margin-based objective function, popular in the information retrieval literature 最小化以下:
    m i n θ x , θ y ∑ i = 1 N [ m a x y ≠ y i ( s ( x i , y i ) + γ − s ( x i , y i ) ) ] + \underset{\theta_x,\theta_y}{min}\sum^N_{i = 1}[\underset{y \not= y_i}{max}(s(x_i,y_i) + \gamma - s(x_i,y_i))]_{+} θx,θymini=1N[y=yimax(s(xi,yi)+γs(xi,yi))]+

在这里 [ x ] + [x]_{+} [x]+ the hinge function
is equal to x x x when x > 0 x >0 x>0 else 0

This objective function tries to maximize the margin between the correct class and all the other classes.

训练阶段

  • sampling a random negative class label and maximizing the margin loss between that and the oracle true sample.
  • each epoch of training,
    • we perform
      an inference step over the list of training classes and sample negative samples from that posterior distribution

at the start of training

  • the model chooses random output classses.

as training progresses

the model starts choosing the hardest,most confusable cases as negative samples.

Consistent with prior work

we find that this training strategy significantly speeds up convergence in training compared to purely random sampling, though sampling from the normalized output distribution adds a fixed time cost.

further more

maximizing the margin with the best incorrect class implies that the margin with other incorrect classes is maximized as well.

  • the input feature representation: a feed-forward neural network.
  • optimize this objective in an online fashion using any gradient descent method.比如:SGD
  • 我们端到端的训练模型,使用 D r o p o u t Dropout Dropout
  • using Dropout [20] on both encoder networks with a dropout rate of 0.2

在这里插入图片描述
在这里 y i ^ = a r g m a x y ≠ y i s ( x i , y \hat{y_i} = argmax_{y \not= y_i}s(x_i,y yi^=argmaxy=yis(xi,y
the highest-scoring incorrect prediction under the current model)
y i y_i yi denotes the ground truth .
在这里插入图片描述
( x i , y i ) (x_i,y_i) (xi,yi) :the partial gradients during training
the input embedding h x ( x i ) h_x(x_i) hx(xi)
all the output embedding: h y ( y ) h_y(y) hy(y)
resulting scores: s ( x i , y ) 对 任 意 的 y ∈ y t r a i n s(x_i,y) 对任意的 y\in y^{train} s(xi,y)yytrain
在这里插入图片描述
使用公式5去计算得分函数更新参数的梯度

测试阶段

我们给出一些测试例子:
D t e s t = { ( x i , y i ) } i = 1 N ^ D^{test} = \left\{\begin{matrix}(x_i,y_i)\end{matrix}\right\}^{\hat{N}}_{i = 1} Dtest={(xiyi)}i=1N^
在这里 y i ∈ y t e s t y_i \in y^{test} yiytest
我们计算 f y ( y ) 对 任 意 的 : y ∈ y t e s t f_y(y) 对任意的: y \in y^{test} fy(y)yytest
我们按照以前的过程来计算所有测试类别的得分 y t e s t y^{test} ytest:
预测这个最佳类别: arg max ⁡ y ∈ y t e s t s ( x i , y ) \argmax_{y \in y^{test}}s(x_i,y) yytestargmaxs(xi,y)

相关工作

  • distributed representations for output classes 输出类别的分布式表示。
  • error-correcting codes for classes 误差正确率代码。
  • The
    individual binary indicators in these error-correcting codes are generated randomly and does not carry any semantic meaning

Many of the NLP problems can similarly be cast as attribute learning problems for better generalization and extending to novel classes.

  • an intriguing avenue for research on how to train networks to learning-to-learn from a few examples

实验

Baselines

  • we also train a baseline model using k-nearest neighbors (k-NN) on domain embeddings
  • 另外一个baseline是一个生成式方法,通过验证这个问题:
    P ( d o m a i n ∣ u t t e r a n c e ) ∝ P ( u t t e r a n c e ∣ d o m i a n ) × P ( d o m a i n ) P(domain | utterance) ∝ P(utterance | domian) \times P(domain) P(domainutterance)P(utterancedomian)×P(domain)
  • build independent models P ( u t t e r a n c e ∣ d o m a i n ) P(utterance | domain) P(utterancedomain)
  • every domain and independently calculate domain priors.
    以下,是我们列出的baselines methods。

. Naïve Bayes (Unigram)

P ( u t t e r a n c e ∣ d o m a i n ) P(utterance | domain) P(utterancedomain)
Naïve Bayes model with features being word unigrams in the utterance.

Naïve Bayes (Unigram + Bigram)

  • Same as above but word bigrams are added as features in addition to unigrams。

Language Model

A trigram language model is used per domain to model P ( u t t e r a n c e ∣ d o m a i n ) P(utterance | domain) P(utterancedomain). Kneser-Ney smoothing for n-gram backoff has been applied.

Embeddings k-NN:

K-NN using intent embeddings from a classifier trained on data excluding the zero-shot partion

  • a vocabulary size of 10,000 unique words 将其映射到 a special rare word token
  • Each domain consists of multiple intents
    Intents can be seen as fine_grained domains themselves
  • they are more homogeneous and therefore easier to model.

实验步骤

  • sample utterances: generated from the domain grammars provided by the developers
  • better learn feature-attribute association weights.
  • data from 1574 dmoains。
  • we restrict ourselves to testing on 32 third-party domains
    测试集包含以三个部分:
  • Live + Generated (N=2814)
  • Generated (N=3016)
  • Zero-Shot Partition (N=2392)
    the embeddings k-NN model was allowed to run on it, but not retrain its embedding model.

结果

在这里插入图片描述
we also compared the zero-shot model to an n-gram based maximum entropy model baseline for intent classification within a domain.

结论和未来展望

  • class attributes
  • a generic framework for achieving zero-shot language understanding.
  • a flexible neural network architecture

未来工作

  • Future work can explore techniques that better map from feature spaces in one modality to another.: Compact Bilinear Pooling popularized by 9.
  • incorporating syntactic information into the model via subword embeddings:18.
  • replacing the dot product based scoring function with a learned model as has recently been popularized by adversarial methods 10.
  • In the context of Spoken Language Understanding。we can
    augment the encoders with context features and generalize them
    to consume ASR lattices and developer grammars

总结

代码运行的时候,会自己根据未来工作进行调试代码,然后会自己进行修改与整理。
会自己泛读论文,大致了解模型架构、创新ideas、未来展望、以及如何将未来展望带入模型进行调试,并用于自己的文章中。并不断探索新的阅读方法,阅读套路。
不断的探索,加快文章的阅读。会自己琢磨透彻,琢磨精髓,

总结

论文学习方法。读论文期间会了解模型架构以及公式推导。以及创新点都行啦,根本不需要逐字逐句的读,然后开始亚尼据其他的样子都行啦的回事与打算。还有基准模型,然后跑代码,了解代码架构都行啦。其他的不重要,学会慢慢的将其高完整。会自己略读都行啦的理由与打算

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/79263.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Yolact

YOLACT 1.Abstract 原理: 生成一组 prototype masks (原型掩码) 个数(nm)可自定义,基于protonet的最后一组卷积核个数 通过一组 coefficients (掩码系数) 预测每个 instance mask (输出mask) 掩码系数由head层输出,shape为&…

微服务框架 SpringCloud微服务架构 微服务保护 32 隔离和降级 32.2 线程隔离

微服务框架 【SpringCloudRabbitMQDockerRedis搜索分布式,系统详解springcloud微服务技术栈课程|黑马程序员Java微服务】 微服务保护 文章目录微服务框架微服务保护32 隔离和降级32.2 线程隔离32.2.1 线程隔离32.2.2 优缺点对比32 隔离和降级 32.2 线程隔离 32.…

算法7:平衡二叉树(AVLTree)

二叉排序树(BST, Binary Sort Tree)也称二叉查找树(Binary Search Tree), 或二叉搜索树。 定义:一颗二叉树,满足以下属性: 左子树的所有的值小于根节点的值右子树的所有值大于根节点的值左、右…

关键词(四)

关键词(四)一.具有争议的关键词—goto二.“空”的关键字—void1.void为什么不能定义变量2.void修饰函数返回值和参数3.void指针一.具有争议的关键词—goto goto语句非常灵活,其实就是从goto这个位置直接跳转到goto后面的那个数据(…

单例模式、工厂模式

单例模式、一、单例模式1.1 饿汉模式1.1.1 实现1.1.2 补充1.2 懒汉模式1.2.1 单线程版1.2.2 多线程版二、工厂模式一、单例模式 单例模式是校招中最常考的设计模式之一。 啥是设计模式? 设计模式好比象棋中的"棋谱":红方当头炮,黑…

软件测试人员究竟要掌握什么技能?顺便说下行业现状

最近团队内部产品在做性能测试中碰到一个问题,不仅仅这次性能测试,其实这在我这近10年工作过程中,经常碰到一些类似的事情,今天拿出来一件事说叨说叨。 1、事情经过 月中上线了一个功能,该功能会应对峰值流量&#x…

【安卓APP源码和设计报告(含PPT)——订餐系统

订餐系统实验报告 课程名称: Android程序设计 班 级: 学 号: 姓 名: 任课教师: 程序功能与环境(服务器,手机实物照片,自己拍) 程序功能 餐厅订餐系统服务器&#…

45. python %占位符格式化处理

45. %占位符格式化处理 文章目录45. %占位符格式化处理1.课题导入2. %占位符概念3. %d格式化为整数3.1 %d将整数格式化到指定位置3.2 %d将浮点数格式化为整数1. 知识回顾:用int函数将浮点数转换为整数2. 用%将浮点数格式化为整数4. %s格式化为字符串4.1 %s将整数格式…

论文笔记-时序预测-Triformer

论文标题: Triformer: Triangular, Variable-Specific Attentions for Long Sequence Multivariate Time Series Forecasting 论文链接: https://arxiv.org/abs/2204.13767v1 代码链接: https://github.com/razvanc92/triformer 摘要 各种现…

[附源码]计算机毕业设计基于JEE平台springbt技术的订餐系统Springboot程序

项目运行 环境配置: Jdk1.8 Tomcat7.0 Mysql HBuilderX(Webstorm也行) Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。 项目技术: SSM mybatis Maven Vue 等等组成,B/S模式 M…

Spring源码解析-环境变量

“不积跬步,无以至千里”。 今天聊一聊Spring中环境变量的动态添加和填充Bean属性的时候一些带“$”符号的属性值的解析问题。 因为最近做项目的时候发现了一个有意思的问题,之前也没关注过。因为项目中使用的容器类型是GenericXmlApplicationContext&a…

从GPT-3到CHAT-GPT(CHAT-GPT如何申请)

回顾2020年7月 2020年7月份有一个重大新闻,人工智能科研公司OpenAI,推出了它的新一代语言模型 GPT-3(Generative Pretrained Transformer 3),这个事情在社交媒体影响甚广,甚至有一篇文章《一个新型 AI 震惊…

动态代理详解

目录 一、动态代理_代理模式简介 二、动态代理_JDK动态代理 dynamic 三、动态代理_CGLib动态代理 四、JDK和CGLib动态代理的区别 一、动态代理_代理模式简介 代理模式是23种设计模式之一。设计模式是前人总结的,在软件开发过程遇到常用问题的解决方案&#xff0…

微服务框架 SpringCloud微服务架构 微服务保护 30 初识Sentinel 30.4 引入cloud-demo

微服务框架 【SpringCloudRabbitMQDockerRedis搜索分布式,系统详解springcloud微服务技术栈课程|黑马程序员Java微服务】 微服务保护 文章目录微服务框架微服务保护30 初识Sentinel30.4 引入cloud-demo30.4.1 引入cloud-demo30.4.2 微服务整合Sentinel30 初识Sent…

尝试使用CubeMX做stm32开发之十三:Clock Configuration(时钟树配置)

参考《STM32中文参考手册_V10》,研究CubeMX中有关时钟树配置。 一、系统时钟配置 三种不同的时钟源可被用于驱动系统时钟(SYSCLK): HSI振荡器时钟HSE振荡器时钟PLL时钟 时钟源选择对应时钟配置寄存器(RCC_CFGR&…

Android -- 每日一问:修改 SharedPreferences 后两种提交方式有什么区别?

知识点 SharedPreferences 类是一个接口类,真正的实现类是 SharedPreferencesImpl 。修改 SharedPreferences 需要获取它的 Editor,在对Editor进行put操作后,最后通过 commit 或者 apply 提交修改到内存和文件。当然有了两种都可以提交的方法…

Java进程线程介绍创建和执行销毁并理解线程安全和线程池 Native Method

目录1.进程和线程2.多线程的核心3.操作系统的多任务--以非常小的时间间隔交替执行4.native 修饰的方法5.Thread创建线程的两种方式1.普遍采用实现Runnable接口的方式2.继承Thread方式6.自定义线程用 new Thread(Runnable target) 启动源码分析6.1-new Thread(myThread)6.2对实例…

mysql8.0.21安装配置方法图文教程

记录了mysql 8.0.21 的安装配置方法,分享给大家。 一、下载 1、下载安装包 mysql下载路径 2、解压压缩包 3、在此目录下新建my.ini配置文件 [mysqld] # 设置 3306 端口 port3306 # 设置 mysql 的安装目录 basedirD:\mysql-8.0.21-winx64 # 设置 mysql 数据…

破案了!不会讲笑话不会作诗的chatGPT!

热出圈的chatGPT, 必须亲手试试热出圈的chatGPT, 必须亲手试试1 猜猜我是谁2 问网传图片李白风格注释代码3 写个程序看看4 帮我猜猜世界杯(发了发了,偷笑脸)5 知道李白吗?6 那你会写诗吗?6 那你讲脑经急转弯吗&#xf…

linux服务器安装docker(学习中)

linux服务器安装docker1、docker官网寻找官方文档1.1、卸载之前的docker1.2、安装yum工具类1.3、配置docker下载源的地址1.4、安装最新稳定版的docker1.5、启动docker1.6、docker镜像下载加速2、docker-卷-映射和挂载2.1、nginx1、docker官网寻找官方文档 然后根据官网文档进行…