版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Multivariate Triangular Quantile Maps for Novelty Detection Jingjing Wang1, Sun Sun2, Yaoliang Yu1 University of Waterloo1, National Research Council Canada2 jingjing.wang, sun.sun, yaoliang.yuuwaterloo.ca Abstract Novelty detection, a fundamental task in machine learning, has drawn a lot of recent
2、attention due to its wide-ranging applications and the rise of neural approaches. In this work, we present a general framework for neural novelty detection that centers around a multivariate extension of the univariate quantile function. Our framework unifi es and extends many classical and recent n
3、ovelty detection algorithms, and opens the way to exploit recent advances in fl ow-based neural density estimation. We adapt the multiple gradient descent algorithm to obtain the fi rst effi cient end- to-end implementation of our framework that is free of tuning hyperparameters. Extensive experimen
4、ts over a number of real datasets confi rm the effi cacy of our proposed method against state-of-the-art alternatives. 1Introduction Novelty detection refers to the fundamental task in machine learning that detects “novel” or “unusual” samples in a data stream. It has wide-ranging applications such
5、as network intrusion detection 14, medical signal processing 17, jet design 19, video surveillance 42,43, image scene analysis 25,47 , document classifi cation 29,30, reinforcement learning 39, etc.; see the review articles 7,31,32,41 for more insightful applications. Over the last two decades or so
6、, many novelty detection algorithms have been proposed and studied in the machine learning fi eld, of which the statistical approach that aims to identify low-density regions of the underlying data distribution has been most popular e.g.4,49,51,53. More recently, new novelty detection algorithms bas
7、ed on deep neural networks e.g.1,9,11,18,26,40,44,46,48,56,58,59 have drawn a lot of attention as they signifi cantly improve their non-neural counterparts, especially in domains (such as image and video) where complex high-dimensional structures abound. This work offers a closer look of these recen
8、t neural novelty detection algorithms, by making a connec- tion to recent fl ow-based generative modelling techniques 22. In 2 we show that the triangular map studied in 22 for neural density estimation serves as a natural extension of the classical univariate quantile function to the multivariate s
9、etting. Since density estimation is extremely challenging in high dimensions, recent neural novelty detection algorithms all extract a lower dimensional latent representation, whose probabilistic properties can then by captured by our multivariate triangular quantile map. Based on this observation w
10、e propose a general framework for neural novelty detection that includes as special cases many classical approaches such as one-class SVM 49 and support vector data description 53, as well as many recent neural approaches e.g.1,40,46,58,59. This unifi ed view of neural novelty detection enables us t
11、o better understand the similarities and subtle dif- ferences of the many existing approaches, and provides some guidance on designing next-generation novelty detection algorithms. More importantly, our general framework makes it possible to effortlessly plug-in recent fl ow-based neural density est
12、imators, which have been shown to be surprisingly effective even in moderately high dimensions. Furthermore, centering our framework around the (multivariate) triangular quantile map (TQM) also enables us to unify the two scoring strategies in the literature 34: we can either threshold 33rd Conferen
13、ce on Neural Information Processing Systems (NeurIPS 2019), Vancouver, Canada. the density function 4,51 or the (univariate) quantile function 49,53. Using the multivariate triangular quantile map, for the fi rst time we can simultaneously perform both, without incurring any additional cost. In 3, m
14、otivated by the sub-optimality of pre-training we cast our novelty detection framework as multi-objective optimization 35 and apply the multiple gradient descent algorithm 12,15,36 for the fi rst time. We present an effi cient implementation that learns the TQM consistently, end-to-end and free of t
15、uning hyperparameters. In 4 we perform extensive experiments on a variety of datasets and verify the effectiveness of our framework against state-of-the-art alternatives. We summarize our main contributions as follows: We extend the univariate quantile function to the multivariate setting through in
16、creasing triangular maps. This multivariate triangular quantile map may be of independent interest for many other problems involving multivariate probabilistic modelling. We present a new framework for neural novelty detection, which unifi es and extends many existing approaches including the celebr
17、ated one-class SVM and many recent neural ones. For the fi rst time we apply the multiple gradient descent algorithm to novelty detection and obtain an effi cient end-to-end implementation of our framework that is free of any tuning hyperparameters. We perform extensive experiments to compare to exi
18、sting novelty detection baselines and to confi rm the effi cacy of our proposed framework. Our code is available at 2A General Framework for Novelty Detection In this section we present a general framework for novelty detection. Our framework builds on recent progresses in generative modelling and u
19、nifi es and extends many existing works. We follow the standard setup for novelty detection e.g.7: Givenni.i.d. samples*X1,.,Xn+ from an unknown distributionPoverRd, we want to decide if a new (unseen) sample Xis “novel,” i.e. if it is unlikely to come from the same distributionP. Due to lack of sup
20、ervision, the notion of “novelty” is not well-defi ned. Practically, a popular surrogate is to identify the low-density regions of the distributionP4,49,51, as samples from these areas are probabilistically unlikely. For simplicity we assume the underlying distribution P has a density p w.r.t. the L
21、ebesgue measure. We exploit the following multivariate generalization of the quantile function. Recall that the cumula- tive distribution function (CDF)Fand the quantile functionQof a univariate random variableXis defi ned as: F(x) = Pr(X x),Q(u) = F1(u) := infx : F(x) u. While the CDF can be easily
22、 generalized to the multivariate setting, it is not so obvious for the quantile function, as its defi nition intrinsically relies on the total ordering on the real line. However, following e.g.13,16 we observe that ifUfollows the uniform distribution over the interval0,1, thenQ(U)follows the distrib
23、utionF . In other words, the quantile function can be defi ned as a mapping that pushes the uniform distribution over0,1into the distributionFof interest. This alternative interpretation allows us to extend the quantile function to the multivariate setting. We recall that a mappingT = (T1,.,Td) : Rd
24、 Rdis called triangular if for allj = 1,.,d, the j-th componentTj depends only on the fi rstjcoordinates of the input, and it is called increasing if for allj,Tjis increasing w.r.t. thej -th coordinate when all other coordinates are fi xed. We callT triangular since its derivative is always a triang
25、ular matrix (and vice versa). Defi nition 1 (Triangular Quantile Map (TQM)LetXbe a random vector inRd, and letUbe uniform over the unit hypercube0,1d. We call anincreasing triangularmapQ = QX: 0,1d Rdthe triangular quantile map of X if Q(U) X, where means equality in distribution. Note that the TQMQ
26、is vector-valued, unlike the CDF which is always real-valued. The existence and uniqueness ofQfollows from results in 5 . Our defi nition immediately leads to the following quantile change-of-variable formula (cf. the usual change-of-variable formula for densities): Proposition 1 Let T : Rd Rdbe an
27、increasing triangular map. If Y = T(X), then QY= T QX.(1) 2 Practically, eq. (1) allows us to easily stack elementary parameterizations of increasing triangular maps together and still obtain a valid TQM. To our best knowledge, a similar defi nition, through conditional univariate quantiles, appeare
28、d in a number of works 2,10,37,45 , albeit mostly as a theoretical tool. Our defi nition makes the important triangular structure explicit and amenable to parameterization through deep networks. Needless to say, whend = 1 , the triangular property is vacuous and our defi nition reduces to the classi
29、cal quantile function. For a more comprehensive introduction to triangular maps and its recent rise in machine learning, see 22, 33, 50. Remark 1 A different defi nition of the multivariate quantile map, based on the theory of optimal transport 54, is discussed in a number of recent works e.g.8,13,1
30、6:Qis instead constrained to be maximally cyclically monotone, i.e. it is the subdifferential of some convex function. On one hand, this defi nition is invariant to permutations of the input coordinates while ours is not. On the other hand, our defi nition is composition friendly (see Proposition 1)
31、 hence can easily exploit recent progresses in deep generative models, as we will see shortly. The two defi nitions coincide with each other only when reduced to the univariate case. We note that the recent work of Inouye and Ravikumar 21 proposed yet another similar defi nition whereQ (termed densi
32、ty destructor there) is only required to be invertible. However, this defi nition does not lead to a unique quantile map and it is less computationally convenient. We are now ready to present our general framework for novelty detection. Letf : Rd Rmbe a feature map andXa random sample from the unkno
33、wn densityp. We propose to learn the density1 f#pof the latent random vectorZ = f(X)using the approach illustrated in 22. In details, we learn the feature map f and the TQM Q simultaneously by minimizing the following objective: min f,Q KL(f#pkQ#q) + (f) + g(Q),(2) wheregembodies some potential cons
34、traints on the increasing triangular mapQ,is some loss asso- ciated with learning the feature mapf,q is a fi xed reference density (in our case the uniform density over the hypercube0,1m), 0are regularization constants, and we use the KL-divergence to measure the discrepancy between two densities. E
35、xploiting Proposition 1 we parameterize the TQM as the compositionQ = T 1, where = (,.,)withthe CDF of standard univaraite Gaussian andT : Rd Rdan increasing triangular map. Note that unlikeQwhose support is constrained to the unit hypercube, there is no constraint on the support ofT, hence it is ea
36、sier to handle the latter computationally. Once the feature mapfand TQMQare estimated (see next section), we can detect novel test samples by either thresholding the density function of the latent variableZor thresholding its TQM. In details, the density of Z = f(X) = Q(U) = T(1(U), using the change
37、-of-variable formula, is pZ(z) = 1/|Q0(Q1(z)| = 1 |T0(T1(z)| m Y j=1 (T1(z)j),where = 0. Thus, we declare a test sample X to be “novel” if log|T0(T1(f(X)| + 1 2kT 1(f( X)k2 2 , (3) whereis some chosen threshold. Crucially, sinceTis increasing triangular,T1and the triangular determinant|T0| can both
38、be computed very effi ciently 22. The (slight) downside of this density approach is that the scale of an appropriate threshold is usually diffi cult to guess. Alternatively, we can declare a test sample Xto be “novel” by directly thresholding the TQMQ. Indeed, letN 0,1mbe a subset whose (uniform) me
39、asure is1 for some (0,1), then we say X is “novel” iff Q1(f(X) 6 N.(4) For instance, we can chooseNto be the cube centered at(1/2,.,1/2)and with side length (1 )1/m, in which case Q1(f(X) 6 N kQ1(f(X) 1 2k (1 )1/m/2. 1The notation T#p stands for the push-forward density, i.e., the density of T(X) wh
40、en X p. 3 The upside of this quantile approach is that we can control Type-I error (i.e. false positive) precisely, i.e. if X is indeed sampled from p, then we will declare it to be novel with probability at most . Before proceeding to the implementation details of(2), let us mention the advantages
41、of our general framework(2)for novelty detection: (a) It allows us to perform feature extraction on the original sampleXin an end-to-end fashion. As is well-known, density estimation hence also novelty detection becomes extremely challenging when the dimensiondis high. Our framework alleviates this
42、curse- of-dimensionality by settingm ? dand employingfto perform dimensionality reduction. (b) Our end-to-end framework enables us to adopt the recent fl ow-based density estimation algorithms, which have been shown to be universally consistent 20,22 and extremely effective in practice. (c) By estim
43、ating the TQMQonce, we can employ the two scoring rules, i.e. the density scoring rule(3) and the quantile scoring rule(4), simultaneously, without incurring any extra overhead. This allows us to perform a fair and comprehensive experimental comparison of the two complementary approaches. (d) Last b
44、ut not least, our framework recovers, unifi es, and extends many existing approaches in the literature. Let us conclude this section with some examples. Example 1 (One-class SVM 49)As shown in 52, the one-class SVM minimizes precisely the conditional value-at-risk, which is the average of the tail o
45、f a distribution: min f CVaR(f(X) + kfk2 H, whereCVaR(Z) := E(Z|Z QZ(), QZ()is the-th quantile of the real random variableZ, andHis the reproducing kernel Hilbert space (RKHS) induced by some kernel . This approach employs the quantile scoring rule (4). To cast one-class SVM into our framework(2), l
46、et us setm = 1hence the TQM reduces to the classical one. Let(f) = kfk2 H andg(Q) = CVaR(Q#q). Now with = 1and = in(2)we recover the celebrated one-class SVM. If instead of choosingffrom an RKHS, we representfusing a deep network, then we recover the recent approach in 6. Example 2 (Support Vector D
47、ata Description (SVDD) 53)Similar to one-class SVM, it is easy to show that SVDD also minimizes the conditional value-at-risk: min cH CVaR(k(X) ck2 H), where : Rd His the canonical feature map of the RKHS. This approach also employs the quantile scoring rule(4). It is well-known known that SVDD and
48、one-class SVM are equivalent for radial kernels e.g. 49. Again in this casem = 1. Letf(X) = k(X) ck2 H, 0andg(Q) = CVaR(Q#q). As approaches in (2), we recover the SVDD formulation. If instead of choosingas the canonical feature map of an RKHS, we representusing a deep network, then we recover the re
49、cent approach in 44. Example 3 (Latent Space Autoregression (LSA) 1)The recent work 1, following a sequence of previous attempts 40,46,58,59, proposed to learn the feature mapfusing an auto-encoder structure, and to learn the density of the latent variableZ = f(X)using an autoregressive model, which
50、, as argued in 22, exactly corresponds to a triangular map. In other words, if we setfas the parameters of an auto-encoder,to be its reconstruction loss, andg 0, then our framework(2) reduces to LSA. However, our general framework opens the way to exploit more advanced fl ow-based density estimation
51、 algorithms, as well as the quantile scoring rule (4). 3Estimating TQM Using Deep Networks In this section we show how to estimate the TQMQin(2)based on samples*X1,.,Xn+ i.i.d. p. In particular, any fl ow-based neural density estimator can be plugged into our framework. Our framework (2) has three c
52、omponents which we implement as follows: A feature extractorffor performing dimensionality reduction. Following previous works 1,40, 46,58,59 we implementfthrough a deep autoencoder that consists of one encoderZ = E(X;E) 4 and one decoder X = D(Z;D) . We use the Euclidean reconstruction loss: (f) =
53、(E,D) = Pn i=1kXi Xik2. As argued in 3, the reconstruction error, aside from low likelihood, is an important indicator for “novelty.” Indeed, since the autoencoder is trained on nominal data, a test sample will incur a large reconstruction error only when it is novel, as such samples have never been
54、 encountered before. A fl ow-based neural density estimator forQ . Here we adopt the sum-of-squares (SOS) fl ow proposed in 22 , although other neural density estimators would apply equally well. The SOS fl ow consists of two parts: an increasing (univariate) polynomialP2r+1(u;a)with degree2r + 1for
55、 modelling conditional densities and a conditioner networkCj(u1,.,uj1;Q)for generating the coeffi cients a of the polynomial: P2r+1(u;a) = c + Ru 0 Pk s=1 ?P r l=0al,st l?2dt, wherec Ris an arbitrary constant,r Nis the degree of polynomial, andkcan be chosen as small as 2. In other words, the TQM Q
56、learned using SOS fl ow has the following form: Q = T 1,wherej, Tj(u1,.,uj) = P2r+1?uj;Cj(u1,.,uj1;Q)?.(5) Any regularization term on the conditioner network weightsQcan be put into the functiong(Q) in our framework (2). Lastly, the KL-divergence term in(2)can be approximated empirically using the g
57、iven sample *X1,.,Xn+. Upon dropping irrelevant constants we reduce the KL term in (2) to: min Q n X i=1 h log|Q0(Q1(f(Xi)| logq(Q1(f(Xi) i , where each component ofQis given in(5). Crucially, sinceQis increasing triangular, evaluating the inverse Q1and the Jacobian |Q0| can both be done in linear t
58、ime 22. Sinceq is the uniform density over the hypercube, upon simplifi cation the fi nal training objective we use in our experiments is as follows. Let Zi= E(Xi;E), we aim to solve: min n X i=1 (1 ) h log|T0(T1(Zi)| + kT1(Zi)k2 2/2 |z negative log-likelihood h(Xi;) i + kXi D(Zi;D)k2 |z reconstruction loss (Xi;) ,(6) and recall thatQ = T 1is parameterized through the conditioner network weightsQin(5). We did not fi nd it necessary to further regularize Q hence set g 0 in (2) and w.l.o.g. =
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 休克病人的急救及护理试卷及答案
- xx县生石灰行业发展规划
- 朱纯古诗词全集大全
- 企业级云存储优化方案
- 关于调整物流配送时间的说明4篇
- 大学生心理调适与自我成长指导
- 物流供应链管理项目经理综合评价表
- 运动器材产品经理新品开发创新性考核表
- 能源公司项目经理节能降本与成本控制评估表
- 安全员c1证考模拟试题库及参考答案
- 2025年英语专业四级考试真题及答案解析
- 浙江省国际贸易集团有限公司行测笔试题目汇编2026
- 2026年临床医师三基三严年度培训计划
- 加油站视频监控系统管理指南
- 钢筋模板混凝土施工方案
- 西朗银金矿简介
- 《科学命题讲座》课件
- GB/T 273.1-2023滚动轴承外形尺寸总方案第1部分:圆锥滚子轴承
- 思想品德第九课谁为我们护航家庭保护与学校保护
- 《 空间向量的运算(2)》示范公开课教学课件【高中数学北师大】
- 核心素养下的高考语文命题评价体系讲座课件
评论
0/150
提交评论