Author Interview - VOS: Learning What You Don't Know by Virtual Outlier Synthesis
deep learning machine learning arxiv explained neural networks ai artificial intelligence paper paper explained virtual outliers how to detect outliers deep learning outliers deep learning outlier detection vos deep learning energy latent space outliers density estimation classification boundaries generative models
#deeplearning #objectdetection #outliers

An interview with the authors of "Virtual Outlier Synthesis".
Watch the paper review video here: https://youtu.be/i-J4T3uLC9M

Outliers are data points that are highly unlikely to be seen in the training distribution, and therefore deep neural networks have troubles when dealing with them. Many approaches to detecting outliers at inference time have been proposed, but most of them show limited success. This paper presents Virtual Outlier Synthesis, which is a method that pairs synthetic outliers, forged in the latent space, with an energy-based regularization of the network at training time. The result is a deep network that can reliably detect outlier datapoints during inference with minimal overhead.

OUTLINE:
0:00 - Intro
2:20 - What was the motivation behind this paper?
5:30 - Why object detection?
11:05 - What's the connection to energy-based models?
12:15 - Is a Gaussian mixture model appropriate for high-dimensional data?
16:15 - What are the most important components of the method?
18:30 - What are the downstream effects of the regularizer?
22:00 - Are there severe trade-offs to outlier detection?
23:55 - Main experimental takeaways?
26:10 - Why do outlier detection in the last layer?
30:20 - What does it take to finish a research projects successfully?

Paper: https://arxiv.org/abs/2202.01197
Code: https://github.com/deeplearning-wisc/vos

Abstract:
Out-of-distribution (OOD) detection has received much attention lately due to its importance in the safe deployment of neural networks. One of the key challenges is that models lack supervision signals from unknown data, and as a result, can produce overconfident predictions on OOD data. Previous approaches rely on real outlier datasets for model regularization, which can be costly and sometimes infeasible to obtain in practice. In this paper, we present VOS, a novel framework for OOD detection by adaptively synthesizing virtual outliers that can meaningfully regularize the model's decision boundary during training. Specifically, VOS samples virtual outliers from the low-likelihood region of the class-conditional distribution estimated in the feature space. Alongside, we introduce a novel unknown-aware training objective, which contrastively shapes the uncertainty space between the ID data and synthesized outlier data. VOS achieves state-of-the-art performance on both object detection and image classification models, reducing the FPR95 by up to 7.87% compared to the previous best method. Code is available at this https URL.

Authors: Xuefeng Du, Zhaoning Wang, Mu Cai, Yixuan Li

Links:
Merch: http://store.ykilcher.com
TabNine Code Completion (Referral): http://bit.ly/tabnine-yannick
YouTube: https://www.youtube.com/c/yannickilcher
Twitter: https://twitter.com/ykilcher
Discord: https://discord.gg/4H8xxDF
BitChute: https://www.bitchute.com/channel/yannic-kilcher
LinkedIn: https://www.linkedin.com/in/ykilcher
BiliBili: https://space.bilibili.com/2017636191

If you want to support me, the best thing to do is to share out the content :)

If you want to support me financially (completely optional and voluntary, but a lot of people have asked for this):
SubscribeStar: https://www.subscribestar.com/yannickilcher
Patreon: https://www.patreon.com/yannickilcher
Bitcoin (BTC): bc1q49lsw3q325tr58ygf8sudx2dqfguclvngvy2cq
Ethereum (ETH): 0x7ad3513E3B8f66799f507Aa7874b1B0eBC7F85e2
Litecoin (LTC): LQW2TRyKYetVC8WjFkhpPhtpbDM4Vw7r9m
Monero (XMR): 4ACL8AGrEo5hAir8A9CeVrW8pEauWvnp1WnSDZxW7tziCDLhZAGsgzhRQABDnFy8yuM9fWJDviJPHKRjV4FWt19CJZN9D4n
 Hello there, this is an interview with the authors of the paper, Learning What You Don't Know by Virtual Outlier Synthesis. This paper presents a method to create what it calls virtual outliers, which are synthetic out of distribution data points in the latent space of the model. And then it trains that model to successfully recognize these points as out of distribution. The paper performs very well on a wide variety of benchmarks. And I have actually made a comprehensive paper review in the last video about this paper. If you haven't checked that out, please do because I'll go over the paper, I'll explain everything that's in it. And the authors that I'm interviewing today have seen that review. So we all start from a common level, and they're directly able to respond to my criticisms, which is really, really cool. So in this interview, we go over a lot of topics, but mainly I get my questions answered, and we get a bit of a look at the behind the scenes of the research, how the research came about, what the authors were interested in, how they solved problems that came up in between, and much more. I hope you like these paper reviews plus interview things. Let me know how I can improve these videos for you by leaving a comment. Like if you do like the video, subscribe or tell someone to subscribe, and I'll see you around. Bye. Hi, everyone. Today, I'm here with Sharon Lee and Xie Feng Du, who are authors on the virtual Outlier Synthesis paper, and are joining me today discussing the paper and as well as my attempt at an explanation of it. Sharon, Xie Feng, welcome to the channel. Thank you for having us. Thank you. It's very cool to have you here. So you have made this paper, it has gathered, I think, a fair bit of attention in the community because outlier detection obviously is a big challenge, especially for security critical applications. And not only do you do outlier detection in classification where we usually see it, but in like sort of the more challenging task of object detection. So my first question would be, how did you even come up with this? Because it is not an obvious idea, let's say, to even tackle this problem. Like what made you tackle the problem in the first place? Yeah, thank you for the question. I'd be happy to share, I guess, from a little bit behind the scene on the research story, how it got started. And by the way, we're really encouraged to see the interest from the community about our work. And so personally, I really am driven to solve problems that are real, meaning that has some connection to the real world. And just like you said, I think out of distribution detection is one of those problems that really matter a lot in deploying machine learning models in the real world. And so sometimes when we're getting closer to this more realistic scenarios, that also means problems are getting harder and more complex. And this actually takes a trajectory to get there. It's actually reflected, I think, in how the field of OOD detection has evolved and unfolded over the years. And so if you look at some of the early research we've done, including some other researchers have done in the space, a very common way to evaluate how good the algorithms are based on the benchmark, which now seems quite artificial, like if you train a model on Cypher 10, and then you evaluate against data sets such as Street View housing number or SVHN. And so the seemingly simple task actually took a while for the research community to make progress on. I think over the years, we've definitely done a much better job developing algorithms to reduce the false positive rate. And so that's why we think we're at a better timing to start tackling some of the harder questions on the object detection side. And why object detection is very interesting and important, because that directly has a better connection. For example, if you think about self-driving cars, none of those images are simple as Cypher 10, which has a single object well centered around in the scene. In the real world, we are going to encounter inputs that have multiple objects in the scene. And some of those are in distribution, which means they have been exposed to the model during the training time, and some of those are not quite. And so I was really glad when Cypher went to join the lab as well to start tackling some of the questions. So that's when we started the project earlier, actually last year already, last spring semester, that's when we started. So you were already in the space of outlier detection, let's say in the broad space of solving these types of problems. And then what made you decide object detection? That's it. Did you run across a problem? Or is this just a natural continuation of the classification data sets? That's another great question. So why object detection? So one of the, like you said, I think one of the typical scenarios when we think about where outlier detection or out of distribution detection algorithms are being used in the real world is some of the high stakes scenarios like safety critical ones, for example, in self-driving. And that is kind of built on these object detection models where not only we have to perform classification, but at the same time being able to localize where the objects are. So I think in terms of motivation, that just seems like a very natural application focus to start with. And of course, we have been, like I said, we have been in the space for working on the problem I think since a couple years ago. And most of the work we've done in this space are on image classification. And so in terms of solution, I also wanted to share a little bit how we arrived at this virtual outlier synthesis. So I think the first motivation is pretty straightforward. We wanted to kind of go beyond image level OOD detection to have this finer grained uncertainty estimates that tells us at the object level whether things are in distribution or OOD. I think figure one in the paper is kind of a perfect illustration for why we need object level uncertainty, right? So as you explained quite eloquently in your video that, you know, this car is something the model has observed, which is in distribution object, right? Whereas this moose here is something that was not exposed to the model during training. And so this picture kind of highlights the complexity that an image can contain at the same time, both in distribution and OOD object. And therefore, we can't just derive an image level, you know, uncertainty measurement. We have to, you know, go finer grained at the object level. And so that was the first, you know, first, I would say the higher level motivation on the object detection side. And then on the solution side, I want to share a little bit on how we arrived at the virtual outlier synthesis. So the idea, the algorithmic idea of this paper is largely inspired by one of our previous papers on energy-based OOD detection, which was published at NURBS in 2020. And so in that paper, we focused on image classification setting. But from a learning algorithm perspective, we proposed this called energy regularized learning, which in a nutshell is trying to, oh, I see your cat there, just walking by. So in a nutshell, that learning framework tries to kind of tackle the problem of classification by not only minimizing the risks on the in-distribution data set, but at the same time, we're introducing a regularizer. And this regularizer has very similar spirit as what we're using here in this paper. And so this regularizer is trying to kind of minimizing the risk or trying to pushing the energy surface to be as distinguishable between known distribution versus unknown distribution. And so for the image classification setting, we used this technique or data set of outlier exposure, which relies on an external different data set. That's not overlapping with the in-distribution data set. So that's actually one of the requirement or limitation, if you call, in that learning framework. And that does not directly translate into the object detection setting anymore, because as you can imagine, in order to bring in an outlier data set for object detection, it's going to be tricky, because you have to annotate through tons of images to make sure that at the object level, things do not overlap with our training data. And so this data collection itself is a prohibitive process. And it can be very time-consuming and laborious and so on. And so that also kind of motivate us to think, well, if there is no external data we can rely on, is there any way we can devise some of the outlier data from the in-distribution data itself? So that's where this whole idea started really is to think further how we improve on top of the original learning framework that we had. And then that's how you gathered the ideas of synthesizing points that are not where the data is. Is there a connection to, I'm not sure how aware of, Jan LeCun has been pushing this energy-based learning a lot, sort of pushing energy up where data is, pushing energy down anywhere else. Do you see some sort of a connection to that? Absolutely. In fact, the work that I just mentioned on energy-based out-of-distribution detection that was published at New Earths 2020 was precisely inspired by this whole energy-based framework from Jan LeCun. By the way, the plural of moose is moose. I didn't know in my video. That's good to know. I figured it out. Not meese. Not meese. Yeah. So, I mean, it makes sense. And you've seen my explanation, right? And I think one of the criticisms a bit that I had was everything's pretty in this sort of 2D landscape where you can show here's the data and there's outside the data. But it gets very complicated once you go to higher dimensions. For example, you had the picture here when you mentioned we assume that the high-dimensional data are Gaussians. Obviously, your method works, right? I think your evaluation is very thorough. You measure on a lot of datasets against a lot of baselines and so on. So obviously, something works here. However, do you have some maybe some response to me, to someone who says, this does not convince me that a Gaussian mixture model is appropriate for this really high-dimensional data? Yeah, I actually like that question a lot. I wanted to maybe take a step back and first just to highlight one of the key, I guess the key insight and knowledge, which I like about this paper aside from the distributional assumption that we made here, is the fact that the virtual outlier synthesis is done in a feature space, right? As opposed to the original high-dimensional pixel space is already a much, much lower dimensionality. So what you see here, this synthesis is completely done in this later representation or sometimes we extract this from the penultimate layer of neural network. So some earlier works explored, so we're not the first to kind of try to synthesize outliers. But what we've done differently is to realize in order to regularize the neural network's decision boundary, we don't have to go all the way to the original pixel space where training a GAM model can be quite tricky and the convergence is going to be a challenging problem on its own. So that's one kind of step, which I think an important step that we've taken is to look into a lower dimensional latent space, which in some sense makes this problem more tractable compared to the original data space. And now coming to the second point, I think when it comes to modeling the density of the representation space, it's actually also a non-trivial problem, right? Density estimation on its own. I think it's a notoriously hard problem in machine learning. And so when we initially approached this problem, we kind of make this, I would say, you know, Gaussian mixture distribution is the most straightforward assumption kind of to make. And this first algorithm framework, I would say, you know, we kind of just wanted to show even under somewhat simplified assumption of representation space being Gaussian, you can still do this virtual outlier synthesis tractably and train things end to end. And from an empirical perspective, as you said, it actually works surprisingly well. But that doesn't mean this has to be the only solution to it. I think there are great opportunities that Voss really opens up to is how do we perform this synthesis in the feature space more creatively, right? When it comes to the method itself, you have this overview diagram right here. And I've attempted to explain this a little bit. Did you find my explanation satisfactory? Is there something missing? Is there emphasis in the wrong place? Or what would you add to so people really understand what's going on? I think you did a phenomenal job explaining this whole pipeline, perhaps in a clearer way if we were to have to present ourselves. One thing I wanted to maybe call out is this notion of, you know, this uncertainty loss, why we formulate this problem that way. So at a higher level, you can think of our learning framework as trying to do something more than the typical supervised learning, say training a model based on cross entropy loss. There's a bit of element in the synthesis part, which closer to this generative modeling and density estimation, which we've also talked about. And so the whole framework combines sort of both bits of supervised learning and also there is some density estimation involved as well. And I think one interesting bits in the learning methodology is how we leverage energy as an uncertainty measurement and to separate apart the known objects versus the unknown ones. And so it's somewhat a problem that's not quite as complex as trying to estimate exactly the pointwise density of p of x. But rather we're kind of picking back on a simpler problem of we just want this energy to be estimated as a level set that is sufficient enough to separate these two parts of data rather than getting every single point estimated correctly, if that makes sense. The uncertainty loss you describe somewhere here. And yeah, so I think I had this other comment where I said directly this loss sort of only affects sort of the classification layer. However, when you think about it, what you could do is you could simply take your Gaussian mixture model, right? And you could simply have your data point there. And you could say, well, if it's unlikely, it's out of distribution, right? I could simply map my inference data point and then evaluate it according to the Gaussian mixture model that I have at training time. And I say, well, it's low likelihood, it's out of distribution, gone, right? I wouldn't need all of this thing, which tells me that this loss does more than just, you know, modify the last layer bit. So there is a almost, is it fair to or is this correct my assumption that there is like this downstream effect on the entire model? How would you like intuitively adding a loss like this? What does it do to the whole feature extraction pipeline that leads to the latent space? Yeah, that's a great question. So perhaps to answer a bit more to that, do you mind scrolling up a little bit? I think we have perfect, yes, that posterior probability right there. So keep in mind this whole training is done in an end-to-end fashion, right? And then whenever we have an input object that goes into this network, we are optimizing for this loss. And this loss will be back propagated all the way, right, through this entire convolutional backbone in this object detector. And so this objective L uncertainty is trying to kind of separate apart in terms of this energy. We'll get to this interpretation of the energy later on. But at the very high level, it's trying to just push energy to be two sides. One is above zero, one is below zero, right? And if we look at this connection with respect to this posterior probability here, so we can interpret energy as this density function for that data point p of x, perhaps plugged in with some unknown factor that we don't know, right? And so this energy does not precisely capture this density just yet. But during this optimization process, we hope that through this propagation and minimizing this objective, that this whole training would converge to a point where the density could be more separable between the ID object and then the OID object. So that's the inherent connection between the uncertainty measurement to the density. So you sort of maybe reformulated a bit. You want to coerce the feature extractor almost to give you a space where you can be more certain about in distribution data, but then less certain about out of distribution data. So this is naturally a harder problem, right? If you go back to this, even in the two dimensional case, I mentioned this is like to separate three classes, I need three lines, right? But to separate three clusters of data from their surroundings, I need a very decision boundary that's shaped highly complex, high dimensional, right? And so on. What are the trade-offs here that I make? Are they severe or did you find this works without severely impacting my accuracy as such? What's sort of the, like, what do I give up when I employ this method? That's a great question. So I think there's natural trade-off would be to say if we employ this regularization, does that kind of hurt the performance, compromise the performance on the object detection side, right? And so we actually showed in the evaluation part in table one, if I recall correctly, that this whole learning framework actually achieves both quite effectively. I think it pretty much preserves the MAP. So that's on the rightmost column where we show the, on the original PASCO VOC and Berkeley deep drive task, how is that MAP changes. It's pretty much the same or similar as the vanilla FASTR CNN without adding our uncertainty regularizer. And so overall this learning from where it kind of provides an actual layer of safety net by pruning out some of the OOD object, but at the same time, if it's indeed an indistribution image it can do as well. When you maybe, when we're at the experiments, I did not go into that at all in my explanation. Is there things that you want to particularly highlight or what should a reader of your paper take away from the experiments other than you beat all the baselines, which I think we've come to expect a little bit from machine learning papers, but what should a reader take away as sort of conclusions from your experimental section? Totally. I like that question a lot. And I think part of the ablation in the paper is, I think it's quite interesting, going beyond table one. We actually did some of the ablations comparing two different synthesis strategy. And so I think table two is perhaps, table three as well. Table two is one of the interesting ones where we kind of try to contrast with, in terms of synthesize, we wanted to know whether this Gaussian-based sampling is the optimal one. There are works have done in the past, for example, directly using GaN to generate images. Or you could also do mix-up to have this interpolation in the pixel space as well. And then they're also utilizing noise. I think those are all kind of natural alternatives for our outlier synthesis approach. So I think this is one of the ablations I personally quite like. And I also want to call out the fact that there is one previous paper, I think they used these proposals with the large background probability as the negative samples to regularize the model. And that turns out to be also suboptimal compared to using BOSS. I've also, so you had this decision to, in the very last layer, introduce these virtual outliers. And I think in the video I observed something like, okay, that helps if the out of distribution data really looks different in the last layer. However, if I have out of distribution data, but that exhibits the same kind of low level features as in distribution data, that might not be the case in a vanilla network. Is this also, let's say, a weakness of your method? Or would you expect that your regularizer would automatically map these types of outliers to different, would construct the latent space such that they are different? Is it different? Yeah, for that question, perhaps I can defer to Shufun. I think Shufun has some good answer to that question. Oh, yeah. So, actually I want to answer this question from two perspectives. So first perspective, I think you were mentioning some, when a model actually encounters some near in distribution node objects. So how does the feature space functions to prevent the model to predict high confidence predictions? So basically, we can potentially adjust the sampling threshold in VOS to see whether we can create a tighter decision boundary in order to separate those in distribution objects and those OD objects. And in addition, I think near in distribution OD detection is essentially a very hard problem. And there's a couple of works exploring this direction, but they are totally in the classification setting. So perhaps we can explore how to combine VOS with those techniques in the future. So this is the first perspective. I think from the second perspective, I'm mentioning you're saying that can we look at different semantic spaces, like different layers of features. Actually I remember in the paper, actually in the appendix section, we have reported the OD detection performance using the layer rather than the panoply layer for our licensees. And actually, it seems like the performance is not as good as what we have if we use the panoply layer as the semantic space for VOS. So basically, I think the reason is that the later layers in the neural network might be more discriminative for classification. So those more discriminative layers may be better for OD detection and our licensees because those synthesized OD layers relies on the quality of those estimated covariance matrix and those mean embeddings for each in distribution class. So I think that may be the reason for why we choose to use the panoply layer for VOS. It makes sense. As you go earlier and earlier, the less you can probably describe the data using sort of this mixture model approach. So I think it makes sense. I was just wondering. And even I think it's important to remember that we're still in high dimensions. And with being in high dimensions, it means that even if some of the features are the same, the moose will have four legs and so on, it will kind of look like a dog, but not fully. So you'd still expect this in these high dimensions to be separated. So maybe a bit to the research process. You thought of this, you thought you're going to tackle this problem and so on. Could you maybe share a bit of how the process, I think it's always, you just see the paper at the end and the paper is like, oh, wow, you have some examples here. I didn't even, I think, show them much in the video. So here you have comparisons at the bottom, everything that's green is detected as out of distribution, which is really nice. The helicopter, I think, was the most one of the most shared pictures of your paper. This looks really nice, right? I think what people don't see much is the process behind it. Like, could you describe it a little bit? Was there a time when you thought this wouldn't work or doesn't work or you don't know how to go further? How was it like to achieve at a system or arrive at a system that finally works really well? Oh, totally. I'd be happy to speak on that. Perhaps Rufun can add on later as well. I think just like many other research process, nothing works out of the box immediately, right? I think part of the research, the fun is really kind of going through the process of figuring out a lot of intermediate obstacles. And so to give you some example, right, some of the challenges, I think, really, Rufun did a lot of hard work in the process. Just when we started the exploration, the first challenge we have to overcome is what's the right evaluation, right? How do we get this correct evaluation benchmark? Because a lot of the previous work focused on image classification that's more or less well established. And in order to evaluate this new setting, we have to actually gather and clean all of these, for example, OOD test images as well. So that's some of the things you just have to kind of go through during the research process. And I think on the methodology side, there are also the challenges as well. So one thing I want to share is there's actually one hyperparameter in VOS, which is, I think, called the starting epoch, which is when you start adding this regularizer. And so it turns out if you just train this whole entire loss with the object detection plus the LL uncertainty from the start, things are not converging as well. So why is that? Because at the beginning of the training, the representation is not quite well formed yet. And so therefore, estimating this density in the latent space is not also very reliable and not to mention the sampling part. And so that's where we kind of got a little bit stuck on is the performance. If you train from scratch, it's not really as desirable. And so later on, we figured out why don't we wait until the representation becomes more formed. So this idea of starting in a later training process helped resolve this issue. And so that's another example. But how did you get this idea? Did you have some indication from some metrics that you logged? Or did you just sit there and just try 10 different things and this one was the one that worked? Or I imagine you sit there, you try it and stuff doesn't converge. It's just like, well, it doesn't work. What can lead you to come up with the correct solution? I think for this one, perhaps it's more natural because if you think about how the method works, it has to rely on some embedding space that has a somewhat clear structure that you can perform density estimation and then sample from. And so when things kind of doesn't work out, we look at what are the kind of possible major reflux that could happen. This one would be the kind of the top one we are diagnosing into. Excellent. Yeah, I think that's a pretty neat overview. Is there something else that you'd like to share about this? Anything that we haven't touched on maybe? Anything that you want to specifically highlight? Yeah, I think I've talked a lot. Xufeng, do you want to add anything that you particularly wanted to add on to? I think I don't have any further comments. Sharon has covered comprehensively about this paper. Your code is online, right? So people can go, can get into it, can experiment with it. Yeah, I think that's pretty neat. Yeah. And with that, Sharon, Xufeng, thank you very much for being here. And this was very enjoyable. Yeah. Thank you so much for having us again. It's been fun, you know, chatting about the work and so on. Thanks for inviting us. Thank you.
 Hello there, this is an interview with the authors of the paper, Learning What You Don't
 Know by Virtual Outlier Synthesis.
 This paper presents a method to create what it calls virtual outliers, which are synthetic
 out of distribution data points in the latent space of the model.
 And then it trains that model to successfully recognize these points as out of distribution.
 The paper performs very well on a wide variety of benchmarks.
 And I have actually made a comprehensive paper review in the last video about this paper.
 If you haven't checked that out, please do because I'll go over the paper, I'll explain
 everything that's in it.
 And the authors that I'm interviewing today have seen that review.
 So we all start from a common level, and they're directly able to respond to my criticisms,
 which is really, really cool.
 So in this interview, we go over a lot of topics, but mainly I get my questions answered,
 and we get a bit of a look at the behind the scenes of the research, how the research came
 about, what the authors were interested in, how they solved problems that came up in between,
 and much more.
 I hope you like these paper reviews plus interview things.
 Let me know how I can improve these videos for you by leaving a comment.
 Like if you do like the video, subscribe or tell someone to subscribe, and I'll see you
 around.
 Bye.
 Hi, everyone.
 Today, I'm here with Sharon Lee and Xie Feng Du, who are authors on the virtual Outlier
 Synthesis paper, and are joining me today discussing the paper and as well as my attempt
 at an explanation of it.
 Sharon, Xie Feng, welcome to the channel.
 Thank you for having us.
 Thank you.
 It's very cool to have you here.
 So you have made this paper, it has gathered, I think, a fair bit of attention in the community
 because outlier detection obviously is a big challenge, especially for security critical
 applications.
 And not only do you do outlier detection in classification where we usually see it, but
 in like sort of the more challenging task of object detection.
 So my first question would be, how did you even come up with this?
 Because it is not an obvious idea, let's say, to even tackle this problem.
 Like what made you tackle the problem in the first place?
 Yeah, thank you for the question.
 I'd be happy to share, I guess, from a little bit behind the scene on the research story,
 how it got started.
 And by the way, we're really encouraged to see the interest from the community about
 our work.
 And so personally, I really am driven to solve problems that are real, meaning that has some
 connection to the real world.
 And just like you said, I think out of distribution detection is one of those problems that really
 matter a lot in deploying machine learning models in the real world.
 And so sometimes when we're getting closer to this more realistic scenarios, that also
 means problems are getting harder and more complex.
 And this actually takes a trajectory to get there.
 It's actually reflected, I think, in how the field of OOD detection has evolved and unfolded
 over the years.
 And so if you look at some of the early research we've done, including some other researchers
 have done in the space, a very common way to evaluate how good the algorithms are based
 on the benchmark, which now seems quite artificial, like if you train a model on Cypher 10, and
 then you evaluate against data sets such as Street View housing number or SVHN.
 And so the seemingly simple task actually took a while for the research community to
 make progress on.
 I think over the years, we've definitely done a much better job developing algorithms to
 reduce the false positive rate.
 And so that's why we think we're at a better timing to start tackling some of the harder
 questions on the object detection side.
 And why object detection is very interesting and important, because that directly has a
 better connection.
 For example, if you think about self-driving cars, none of those images are simple as Cypher
 10, which has a single object well centered around in the scene.
 In the real world, we are going to encounter inputs that have multiple objects in the scene.
 And some of those are in distribution, which means they have been exposed to the model
 during the training time, and some of those are not quite.
 And so I was really glad when Cypher went to join the lab as well to start tackling
 some of the questions.
 So that's when we started the project earlier, actually last year already, last spring semester,
 that's when we started.
 So you were already in the space of outlier detection, let's say in the broad space of
 solving these types of problems.
 And then what made you decide object detection?
 That's it.
 Did you run across a problem?
 Or is this just a natural continuation of the classification data sets?
 That's another great question.
 So why object detection?
 So one of the, like you said, I think one of the typical scenarios when we think about
 where outlier detection or out of distribution detection algorithms are being used in the
 real world is some of the high stakes scenarios like safety critical ones, for example, in
 self-driving.
 And that is kind of built on these object detection models where not only we have to
 perform classification, but at the same time being able to localize where the objects are.
 So I think in terms of motivation, that just seems like a very natural application focus
 to start with.
 And of course, we have been, like I said, we have been in the space for working on the
 problem I think since a couple years ago.
 And most of the work we've done in this space are on image classification.
 And so in terms of solution, I also wanted to share a little bit how we arrived at this
 virtual outlier synthesis.
 So I think the first motivation is pretty straightforward.
 We wanted to kind of go beyond image level OOD detection to have this finer grained uncertainty
 estimates that tells us at the object level whether things are in distribution or OOD.
 I think figure one in the paper is kind of a perfect illustration for why we need object
 level uncertainty, right?
 So as you explained quite eloquently in your video that, you know, this car is something
 the model has observed, which is in distribution object, right?
 Whereas this moose here is something that was not exposed to the model during training.
 And so this picture kind of highlights the complexity that an image can contain at the
 same time, both in distribution and OOD object.
 And therefore, we can't just derive an image level, you know, uncertainty measurement.
 We have to, you know, go finer grained at the object level.
 And so that was the first, you know, first, I would say the higher level motivation on
 the object detection side.
 And then on the solution side, I want to share a little bit on how we arrived at the virtual
 outlier synthesis.
 So the idea, the algorithmic idea of this paper is largely inspired by one of our previous
 papers on energy-based OOD detection, which was published at NURBS in 2020.
 And so in that paper, we focused on image classification setting.
 But from a learning algorithm perspective, we proposed this called energy regularized
 learning, which in a nutshell is trying to, oh, I see your cat there, just walking by.
 So in a nutshell, that learning framework tries to kind of tackle the problem of classification
 by not only minimizing the risks on the in-distribution data set, but at the same time, we're introducing
 a regularizer.
 And this regularizer has very similar spirit as what we're using here in this paper.
 And so this regularizer is trying to kind of minimizing the risk or trying to pushing
 the energy surface to be as distinguishable between known distribution versus unknown
 distribution.
 And so for the image classification setting, we used this technique or data set of outlier
 exposure, which relies on an external different data set.
 That's not overlapping with the in-distribution data set.
 So that's actually one of the requirement or limitation, if you call, in that learning
 framework.
 And that does not directly translate into the object detection setting anymore, because
 as you can imagine, in order to bring in an outlier data set for object detection, it's
 going to be tricky, because you have to annotate through tons of images to make sure that at
 the object level, things do not overlap with our training data.
 And so this data collection itself is a prohibitive process.
 And it can be very time-consuming and laborious and so on.
 And so that also kind of motivate us to think, well, if there is no external data we can
 rely on, is there any way we can devise some of the outlier data from the in-distribution
 data itself?
 So that's where this whole idea started really is to think further how we improve on top
 of the original learning framework that we had.
 And then that's how you gathered the ideas of synthesizing points that are not where
 the data is.
 Is there a connection to, I'm not sure how aware of, Jan LeCun has been pushing this
 energy-based learning a lot, sort of pushing energy up where data is, pushing energy down
 anywhere else.
 Do you see some sort of a connection to that?
 Absolutely.
 In fact, the work that I just mentioned on energy-based out-of-distribution detection
 that was published at New Earths 2020 was precisely inspired by this whole energy-based
 framework from Jan LeCun.
 By the way, the plural of moose is moose.
 I didn't know in my video.
 That's good to know.
 I figured it out.
 Not meese.
 Not meese.
 Yeah.
 So, I mean, it makes sense.
 And you've seen my explanation, right?
 And I think one of the criticisms a bit that I had was everything's pretty in this sort
 of 2D landscape where you can show here's the data and there's outside the data.
 But it gets very complicated once you go to higher dimensions.
 For example, you had the picture here when you mentioned we assume that the high-dimensional
 data are Gaussians.
 Obviously, your method works, right?
 I think your evaluation is very thorough.
 You measure on a lot of datasets against a lot of baselines and so on.
 So obviously, something works here.
 However, do you have some maybe some response to me, to someone who says, this does not
 convince me that a Gaussian mixture model is appropriate for this really high-dimensional
 data?
 Yeah, I actually like that question a lot.
 I wanted to maybe take a step back and first just to highlight one of the key, I guess
 the key insight and knowledge, which I like about this paper aside from the distributional
 assumption that we made here, is the fact that the virtual outlier synthesis is done
 in a feature space, right?
 As opposed to the original high-dimensional pixel space is already a much, much lower
 dimensionality.
 So what you see here, this synthesis is completely done in this later representation or sometimes
 we extract this from the penultimate layer of neural network.
 So some earlier works explored, so we're not the first to kind of try to synthesize outliers.
 But what we've done differently is to realize in order to regularize the neural network's
 decision boundary, we don't have to go all the way to the original pixel space where
 training a GAM model can be quite tricky and the convergence is going to be a challenging
 problem on its own.
 So that's one kind of step, which I think an important step that we've taken is to
 look into a lower dimensional latent space, which in some sense makes this problem more
 tractable compared to the original data space.
 And now coming to the second point, I think when it comes to modeling the density of the
 representation space, it's actually also a non-trivial problem, right?
 Density estimation on its own.
 I think it's a notoriously hard problem in machine learning.
 And so when we initially approached this problem, we kind of make this, I would say, you know,
 Gaussian mixture distribution is the most straightforward assumption kind of to make.
 And this first algorithm framework, I would say, you know, we kind of just wanted to show
 even under somewhat simplified assumption of representation space being Gaussian, you
 can still do this virtual outlier synthesis tractably and train things end to end.
 And from an empirical perspective, as you said, it actually works surprisingly well.
 But that doesn't mean this has to be the only solution to it.
 I think there are great opportunities that Voss really opens up to is how do we perform
 this synthesis in the feature space more creatively, right?
 When it comes to the method itself, you have this overview diagram right here.
 And I've attempted to explain this a little bit.
 Did you find my explanation satisfactory?
 Is there something missing?
 Is there emphasis in the wrong place?
 Or what would you add to so people really understand what's going on?
 I think you did a phenomenal job explaining this whole pipeline, perhaps in a clearer
 way if we were to have to present ourselves.
 One thing I wanted to maybe call out is this notion of, you know, this uncertainty loss,
 why we formulate this problem that way.
 So at a higher level, you can think of our learning framework as trying to do something
 more than the typical supervised learning, say training a model based on cross entropy
 loss.
 There's a bit of element in the synthesis part, which closer to this generative modeling
 and density estimation, which we've also talked about.
 And so the whole framework combines sort of both bits of supervised learning and also
 there is some density estimation involved as well.
 And I think one interesting bits in the learning methodology is how we leverage energy as an
 uncertainty measurement and to separate apart the known objects versus the unknown ones.
 And so it's somewhat a problem that's not quite as complex as trying to estimate exactly
 the pointwise density of p of x.
 But rather we're kind of picking back on a simpler problem of we just want this energy
 to be estimated as a level set that is sufficient enough to separate these two parts of data
 rather than getting every single point estimated correctly, if that makes sense.
 The uncertainty loss you describe somewhere here.
 And yeah, so I think I had this other comment where I said directly this loss sort of only
 affects sort of the classification layer.
 However, when you think about it, what you could do is you could simply take your Gaussian
 mixture model, right?
 And you could simply have your data point there.
 And you could say, well, if it's unlikely, it's out of distribution, right?
 I could simply map my inference data point and then evaluate it according to the Gaussian
 mixture model that I have at training time.
 And I say, well, it's low likelihood, it's out of distribution, gone, right?
 I wouldn't need all of this thing, which tells me that this loss does more than just, you
 know, modify the last layer bit.
 So there is a almost, is it fair to or is this correct my assumption that there is like
 this downstream effect on the entire model?
 How would you like intuitively adding a loss like this?
 What does it do to the whole feature extraction pipeline that leads to the latent space?
 Yeah, that's a great question.
 So perhaps to answer a bit more to that, do you mind scrolling up a little bit?
 I think we have perfect, yes, that posterior probability right there.
 So keep in mind this whole training is done in an end-to-end fashion, right?
 And then whenever we have an input object that goes into this network, we are optimizing
 for this loss.
 And this loss will be back propagated all the way, right, through this entire convolutional
 backbone in this object detector.
 And so this objective L uncertainty is trying to kind of separate apart in terms of this
 energy.
 We'll get to this interpretation of the energy later on.
 But at the very high level, it's trying to just push energy to be two sides.
 One is above zero, one is below zero, right?
 And if we look at this connection with respect to this posterior probability here, so we
 can interpret energy as this density function for that data point p of x, perhaps plugged
 in with some unknown factor that we don't know, right?
 And so this energy does not precisely capture this density just yet.
 But during this optimization process, we hope that through this propagation and minimizing
 this objective, that this whole training would converge to a point where the density could
 be more separable between the ID object and then the OID object.
 So that's the inherent connection between the uncertainty measurement to the density.
 So you sort of maybe reformulated a bit.
 You want to coerce the feature extractor almost to give you a space where you can be more
 certain about in distribution data, but then less certain about out of distribution data.
 So this is naturally a harder problem, right?
 If you go back to this, even in the two dimensional case, I mentioned this is like to separate
 three classes, I need three lines, right?
 But to separate three clusters of data from their surroundings, I need a very decision
 boundary that's shaped highly complex, high dimensional, right?
 And so on.
 What are the trade-offs here that I make?
 Are they severe or did you find this works without severely impacting my accuracy as
 such?
 What's sort of the, like, what do I give up when I employ this method?
 That's a great question.
 So I think there's natural trade-off would be to say if we employ this regularization,
 does that kind of hurt the performance, compromise the performance on the object detection side,
 right?
 And so we actually showed in the evaluation part in table one, if I recall correctly,
 that this whole learning framework actually achieves both quite effectively.
 I think it pretty much preserves the MAP.
 So that's on the rightmost column where we show the, on the original PASCO VOC and Berkeley
 deep drive task, how is that MAP changes.
 It's pretty much the same or similar as the vanilla FASTR CNN without adding our uncertainty
 regularizer.
 And so overall this learning from where it kind of provides an actual layer of safety
 net by pruning out some of the OOD object, but at the same time, if it's indeed an indistribution
 image it can do as well.
 When you maybe, when we're at the experiments, I did not go into that at all in my explanation.
 Is there things that you want to particularly highlight or what should a reader of your
 paper take away from the experiments other than you beat all the baselines, which I think
 we've come to expect a little bit from machine learning papers, but what should a reader
 take away as sort of conclusions from your experimental section?
 Totally.
 I like that question a lot.
 And I think part of the ablation in the paper is, I think it's quite interesting, going
 beyond table one.
 We actually did some of the ablations comparing two different synthesis strategy.
 And so I think table two is perhaps, table three as well.
 Table two is one of the interesting ones where we kind of try to contrast with, in terms
 of synthesize, we wanted to know whether this Gaussian-based sampling is the optimal one.
 There are works have done in the past, for example, directly using GaN to generate images.
 Or you could also do mix-up to have this interpolation in the pixel space as well.
 And then they're also utilizing noise.
 I think those are all kind of natural alternatives for our outlier synthesis approach.
 So I think this is one of the ablations I personally quite like.
 And I also want to call out the fact that there is one previous paper, I think they
 used these proposals with the large background probability as the negative samples to regularize
 the model.
 And that turns out to be also suboptimal compared to using BOSS.
 I've also, so you had this decision to, in the very last layer, introduce these virtual
 outliers.
 And I think in the video I observed something like, okay, that helps if the out of distribution
 data really looks different in the last layer.
 However, if I have out of distribution data, but that exhibits the same kind of low level
 features as in distribution data, that might not be the case in a vanilla network.
 Is this also, let's say, a weakness of your method?
 Or would you expect that your regularizer would automatically map these types of outliers
 to different, would construct the latent space such that they are different?
 Is it different?
 Yeah, for that question, perhaps I can defer to Shufun.
 I think Shufun has some good answer to that question.
 Oh, yeah.
 So, actually I want to answer this question from two perspectives.
 So first perspective, I think you were mentioning some, when a model actually encounters some
 near in distribution node objects.
 So how does the feature space functions to prevent the model to predict high confidence
 predictions?
 So basically, we can potentially adjust the sampling threshold in VOS to see whether we
 can create a tighter decision boundary in order to separate those in distribution objects
 and those OD objects.
 And in addition, I think near in distribution OD detection is essentially a very hard problem.
 And there's a couple of works exploring this direction, but they are totally in the classification
 setting.
 So perhaps we can explore how to combine VOS with those techniques in the future.
 So this is the first perspective.
 I think from the second perspective, I'm mentioning you're saying that can we look at different
 semantic spaces, like different layers of features.
 Actually I remember in the paper, actually in the appendix section, we have reported
 the OD detection performance using the layer rather than the panoply layer for our licensees.
 And actually, it seems like the performance is not as good as what we have if we use the
 panoply layer as the semantic space for VOS.
 So basically, I think the reason is that the later layers in the neural network might be
 more discriminative for classification.
 So those more discriminative layers may be better for OD detection and our licensees
 because those synthesized OD layers relies on the quality of those estimated covariance
 matrix and those mean embeddings for each in distribution class.
 So I think that may be the reason for why we choose to use the panoply layer for VOS.
 It makes sense.
 As you go earlier and earlier, the less you can probably describe the data using sort
 of this mixture model approach.
 So I think it makes sense.
 I was just wondering.
 And even I think it's important to remember that we're still in high dimensions.
 And with being in high dimensions, it means that even if some of the features are the
 same, the moose will have four legs and so on, it will kind of look like a dog, but not
 fully.
 So you'd still expect this in these high dimensions to be separated.
 So maybe a bit to the research process.
 You thought of this, you thought you're going to tackle this problem and so on.
 Could you maybe share a bit of how the process, I think it's always, you just see the paper
 at the end and the paper is like, oh, wow, you have some examples here.
 I didn't even, I think, show them much in the video.
 So here you have comparisons at the bottom, everything that's green is detected as out
 of distribution, which is really nice.
 The helicopter, I think, was the most one of the most shared pictures of your paper.
 This looks really nice, right?
 I think what people don't see much is the process behind it.
 Like, could you describe it a little bit?
 Was there a time when you thought this wouldn't work or doesn't work or you don't know how
 to go further?
 How was it like to achieve at a system or arrive at a system that finally works really
 well?
 Oh, totally.
 I'd be happy to speak on that.
 Perhaps Rufun can add on later as well.
 I think just like many other research process, nothing works out of the box immediately,
 right?
 I think part of the research, the fun is really kind of going through the process of figuring
 out a lot of intermediate obstacles.
 And so to give you some example, right, some of the challenges, I think, really, Rufun
 did a lot of hard work in the process.
 Just when we started the exploration, the first challenge we have to overcome is what's
 the right evaluation, right?
 How do we get this correct evaluation benchmark?
 Because a lot of the previous work focused on image classification that's more or less
 well established.
 And in order to evaluate this new setting, we have to actually gather and clean all of
 these, for example, OOD test images as well.
 So that's some of the things you just have to kind of go through during the research
 process.
 And I think on the methodology side, there are also the challenges as well.
 So one thing I want to share is there's actually one hyperparameter in VOS, which is, I think,
 called the starting epoch, which is when you start adding this regularizer.
 And so it turns out if you just train this whole entire loss with the object detection
 plus the LL uncertainty from the start, things are not converging as well.
 So why is that?
 Because at the beginning of the training, the representation is not quite well formed
 yet.
 And so therefore, estimating this density in the latent space is not also very reliable
 and not to mention the sampling part.
 And so that's where we kind of got a little bit stuck on is the performance.
 If you train from scratch, it's not really as desirable.
 And so later on, we figured out why don't we wait until the representation becomes more
 formed.
 So this idea of starting in a later training process helped resolve this issue.
 And so that's another example.
 But how did you get this idea?
 Did you have some indication from some metrics that you logged?
 Or did you just sit there and just try 10 different things and this one was the one
 that worked?
 Or I imagine you sit there, you try it and stuff doesn't converge.
 It's just like, well, it doesn't work.
 What can lead you to come up with the correct solution?
 I think for this one, perhaps it's more natural because if you think about how the method
 works, it has to rely on some embedding space that has a somewhat clear structure that you
 can perform density estimation and then sample from.
 And so when things kind of doesn't work out, we look at what are the kind of possible major
 reflux that could happen.
 This one would be the kind of the top one we are diagnosing into.
 Excellent.
 Yeah, I think that's a pretty neat overview.
 Is there something else that you'd like to share about this?
 Anything that we haven't touched on maybe?
 Anything that you want to specifically highlight?
 Yeah, I think I've talked a lot.
 Xufeng, do you want to add anything that you particularly wanted to add on to?
 I think I don't have any further comments.
 Sharon has covered comprehensively about this paper.
 Your code is online, right?
 So people can go, can get into it, can experiment with it.
 Yeah, I think that's pretty neat.
 Yeah.
 And with that, Sharon, Xufeng, thank you very much for being here.
 And this was very enjoyable.
 Yeah.
 Thank you so much for having us again.
 It's been fun, you know, chatting about the work and so on.
 Thanks for inviting us.
 Thank you.