← All AI Engineer talks

AI Engineer Europe 2026

How Transformers Finally Ate Vision

About this talk

Roboflow's Isaac Robinson explains how vision transformers displaced convolutional architectures through scalable pretraining, learned inductive biases, and infrastructure inherited from large language models. Tracing Swin, ConvNeXt, Hiera, masked autoencoders, DINO models, and FlashAttention, he connects backbone design to segmentation foundation models and practical deployment tradeoffs, including Roboflow-reported speed comparisons against fine-tuned SAM3.

Chapters

  1. 0:00Introduction: CNN inductive biases and the rise of transformers
  2. 3:40Architecture evolution: Swin, ConvNeXt, and Hiera
  3. 7:25Masked autoencoders and DINO visual representations
  4. 9:33FlashAttention and the practical advantages of vision transformers
  5. 10:38SAM, Roboflow deployment tradeoffs, and closing questions

Talk transcript

  1. 0:00

    [upbeat music] Hi, I'm Isaac Robinson.

  2. 0:15

    I'm the research lead [REDACTED:username], and I'm here to talk to you today about how transformers finally ate vision.

  3. 0:23

    Uh, so I'm gonna start off with a brief summary of the competition, then we're gonna go through an overview of the evolution of the transformer,

  4. 0:35

    why that ended up winning out, some consequences of that, and what's next.

  5. 0:40

    So where we started, convolutional neural networks. I'm sure everyone here is aware of how these work, but just to summarize, [chuckles]

  6. 0:48

    they have excellent inductive bias motivated by looking at how the eye works. So you have a, a filter that you convolve against your image, and you have activations that light up the same way regardless of where in the image the thing is happening.

  7. 1:05

    Great inductive bias. A person in an image is a person regardless of whether they're in the upper left or the bottom right. And you-- we build these, uh, interesting hierarchical structures out of these ResNets, et cetera.

  8. 1:17

    This is how we've done vision for a very long time.

  9. 1:21

    Then comes the transformer. Again, I'm sure everyone is aware of how a transformer works, but just to summarize, we, uh, have a just a set of tokens. We run a set-to-set operation.

  10. 1:34

    So there's no inductive bias. This is just an N squared transformation. We inject the inductive biases into the transformer. So for example, a classical, uh, autoregressive transformer, we add a causal mask to the attention matris- matrix, and that gives us a sequential modeling.

  11. 1:53

    Uh, for vision, we have a vision transformer,

  12. 2:01

    and this is very complicated. A lot of engineering went into this. We take our image, we split it into, uh, patches. Sixteen by sixteen was the original.

  13. 2:14

    And we add a learned positional encoding, and then we throw that into a transformer,

  14. 2:21

    and that's it. So transformer is N squared set to set. We've got patches in our image. This is, uh... We've got,

  15. 2:34

    uh, N over sixteen patches for the side length N, and we end up actually with N to the fourth power with the resolution, uh, compute scaling. So we have no inductive bias.

  16. 2:45

    The thing that is in the upper left could have a totally different activation pattern if it's in the bottom right.

  17. 2:53

    And so the question naturally arises: which is better? The high inductive bias N squared convolutional network or the no inductive bias N to the fourth power ViT?

  18. 3:03

    So as everyone would expect, it's the ViT.

  19. 3:09

    So how is this possible? And I'm, I'm going to make the argument that it is because of massive ViT-specific pre-training,

  20. 3:19

    and then we get to borrow a lot of speedups and infrastructure from the fact that LLMs are blowing up.

  21. 3:27

    So to trace this evolution, we're gonna talk about-- We, we just talked about the introduction of the ViT, then how it-- how people tried to say, "Okay, well this, this cannot possibly be the best thing that we can do.

  22. 3:40

    How do we make this better?" So we go to Swin, then back to, uh, a convolutional-based network, ConvNeXt, then to Hiera, um, which I think is a, kind of a-- ha-has some really, really beautiful takeaways.

  23. 3:54

    And then as always happens with machine learning, we come back, bitter lesson, to the simple thing that scales well: the ViT.

  24. 4:05

    So, uh, first we're gonna start with Swin.

  25. 4:10

    So we have this Patchify operation, and we take our, uh, our patches and we split them. Instead of doing global attention across all the patches at once, we just say, "Okay, we're gonna do at- attention in this window."

  26. 4:24

    If we just keep doing attention in this window though, the, the, uh, tokens will not be able to interact with each other. So these two will never see each other.

  27. 4:33

    And so the next layer, in fact, we shift the window a little bit. So we've got these back and forth overlapping windows, and this looks very, very similar to what I described with the convolution.

  28. 4:43

    Yeah, so we've got this, uh, similar-looking operation that is happening on these sections of the image and, uh, then we end up with like overlap between the filters, the locations that they get applied on, and this is how we proceed.

  29. 4:58

    And this actually gets us down to N squared if your window size is independent of your resolution, and it adds a locality inductive bias following the convolution of that.

  30. 5:08

    So that, that seems logical. That makes sense. Um,

  31. 5:14

    then we go to the, uh... Someone said, [chuckles] "Okay, look, there's this transformer operation that has no inherent relationship with vision. Let's go back to the convolutional network. Let's take all the learnings that we've had from the vision transformers and just spit them into a convolution network and see what happens."

  32. 5:32

    So ConvNeXt says, "Okay, we're gonna do a Patchify operation." We're gonna do a, a-- I think it was a...

  33. 5:38

    It was a four-by-four patch instead of a sixteen-by-sixteen patch. And we're gonna say our ViT was, as all transformers, a self-attention, feed forward, self-attention, feed forward, et cetera.

  34. 5:53

    And that self-attention is mixing your spatial information. Okay? So for the convolutional network, what if we just say, "Okay, we're gonna have the convolution mix the spatial information. We're gonna do the same pattern."

  35. 6:05

    Uh, mixer- Feed forward, mixer feed forward onwards. And we're gonna borrow the same hierarchical structure that everyone has been using for these convolution networks,

  36. 6:15

    and, uh, also throw in Layer Norm and a couple other innovations, and that's it. We're gonna try that. Turns out that beats ViT and Swin when you apply it on the, uh, standard ImageNet reference.

  37. 6:30

    That's great. Finally, we have something that makes a little bit of sense.

  38. 6:35

    Um, turns out that's not super fast. So someone, uh, Meta decided, okay, what, what are, what are the actual important things here? The Conv, ConvNeXt has a bunch of these beautiful inductive biases.

  39. 6:50

    It's following this formula that we got from the transformer.

  40. 6:55

    Let's look at what those inductive biases are actually useful for. So we're gonna take a really, really good inductively biased transformer model. We're gonna strip out the biases one at a time.

  41. 7:06

    We're gonna get a speed up because we don't have all this specialized equipment anymore for the inductive bias, and we're gonna use pre-training to learn the bias instead. So this is, I think, a really, really great example of the balance between pre-training and inherent inductive bias, which ends up being how transformers ultimately win out.

  42. 7:25

    Here we're using, uh, uh, MAE, masked autoencoder. Um, for those of you who are not familiar, you take your image, you take your patches, you drop a bunch of the patches, and you ask the, the model to reconstruct what would've been in the patches just based on the context.

  43. 7:44

    Very, very similar to BERT for those of you who come from the language space. Uh, you do this at scale, and it turns out the model actually learns back the inductive biases.

  44. 7:55

    But you can't actually apply MAE to a convolutional network. How do you drop out a patch when you're doing this convolution that's invariant across patches? So it's a ViT specific, uh, pre-training technique that adds inductive bias that would otherwise be missing from the structure.

  45. 8:14

    Um, so that's great. That's super interesting. That, that works nicely.

  46. 8:20

    Turns out it doesn't-- You can take that to an extreme and you throw in DINOv2, DINOv3, these really,

  47. 8:29

    again, ViT specific pre-training techniques, and you at the end of it don't just have these inductive biases towards how to process an image, you actually have really, really, really fit, uh, rich feature maps out of the box.

  48. 8:43

    So for example, this is a PCA decomposition of the feature maps produced by a DINOv3 pre-trained ViT, and we see that the paws of the cat have different colors, and that it's tracing the paws correctly for each of the different cats.

  49. 8:59

    The satellite imagery is decomposed in a way that is semantically meaningful. And, uh, in fact, the self-supervised learning objective is, is catching up with the best that we have from supervised learning, and this is via linear probe.

  50. 9:12

    So you have your frozen features. You're just probing into them. You're not training anything specifically on your data, except for that linear projection at the end,

  51. 9:21

    and you're getting very, very, very close to the best that we know how to do with self su- with, uh, fully supervised learning.

  52. 9:29

    Okay, but what about the speed issue? This is still N to the fourth power.

  53. 9:33

    Uh, it turns out that people are-- care a lot about attention. So in the LLM world, we start introducing these tools, uh, FlashAttention, the biggest one, and, uh, Hiera explicitly showed a speed up for the same accuracy versus ViT.

  54. 9:54

    But they have a note in their paper where they, where they say, "Okay, we see the speed up,

  55. 10:01

    and we're not gonna measure with FlashAttention." [audience laughing] So then you add back in FlashAttention, suddenly it doesn't really matter. You've got- You're back to this very silly Ns- N to the fourth power thing that benefits from this ViT specific pre-training method, and that's it.

  56. 10:19

    We're, uh, we've kind of-- We're, we're-- we've kind of won.

  57. 10:26

    So this is a talk about th- uh, this is a, an evolution of the backbones, how it is, how it is that the N to the fourth thing ended up beating out everyone that tried to beat it.

  58. 10:38

    What does this mean in practice and application? So SAM is a very famous series of models.

  59. 10:47

    Again, if I- I don't know where people come from, but SAM was, uh, w- from my perspective, one of the most important, uh, foundation model series in vision, period.

  60. 10:59

    And we actually see the same pattern. So SAM to Mobile SAM to SAM two to SAM three. If you look at the backbones that are underlying it, it's a ViT trained with MAE.

  61. 11:10

    Then someone says, "Okay, well, surely this cannot be the best that we can do." So they, uh, Mobile SAM actually uses a specialized convolutional transformer hybrid, uh, called TinyViT and replaces the, the ViT backbone.

  62. 11:23

    And then SAM two actually uses Hiera with, uh, this MAE pre-training, and then SAM three just gives up on the architecture ablation and just says, "Okay, well, we've got this massively pre-trained backbone.

  63. 11:37

    Let's just stick it in. That's the best that we can do."

  64. 11:41

    Um, so that's all good and fine, but where does that actually leave us? Um,

  65. 11:50

    this is really expensive if we're relying on these huge pre-training strategies in order to recover the performance that is lost due to the fact that our architecture is not biased towards the subject at all.

  66. 12:02

    Uh, that means we have to spend a huge amount of money every time we wanna do a deployment.

  67. 12:07

    So no deployment flexibility means that we have these one size fits all models. So SAM three Is this very, very powerful thing, but is also 800 million parameters. It takes 300 milliseconds to run on a T4 GPU.

  68. 12:23

    It's not actually usable in a lot of cases, uh, especially because Vision historically has been focused on these very low power edge devices, these, uh, resco- resource constrained deployment scenarios.

  69. 12:36

    So, uh, [REDACTED:username], what we have done is we've attempted to say,

  70. 12:44

    how do we actually take these fixed foundation models and transform them into something that has flexibility? So we introduced a data set, RF 100 VL, that measures how well, uh, uh, foundation models transfer to downstream diverse tasks with respect to object detection, which is one of the

  71. 13:09

    canonical vision-centric tasks. And we see about a 40x speed up for the same s- accuracy versus fine-tuning SAM3. Uh, and for merely a 15x speed up, we get a, a meaningful improvement.

  72. 13:27

    Um, so this combination of this huge advancement in foundation model pre-training and these strong deployment methods, combined with, uh,

  73. 13:40

    an actual ability to deploy these in hardware constrained environments, ends up being the, uh, final nail in the coffin for these classical convolutional based methods. Uh, these-- At the time of our publication of RF-DETR, these were the best convolutional--

  74. 14:00

    uh, th- these were the best real-time instance segmentation models, and we, uh, we, we, we, we outperformed them in a, in a meaningful way. Uh [laughs]

  75. 14:10

    Maybe. [laughs]

  76. 14:12

    Um, and so this is-- All those models on that line use actually the same foundation model. We just modify the foundation model using neural architecture search, such that we generate an entire family of, uh, high-performance models in, in one go.

  77. 14:31

    To do this, we actually introduce a bunch of, uh, flexible mobs. All of these are drop-in compatible with the existing foundation model infrastructure. And by mixing and matching them in a way that is dependent on target data and target hardware, we can, uh, resolve the issue that,

  78. 14:52

    uh, these foundation models do not have deployment flexibility.

  79. 14:57

    Um, so massive ViT specific pre-training plus speed ups from LLMs, plus, uh, pre-training compatible neural architecture search, and, uh,

  80. 15:11

    that's it. [laughs] [audience clapping] Yay.

  81. 15:22

    Do we have a- architectures that support like unified video plus image plus text pre-training already? Do-- Is someone working on that?

  82. 15:33

    So there are a lot of people working on like a huge amount of different combinations of things. I actually think SAM3 is a good example of that. They do- [coughs] Well, i- in terms of,

  83. 15:46

    in terms of vision specific video processing, it does video processing in the-- in-- from the perspective of tracking objects through video.

  84. 15:55

    Mm-hmm.

  85. 15:55

    So they do massive scale pre-training. They do the perception encoder pre-training for their backbone, and then they do a huge amount of downstream pre-training.

  86. 16:04

    Or I guess you would just call it training at that point. Um, and-

  87. 16:08

    What about JePA? Like the video-

  88. 16:10

    Yeah, the video-- Yeah, JePA and the ViJePA, those are, uh...

  89. 16:15

    I mean, yeah, those are another variety of foundation model. I think in terms of single, uh, like image centric pre-training,

  90. 16:23

    JePA doesn't seem to outperform a lot of the other ones. Video JePA,

  91. 16:30

    I haven't seen anyone use it meaningfully in a video context for downstream transfer yet, but, you know, we'll see.

  92. 16:39

    Yeah.

  93. 16:40

    Yeah. Any other questions? Cool. Okay.

  94. 16:48

    That's it. [audience clapping] [outro jingle]