100K Subs AMA (Ask Me Anything)

Euclidean geometry continuous flat spaces and so on and therefore yeah I'm a big fan


100K Subs AMA (Ask Me Anything)

how much of group theory should be known for entering geometric deep learning again it's


100K Subs AMA (Ask Me Anything)

I would I would I would recommend you go read the machine learning papers and then you see


100K Subs AMA (Ask Me Anything)

what math is required to understand it and then you go read the math rather than trying


100K Subs AMA (Ask Me Anything)

to go learn all about the math before enter a machine learning field that's probably more


100K Subs AMA (Ask Me Anything)

efficient have you been in Greece hmm probably probably as a kid probably I've been a long


100K Subs AMA (Ask Me Anything)

time follower thank you for a contribution thank you for being a follower Mike in your


100K Subs AMA (Ask Me Anything)

opinion what do you think the next big thing deep learning will be yeah if I knew right


100K Subs AMA (Ask Me Anything)

I have I haven't I've no idea I can only speculate as as much as all other people can speculate


100K Subs AMA (Ask Me Anything)

who can tell what the neck next if we knew we do it right so it's probably going to be


100K Subs AMA (Ask Me Anything)

something rather rather unexpected meh meh I have no idea like there are many people


100K Subs AMA (Ask Me Anything)

who tell you they know but I'm not I don't I don't believe them don't want to be a professor


100K Subs AMA (Ask Me Anything)

but love researching should I go for a PhD yes I mean you know whatever whatever is enjoyable


100K Subs AMA (Ask Me Anything)

to you I think this is just my personal opinion I think people optimize too much for a career


100K Subs AMA (Ask Me Anything)

the people go like oh I need to do I need to do this masters and then need to do the


100K Subs AMA (Ask Me Anything)

PhD because then I will do this and this you know life changes and plans change and your


100K Subs AMA (Ask Me Anything)

interests change and so on so I think you're unless you have an extremely clear plan since


100K Subs AMA (Ask Me Anything)

you're five years old you're probably better off just doing whatever you're interested


100K Subs AMA (Ask Me Anything)

in should have a bit of foresight and so on but if you're thinking should I do a PhD or


100K Subs AMA (Ask Me Anything)

not if you like research if you like the PhD life I can tell you it's sometimes stressful


100K Subs AMA (Ask Me Anything)

it's rather alone so it's not like you work in as tight teams as an industry and if you


100K Subs AMA (Ask Me Anything)

find a good advisor that you know you click with certainly that might be something for


100K Subs AMA (Ask Me Anything)

you but also industry has has appeals and there are positions in industry where you


100K Subs AMA (Ask Me Anything)

can still do quite a bit into the researchy direction you think consciousness in AI will


100K Subs AMA (Ask Me Anything)

occur in our lifetime how would you how would you know right like if you propose it if you


100K Subs AMA (Ask Me Anything)

like we need a better test probably for consciousness it would be surprising given that we don't


100K Subs AMA (Ask Me Anything)

even understand our own consciousness like intelligence is probably easier than consciousness


100K Subs AMA (Ask Me Anything)

no because intelligence you know we sort of measure intelligence with oh which tasks can


100K Subs AMA (Ask Me Anything)

you solve how fast can you solve these like tasks or new tasks how much can you transfer


100K Subs AMA (Ask Me Anything)

knowledge how much data do you need for new tasks and so on consciousness we don't even


100K Subs AMA (Ask Me Anything)

have a clue how to measure it right yeah why is self-driving so much behind in Europe is


100K Subs AMA (Ask Me Anything)

it I don't know I don't know whether it is probably because Europeans generally are not


100K Subs AMA (Ask Me Anything)

as risky there is also probably more regulations such that it the outlook of developing a working


100K Subs AMA (Ask Me Anything)

self-driving system isn't as bright as in other places because say you develop one you


100K Subs AMA (Ask Me Anything)

would have to probably develop it to a higher safety standard than in other places and once


100K Subs AMA (Ask Me Anything)

you have it at that standard you it would take a lot longer for the society to sort


100K Subs AMA (Ask Me Anything)

of to sort of match up with what you're doing right I'm gonna go for like 10 more minutes


100K Subs AMA (Ask Me Anything)

or so if that's if that's fine what's next for the channel what will take you to one


100K Subs AMA (Ask Me Anything)

million I don't honestly like I'm not I'm not I'm not I don't plan on on on on how shall


100K Subs AMA (Ask Me Anything)

I say stopping or anything like I am doubtful that will reach a million I'd be super happy


100K Subs AMA (Ask Me Anything)

if that happens I'm I'm also pretty happy if it just stays at the at the if it stays


100K Subs AMA (Ask Me Anything)

at the size it is or if it grows as it has grown now this is this is fine I enjoy this


100K Subs AMA (Ask Me Anything)

independent of how many people are are watching or how how big it becomes how often did you


100K Subs AMA (Ask Me Anything)

think of quitting your PhD quite quite a number of times I think that's a common experience


100K Subs AMA (Ask Me Anything)

though and and then you think like well what else should I do you continue can you please


100K Subs AMA (Ask Me Anything)

tell me the roadmap to learn deep learning in two weeks that's a good question hmm I


100K Subs AMA (Ask Me Anything)

have no I have no idea do I probably do do a bunch of tutorials in in computer vision


100K Subs AMA (Ask Me Anything)

and in NLP in reinforcement learning if you're if you're fast and pick up stuff fast and


100K Subs AMA (Ask Me Anything)

you'll see sort of the principles what's your view on the machine learning job market in


100K Subs AMA (Ask Me Anything)

Zurich out of Google is it really mostly the I finance reporting disguised as a mouth probably


100K Subs AMA (Ask Me Anything)

I have never had to apply in Zurich though I am now an employer so I would be interested


100K Subs AMA (Ask Me Anything)

in that in the answer to that question as well how do you organize your machine learning


100K Subs AMA (Ask Me Anything)

projects I don't I'm a mess are you a believer in in what how much can you bench I don't


100K Subs AMA (Ask Me Anything)

know probably 60 kilos or so I'm not not too good at benching is Jax a good framework to


100K Subs AMA (Ask Me Anything)

start learning deep learning sure I think Jax is is doing fine yeah sorry is pics to


100K Subs AMA (Ask Me Anything)

pics or pics to pics HD still the best approach for this tasks are there new approaches I


100K Subs AMA (Ask Me Anything)

don't know I've I've lost the overview over what's best like what what is best in papers


100K Subs AMA (Ask Me Anything)

and leaderboards is often not what's actually best in practice you you just need to try


100K Subs AMA (Ask Me Anything)

out stuff see what other people are doing and that's probably the only way you figure


100K Subs AMA (Ask Me Anything)

out what's really best and not necessarily from papers so like papers can give you ideas


100K Subs AMA (Ask Me Anything)

and and new methods to try out but it still comes down to you just apply things to your


100K Subs AMA (Ask Me Anything)

problem and see what is best consciousness prior versus general intelligence which one


100K Subs AMA (Ask Me Anything)

do you think is more plausible and achievable I get depends I don't know it depends again


100K Subs AMA (Ask Me Anything)

on your specifications of what these what these things mean I am like certainly you


100K Subs AMA (Ask Me Anything)

need some sort of prior built in or not you need but if you do you probably make your


100K Subs AMA (Ask Me Anything)

life a lot easier learning stuff so I'm not opposed to not opposed to building in priors


100K Subs AMA (Ask Me Anything)

especially also given that the priors you as a human have aren't perfect right so that


100K Subs AMA (Ask Me Anything)

already signals you that you don't necessarily need perfect priors in order to in order to


100K Subs AMA (Ask Me Anything)

be able to to to to build a system that at least displays human level intelligence so


100K Subs AMA (Ask Me Anything)

yeah most interesting application of AI for good I don't is there is that a like is that


100K Subs AMA (Ask Me Anything)

a specific thing AI for for good or is it just the concept of using AI for good I'm


100K Subs AMA (Ask Me Anything)

not sure yeah what would you advise to teenagers really interested in AGI or deep learning


100K Subs AMA (Ask Me Anything)

research well I don't I don't necessarily think it's relevant that you're a teenager


100K Subs AMA (Ask Me Anything)

learn anyone interested probably learn to learn to program and then just dive into stuff


100K Subs AMA (Ask Me Anything)

it's probably most interesting to dive into applications and try to code something yourself


100K Subs AMA (Ask Me Anything)

try to understand other people's code and from there you can go more a little bit into


100K Subs AMA (Ask Me Anything)

the theory what's behind it the most underrated skill in ML what do I know I don't know experience


100K Subs AMA (Ask Me Anything)

probably or maybe nowadays the most underrated skills is knowing how to use random forest


100K Subs AMA (Ask Me Anything)

and an XG boost and things like this it's it's it's probably still still a lot of problems


100K Subs AMA (Ask Me Anything)

can be solved using those things favorite and least favorite depiction of AI and ML


100K Subs AMA (Ask Me Anything)

in fiction I've I don't know that's that's up to the up to the fiction I don't have particular


100K Subs AMA (Ask Me Anything)

not too much into fiction yeah what's your startup about it's legal tech it's just processing


100K Subs AMA (Ask Me Anything)

legal documents is transformer in general better than a CNN no in in general it's it's


100K Subs AMA (Ask Me Anything)

not better in general both have their strengths and weaknesses can someone buy shares of your


100K Subs AMA (Ask Me Anything)

company not publicly but if you're not opposed to shady backroom deals then you know all


100K Subs AMA (Ask Me Anything)

up for it have you ever fudged numbers for a paper no but what what you what you do is


100K Subs AMA (Ask Me Anything)

you just try until you get the number you want right you change you change your method


100K Subs AMA (Ask Me Anything)

a bit you and so on which is you know I mean that's research you ultimately try to get


100K Subs AMA (Ask Me Anything)

your stuff to work but there's definitely an element where you put more work into your


100K Subs AMA (Ask Me Anything)

into optimizing your method than the baselines so and that's just what everyone does internships


100K Subs AMA (Ask Me Anything)

during PhD good thing yeah definitely cool can recommend tabs are illegal according to


100K Subs AMA (Ask Me Anything)

pep 8 wow I didn't know I don't I don't like tabs just personal opinion just make your


100K Subs AMA (Ask Me Anything)

editor do spaces instead of like I use the tab key but make your editor convert it to


100K Subs AMA (Ask Me Anything)

spaces what are your favorite non ML books and I don't really I don't really have it


100K Subs AMA (Ask Me Anything)

also it changes I yeah our ML research papers overrated I mean some are in some a lot of


100K Subs AMA (Ask Me Anything)

probably a lot are probably underrated so how many papers do you read per day I like


100K Subs AMA (Ask Me Anything)

however many however many come across come in front of me really read one not super many


100K Subs AMA (Ask Me Anything)

but skim I skim a lot to see if I'm interested four spaces are two spaces I don't I don't


100K Subs AMA (Ask Me Anything)

know I think I've set my Python to four and my ECMAScript to two yeah are you scared of


100K Subs AMA (Ask Me Anything)

Google sure in in some way I'm I'm scared of Google I was scared of Google physical


100K Subs AMA (Ask Me Anything)

security that definitely when I was there they sort of they laugh at you like they smile


100K Subs AMA (Ask Me Anything)

at you you know the people are actually doing building security they smile at you but they


100K Subs AMA (Ask Me Anything)

always see you as like a bit of a threat even if you're if you work there right they're


100K Subs AMA (Ask Me Anything)

like I don't trust you but yeah are we in a simulation no probably not like I know it's


100K Subs AMA (Ask Me Anything)

a there's a convincing argument but probably probably not what was your dissertation on


100K Subs AMA (Ask Me Anything)

adversarial examples or in general adversarial learning not not world earth shattering yeah


100K Subs AMA (Ask Me Anything)

thought on NVIDIA's monopoly it's kind of breaking up no which is cool like AMD is getting


100K Subs AMA (Ask Me Anything)

in there there are various things like graph core and and and lambda and there's TPUs and


100K Subs AMA (Ask Me Anything)

yeah yeah it's it's sort of falling apart a little bit though they're probably still


100K Subs AMA (Ask Me Anything)

make more money than they know what to do with but you know cool thing cool new things


100K Subs AMA (Ask Me Anything)

coming up in the hardware area how do you do research without burning out you know look


100K Subs AMA (Ask Me Anything)

after yourself just know yourself and how much how much you can do and you know try


100K Subs AMA (Ask Me Anything)

to try to not to to not fall into FOMO too much why didn't you go for a postdoc I am


100K Subs AMA (Ask Me Anything)

not a successful enough academic to do to become a professor so doing a postdoc makes


100K Subs AMA (Ask Me Anything)

no sense for me yeah I just like I haven't I haven't I haven't hyper published papers


100K Subs AMA (Ask Me Anything)

during my PhD I also don't have any super impactful papers or anything so becoming a


100K Subs AMA (Ask Me Anything)

professor is not really in it for me nor would I have necessarily liked to do that


100K Subs AMA (Ask Me Anything)

how do I contact you about deep judge my company's working on something similar and we have a


100K Subs AMA (Ask Me Anything)

prototype in beta as well a lot of users and firms interested answer me you go to our website


100K Subs AMA (Ask Me Anything)

deep judge dot AI it's ugly right now we're redesigning it yeah there's a you can you


100K Subs AMA (Ask Me Anything)

can there's there's an there's an email there's a contact button there otherwise otherwise


100K Subs AMA (Ask Me Anything)

I'm findable on on Twitter if if you want to step into that cesspool could an AI create


100K Subs AMA (Ask Me Anything)

a game on the fly like graphic card creates visuals on the fly yes there is already there's


100K Subs AMA (Ask Me Anything)

work on procedural generation of like game levels so that is definitely that's happening


100K Subs AMA (Ask Me Anything)

it's still like whether or not the AI can come up with a game like game rules or so


100K Subs AMA (Ask Me Anything)

on I don't know but it can certainly invent levels of games I've seen I've seen even projects


100K Subs AMA (Ask Me Anything)

where you can play these in real time so yeah is AI overfunded my sampling bias tells me


100K Subs AMA (Ask Me Anything)

that it seems like there's no other science except AI for funders I mean there's a bunch


100K Subs AMA (Ask Me Anything)

of others just like biology and there's a bunch of tech I mean blockchain there's a


100K Subs AMA (Ask Me Anything)

lot of funding going into AI but there's also a lot of stuff happening right it's a lot


100K Subs AMA (Ask Me Anything)

of lot of cool products that we haven't built yet given the technologies that we have and


100K Subs AMA (Ask Me Anything)

that are possible so what's your favorite differential equation the damped oscillator


100K Subs AMA (Ask Me Anything)

probably video idea neural networks in Conway game of life yeah why not I thought about


100K Subs AMA (Ask Me Anything)

a neural network in Windows Task Manager but I honestly have no idea how to achieve that


100K Subs AMA (Ask Me Anything)

in what order would you prefer work as a research scientist DeepMind NVIDIA Facebook Google


100K Subs AMA (Ask Me Anything)

Spotify open air Microsoft probably depends more on your on your team within these companies


100K Subs AMA (Ask Me Anything)

than on the actual company yeah so just select probably your most enjoyment will come from


100K Subs AMA (Ask Me Anything)

selecting the people that you're going to work with rather than the company itself have


100K Subs AMA (Ask Me Anything)

you tried doing ML with Julia I have not I don't know Julia I know some people like it


100K Subs AMA (Ask Me Anything)

but it seems like right now there's no advantage in it's like a parallel universe so yeah no


100K Subs AMA (Ask Me Anything)

are you a movie buff best sci-fi movie no I'm I'm not much in I watch movies sometimes


100K Subs AMA (Ask Me Anything)

I'm not too much into into movies what's the coolest product in your opinion the coolest


100K Subs AMA (Ask Me Anything)

product I don't know fire the wheel a steam engine I don't know do you know 19 in French


100K Subs AMA (Ask Me Anything)

what the number Disney is that is an actual number I don't know are you looking for interns


100K Subs AMA (Ask Me Anything)

um sure I don't I don't know what to do with them so maybe not yeah no not not actively


100K Subs AMA (Ask Me Anything)

which programming languages are you fluent on Python I used to be fluent in Java C++


100K Subs AMA (Ask Me Anything)

bunch of others see certainly but over time I've just not used them and I've just used


100K Subs AMA (Ask Me Anything)

but oh yeah of course yes so JavaScript I'm pretty fluent in JavaScript as well how to


100K Subs AMA (Ask Me Anything)

prevent hair fall I have to prevent hair fall do I look like I have advice on that


100K Subs AMA (Ask Me Anything)

favorite YouTube channels so in general YouTube yeah Pewds PewDiePie obviously obviously


100K Subs AMA (Ask Me Anything)

yeah no question are you currently unemployed no I'm very


100K Subs AMA (Ask Me Anything)

employed yeah would you outsource C++ optimization to scale a creation sure if you can't do it


100K Subs AMA (Ask Me Anything)

merch is coming is coming how many hours do you spend a day during PhD you mean on doing


100K Subs AMA (Ask Me Anything)

the PhD however many you take do you recommend any advisor for a PhD at ETH this is really


100K Subs AMA (Ask Me Anything)

a person like advisor is a personal choice like this there's no general recommendation


100K Subs AMA (Ask Me Anything)

for all people it's just you know you just have to decide what's what's best for you


100K Subs AMA (Ask Me Anything)

are you on a Switzerland right now yes I'm on a Switzerland correct yeah what's your


100K Subs AMA (Ask Me Anything)

opinion on Elon Musk I like Elon Musk I know like he over promises stuff and and and so


100K Subs AMA (Ask Me Anything)

on and he gets a lot of hype going and and whatnot but I'd rather have I'd rather have


100K Subs AMA (Ask Me Anything)

have that like yeah I'd rather have a world with with Elon than without you know for


100K Subs AMA (Ask Me Anything)

all of this over promising and whatnot he's also doing really cool things so yeah thoughts


100K Subs AMA (Ask Me Anything)

on ML and bioinformatics probably coming like probably probably up and coming topic yeah


100K Subs AMA (Ask Me Anything)

all right so I'm I'm gonna cut this now I as you can see it's dark haha yeah thanks


100K Subs AMA (Ask Me Anything)

so much for being here as I said this wasn't really planned this it was for 100k I guess


100K Subs AMA (Ask Me Anything)

maybe we can do AMA's more regularly but thanks everyone for being here thanks everyone for


100K Subs AMA (Ask Me Anything)

subscribing or watching videos it's a pleasure to make these really and yeah I never would


100K Subs AMA (Ask Me Anything)

have I wouldn't have guessed that anyone will watch so this it's a it's a huge compliment


100K Subs AMA (Ask Me Anything)

that you all are here and I really I really thank you yeah thanks a lot and I'll I'll


100K Subs AMA (Ask Me Anything)


HyperTransformer: Model Generation for Supervised and Semi-Supervised Few-Shot Learning (w/ Author)

Hello, today we're going to look at hyper transformer. This is a model for few shot


learning where you get new data that you haven't seen before with potentially new class labels. So


this model takes in a set of data points and corresponding class labels and its output is


the weights of a convolutional neural network that can then be used to classify those data points and


corresponding test data points. This is very useful because it decouples the model that does


the meta learning or the few shot learning. It decouples the size of that model from the size


of the model that then does the actual inference on the data, which means that I can have a big


model doing all the meta learning things and end up with a very, very lean convnet that I can deploy


anywhere. It's very useful if this needs to be deployed on mobile phones. It's very useful if


there are privacy considerations, federated learning, anything like this. So the hyper


transformer, it doesn't classify data itself, it actually produces a model that classifies data,


which is very cool in itself. So the models are quite performant by itself. They're not super good.


Like they're not the best, but they're good enough. And potentially, they could even be used as a


starting point to then refine and do some more training. So this is what we're going to look at


today. This research is by Andrej Smoginoff, Mark Sandler and Mark Vladimirov. And I'm going to


interview Andrej in a bit here on the channel. He joined me and we had a nice conversation about the


paper. So please let me know if you like styles like this. I feel it's a big boost to have the


authors on with these paper reviews. But you need to tell me how to make the best use of their time


how to need to make the best use of your time, the viewers time because I don't want to make


these videos like more long than they have to be. But also want to give you the opportunity to sort


of pick and choose some people prefer just my explanations. Some people prefer the interviews.


And I view it as like a bit of a buffet. But please let me know in the comments how you would like a


paper explanation with an author to be structured the best because it's, you know, ultimately,


it needs to be good for anyone watching. Alright, let's dive in. The interview is going to be,


I'll mark it, there's chapter annotations down in the bar here. You just look if you want to skip to


the interview, feel free. So the hyper transformer is a model and it says it says it in the name,


it's a hyper transformer or I mean, you could you could also have called it like meta transformer


or something like this. It is a model that in itself produces weights. And what is it useful


for? It's useful for few shot learning. And this is one of the things I appreciate about this paper,


which I only really realized after I've done the interview is that in just the framing of the


problem itself is very special, such that the model is quite good at it, which is maybe a lesson


for all of us in research to to to already look for the good problem. So what we're going to end


up with is we're going to end up with a few shot learning setting in few shot learning, you want to


build a model, like, let's call it model M, or just some sort of an algorithm doesn't even have to


be a model. And that model M will get just a few data points. Let's call let's say these are images


like, okay, I get in this case, four, it might be some more than four. But you know, a couple of


dozen images or something like this, so not a giant amount of images with their corresponding


label. So let's call let's give each one of y like each one a label. And I want to take this data set,


I want to input it into this box, and the box should come up with ideally a model. So the box


doesn't have to be a model. But let's call this like a neural network over here, which should then


be performant on the data that on the distribution that this small amount of data has come from. The


challenges are obvious, you only have very little data to do this. The second challenge is that


these labels might come from classes that you've never seen before, right? They might be new


classes. So this is the general task of few shot learning. The advantage is that very often, the


task isn't completely new. So the task isn't like a complete surprise. But the task itself, this is


what it's called a task right here, the task itself comes from a distribution of tasks, which means


that you have kind of a like a data set that have many such tasks here. So here is a task, right,


this is a data set with some train and test samples, each one having their labels. And then


so this is a task, and then there might be another task and another task and another task. So consider


this sort of like a machine learning problem, except the data points are entire tasks. So you


want to build a model that takes in such a task and gives you a good classifier for that particular


task. Now, the question is obviously, how you do that, what most people do or not most people,


what has been popular previously, and I've made a video, for example, for iMAML. So iMAML, I think


it's written like this, L, there's an L here. This is a technique about meta learning. So what you


would do is you would train one big model, you train a big model. And you train it with each of,


you sort of train it with each of the tasks. And what you do is you want to end up with a model


that is kind of like a common initialization for all the models. So when you get a new task,


you want to take this model and you want to fine tune it for a couple of steps for that particular


task. And if you get another task, you want to take the common initialization, you want to fine


tune it for that particular task. So for each task, you'd end up with the same model with this


model right here, but fine tuned for that particular task. This is what we do. It's very popular if you


think of things like BERT or so, this is essentially what we do, we get to a common initialization,


and then we fine tune that, except methods like imaml explicitly train that initialization


for the purpose of then being fine tuned to a few short learning tasks. So potentially having new


labels, or potentially the same labels. The problem is obvious, the models are the same, right, this


model and this model right here, they're the same like architecture, it's just one is a fine tuned


version of the other. And there's the question, right? For is that appropriate for the task? Like


is this model right here appropriate for this task? Maybe you can say, well, maybe not, it's just a


few data points. In general, if I have a few data points, I might want a small lean model, though it


doesn't like blow up, it doesn't overfit. Also, maybe, you know, where do I use few shot learning?


Well, probably, I use it when you know, I need to have a model for every user, like you have your


photos library, the photos library has a couple of dozen pictures in it. Now you want to train a


classifier on it, right? And your classifier is going to be different from the next user's


classifier, and so on. So there's no common classifier, it can be personalized. And also


there, this needs to like run on your mobile phone, if that's the case, and then you don't want


like this giant model. So we want a lean model. However, if you look at the model in the middle


right here, like this one, of course, this needs to be big, it needs to like cover all of the


different tasks that could be and then some more, right? Like it needs to train on a distribution of


tasks to be able to classify tasks that it hasn't even seen before. So that one needs to be giant,


ideally, as big as it can get, right to absorb all the information. So there you have the dichotomy,


and the weakness with the approach of having the same model being fine tuned down the road.


And that's why the hyper transformer does a different thing. The hyper transformer says,


well, I have a big model right here, and that model will produce the weights of the small model.


So we won't fine tune anything, we will simply forward propagate the task through the model.


And then that model will spit out the weights. And we're gonna do it in a kind of a smart way,


because I believe this has been tried before. I think even I have tried it before. And it usually


doesn't work and has particular reasons why it doesn't work. Among other things, neural networks


are quite bad at hitting exact numbers, they're good at classifying. But when it comes to like


regressing on numbers, they're quite bad. Also, there are errors that build up and so on, we'll


get into that. However, what I said before, the framing of the task. Now, few shot learning can


be characterized in a few different ways. Sometimes often, it is also said, well, we have like a big


data set available, right? Big data set, like ImageNet, or so on. And we use that to pre train


the big model right here. And we use that to sort of prepare the model for a few shot learning.


This is particularly not, I'm sure you could somehow get it in there. But in this particular


thing, the model needs to be able, it's a transformer, it needs to be able to take all of


these samples into its input, so into its context window. And therefore, it's almost like the model


is limited to an upper bound of number of data points that it can input. So the framing of the


task itself, like few shot learning means you have these tasks, and every task has few samples, and so


on. You know, differentiate it from the framing where few shot or meta learning means that you


want to, you want to, you get a big data set, and then you want to fine tune it on many small data


sets. That distinction is a smart one, if you write a research paper, right? It is, it is, if you say,


well, we're actually in this situation. And here, the model makes perfect sense, right? Here, it


will be more difficult. I think just a lesson for people who write research papers is the framing of


the problem is like half the battle. So how does this model actually produce weights? This is a


schematic overview over the hyper transformer method. The hyper transformer itself, you can see


right, right here, not even that. So the hyper transformer itself is going to be this box right


here, or this box right here, respectively, that produces weights of neural networks, the weights


of the neural networks that are produced are these things right here. So what's all this other stuff?


Well, the hyper transformer needs some information to produce actual weights. Remember, what we're


going to do is we're going to take a set of what they call support samples. So this is the data


set. This is the entire data set. In this case, we have three data points. Now, this is a schematic,


usually, as I said, it's maybe a couple of dozen data points. In this case, we have three data


points. So these are the X's and their corresponding labels. In this case, they call them C for like


class labels, we call them Y. So these are data points and labels. And remember, you might not


have exactly seen the classes before, or you might. This is up to sort of the task at hand.


So what we're going to do is we're going to feed the hyper transformer with the data, right? We say,


you know, here is this, this is the entire data set. We say, dear hyper transformer, this is the


entire data set, please give us weights. Now the question is, how do we feed a data set to the


transformer? And they have various ways of how to do that. And what they do is they want to provide


like the most accurate information to the transformer as possible. So the first thing you


see right here is that there is a feature extractor, this thing right here, it takes in a data point,


each one individually, and it outputs features for it, which makes sense. So the transformer can't,


for example, read images by itself, it can't read them out of the box. So we need some sort of data


extraction pipeline. This is a feature extractor, it's going to be like a convolutional neural


network that has a few layers that serves as a feature extractor. This can be trained end to end,


this can also be pre trained. What's important that we end up with a vector for each data point,


so each data point here gets a vector, which can then be fed into the transformer as you would feed


a token embedding vector, if you were to do NLP. The other thing is, and this is not super important


in in the first layer, we also need to feed the hidden activations of the current layer. Now I


want to leave this away right here, because in the first layer, there's not that much of a distinction,


but it's going to be important in all the following layers. And then we also want to feed an embedding


of the class label right here, they put the class label directly, but it's actually an embedding


of the class label that is fed to the transformer. So with all of this information, the transformer


sees the entire data set it's supposed to classify, and it will output the weights of the


convolutional neural network. Now you see right here, it's more complicated than just outputting


the weights of the entire ConvNet. So what we could do is we can say, well, I have a ConvNet


with a bunch of layers, right? I put my data into the transformer and the transformer just like boom,


outputs all the weights at the same time, like bam, bam, bam, bam, bam, here's all the weights,


this would be very bad. Well, I guess, I don't know, but I guess it wouldn't work, at least in


my experience, because these errors, they will kind of accumulate, the transformer would need to guess


from the initial embeddings right here, what all the weights are. So essentially, internally,


it would sort of have to model this model in its like, inside of it, and then sort of guess


what the representations in here are going to be in order to create the weights for the layer here.


If you make a mistake right here, then or a small error, then that error will kind of accumulate


through the layers and so on. So it is quite bad advice to produce all the weights at the same time,


instead of the hyper transformer produces the first layer's weights first, then it takes the


data points, propagates them through the weights that it itself had just produced, it observes the


hidden activations after that layer, and then it reconsiders these hidden activations for producing


the second layer's weights. This is all one big computational graph, you can actually model it in


like TensorFlow, PyTorch, and in the interview, we're going into a little bit of whether that's,


you know, feasible for larger models and whatnot. But that's what it does. So it first produces the


weights of the first layer right here, then it forward props the model. So this this F right


here, that is the resulting ConvNet. So you take the weights of the ConvNet, you fuse it together


with the architecture, and that's going to be the generated layer number one, you take the data


points, you feed them through the generated layer, you get the activations right here.


And that those activations will become sort of the feature, it says activation feature extractor.


So you got you're going to add some hidden activations, which are also going to be if it's


a ConvNet, they're going to be some sort of a tensor, some sort of like a n width by height by


channel tensor. So again, you need like a feature extractor. But essentially, what you're going to


do is you're going to feed the hidden activations again, to the transformer, along with the original


data. So you're going to say here's the original data, here is the hidden activation it has at the


layer that I'm trying to produce the weights for right now. And also, again, you're going to feed


the class labels. So this is the totality of the information that transformer has available


at every layer, it has the original data, the hidden embeddings of the current layer after the


last layers, and the class labels, and then it's supposed to produce the next layer right here.


Yeah, this, as I said, the computational graph is quite enormous right here. Because if you if you


think about it, right, you produce these weights right here, and then you forward prop through


these weights. So any change you do to the weights will sort of change everything that's after. But


Andre told me that this is it is quite possible to do with current deep learning frameworks,


which is a cool thing. Like imagine you had to do this by hand, like old papers, they always wrote


down the gradient by hand. So this is in general, the model, what's possible, and what they do is


they say, well, we don't technically need to produce all the weights of a CNN, what we can do


is if we have like a CNN, we can just use the hyper transformer to produce like the last layers


weights or the last two layers weights, we can still train, for example, these things right here


with back prop. So what happens during training during training, this thing right here is one task,


right? This is one data point, essentially, if you think from a meta learning perspective.


So this one task, I'm going to feed through the whole architecture. At the end, right here,


I'm going to feed the data or these hidden activations, I'm going to feed them through,


I'm going to get the labels of the data point, then I'm going to use back propagation to train


all of this. So I'm going to use back propagation to train the hyper transformers parameters,


possibly also the feature extractors parameters here and here. And if I don't, like this is one


step. And if those things only produce, let's say they only produce the last two layers weights,


I can also back propagate because the back propagation path is like this, and then


like, you know, like this, and then so on. I can also use back propagation to train these first


two layers. So the first two layers will essentially become this, this common feature extractor,


like we talked about at the beginning, when we spoke about iMAML or something like this,


they will essentially become shared among tasks. And then it is just the last layers that are


tasks specifically produced for that. They do find in the experiments that for small models,


like if the CNN is small, it pays off to produce more of the layers like also the filters. If the


CNN however is large, they say they can get away with just producing like the last layer, which is


the classification layer. So, you know, I don't know whether that's a limitation of the


implementation of the method itself, it seems you know that there's errors can accumulate and so on,


the data sets, but also, as I said, the models should be small, so you don't even want to build


super large models from, you don't want to build super large models right here, the ones that you


actually deploy. So that is the overview over the model. There is this other graphic right here,


where they show how exactly the hyper transformer does the things it does. So here, what it gets as


an input are these things. So we have the class, sorry, the class label embeddings


concatenated with the sample embeddings. So that is like one token as an input, they do praise the


transformer because it's invariant to positions, right? So if you don't provide positional


encodings, any permutation of the input will generate the same output essentially. So this is


one token, one token is an embedding of a sample and an embedding of its class label. The transformer


can also take what they call no label embeddings, which means they can go into semi-supervised


learning. So sometimes you have a bunch of data and then a bunch more data that is not labeled. So


they can just provide a pseudo embedding, like for an additional class that essentially says this


one's unlabeled. They do find that they can incorporate unlabeled data, but only to a point,


like if it's too much, it gets too noisy. And then these things right here, essentially, these are


kind of requests to the transformer. These are embeddings for the weights that I'd like to


produce. So essentially this one right here might say, I want to produce layer one weights for the


convolutional filter and of that convolutional filter, I want to generate slice number one.


So and then this one right here will be slice number one of the convolutional filter of layer


one. So that you essentially with the weight embeddings, what they call right here, these aren't


really weight embeddings themselves, they're like weight address embeddings, like you know,


if you had to name the variables in your code, these are essentially the variable names. So


these are the, it's like the CLS token, right? You request something from the transformer. You say,


here is a token and on the output of that token, I'm going to expect you to give me a particular


result. So that is how the hyper transformer takes in data and outputs data. Here is the generated


weight slices. Now they can be directly the weights or they can be some sort of an embedding for the


weights if you have to produce a lot of weights. So you can have like another model that scales up


whatever is output here to the actual format of the weights. Yeah, many things possible right here.


I don't want to go too much into the results right here. Because as I said, one big rule


is that if they have models that produce all of the weights right here, and also this here,


logits and conv, like if they produce the logit layer and the convolutional layers, this only


appears to really help if the model is small. So these here would be the smaller models, which do


outperform if you only, if you sort of learn jointly the conv layers and then only produce the


conv layers and then only produce the logit layers with the hyper transformer. Whereas for the bigger


models, this doesn't seem to make that much of a difference anymore. Other than that, I don't want


to go too much into the results. However, the last thing I want to explain right here is their sort


of chapter on the reasoning behind the self attention mechanism. So they argue that the self


attention mechanism has special properties that make it very, very apt at producing weights for


like a classifier. And specifically, they go into why it could be ideal, not ideal, but appropriate


for producing weights for a classification layer. So I want to make clear what's happening right


here. They say theoretically or in concept, the self attention mechanism right here can in one


single layer of self attention can produce a classifier over the data samples that we give it.


Right. This is what the transformer has to do. The transformer has to take in the data points,


right? It has to produce essentially, let's think of the last layer as to produce a classifier


for those data points. So the question is, how does it do that? There's no SGD involved, there's


no training involved, right? You could fine tune, but they're in the forward prop through the


transformer, there's no training involved. So how conceivably can self attention mechanism produce


the a classifier over data. And for that, they show that even a one layer self attention mechanism


can conceivably produce a simple classifier. How does it do that? So let's think of what a


classifier is. A classifier is essentially a weight matrix and the weight matrix in the,


let's say in the, let's make a coordinate system. Let's say this is the embedding space of the last


layer. So what the weight matrix looks like is, let's say we have, let's say we have


three different classes or say we have four different, oopsie, we have four different classes.


So this is one, two, three, four, four different classes, which means that the weight matrix is


going to be like D by four. So it has one, one slice, one column or row, one column for each


of the, one column for each of the classes. And how is it going to classify? Well, it's going to


run every data point X through the weight matrix, multiply by the weight matrix. And that gives me


four numbers. So it's an inner product, which with each of the columns, give me four numbers,


which is essentially the inner product with each of the four vectors right here. If X is, for example,


here, the biggest number is going to be the one with the largest dot product. So that's going to


be this one right here. And that's going to be my class label. These are usually called logits,


the numbers that turn out right here, but they're essentially similarities to the columns of the


weight matrix of the last layer. So can we produce this weight matrix? Can the self attention


mechanism produce the purple weight matrix such that at least the training data points are


classified correctly? Now, in order to do that, what it needs to do is it needs to do the following


for each of the data points that we have, it has to, the weight matrix can essentially be


constructed like this. So Y here, this is Y is a one hot encoding over the class label. And Ej


is some embedding of the data point. And you see, if we calculate this up, Y is only going to be one


at the class where the data points label is. So the weight matrix, essentially, this is going to


address only the column of the weight matrix where that data point falls into. And by the sum,


it essentially sorts all the data points into their respective columns. And within each column,


it sums all the data points up. So if we do, if you apply this formula, then the data points


in class one are going to be summed together or averaged together and put into the weight matrix


at column one. And the same for column two, the same for conflict that would actually result in


a good classifier because the classifier would just be the mean embedding of all of the data


points that belong to this class, which is, you know, a reasonable classifier. In first


approximation. The question is, can the self attention mechanism produce something like this?


So let's ask ourselves right here. Let's say, let's draw this again. So we have x1, y1, x2,


y2, x3, y3. If you remember, the self attention mechanism will calculate queries, keys, and values


for each of the data points. It will provide, like it will do like a softmax over the queries


and the keys of over an outer product of them, then multiply them by the values. So the question


is, this entire thing needs to turn out to be a W like that. So this entire thing needs to


address all the data points of the same class and then average them. We can say, well, that's pretty


easy. Okay. And they say this, this is what they say in the paragraph right here, they try to make


a case that this can be done. So if we take the data points and we just calculate, we calculate


their embedding, like they have some embedding function. Actually, we don't even need, let's just


say the data points themselves are already embedded. So x, x2 like is the embedding of itself.


So let's say these, the data points themselves, they are, they're the values. Yeah, let's say they


are the values, then the labels are the keys. So that means that if two data points have the same


label, they will expose the same key. Now, all we need to do essentially, is we need to make sure


that the queries, so over here, we have the weight, the address of weight one and the address of weight


two, we need to make sure that the queries that the weights produce, if those queries


are matching with the keys that these expose, you can see that this all works out. So weight one


would say, well, I am the weight that is going to be the column for class one, I'm going to expose


as a query, the embedding, which they like, I don't know how to write this letter, the embedding


for class one, whereas these data points say, well, I'm going to expose as a key, whatever the embedding


of my class label is. And now you can see that weight one, given that it's class one, will


aggregate all of the different data points, but only if they expose the key of class one, right,


if y two equals c one, they will aggregate together the query and the keys will match,


they will aggregate together the values are the data points themselves. So this will result for


each of the weights in an average of all the data points that correspond to its particular class


label. That's exactly how we build the W. Notice that it's not important what the queries of the


data point tokens are, it's also not important what the keys and the values of the weights are,


as long as they don't conflict with these queries right here. It's just a proof of concept that this


could happen. Another proof of concept they do in a similar vein is that with respect to the


unlabeled samples, remember, we said we can also do semi supervised learning right here,


we have a data point and we have no label available for it, what can be done and they show


that with a two layer self attention mechanism, you can actually do it such that in the first layer,


sort of the labels are propagated. And then in the second layer, you can apply the same thing as


right here. So how do we propagate labels? Again, let's think of data point x1, y1, x2, y2. And now


let's think of x3 with unknown label. What can we do? What we can do is and now we have to rethink


a bit how do we structure the self attention mechanism such that label is propagated in the


next layer to this data point right here. So let's say this data point here exposes as a query,


it exposes its data point, like its vector, its embedding, that is going to be the query. So every


token right here as a query exposes its embedding and also as a key and specifically these two as a


key, they expose their vector, and they also expose their embedding of the class as values.


So now you can see that we're going to match up keys and queries. Now let's say these two data


points here are very similar, their keys and their queries are going to match right. And


specifically, since this here is the query, the value of that data point is going to be put is


going to be aggregated in that token, whereas these might not match as much. So this this value


isn't going to be aggregated. So here you can see that this is essentially a nearest neighbor


classifier, this token is going to look which of the other data points are similar to myself,


if this is really how it's, you know, how the mechanism is structured, is going to look which


are similar to myself. And from all of those that are similar, I'm going to average the class label


embedding for myself. And all then I need is like a residual connection to copy over the data,


and some orthogonality. And I have essentially aggregated class labels from all the nearest


neighbors of the other data points. That's the first layer. And then the second layer,


now every data point has a class embedding, and I can just use this one to build a classifier.


So this is a proof of concept that with two layers, it is actually possible to label unlabeled


data in the nearest neighbor fashion, and then build a rudimentary classifier over like an average


embedding classifier over that data. I hope that made a little bit of sense. We're going to talk


about some supporting experiments that are in the appendix that actually show and we're going to


talk about this in the interview that actually show that if these are these two layers, right,


in the first layer, the unlabeled examples, they attend to the labeled examples a lot. And then in


the transformer layer two, the weights actually attend, sorry, in the layer one, the weights


attend only to the labeled examples, you can see they don't attend to the unlabeled examples at


all. In layer two, however, the weights having already attended to the to the labeled examples


now also attend to the unlabeled examples, which means that the unlabeled examples have gained


some information in layer two. As I said, we're going to talk about this more in the interview.


So what you're going to hear in the interview is also again, like a little bit of a different


perspective on the model. We'll go through the experiments, we go through it means some


criticisms that I have about the model itself. And yeah, so I realized this was a bit of a longer


explanation than usual. I'm trying these things out again, let me know what you prefer like short


introductions to the paper, then an interview or like long explanations followed by a short or long


interview. Do you want to pick and choose from the video and so on? I need to know so please tell me.


And as always, if you like this and leave a like, comments and yeah, have fun. Welcome, everyone.


Today I have with me here, Andrej Smoginov. Is that approximately correct? Yeah, thank you. Thanks


for having me. Thank you. So you're you're one of the authors of the hyper transformer paper. And


this is a pretty cool paper I found. Little like it I do not I do not hang it out big time. But I


have once tried to publish a paper using one model to produce the weights of another another model.


It worked like barely. So when I saw a paper that actually does it in practice, I was like,


I was stoked. I was like, yay, this is you know, it's pretty cool. So yeah, welcome. First of


all, and and congrats on this paper. It's I liked it. If we look at like the high level idea of the


paper, it is you generate essentially use one neural network to generate weights for another


neural network. There are many settings which that can be applied to do you want to maybe


transmit like the high level idea of what the paper is about? Yeah, so so we basically started


exactly as a question, can we even train a model that generates all of the weights for the other


model? But unlike hyper network paper, which we were inspired by, in this case, we really wanted


to modulate the model that we produce on the task that it's supposed to solve. So basically, what we


wanted is we wanted to take a description of a task that the model is supposed to solve. And in


a single forward pass converted into the weights of a fully trained model, and not even a subset


of weights, but we wanted to take a big bite and generate all of the weights of the model.


And the question, you know, from the very beginning was, is it even going to work?


Will we get results comparable to what you might get by training the model to start with? And the


in principle, the applications, we consider the future learning as an application.


But it really kind of the field could be, for example, personalization. And I guess, like one


of the main ideas of this paper, what we try to convey is that in many cases, when people discuss


future learning, or when they discuss personalization, they think of models as, you know,


as large as they need to be to serve all of the potential users, all of the potential needs.


And here we ask a question, well, what if the computational budget is actually limited,


and you want to basically to produce a model that is very, very fine tuned to specific needs of a


specific user. So basically, we are kind of trying to separate the complexity of a small model that


is supposed to solve a task for each individual kind of user from the complexity of a big model


that's supposed to know everything about the world, and everything about how to generate


these small models. And so that kind of was one of the main ideas that we can separate them.


And we were hoping that we would be able to capture kind of the variety of the small models,


and how they depend on the task inside this big transformer based model, essentially.


The idea seems so clear when you think about it, but it is so far away when you've,


at least to me, it was like, once I saw your paper, I was like, oh, yeah, of course,


because what we were doing in the past few years, I think is, and this started maybe with something


like BERT made it really popular to like, pre train a really big model, and then kind of just


fine tune it on on your little data. And all of these meta learning or few shot learning papers,


they would do the same thing, they would pre train a big model. And then for example, mammal would


train that same model on the small data, essentially, what they were trying to do was


find like a good initialization, right to, to then continue training. But essentially,


the same model was tasked with two different things. The same model was tasked with ultimately


solving all of these small tasks that you throw at it. And at the same time, like finding a good


compromise between all the models and you separating this, it makes total sense, you say,


well, one network is really responsible for integrating all of these tasks. And the other,


like the smaller network that is produced is responsible for, you know, solving the individual


tasks. This has lots of applications. I think you mentioned it in the paper, personalization is


probably a big one, right? If I just have my, you know, 2030 photos in my photo library. Now, I could


I could have like a small model that is just made for me, derived by this by this big model. So I


was, I was, it seems obvious in hindsight, but I, it was, to me, it was not on the forefront of my


mind. So you, you, I mean, there are legitimate concerns when, when you say we want one network


to just output the weights of another network. Specifically, we know that neural networks are


really good at classifying stuff, you know, outputting ones or zeros or, or into a bucket,


but they're not so good at outputting exact numbers, right? They're not, they're not to the,


to the point where a lot of reinforcement learning papers, for example, they would rather


bucket the values they're trying to predict and then predict the class of the bucket, rather than


predicting an actual number. So, you know, did you, did you have, you must have had these concerns as


well, and how, how exactly does your model like predict the weights of another model?


Yeah, that's, that was definitely a concern. And actually, as it turned out for convolutional models


solving future learning tasks, that doesn't end up being a huge issue, partly because for,


especially for very large models, you don't really need to fine tune all of the weights


very carefully. Because if your embedding is already good enough, embedding model,


then in principle, all you need to do is look at the final embeddings produced for different images


and kind of based on that, figure out how you need to assign labels to essentially these embeddings.


So in practice, as we've seen, all that matters for, especially for very large models that,


you know, can have a very large embedding inside, is to just generate the final layer.


But once you get into the land of smaller models, it's still important to, to generate all of the


layers. And one of the approaches that we use, basically, what we have to do carefully is instead


of generating all layers at once from the inputs. So the input in this case, just to clarify, is the,


in a fusion learning scenario, you have a support set that basically tells you, these are the images


that the final network has to classify as a cat, for example. And these are the images that the


final network should classify as a dog. And then we hope that the generated model would be able to


classify all cats as cats, and all dogs as dogs. And so our model in this case would see a support


set, it would see that sufficiently small batch of images. And instead of generating, you know,


like immediately layer one, two, three, four, we decided that we needed to generate them layer by


layer, starting from the lower one. And the motivation for this is really, if you imagine


that you modify the very early layer, then all of the activations throughout the network will be


modified. And so basically, if you modify the first layer, you have to then adjust all of the rest.


And the, you know, the differences will propagate and will potentially amplify through the network.


And so you have to potentially be very aware of what the previous layer generates to actually


generate the following layer. And I guess that was one of the ideas how we could stabilize that


layer by layer generation process. So is it fair to say that you're so this this what you call


support set, that is essentially the data set of the few shots task, right? It's like here are


10 images of dogs and cats with corresponding labels, which in this is a diagram of your


architecture in general. So this is the support set with the samples and the labels. And then you


make you make use of lots of signals throughout the network such that, as you said, you make sure


you first build the first layer, and then based on that build the second layer. So if we if we


quickly walk through it, one core component is this image feature extractor that is a trained,


let's say a convnet that is applied to each image individually, and just extract some sort of a


feature map. And this feature map is then given to every single computation layer in your in your


set, right. So your main model is this this transformer thing here, that it takes in, as you


can see, it takes in these these embeddings of the support set, it takes in the labels, obviously,


right, it needs to know what it needs to classify how. And it generates it takes in this thing


right here. And I think in the first layer, this is kind of the same as these image embeddings.


It's it's another embedding, right? It's sort of it's another embedding, a signal or Yeah,


but yeah, it's basically produced from the same images, essentially, I guess we will will will


come like this is in subsequent layers, this will actually be different. So what we do is


the transformer here, it will produce the weights of the first layer. And as you said, we don't just


produce the first layer and the second and the third in one batch. But what is what seems to be


really important is now we actually forward propagate, I need a different color here,


we forward propagate the the support set through the weights we've just generated. And that will


give us the next layer's representation. And then that can be used again by the transformer to


generate the next layer's weights, along with the embeddings of the original images along with the


labels and so on. So this this sort of building up to the end seems to be important and refeeding the


information through your own generation. Is it fair to say that it's a little bit like an auto


regressive language model if I you know, feed in whatever I output again and again? Yeah, exactly.


In some version of the paper, we even wrote it this way, basically. But yeah, it's kind of like


a progressive process in a way that you generate basically the next the following layer weights,


conditioned on the weights that you already generated, essentially. And again, the motivation,


you know, for this is if you imagine yourself having images, original images, and you have to


generate weights for the layer number three, convolutional layer, right? It's you may have a


trouble if you just look at the images themselves. But if you look at the activations that the


previous layer gives you with the corresponding labels, you can then look at small patches of


those activations and figure out that, oh, look, there is this feature that is seen in all of the


images, you know, labeled as one. So perhaps I can have a filter specifically looking for this.


In the activations, because that's what the layer is going to operate on. And that's basically why


we have to do it this way. When we try to mean it all at once, you know, the model is significantly


less stable. Yeah, I mean, that is what one would expect. So I think Yeah, the trick here is that


every every, every step where you generate the weights of a new layer, you have sort of all the


information you have, what's the data set I'm trying to classify? How does that data set look


at the input to that layer, right? And that helps me tremendously to then produce the weights.


This looks it looks it's two layers right here. And it looks already quite complicated, right here


is like an entire transformer, right? That, and then that transformer generates a set of weights,


right, then I forward propagate a signal through the weights that were generated by


using that signal as an input, right? So I'm imagining the computation graph here gets pretty,


pretty iffy quite freak like quite fast. And then there is another transformer. And then I'm back


prop through all of this back, right? How does how like, what's the concerns with like stability


here in like, how big does the computational graph get? Is this a problem? So in practice,


it was not a big problem. But you're right that it grows faster than you know, generally


conventional CNN would grow. And but but here, what you care about, I assume is kind of the


longest path in this right in this graph. And so I assume it will still be like, it should be still


proportional to the number of layers. But it is true that like, when you generate the final layer,


you essentially have to back propagate through all of the transformers that you have, right? Like if


you have multiple layers in each transformer, you have to back propagate through all of them.


But in practice, this thing was surprisingly stable to train actually, that was one of the


things that surprised me. The only issue I think is, I wasn't able to like, when we looked at this,


we weren't able really to train it with anything other than SGD, not that we really, you know,


spent a lot of time doing this. And one of the assumptions why it could at least partially be


the case is because when we train it, the way we train it is basically we're training kind of like


you will train an usual model where you give input images and you produce labels. Here we give tasks


which are support sets, and we produce weights. But essentially, since you know, like we have


memory limitations, we basically do one task per batch. So it's kind of a single sample batch,


if you will, in that sense, in a sense that it's just one support sample, support batch. And so


that maybe that's why the methods weren't exactly super stable. And when we look at the


when you really applied other techniques, but with SGD trained absolutely fine. And we discovered,


like, I think to some degree, one of the advantages that we claim this method might have


is that it actually might be more stable than mammal-based methods, for example,


because in mammal-like methods, you really have to back propagate through potentially many unrolls


if you want to really apply several SGD updates. So here we really propagate through a single


model in that sense, although, you know, to some degree, it's still a very manual layer model.


And you make a particular case that transformers are a good choice of model for this particular


task. Why? Why are transformers so good? They have some trivialized properties,


like one of the trivial properties is that in the usual design when you don't use any kind of


masking or when you don't use positional embeddings, the output of the transformer is


kind of equivariant to the inputs. So in a sense, if you change the order of input tokens, the output


tokens will change the same way. And that's what you want for a model like this, because


the order of samples in the support set in which order in which you show kittens doesn't really


matter. All that matters is that you show them all. And so that was one nice property that it's


really, it can handle potentially a very number of samples and it doesn't matter what order they


come in. But another consideration, and that was, you know, there are prior papers that looked at


attention-based methods applied specifically for generating the last layer, the last logit's layer


of the model. And we make a claim that these attention-based mechanisms are useful specifically


for sure for generating the final logit's layer. And I guess we make a distinction, we say that


first of all, when you are in supervised regime and you have a label for every sample,


if you naively want to say, oh, you know what, I will generate the last layer by just essentially


averaging embeddings for each class. And that will be a row in my final logit's layer.


Because what you want to do is when a new embedding arrives, for example, you don't know yet, you


take a dot product with all of the embeddings that you know correspond to certain classes.


And that gives you basically the kind of the higher this dot product is, the more aligned


the vectors are, the more likely you will say that, oh, yeah, that's probably that class.


And so one of the approaches to generating the logit's layer is basically to average embeddings


for each class. So if you have a bunch of people, you take embeddings for these images,


you average them, and that's your row in that logit's weight matrix that you produce.


But if you want to just average embeddings, that can be done with a simple attention mechanism.


You basically you take the output that you want to produce, that row, and you make it attend to


embeddings of all of the images labeled as like a one. And then when you attend to only those,


you only need in the end to average their corresponding values, which will be embeddings.


And you end up calculating the average of embeddings of all of the cats. And that's


what you want, kind of. So that was the very simple mechanism that you could naively use


that can also be implemented as basically as an attention based model.


And you so that is so you make specific arguments. Yeah, this is the reasoning


behind the self attention mechanism. Here you show a diagram that goes a little bit into how exactly


you you build up this. So you have your support set on is inputs as tokens along with their labels


or the class embeddings, let's say you also have the opportunity to put in data without labels,


which I guess is quite often available in these tasks. So users, let's let's again assume I have


my photo library, right? I might even label some of the photos, maybe with like hashtags, or I send


them to my, you know, I share them in some album or so, but most of the photos will have no label.


So you also have the opportunity here to just input them as well and just say, here is some data. And


I think the a lot of models benefit from kind of like extra data just to know what the data


manifold looks like. So that's the the sense here. But you in your experiments, you also show you


have to be careful how how much of those you you introduce right in comparison. But in essence,


you can you can take this in. And then for each weight that you want to output, you have a special


token. So this is this will be equivalent to let's say the the CLS token or so in in a in like a


BERT model when I want to classify something I have one token per output that I want to do the


these have different embeddings. So like that they're like addresses of the weights that I want


to output. And yeah, this this whole thing. It's it's a then there's just just test transformer.


But you have you already said with respect to like the last layer that this is implementable.


But you also make the case that if I have a two layer transformer, I can implement like a nearest


neighbor algorithm is like, do you want to maybe just briefly, what's the idea behind how does


how does a two layer transformer implement nearest neighbor? We never full disclosure, we never


really tried to implement it right like in code, but it's it's a simple cost of that hopefully is


correct. But the idea was that yeah, when you have labeled and unlabeled samples, again, you can't


imagine that you have a bunch of embeddings that you know the label of like you know that these


are cats, but you also have a bunch of unlabeled embeddings everywhere. So naively, what you might


want to do is you look at them on all unlabeled embeddings. And you notice that some of them are


really close to embeddings that you already know are cats. So you say, Okay, you know what, I will


label them as cats, because they are suspiciously suspiciously close. And when I have to compute the


final, you know, clusters, basically, I will just average over both labeled samples and those that I


just labeled, because I'm pretty sure that they are actually cats. Right. So that's kind of a reasonable


way to do this. And if you have self attention based mechanism, you can do it in two steps.


The first step is really when you try to propagate labels from labeled samples to these nearby


unlabeled samples. And if you remember how the right how the self attention mechanism works,


is you can you need to make sure that the closeness is based on the product of embeddings


of samples. And you can make unlabeled samples attend to nearby labeled samples.


And when when this when I'm an unlabeled sample, and I attend to all nearby labeled samples,


I can basically look at them and pull their class information to myself to my personal embedding.


So even though my class embedding before was I have no idea what I am, as soon as I saw several


neighbors in the embedding space, I can just borrow their embeddings. And this way, be certain


that I belong to that cat category, actually. And so that's kind of the idea of what the first layer


should do. And then after this is done, the second layer basically looks at specifically the traces


of this label, whether it was, you know, originally given to the sample or it propagated to the


sample. And as soon as I observe that all these samples are marked as a cat or kind of a, you know,


a smell of a cat, basically, they they borrow that cat reference, I can again, I can take all of them


average their embeddings, and that will be my final kind of the centroid of the cluster that


I'm producing. And you know, funny enough, we didn't really look into what exactly the transformer


does, because it's really difficult. But if you just look at the attention maps of two layers,


it turns out to be suspiciously close to the mechanism that how self attention actually works


on a trained model. Because we see that exactly like in the very first layer, unlabeled samples


attend to labeled samples. And at the same time, weights get information from labeled samples. But


at the second layer, weights actually get something from this unlabeled samples that were just updated.


So it does look like this mechanism or at least the version of it is actually what's happening.


And you have sort of you do in the appendix, you do a lot of investigations into these,


into various attention maps and so on. Is there is there one you'd like to particularly highlight?


Yeah, it's this one basically, I don't remember exactly how it works. But I think in the first one,


the first transformer layer, it's very awkward to describe. So basically, what happens is the top


rows are the ones that will generate weights. So basically, if you look at the, for example,


the very top row, this row is telling you when the weights are updated, what are they looking at?


Yeah, so in this case, you can see that they are looking at columns corresponding to labeled samples.


So it means that these weights borrow something from labeled samples.


But at the same time, if you look below, you will see that at the bottom of this plot,


there are unlabeled samples, and they also attend to labeled samples. So basically, after this first


layer, both the weights are updated, and the unlabeled samples are updated somehow


from the labeled sample information. And then at the second layer...


It's interesting that the weights, they don't care at all about the unlabeled samples,


like they learn to ignore the unlabeled samples. That's pretty interesting.


Yeah, and that's exactly kind of what you would want. Because at this point,


these unlabeled samples really carrying not that much information about what you need to generate.


And that's actually maybe one of the reasons why when you have too many of these samples,


the model becomes overwhelmed, and you have to introduce them carefully.


You can't just throw hundreds of unlabeled samples at this model.


And then at the second layer, basically what happens is at this point, you don't care how


labeled or unlabeled samples are modified, because you don't take that information into account after


the second layer. So all you care about at the transform layer two is the top rows. It's again,


the weights. And here you can see that top rows actually at the second layer,


they tend to unlabeled samples, but almost fully neglect the labeled samples.


Which is also actually quite remarkable that there is this divide. And in our opinion,


that basically shows that there is this flow of information from labeled samples to unlabeled,


and then from unlabeled at the final layer to the weights.


Yeah.


It looks like the weights, they don't even care about the labeled samples anymore,


but it is probably because they've already gotten a lot of information in layer one out of these


labeled samples, right? And now they're also aggregating across the unlabeled samples.


Do you think there might be like some sort of, you know, in these autoregressive models,


they have causal attention and so on. Do you think there might be some smart attention mask that you


could implement that would kind of encourage the algorithm to behave better? Like, I'm not exactly


sure what I'm looking for. But do you think that there could be some smart biases built into the


attention masks here so that we actually make the model pay attention to the more relevant things


or that we want them to pay attention to? Yeah, I think actually that's a wonderful


idea. Actually, as a matter of fact, what we do right now is we say, oh, we think that's what's


happening. And then we look at the attention masks and we see that, yes, that's mostly what's


happening. But you're absolutely right that if we were certain that we wanted to restrict the flow


of information in a particular way, we could very well manipulate basically the masking


of each self-attention layer and this way very carefully restrict how the computation should


actually be performed. Yeah, you're right. That's actually a very interesting point. And I imagine


that could be applied to a bunch of other applications like what you just said. Like,


if you know in advance how the information should flow essentially, you can implement this by using


proper attention masks. You also have a bunch of other visualizations right here. Do you want to


maybe tell us a little bit about, because I just thought they looked kind of funky.


What do they represent? These are weights of the actual CNN layers. Yeah, to be honest,


it's really difficult to interpret them. And I think I would rather not go into too much because


it, we really have a hard time understanding what these mean. But I think to some degree,


one thing to observe is that first of all, we discussed several ways of generating weights.


And one of them, it all ends up being how you take the outputs produced by a transformer and how you


combine them in the single convolutional filters. If you think about this, there are multiple


opportunities. You can, for example, take outputs and assume that they are different channels


of a kernel by kernel by input channel thing. Or you can assume that they are,


there are k squared different slices that you combine, but each has a dimension of input


channels, output channels. And then you reshape them into k by k by input channels by output


channels. And depending on how you choose to do that, the model will have different


deductive biases actually, because a very lazy transformer model, for example, wouldn't probably


want to generate very different embeddings, very different tokens as output. It would more likely,


if it's, you know, maybe poorly trained, would generate very similar outputs. And so if you


assume that these outputs correspond to spatial dimensions, then you will see much more smooth


produced weights. Because essentially, you treat every coordinate, every spatial coordinate as


different produced tokens, and they are all very, very similar. But if you do that in channel,


channel wise, then now kind of the k by k thing, k by k kernel can look completely random. It can,


like there doesn't have to be any order. They can look like minus five plus five minus 11 plus 12.


And so that's why they will look much more kind of random visually. And so I think we kind of


observed that. But we were also curious to see if the generated kernels vary significantly for


different supports and tasks. And I guess, again, we see that they vary, but we cannot interpret


this. We hope to get slightly better results, slightly more interpretable. But in that regard,


I think what matters is that when we generate small models, we can measure the difference


of training and test accuracies when you actually generate only the final layer or you generate all


of the layers, including computational layers. And we see that for teeny tiny models, for especially


small ones, it really starts to matter that you generate all of the layers instead of only the


final one. And so that in the future, if we really want to understand what this model does, we really


have to look at the smaller models. And then the variation of kernels with respect to different


support sets will be probably more telling of what's happening. So yeah, you find that in the


small models, you fare better generating all the weights than if you... And in the larger models,


the strategy is essentially to only train the model to produce the last layer and then use


regular backprop through that generated layer to essentially learn the lower layers. And that might


be... I mean, that might also be like an effect of just the method not being figured out yet quite


quite right. It's a complicated method. It seems maybe a bit unstable, especially if you go to a


larger model and also the errors in larger model, they accumulate over the layers, right? You have


many weights. If one is kind of off, then what are you going to do? So yeah, it's an exciting


future. Have you thought about... So you generate this output, essentially this weight token


at the end, it generates some sort of an embedding. I'm gonna scroll for a whole bunch of time right


here. Now, I think I copied the paper twice. I'm sorry. So this the the yeah, you're going you're


going to generate for each of these weight tokens, you're going to generate some sort of an output


at which you can interpret directly. Is it also possible to interpret this output as let's say,


let's say the embedding of a convolutional kernel, like that there'd be an another model like like


a GAN or a VQVAE or something like this, where you essentially generate into the embedding space


of that model. And then that model can be really good at producing like realistic filters,


it just sort of needs to know what filter to produce. Is that something that you have tried or


have in mind or ruled out as a possibility? No, it's definitely something that we have in mind,


because really, when we try to scale these methods, it becomes difficult when you have


to generate really humongous weights. And at this point, yes, the best thing you can probably do


is basically have a separate model that receives embeddings of the weights that it needs to generate


and that generates, learns to generate those weights themselves. So yeah, you got it exactly


right. That's basically that's one of the paths to scale it to significantly larger models.


We can scale this model even to resident architectures, but to maybe to speed up training,


to improve, like you said, we don't even know for sure if the lack of the need to train lower


common layers is a result of a, that the method is, you know, having trouble. And I definitely


have some evidence that if we pre-train certain parts of the model, then it trains slightly better.


So there is definitely that complication of training this thing end to end, but also it's,


you know, it's few shots. So that every, if you train, you know, some model on five classes,


having all of the images, of course, it will perform significantly better because in a few


shot setting, you have only a few images per class. And so what can you do? So that's another


source of maybe imperfection that results in you not having to generate the, you know,


the convolutional layers. But also it's that I think honestly, the classification problem is


kind of simple in a sense that you need to find boundaries between classes. Generative models,


for example, are much, much more challenging because you have to understand the structure


of the data mainfold, not just how to separate the data mainfolds. And so I think like, if you


asked me where this can become important, it would be there.


So you've made several experiments on, oh, sorry, you made several experiments on benchmark


datasets. Could you maybe summarize what in your opinion in the experiments, like what was most


striking to you? What stood out the most? Like what's the main conclusion you pulled out of there?


Yes. So I think one of the conclusions was that yes, when we generate small models, we can


potentially perform better than, you know, mammal based methods or methods that we train


a small embedding and then try to just generate the final layer by, you know, using, again,


like that dot product method, for example, averaging embeddings, finding clusters. So we


definitely, because we have such a large model generating a smaller model, we can actually


generate a smaller model. We have a lot more capacity to learn about the world. And when we


generate a small model, we are much more informed than say a mammal model would be. So we


definitely think that for smaller models, there is an advantage of doing what we do, a significant


bump in accuracy. And especially in the training accuracy, which might matter if what you care


about is basically specialize a model, assuming that the classes are seen during training. Because


generalization is I train on cats and dogs, but I generalize to new unseen classes. And that can be


complicated. But when you know for sure that you need to specialize for a user, their model to work


on some of the classes that you saw during training, then what you care about is the training


accuracy. And because we have such a big model, we definitely get much, much higher training


accuracy. So that's about this. So basically, again, for smaller models, there's definitely


an advantage of doing this. When it comes to very large models, we see that when we generate just


the last logics layer, we get competitive results to a lot of different methods that try to carefully


design those functions and the methods that they use. So without doing anything, we basically are


kind of comparable. So that was again, encouraging. And the final thing that, to be honest, that I


personally found very, very exciting is that I think of this as having a potential to move to


very, very abstract task descriptions. So in future learning, your task description is essentially,


look, these are several images you should label as cat, these few images you should label as dog,


et cetera. But in one of our examples, we add unlabeled samples. And that includes the accuracy


quite a lot. So I was very excited to see that we can get a very significant bump in the model


accuracy by giving it unlabeled examples. So somehow, without us telling how we should use


unlabeled examples, we've learned to use them. But in the future, you could also imagine using


a lot of other types of data. You could provide, like you mentioned, photo metadata, hashtags,


which might be sparsely available for some images, for example. You could have textual descriptions,


for example, of what people are interested in, and so on and so forth. And that would be a task


description from which your model learns to generate a model very well aligned with the


interests of that particular person, for example. So I am kind of personally very excited about this.


And I think that that performance on semi-supervised tasks and the fact that the model learned what to


do in that case is potentially the most interesting. Yeah, and I didn't mention another thing,


it's basically what we already covered, is that for smaller models, you don't only care about


generating the last logic layer, but you seem to benefit from generating all of the complex as well.


And it still remains to see if there is a big difference versus generating something like


film layers. But I'm hopeful that generating, as a matter of fact, all of the layers full of them,


full of weights is important. Cool. Yeah, I think that was, I mean, I've looked at the


results, I was positively surprised. I mean, it's not at the level yet where it's like,


you know, we can generate like the state of the art ImageNet models, but it's not necessary. Like,


I think it's important to keep in mind that these models, they're supposed to be deployed somewhere


where I have very little data, right? I just want to kind of produce a small model for that little


data, maybe in personalization, right? The model even doesn't even have to be big, because it may


maybe, you know, on my phone or something like this. And there's definitely also, I think,


opportunities in the future to combine this thing with, I should say, to combine it with optimization,


right? It's not necessarily a binary choice between I generate the weights or I, you know, like mammal,


I optimize from some checkpoint, I can also, you know, maybe find clever ways of combining it. But


I really like the approach of the paper right here. Yeah, is there, I don't know, is there


anything else you want to say about this general research direction? Anything people, if people


want to dive into this, you know, where can they go? What can they, who can they do? What are like,


you know, big open questions that you're not considering researching? So, you know,


your personal research would be very interesting and interesting, because people follow you.


People don't scoop you. That's OK. Well, I do think that, I think we are still actually


interested in this research direction. And we think that this particular model could be scaled


and could be applied to other problems as well. And that it could potentially, again,


shine either in circumstances where you have a limited computational budget or where you have


ideas are not new and if somebody wants to just know what people have been doing in that


regard, like for example what you just mentioned, Leo paper does something similar where they


also have generation of model layers but at the same time they also use mammal approach


essentially. So they kind of back propagate through the generator of, yeah essentially


through the generator in a way. So it's kind of similar to our approach joined with mammal.


But there are other techniques that generate weights and I think that hyper network original


paper is really interesting and it gave rise to a lot of interesting research and there


were recently papers that looked into generative models that also looked at, that were inspired


by hyper networks. And honestly I think that yeah in the future we might see models that


generate other models and that actually works in practice. Let's see, yeah so to be honest


it's very difficult to say what else can be done. But one of the things that maybe people


will scoop me but what I'm interested in is, I was just thinking about this, is we can


also generate not just weights of the CNN models, we can generate policies as well for


example. And as a very simple example which is very toyish but could be interesting is


for example you have a robot that you build. You take a few photos of it and you upload


them to the service and the service basically is tasked with having several images of the


robot and having maybe images of the T-Rex that it's supposed to walk on. Just generate


a locomotive controller policy for it just like that, just from images. And so I think


that doing things like this might be interesting. Again one thing to note is that model distillation


and training and combining these methods with training might be very very interesting as


well and probably can be very compatible with methods like this. But I think that's one


direction where the future is. Generating models from specifications of what needs to


happen instead of necessarily just training them from scratch.


Cool. Well in this case Andrei thank you so much for being with us here. This was awesome.


Thank you for your insights and I hope to see you again with a transformer that generates


an even bigger transformer.


Yeah we didn't think about that. Thank you very much. Thanks for inviting me and it was


[ML News] Plagiarism Case w/ Plot Twist | CLIP for video surveillance | OpenAI summarizes books

A plagiarism story has an unexpected plot twist clip can be used for video surveillance


and Schmidt Hooper goes on another rant on his blog about citing his works. Welcome to


ML news. Hello friends of the Monday it is ML news and our first story is convoluted.


No pun intended. So it starts out with a Reddit post by user chong 98 alleging plagiarism


of a paper. They refer to a story of plagiarism that we at ML news here have covered about


momentum residual neural networks. They say today I found out that our paper still in


conference review is also severely plagiarized by this other paper. So they made a little


GitHub read me documenting that they have uploaded their paper to archive first and


detailed comparison of what they accuse the other paper of plagiarizing. Largely it comes


down to the idea is very similar and it's applied on different data sets but essentially


the same method. Also, some formulations are quite similar. And their conclusion reads


usually the methods that work extremely well in practice are very simple. And we are happy


to find that LAD which is their method is one of these techniques. We encourage people


to try out our proposed led to improve our results for object detection give us appropriate


credit. However, we are extremely upset if our ideas obviously stolen saying that the


other authors must withdraw their paper. Now we know that plagiarism like this happens


quite a bit in machine learning. There are just so many papers and it's very difficult


to even detect if another paper has plagiarized your paper. It's difficult for reviewers to


find out that the paper is a copy of some other work. A lot of people are hoping to


get publications and by simply taking paper rewriting them a little bit, maybe doing one


or two different experiments and then submitting them somewhere else. However, there is a twist


user zill 24 says something very interesting is going on here. Because just a couple of


days ago, this exact paper has been found to plagiarize word by word, another paper


by Chinese authors submitted in 2020. And as thus caused many discussions on Chinese


forums. And this links to Chihou, which is sort of a Chinese Quora, and they put their


paper and this paper side by side. And it turns out not to be an approximate plagiarism,


but actually copy the paper in parts word by word, or at least phrase by phrase. So


this is a near duplicate paper right here of this paper. If you're confused, so was


I. And apparently, so is the original poster of the plagiarism claim saying, I'm never


aware of the paper you mentioned, but for sure I'll read inside it if it's the same


idea. Thanks for pointing out. And as you can see, people are generally lost. So here's


what happened. So the paper we considered first, let's call that paper a that paper


has been written and submitted to a conference and uploaded on archive this year in August,


the paper they claim plagiarized them was uploaded to archive in September, as you can


see by the date. Let's call this paper be the Reddit post claims paper be having very


similar ideas copied from paper a however, then an author of yet another paper paper


C comes along and shows pretty convincingly that paper B is actually a copy of paper C,


including screenshots of the diagrams and so on. Paper C also delivers proof of first


submission and so on. And you can even analyze that paper B did in fact screenshot paper


C because the resolution of their figures is worse. Here is the interesting part. Not


only was paper C written a year before, but also it was never released publicly, it was


submitted to two conferences. And then after rejection, the author simply dropped it because


they thought their idea wasn't that good. So paper C was before paper a and paper B,


but was never released. So there are multiple questions now, like how did paper B authors


get access to paper C? Now this post on chihu tries to follow that up. So they're trying


to contact the university, they're trying to find these people, they find that the main


authors no longer study there. One of the authors apparently says, Well, I just kind


of uploaded it to archive, but I didn't really write the paper. Nobody admits to anything,


nobody says anything. The nuribs chairs checked and it turns out none of the area chairs,


senior area chairs or reviewers is at the institution that plagiarized the paper. So


as of yet, it is still unclear who leaked the paper and how where these authors got


it from. Nor does anyone in this chain admit to any plagiarism. Now, while this obviously


sucks for the researchers of paper C, the question is what about paper a now. So paper


a made the claim that since paper B's claims were so similar, and paper B was after paper


a paper be copied from paper a but now you have a paper that's essentially a copy from