In short
The TWIML AI Podcast Episode #636: Unifying Vision and Language Models with Mohit Bansal
Date of Episode: [Date]
Host: Sam Charrington
Guest: Mohit Bansal, Parker Professor and Director of the MURGe-Lab at UNC, Chapel Hill.
Episode Summary
In this episode, Sam Charrington interviews Mohit Bansal about the integration of vision and language models in AI, focusing on the themes of unification, efficiency, and evaluation in the realm of multimodal AI. Bansal discusses his background in AI and machine learning, the challenges of generative AI, and introduces advanced models like UDOP and VL-T5, noting their state-of-the-art performance in vision and language tasks with fewer parameters. The discussion extends to data efficiency, evaluation biases, and the future direction of multimodal models.
Key Concepts and Discussion Points
- Introduction to Multimodal Models
- Mohit Bansal's background and journey into AI.
- Early thoughts on the potential of multimodal AI at IIT Kanpur and Berkeley.
- The progression of projects leading to the focus on multimodal tasks.
- Unification in AI Models
- Definition and Importance:
- Unification aims to reduce the number of specialized models by sharing parameters across tasks.
- Benefits include increased efficiency, simplicity, and generalizability.
- Challenges:
- Need for smarter vision and NLP components for effective communication.
- Large resource requirements for current models pose accessibility issues.
- Example Models:
- VL-T5: Unified model for various multimodal tasks, demonstrating efficiency by sharing parameters and pre-training objectives across tasks, achieving similar performance to specialized models.
- Efficiency in Model Development
- Parameter Efficiency:
- Introduction of adapters: small bottleneck modules allowing selective updates rather than full model updates.
- Memory Efficiency:
- Side networks for backpropagation reduce memory consumption.
- Keyframe sampling and audio complementarity to enhance video and audio processing.
- Evaluation Challenges
- Current evaluation metrics rely heavily on human perception, leading to biases and subjectivity.
- Discussion on FID and CNFID metrics, and the importance of evaluating models beyond mere distribution matching.
- Introduction of DALI eval: a metric to assess generative models based on spatial relationships and biases present in generated content.
- Need for causal explanation: Verifying if models provide correct answers for the right reasons, integrating attention mechanisms.
- Future Directions
- Expanding the concept of multimodality to include non-verbal cues and actions.
- Exploring explainability through generating programs that outline the processes of arriving at answers.
- Integration of diverse modalities in future models to enhance performance and applicability.
Key Takeaways
- Unification in AI models can streamline processes and improve efficiency.
- Model evaluation remains a complex and evolving challenge, requiring more robust and fair metrics.
- The future of multimodal AI holds potential for richer, more interactive AI systems that can learn and explain their reasoning.
References
- To learn more about Mohit Bansal's work and the discussed models, visit the [show notes](https://twimlai.com/go/636).
Conclusion The episode provides an enlightening look at the intersection of vision and language in AI, emphasizing the need for efficient, unified models and robust evaluation strategies as the field advances. Mohit Bansal's insights into the challenges and future directions of multimodal AI are crucial for researchers and practitioners alike.
For further reading and to stay updated on these topics, follow the TWIML AI Podcast and consider subscribing for future episodes.
Written by AI. May contain mistakes. Listen to the episode to check what was said.
Transcript
Automatic transcript. May contain errors.0:07All right, everyone, welcome to another episode of the TwiML AI podcast. I am your host, Sam Charrington, and today I'm joined by Mohit Bansal. Mohit is Parker Professor and Director of the Merge Lab at the University of North Carolina, Chapel Hill. Before we get going, be sure to take a moment to hit that follow button on Apple Podcasts, Spotify, or wherever you are listening to today's show. Mohit, welcome to the podcast. Thanks for having me. Really excited. Same here. So we're going to be diving into your work on multimodal, large-scale language models, and in particular, the themes of unification, efficiency, and evaluation, among others.
0:48And I'm very excited about exploring that topic with you. But before we get to that, I'd love to have you share a little bit about your background, how you came to work in the field, et cetera. Great. Yeah, definitely. So way back, I was, I guess, 15 years ago now, I was in India. So I did my undergrad there. I don't know if you wanted that much background, but yeah. So I started some AI and machine learning. IIT Kanpur, multimodal was not really a thing back then. And then I did my grad school at Berkeley, where we were always sort of joking between the NLP and vision groups, like, hey, like, when should we start multimodal?
1:22And then we would say, like, it's not really ready yet. The vision and NLP components need to be sort of smarter to talk to each other. So I think my first multimodal project was around 10 years ago when I was in Chicago. And then, yeah. And then since then, it's been a big part of my group and my lab. We basically work on several things. We have large scale language models for multimodality. We do a lot of video based data sets and tasks and models for video summarization, video future prediction, video question answering. We've also done a lot of work recently on trying to evaluate these very hot text-to-image and text-to-video models, which you see a lot of samples probably online.
2:02But how do you actually evaluate right there and compare these models? So, yeah, a whole spectrum of multimodal aspects. But like you said, I'll focus a bit more later today on themes of unification, efficiency, and evaluation because I think all these are very important in today's context. Were you surprised when the news came out that GPT-4 was multimodal? No, I feel like there was a lot of people already somehow predicting that. I mean, not somehow, they had probably some knowledge about it. Yeah, so we were expecting more multimodal elements to be getting integrated in all these models. I think it does have some pretty interesting elements in terms of zero-shot image understanding capabilities, being able to also do some step-by-step explanation of how it did that reasoning.
2:45But I mean, it's still a long way to go. I mean, there's a lot of capabilities like step-by-step generation and also things about explainability and efficiency. I would say it's a balanced excitement. It's an exciting time and it's giving a lot of people the sort of excitement to focus on this area while still tons of work left to be done. Yeah. And when you characterize the work left to be done, I imagine these themes that we've mentioned a couple of times now are a big part of the missing pieces. Right. Definitely. So it would be things like when I say unification, the idea is instead of having thousands of specialized models for every kind of vision and language tasks that have popped up in the last, I think we did LexMIRD, which was one of the first multimodal BERTs, right?
3:31You know BERT, obviously. So the first sort of BERT to combine vision encoders and language encoders and then have a cross-modal encoder for multimodal interactions has been almost four and a half to five years now. So since then, there's thousands of specialized models for very specific kinds of tasks, like visual question answering versus referring expression or visual pointing, generating a bounding box or segmentation, or even image generation and so on. So recently, the focus has gone much more on can we unify these models? So first of all, that's more simple, that's more efficient, because it can share parameters, but it can also learn knowledge from each other's parameters and modules.
4:10So there's a lot of advantages to unification, right? The shared knowledge, like I was saying, but also generalizability. Maybe because you've learned all these tasks together, you might be able to also compose a new task, right? An unseen task when you come across that. So that's obviously one angle. And then efficiency, I don't have to say much, I'm sure, right? Because as you know, all these models are going crazy in terms of number of parameters, like 100 million used to sound big, then a billion used to sound big in terms of parameters, then 10 billion, right? So, I mean, the definition keeps changing, right, of like what we are surprised by.
4:41The sad part is that these are still extremely out of sort of reach in terms of the resources available to most people, right? I mean, obviously, most of academia, but also just in general, right, any underrepresented community or anything that's not a big organization or like the four or five such options. So, that's the other theme that I can go deeper into later where how do we make these models efficient in all aspects, right? So number of parameters that need to be updated, the memory, the sort of speed, even, right? And there's many other angles, right? Like the environmental aspects, the carbon footprint, and so on.
5:11And then the third thing you mentioned, evaluation. Yeah. So evaluation is completely like an open challenge right now, right? I mean, I would say the first two, at least we've been, right, the community and our lab and all of, like a lot of folks have been at least focusing on the last two years, much more. But evaluation, especially for things like generative AI, right? So what we call generative AI, I don't really call it that in my life, but a lot of us have already been doing it for so long. But if you want to call it generative AI, just the term itself, generative AI, at least the good thing about that term is that it should clarify how hard evaluation is.
5:44Because even in language, there's a 30, 40-year-old field of just focusing on how to evaluate generated text, like automatic summarization and so on. Because there's thousands of ways to say the right thing. right so you cannot just match it to the ground truth which the humans wrote so now imagine doing the same thing for generated images and videos right which will have even more infinite sort of variations right that can still mean the same thing and they don't really matter right they're not really important changes but the model might get fooled by it right so yeah so evaluation metrics is one aspect of it right so we have one of the first works called dally eval that tries to take tally and other diffusion and image generation models and actually quantitatively try to evaluate their fine-grained reasoning skills like can they get the count right can they get the spatial positions right like left of something versus right of something right generate a horse left of the astronaut versus right of the astronaut got it and also social kind of issues like biases right gender bias race bias and so on color skin tone bias but there's so many other aspects to evaluation right are these models even if they're getting the answer right is it by spurious correlations or is it actually causally correct right is it right for the right reasons or right for the wrong reasons then there's this whole angle of also explainability right can the model explain the path to its answer right so we have some work and there's also some recent work from the community on basically being able to show the program right that sort of generated the actual answer could almost be like a graph or a tree of different modules that you're using so that opens a lot of very exciting doors actually as future work right because you've probably seen some of these works where, in fact, you can generate something as a program of different APIs or different tools, right?
7:25And in some sense, you're basically using this API or even apps, right? Different kinds of tools that are just getting combined and you execute that program, right? And the answer comes out. So there's a lot of recent work from different groups on that. Awesome. You know, when thinking about unification, one of the drivers for a long time for multi-modality, at least from the perspective of some NLP community, was this idea that in order to really kind of master language, we need grounding. And one of the main sources of grounding is like visual information. And so a driver for kind of multi-modality was to achieve grounding.
8:05In a sense, you know, the success of large language models says maybe we don't need other stuff in order to create these models that are really good at language. So I'm just curious your perspective to what degree does grounding factor in when you think about multimodality? And what are the primary drivers for your research in the area? Yeah, so maybe I'll come at it from two different angles. So one is the perfect question you asked, which is about what is grounding and is it needed today, right? In fact, the first multimodal project that I worked on 10 years ago was grounding where the topic was you have some 3d images and you have this sort of maybe caption right describing the image and this was in collaboration with other researchers at TTI Chicago and basically the idea was that can you actually learn the perfect definition of coreference so coreference means like figuring out which two words in a sentence right refer to the same entity so usually it's just been done as text alone right because you just try to figure out okay does this pronoun refer to like this person or the other person right but if you look at the actual definition of coreference it's all about grounding right do they actually ground two words ground to the same entity right in the actual world so that's what we did we said okay like can we improve coreference of different things in the long caption it was a paragraph level multi-sentence caption can we improve the coreference by actually trying to ground different words to bounding boxes in the 3d image like cuboids not boxes so that was the basic idea and in fact you could do the reverse you could also improve the box prediction and the scene prediction using information from the text so it was sort of bi-directional mutual improvements and then six years later we did this paper called vocalization which was basically the first attempt at taking something like BERT like a pure language model with masked language modeling objectives right which I usually just call fill in the blanks which means that you just remove some words right and then in context the model has to predict the the missing words.
9:59Now, what we said is that doesn't sound enough for Bert to just be basically be a world model by only filling blanks in Wikipedia. So what if we also ask it to do an additional pre-training task objective of for every word, you also need to predict a visual mapping, which is exactly what you said of like, can each word in context also try to sort of come up with some sort of image, right? That represents that word in context, right? Because the word on its own can have multiple meanings or can be ambiguous. So that's what we did. We first trained a Vokenizer. This was... But not from a generative perspective, from a retrieval perspective?
10:34From retrieval, because this was 2018 when we started this project, 2019. So now, yeah, you could do the exact same thing with generations. But back then, it was basically first training something like... This was like a small version of Clip before the Clip era. And what you would do is you could train a Vokenizer on MS-Coco kind of multimodal data sets, which have images and captions. And then you would basically take that visual mapper that's trained on MS Coco and get all kinds of visual predicted visual mappings for all of Wikipedia because that's what you trained Bert on right back then so basically you would want longer sentences from Wikipedia and much more text because Bert cannot just be trained on small short caption style sentences so you would transfer this you would train the vocalizer on MS Coco but you would get all the visual mappings from Wikipedia based on that tool and then you would basically retrain pre-train Bert using two objectives now the mask language modeling as well as the visual like retrieval prediction and then we did a more advanced version of this at NeurIPS 21 called WIDL and KD where we were not just using images but we said let's distill knowledge from videos right because videos have much more temporal and physical knowledge so then what we did is we trained a teacher model which was trained on video and language discriminative objectives took the just the language part of that teacher model the language encoder.
11:51And we basically distilled its knowledge to a student language model. And then we only use that student language model to perform language only tasks. And we showed that basically you can So you're trying to show that you can ground in training visually and then take just the language part and separate and it retains some of the benefit of grounding. Yeah, exactly. So we actually showed that it can retrieve relevant videos just as a language model, even though it has never seen videos before. But more importantly, we took NLP only tasks, right traditionally, which are not multimodal tasks, just text only tasks.
12:24And we showed that you can get better results, because this language model has distilled knowledge from videos. And in fact, we showed it on very specific data sets that intuitively should need temporal or physical knowledge. So one example is physical common sense task called PICA from UW, where basically it needs kind of knowledge of whether like how to screw a bulb clockwise versus anti-clockwise. And then also something different would be like temporal knowledge, where if you mention a very complex ordering of events, like can you actually figure out which event happened before which other event?
12:56So these are the kinds of things where you would imagine, right, this kind of knowledge being useful. And that's where we showed the bigger gains. So that sort of comes back to your like last point, right? Is it relevant as the language models keep getting bigger and bigger? So that's sort of an open question. I have two answers to that. One is, I feel like there'll always be certain kinds of physical common sense and temporal common sense, right? And dynamic common sense kind of knowledge that's just not written in text, right? I mean, this is a very old concept, right? That some things are more visual and some things are more verbal.
13:29So unless you actually find artificial data that has described every possible thing in the world, like verbally, if you look at natural data, right, then there are a lot of things that are inherently visual and also temporal and physical. so you don't expect them to be having very concrete definitions in text very verbal so my short answer would be that right but the other more interesting answer would be also data efficiency right that connects to the like maybe in a nice way the second point of efficiency that even if you did find a way to get 100 billion tokens of text to be able to capture all this knowledge like why bother right i mean if you can basically use much smaller amount and much more natural and much easily collectible similar information from another modality right like that's in some sense how we learn right as humans because we use all our senses as opposed to if i forced you right to like no you're not allowed to just read ground anything yeah you just have to learn your whole you'll be 40 years old and you have to just learn everything by getting lucky by finding text right so so that's the that's the trade-off i guess it's also about data efficiency It's a bit counterintuitive to think of video as being efficient relative to text because the files are so cumbersome, the volumes are so large.
14:41I completely agree. But I think there's a difference in terms of senses, the sense being used and the modality being used, it's more efficient. But in terms of engineering, it's less efficient, right? So I think you can pack the same amount of information in a video if you are learning as a human by watching a video, right? So in that sense, much more information can be packed. But in terms of engineering, yeah, just the way we represent videos right now is just more cumbersome. So that's been a big focus of our work, actually, right? How to make video and language models much, much more efficient.
15:09For example, by using very specific keyframes and not all the frames. And we have another paper where we showed that you don't need to use the video all the time. Sometimes you can decide which parts are important to see the video. And some parts you can just listen to the audio, right? Imagine watching a movie, right? Sometimes you're just working, right? when watching a movie and only a few times you glance at the TV, right, for the important scenes, but the rest of the time you get most of the material from the audio. There's a lot of, right, other ways to get efficiency in video and language.
15:35So one of the things that is enabling kind of this next level of unification for multi-modality is kind of this emergence of transformers as a standard substrate for machine learning applications. Is that necessary for unification as you've defined it? Or were you doing experiments around unification pre-transformer? Is there an idea of pre-transformer unification? You know, in some ways, maybe there's like architectural unification, but there's also like task unification or something like that. Like what are the right words to talk about this kind of stuff? So there's different levels of unification is what you're trying to ask.
16:14So the unification thing that we did in 2021 ICML, we started it early 2020 was called VLT5. So that was definitely based on transformers, right? And the T5 model. And the idea there is, can you unify based on treating everything like language generation? Since it's a multimodal interview, a lot of it is visuals. I wish I could show you slides, but I'll try to describe it visually. This is a perfect example, right? Of the efficiency I was talking about. I have to describe everything verbally, but I can just show you a figure and we would be done in five seconds. So basically the idea is that we said, why can't every task be treated as language generation?
16:50So this was kind of like the language version of generative AI, where we said, okay, imagine you're doing visual question answering. Then it's obvious, right? You take the image and the question and the answer can be generated as text. But suppose you're doing image captioning, then also it's obvious, right? You take the image and the caption gets generated as text. But you can also do something like image text matching. So that's a task, right? where you have to say false or true, whether a pair of image and text match each other or not. So that can also be generated as true or false. Instead of classification, right?
17:17You can do a generative version of that where it generates same as VQA. VQA traditionally is a thousand way classification. You already know all the thousand possible answers and your model has to do a sigmoid right over all kinds of answers. Whereas what you could do is you could try to generate all these answers, right? And this way it also allows you to handle rare answers or unseen answers. So that was sort of the idea. But what you could do is you could also handle very unexpected tasks. So what you could do is you could also say that I want to basically do the task of visual grounding, which is also called referring expression comprehension.
17:49And the idea is I give you a complex image and I say the third horse from the left, right? And it might have many horses. So basically you have to draw a bounding box or segmentation around the third horse from the left. So traditionally, this is basically the task has to generate a, like give up, like it has a lot of boxes and it has to predict which box am I talking about? So in this case, let's say box number 31. right so what we said is now you can also handle this task as language generation right where you could basically just ask your language decoder to actually just generate the id of the box as a word so that's what the idea of vlt5 is right that you could handle all kinds of seven eight different very different multimodal tasks like bqa captioning image text matching also visual grounding but also things like multimodal machine translation where you're given english plus image and you have to generate a second language and we showed all of these can basically be treated as image and text inputs go in you do a bi-directional transformer and then the output is generated by language decoder it's basically just like conditional language modeling all right you just have a conditional language decoder and yeah so that way we showed that you can actually have seven times less parameters by basically sharing parameters across all seven tasks and in fact get pretty similar performance to all the specialized individual models for all these seven tasks And then there were also other side effects, right?
19:05Like I said, you can also handle rare categories or unseen categories in VQA because you're generating things, right, word by word, or even character by character, as opposed to classifying from a vocabulary. So this was 2021. To be clear in that particular research, the VLT5, was that end-to-end trained or did you have a pre-trained kind of standard LLM and input stage that kind of fed into it? Yeah, so we started with T5 parameters. Yeah, T5 parameters could be used to initialize the decoder. And then you would have the visual and textual input. So then you would think of it almost like visually prompting a T5, right by giving it an image and a question, these kinds of things.
19:46We showed both ways like with and without using the T5 parameters. And then what happened is this was 2021. And then a lot of good follow up work from Google and AI to so you probably heard of models like flamingo and also unified io gpb right so a lot of these models followed up on vlt5 and they took it several steps forward where instead of only generating everything as text you can also handle tasks like text to image where you could also be right like the decoder is also multimodal so based on the task you can decide whether to only generate language or generate an image or both right so this is sort of now it's many to many unification Many things can come as input and many things can come out as outputs.
20:26But now coming back to your question of different levels of unification. So VLT5, there's three levels of unification, right? You could unify the parameters that you can share the parameters, but the pre-training object might still be different. And then architecture might also be different for some parts of the model. So another more interesting thing could be where you also unify the pre-training objectives. So one example of what we did there was called TVLT, which is called textless vision language transformer. And the idea there is that you basically want, so this goes back to your question about video and language efficiency.
20:59What we figured out is we said that if you're using video and language, and there is a lot of issues in the text. So what happens is you usually use the automatic subtitles, right, that are obtained by getting like automatic speech recognition, right, spits out the subtitles. So there's a pretty well known problem here that this is all very noisy and misaligned with the videos and so on. So what we did was we basically said the intuition is that you can actually skip everything on the text side. You don't want any ASR modules. You don't want any tokenizers. These may not even exist for a lot of domains and languages.
21:30And what you can do is you can treat the audio spectrogram images almost the same as video frames. So basically, again, visually, it would be easier to explain, but you probably have seen audio spectrograms, right? Like these sort of images, right, that have different levels of the audio features. so what we did is we basically treated the video frame images and the audio spectrogram images exactly as the same image encoder with the same shared parameters but also with the same shared pre-training objective now and what that means is that you can actually just do the masked auto so are you familiar with the image version of masked language modeling so in in bird what you would do is you would remove words right mask out words and fill in the blank in context in images you do the same thing where you mask out patches of images, masking squares and stuff.
22:17Yeah, right. And then you have to reconstruct them. So basically, we did the exact same thing, both on video frames, as well as audio frames. And this way, we could share both the pre training objective and the parameters and the architecture. And what we showed is using this, you avoid all text modules and all the noisy situations, you get 30 times speed up in inference, and one third of the parameters while still maintaining the same results as text-based models. But you also get improvements when there are tasks that actually need audio features, like multimodal sentiment analysis, where you need some sort of emotion and pitch and tone, right?
22:51These kinds of elements. So that's sort of one example of going one step further, right? In terms of like the kinds of things you can unify. So on this topic of the image masking, just as an aside, I guess, Is that the same as kind of infill as a task? Yeah, it's similar to infilling or inpainting, these kinds of things. So that's also being used for text to image generation now. So that actually also connects well to the third example I was going to give for unification, which is this new work we had in collaboration with Microsoft called UDOP, Universal Document Processing. And the idea there was that now you have even more complex modalities.
23:26You don't have just text and vision, but you actually have them spread out in a very complex layout, right? So it could be very... So think about like a newspaper page or an annual report or something like that, where you've got text, you've got images, you've got tables, et cetera. Exactly. So it could be even things like random websites, finance reports, academic papers. So very, very diverse kinds. There's a whole actually benchmark, which has all these kinds of documents, finance reports, academic papers, websites. And the best part is there's a whole benchmark on this, where you have a set of questions that you need to answer about these documents.
24:01So it's called document question answering. And there's several other related tasks called document understanding tasks. So it's called the DUE benchmark, document understanding evaluation. So basically, this UW model that I'm talking about got the new state of the art sort of frank one on this benchmark. And the way it does that is that it unifies text, image, vision, and layout, all three of these together now, right? So it's not just about text and images, but it's about text, images, and layout. So the way it basically does this is it just has these joint pre-training objectives where the text layout and vision goes in and then it has to reconstruct the text and layout together so instead of just reconstructing the patches or the text independently now it treats the text and the layout kind of boundaries and locations indices right like the the coordinates you can call it it starts merging the text and coordinates together as just text and it tries to reconstruct the text and the coordinates of that text all together and then it also does the similar thing for the vision side.
24:57It's very cool. I wish I could show you images, but like what it can do is it can. Well, if you send me links to images or we'll of course include the paper in our show notes, but if there are particular images or videos or anything like that, we can include those in the show notes page as well. Sounds like a little bit of, you're doing two things here. One is you're making the layout information explicit to the model. Right. Right. And the second is multitask kind of thing. You're having the model attend to thinking about layout as it's making predictions. Exactly. So it can sort of learn that like what kind of text appears on which part of the document, right?
25:36It's sort of learning this together. That suppose I see something like a signature, maybe already know that it's usually in the bottom left or the bottom right, not on the top left or top right. So that's exactly what you mean by making it think jointly. It's not just generating the text. And by here text, by the way I mean also OCR like it can be handwritten not just like type okay so that's why I wanted to show this to you because we have these very cool examples where this is one of the first models that can actually edit documents so I can tell it exactly like which part of the image sort of to change right and like replace it with something else with the same exact format or handwriting and so on and so the technically this is important obviously ethically there's a whole separate discussion on this right that's why we didn't release this image encoder we only decoder We only release the importer.
26:16But technically, it's extremely important because this way, the model is actually much better at understanding by being able to generate and edit the input, right? When you're actually able to edit and generate things, you understand much better, right, than just staring at things or just looking at them, right? So that's sort of why this model is really state of the art, because it's understanding by generating and editing documents. I want to draw a parallel. Well, and you tell me if you think that this is applicable or whether I'm kind of overloading this idea. So we've kind of long explored in the podcast, this kind of swinging pendulum between pure statistical systems and trying to incorporate kind of physical knowledge into statistical systems.
27:00For example, in the case of robotics, like do we incorporate the physics information or do we just do kind of an end-to-end statistical treatment of the problem? And in a lot of ways, incorporating in the layout is kind of analogous to incorporating in the physics of the document as opposed to an end-to-end, hey, everything is pixels and we don't care about anything. We don't care about this additional kind of featurization of the layout. The structure. The structure. Is that a fair analogy? Yeah, it's a fair analogy. And I'll take it one step further, which is I think already what you said, is that I could do it in two ways.
27:36I could actually pre-define the structure, right? And like sort of hard-coded or give it as priors, right? Whereas the other way to do it is to sort of learn that, right? Through generation or editing, right? So that's the sort of difference I was trying to create that also because this model is not pre-assuming anything during understanding, but it's actually learning by making edits and changing and seeing whether the answer goes wrong, right? That's why it can learn much more in terms of almost like exploration, right? As opposed to given some priors, right? Okay, this is how the world works.
28:04That doesn't work for very, very diverse document layouts, right? Like different finance companies versus websites versus academic papers, like different style files, right? Things are so diverse that the generation element is very important here. This UDOT paper is a CVPR 2023 paper, and we'll also include in the show notes, Cha Zhang from Microsoft is a co-author on this paper. And he was previously on the podcast, at least a year ago, I want to say, talking about kind of some of the ways that they're approaching advanced OCR, which I'm imagining some of that is like a precursor to this work.
Read the full transcript
28:42Yeah, I think it's a different group in MSR and they have multiple efforts also. They've done a lot of good work on OCR, layout, language modeling, and so on. Okay, three years ago, I'm told.
28:56The pandemic twists time. Yeah, so some of the seminal initial work. And then Chai is also a co-author on our UW work. So yeah, they've been pursuing the different pieces of it for a long time. We've spent a lot of time on unification. We want to make sure to cover efficiency and evaluation. Efficiency, you mentioned, it's kind of the elephant in the room because these models have gotten so large. What are some of the ways that you've approached trying to make multimodal, large-scale models more efficient? I think it connects well to the previous part and will save some time, is that unification, right?
29:28Luckily, it's already a very good way for efficiency because as I said, in VLT5, you could have these single set of parameters as opposed to seven times, right? For seven different individual models. So unification directly gives you that sort of efficiency in terms of a smaller model and number of parameters because you're sharing parameters right and then other ways that we've been doing it is for something called for example vl adapters which was cvpr 2022 where the idea is that you add these small bottleneck modules called adapters inside between different layers of your model in specific places and the good thing is then you can only update those adapters parameters as opposed to the parameters of the full model.
30:06And there's different variants of these simple adapters or high performers or compactors. But at the end of the day, what we showed in that paper is that if you only update those 1 % to 5 % of the parameters in the adapters, you can actually still get similar performance to full fine tuning on diverse kinds of image language and video language tasks. And more interestingly, it's also in these adapters, you can have different settings. We showed that you can have all the parameters of the adapter shared across the different tasks, or you could have completely independent adapters or you can have half shared and half unshared parts of the adapters.
30:40So luckily, even the fully shared one works best, which reduces parameters even further. And it actually also works best for knowledge sharing, like smaller tasks with small amount of data got the best benefit because the whole adapter parameters were shared. And then the last thing we showed there was that it's also the simple adapter approach is also much better than more complex parameter efficient tuning approaches like LoRa and prompt tuning and so on. So that's sort of one angle. But then the next step here was that how, so if you're just reducing the number of parameters to be updated, unfortunately, it doesn't have a big impact on the amount of memory that's used for the model, which as we know, like strictly defines the kind of GPUs, right, that you need.
31:18For example, Academic Labs cannot have 100, 200 GB memory based GPUs, right? And I mean, in fact, most of us are still using a lot of the 12 GB memory GPUs because the 48 GB ones are pretty expensive. So memory efficiency is another very important angle. And that's what we showed in the next paper called ladder side tuning, which is NeurIPS 2022, where we showed that you can actually have a side network. So if your backbone of the model is very huge and expensive, instead of backpropagating through the whole backbone, which increases the memory consumption, you can just have a shallow side network.
31:50And you can actually just do the backpropagation through the side network as opposed to the full backbone model. So I'm not going to too much more detail in interest of time, but these were sort of the two examples of efficiency where you can reduce the number of parameters being updated. And further, you can add the side backbone to also reduce the memory consumption. You know, what's common between these is that there are kind of architectural algorithmic approaches to efficiency as opposed to maybe coarse grain engineering approaches to efficiency. Yeah. Another example I already gave you is the video and audio one, right?
32:22Like when you are, like you said, video frames are very expensive. So two ways we reduce video efficiency, increase video efficiency is one is you can only use a few key frames instead of using all the frames of a video, right? You can just sample a few key important frames. This was called ClipBird, which was CBPR21 best paper, honorable mention. And the idea was very simple that basically you can back propagate through updating all the video features by just sampling a very few small set of frames instead of the whole video. And the other related idea to this is the audio complementarity where you can actually skip a lot of video frames and just use the cheaper audio frames in place of them, which sort of comes from that intuition I was saying that even as humans, right, when we are watching a movie, for example, we don't really need to be watching the TV screen all the time.
33:09So these are maybe some other kinds of efficiency examples, but more on the video side. I think we've saved evaluation the most amorphous and probably difficult one for last. This is something that I've, maybe it's another conversation. Like I've been wanting to dig into this because I see oftentimes kind of comparisons between generative models. And I'm often, you know, I haven't had a chance to dig into it yet, but I'm often like, how are they even benchmarking or comparing these types of models? Is it all kind of human perception-based types of evaluation? Or are there some other ways that folks are doing this?
33:49Give us a kind of a lay of the land for evaluation? So that's exactly what we started. So yeah, so we basically, I mean, it's mostly what you said. It's basically human perception or human evaluation, right? You take a few examples generated by your model versus the previous model and you try to see which one is better. And I mean, that cannot be scaled, right? For example, and it can also be pretty biased based on like who the evaluator is and they're very subjective, right? They can have different preferences. So the current metrics are things like FID and CNFID. If I can jump in, the greatest example of this So the example that's top of mind for me is, I guess, in one of the ChatGPT blog posts, they talked about the reason why ChatGPT was initially so verbose was because the evaluators just they liked verbose output and they said, oh, this sounds like the chatbot really knows what it's talking about.
34:42When it like, tell them what you're going to tell them, tell them, tell them what you told them, like this classic essay style. And that got fed back into the product. And that's why it became so verbose. Yeah, exactly. That's a whole, like you said, different conversation on its own. Like this whole area of RLHF, right? Reinforcement learning with human feedback has all these things to take care of because make sure that the human feedback is diverse enough and not just the verbose versus non-verbose person, but different communities, different cultures, right? Different socioeconomic backgrounds.
35:10So yeah, that's a very interesting conversation also. So coming back to its related point in text-to-image models, the metrics, there are some metrics. So there were things like FID, which basically what it does at a high level is it tries to match the distribution, right, of the training images, right, with the image that was generated. So in some sense, like the ground truth images versus the image generated, it tries to find a distribution of both of them and calculate the distance between the distributions, right? So it would almost be like... It strikes me that that's almost a negative metric in the sense of a better generative model would be able to generate an out-of-distribution response to a prompt as opposed to being closely aligned to the distribution of the training data, right?
35:54Yeah, I think at the high level, that's exactly hitting the nail on the head is the phrase, right? Yes, because in fact, that's the reason maybe because why most of the evaluation metrics that both we and others are working on is checking for out of distribution accuracy. So that's the main issue that basically it should not be able to memorize things that are already in the training distribution, right? It should be able to handle completely unseen scenarios. But even before that, a bigger issue is that if you want instance level evaluation, not distribution level, what it should be able to do is, like I said, if I say horse on the left of the astronaut or the right of the astronaut, like distribution level metrics will not be able to check for that, right?
36:35You really need something which finds object detectors. So it first detects the objects in the image, and then it checks the coordinates of the boxes of those objects. And then it has some calculations saying, okay, was the horse, the box for the horse and the box for the astronaut? I found them. Now let me check whether their coordinates satisfy a left relationship or a right relationship, right? These kinds of things. Which is really interesting because it kind of suggests a need to move from a regime of kind of static benchmarking to the creation of a benchmarking system that can be applied to the generated images.
37:10Is that correct? Yeah, so basically, in DALI eval, which was one of these first metrics for text to image models, we tried to capture color, counting and different kinds of spatial relationships by basically doing what I said, like figuring out where the boxes are and what their relationship is. And then we also had a social bias kind of evaluation, right? Can we figure out whether these models, instead of uniform distribution for a prompt, like an image of a nurse or an image of a doctor, these should be uniform distribution, right? over things like gender or color skin tone. But we showed that most of these models are very, very skewed in terms of one gender or one skin tone.
37:49So again, we showed how to have some initial metrics for this and not just do human evaluation. But obviously it's not easy because some of these also need models as the metric, right? I mean, even object detection and gender classification, right? All these can have their own biases. It's an open challenge, right? It's a work in progress. You always do want some human evaluation as a good complementary safeguard, but you also want to keep improving the metrics so that they correlate. So the way the metric development community works is that you also want to show that the metric has high correlation with human judgments.
38:22And what that means is that if you use your metric to rank the outputs, and then also humans have ranked the output in terms of some quality, then you calculate the correlation between these two rankings. That's called a meta-evaluation metric. So you want to basically keep improving this correlation. If your metric is getting better, it should get more and more correlated with human judgments. So that's sort of one angle of evaluation. That's why I agree that when you said it can be a whole different like conversation is because there's so many other elements, right? I briefly mentioned this issue of spuriousness, where even if the model, suppose a VQA model, right, even visual question answering, if it gets the answer right, like how do we know whether it was right for the right reason?
38:58Or was it just some spurious correlations? So we had this work at NewRIPS last year called VizFizz, which basically showed that if you want to use human level supervision of attention, attention boxes or attention maps of what to pay attention to when answering a question about an image, how do you actually use those? So we showed that you can actually get improvements using those attention maps just for spurious reasons. You'll see improvements in VQA performance, but they will be not right for the right reason. So basically we showed how you can bring in different kinds of causality and explainability kind of objective functions to make sure that the improvement is right for the right reason.
39:35So that's another sort of completely sort of long conversation, right? On how do you insert more causality and reduce like spuriousness, right? In terms of evaluation, because the model just getting the right answer is not enough. That connects it to also explainability, right? Maybe the model should also generate a path or a tree or a graph of reasoning, right, on how it reached the answer. And then you can also evaluate the reasoning paths, not just the final answer. So there's a lot of different aspects of evaluation. There's also a very big area called factuality and faithfulness, right? I mean, is basically the image generated image, is it faithful to the input information in the text, the prompt, right?
40:14If you're generating a multimodal summary, is it faithful to the input document and the images that it's summarizing, or did it hallucinate information that was not present? So we also do a lot of work on faithfulness and factuality, but that's good, right? I mean, I feel like - Echoing back to some of the comments you made in the context of unification and efficiency, would you say that the introduction of multimodality makes factuality an easier problem to solve than just factuality for large language models or is it harder or both, I guess is probably the answer. Yeah, that's a very good question.
40:50actually. And the answer is both. So we had this paper on multimodal summarization and how to improve its faithfulness. And so what we had to do is now instead of just checking whether the text is hallucinating something with respect to the input document, now you also need to check whether it's hallucinating something with respect to the input image. But then we also showed the thing you said, the other side, that in fact, having multiple modalities also gives you some sort of voting, right, or some sort of agreement. So it depends on the scenario, some information that's present in both modalities gives you a better way to avoid faithfulness because, right, it should not hallucinate based on either modality.
41:25But given the fact that some modalities are just harder in terms of, right, being accurate, like the features are not that high quality in certain modalities than other modalities, that definitely creates a little bit of an imbalance. And when you talked about those two separate tasks, checking that the alignment between the the prompt and the text and the prompt and the image. Is that like supervision or is that? Both. So first we came up with a metric to actually measure that. And then exactly like you said, we also used it as supervision. So the metric was used as a reward to improve the quality of the multimodal summary generation system and reduce its hallucinations.
42:02I'm not sure if that fully answers the question. When you come up with the metric, is the metric kind of computable from the prompt in the image or is there have to be a labeling step each time? What kind of labels do you mean? Okay, you want to determine if you have a prompt and it's generating an image and you want to determine if there's some hallucination in the image. Can you automatically evaluate the image to determine if there's a hallucination or does a human need to look at the image and say... Yeah, so it kind of connects back to, for example, in this case, what you're talking about, it connects back to the object detection based DALI eval metrics that we developed, right because the generated image you can first detect all the objects and then you can see whether it hallucinated some object that was not in the prompt but it's not that easy because it has to be something about the important objects right more salient objects because something in the background is fine if i say generate a dog with a frisbee why can't there be a human in the background right yeah probably there will be it's still a little bit tricky but the more engineering answer would be you first get all the objects in the generated image and you can then check based on saliency, right?
43:05At least anything salient should not have been generated that's not in the prompt, right? In the input prompt. So yeah, it's almost automatable as long as you have a good object detector. Super, super interesting. Well, Mahat, this is all, this has been a really fascinating conversation and a lot of interesting stuff. We've talked about a lot of future directions. I know the universal document processing is something that you're continuing to work on. Any other ideas in terms of future directions based on what we've talked about? I would say two main things, right? One is, and not just me, I feel like open questions for the community would be just multimodal right now, right?
43:41It shouldn't just mean images, videos, and text, right? I mean, obviously, we are going to things like layout and all that. But multimodality for humans, right, is much, much more. It's things like having action and interaction, right? Like we as humans, right? I mean, you learned not to touch something hot after you got burned, right? There's probably there's even some idioms on this, right? so so basically think of it as learning by interaction so that's another kind of modality right that's very very less incorporated in terms of these multi-modal models then there's things like gaze right where am i looking when i'm talking to you there's things like gesture i'm pointing there's things like posture right so there's a lot of these things called non-verbal cues right so we also need to bring in many other kinds of non-verbal cues as modalities as well as this reaction action interaction kind of element right as rewards and that's very hard right now because it has to be mostly done in simulation benchmarks, right?
44:33These simulated worlds. And that has a little bit of this chicken and egg problem that it can only learn as complex of a behavior as the simulated benchmark allows. Because we can formulate in a simulation. But we formulate that simulation. So it's already sort of, and it's mostly handicapped partially because it's basically the simulation benchmarks have the limitation is the right word for in terms of not whether we want to include more things in them, but it says that the unity and all the sort of software, right, that you'd use to create these benchmarks can only handle that much realism and continuity, right, and diversity of actions and objects.
45:09So that's sort of one open challenge. And then the other, yeah, I already covered is explainability, right? How can we generate things like programs that can actually first explain the program on how to generate the answer? And then you execute that program, just like Python, and then you get the answer. So there's much more work starting on that. We had one of these works called summarization programs, which does it for language generation, like summary generation. And then recently there's works on the visual side of this from the community where if they're answering a question, for example, they'll first generate a program like in Python to actually execute and generate the answer.
45:43So it also shows you the path of how the answer was generated, right? Not just the answer. Like there's an image and I say, how many dogs are next to the white building, right? So instead of just randomly saying three, the program will show you first it detected the white building, then it went to the left side of it, then it counted the number of dogs. And this is a very quick example, but you get the idea, hopefully, that it gives you the whole program on how it came to the answer. So that's also a pretty exciting new area of program-based explainability and then executing those programs. Okay, awesome.
46:14Which opens a lot of doors, right? Because these programs doesn't need to be just Python. They can actually use APIs or tools, and they can combine all kinds of things on the internet, right? To be able to mix and match different APIs. And you're seeing some of this work online, I'm sure, these days. It basically creates a much, much bigger opportunity being able to mix and match APIs to be able to do very diverse kinds of tasks. Got it, guys. So you're referring to some of the work that's happening around kind of tools-based agents and things like that. Exactly. And now you're applying these ideas to validation, explainability, and truthfulness of generated images and text.
46:52Yeah, it's both for enhancing the kinds of skills you can do, but also along with free explainability. because it's actually telling you which APIs and tools that combine. Awesome. Well, Mohit, thanks so much for taking the time to share a bit about what you've been working on. It's very, very interesting stuff. Thanks. Same way. Thanks for having me. Thank you. All right, everyone, that's our show for today. To learn more about today's guest or the topics mentioned in this interview, visit twimla.ai.com. Of course, if you like what you hear on the podcast, please subscribe, rate, and review the show on your favorite podcatcher.
47:29Thanks so much for listening and catch you next time.
From the publisher
Today we're joined by Mohit Bansal, Parker Professor, and Director of the MURGe-Lab at UNC, Chapel Hill. In our conversation with Mohit, we explore the concept of unification in AI models, highlighting the advantages of shared knowledge and efficiency. He addresses the challenges of evaluation in generative AI, including biases and spurious correlations. Mohit introduces groundbreaking models such as UDOP and VL-T5, which achieved state-of-the-art results in various vision and language tasks while using fewer parameters. Finally, we discuss the importance of data efficiency, evaluating bias in models, and the future of multimodal models and explainability.
The complete show notes for this episode can be found at twimlai.com/go/636.




