# Oral 31891

- Kind: Oral
- Talk page and recording: https://iclr.cc/virtual/2025/oral/31891

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Thank you everyone for stopping by. My name is Mrinal Mathur. Uh today I'll be uh talking about the paper which we recently talked about is Adaptive Thinking Using Dynamic Computation or what we call Mine. So uh uh before diving into our solution, let's look at the key limitation of today's uh M_S_ system. They're ballistic, right? Uh they process every input with the same depth, whether it's easy or difficult.
And modern models treat every example identically. So easy cases still trigger the full stack of layers and hard cases may still misfire. And that mismatch is exactly what we want to fix. So we are taking inspiration from biological system here where imagine if your brain treated every thought with the same effort, checking your email would feel like solving a calculus proof. But thankfully, you know, biology figured that out.
So even even repetitively applying convolution in Conway's Game of Life is still incomplete and most of the most of the autoregressive generation that we know right right now is what is the main reason the public actually knows what AI stands for.
So, here's the root cause. Standard deep nets actually apply a fixed computational graph to every example without any feedback loops or no second thoughts. And we see that this wastes up to forty percent of flops on easy cases, and these models cannot decide when to stop or revisit an any earlier layers. So computation is neither adaptive nor efficient.
So far since we have seen a one short fix depth pipeline which cannot adopt adapt to easy versus difficult inputs. To address that our mind model turns certain layers into iterative blocks. We are using fixed point iterations here because it's it reuses the same layers until equilibrium and even in numeric code which is a full of loops where you update same variable until and until it cycles down.
That's a fixed point so
Since up to now since we have treated each layer as a one-shot operation, to enable the thinking twice or more, we introduce fixed-point blocks. So starting from an initial state, we apply the same transformation repeatedly until we reach the convergence, and this effectively simulates an infinitely deep network with shared weights and parameters. So here is the thing, like easy inputs converge in just a few steps while harder ones naturally
actually takes more iterations and that's the core mechanism of our mind which uses to adapt its compute per input.
Now imagine each layer has its own smart switch. So what are introspection? So we introduce something called introspection network which watches the layers activation at those internal feature maps and decides in real time whether the layer this layer output is actually good. So if it is good and we actually skip the whole the whole extra work of fixed point. If it is not confident yet then we loop this layer until and until it's actually ready.
So in effect, the model self -diagnoses which layer needs more thinking and which can move on immediately. So to make sure that the selection is done stochastically, there is more exploration due uh during the training. So we use Gumbel softmax for this. This this stochastic selection during training encourages exploration at test time. It gives us the crisp per-layer decision, which again self -diagnoses which layer needs more work and which can move on.
So now that we have seen how the introspection network actually produces a layer-specific mask, for each input, let's pull back and look at how those gates and fixed point actually fits in our mind framework. So in this particular part, we are introducing two layers of adaptivity. One is the fixed point operation, and second is the introspection network.
So underneath this or layer, so we have this an adaptive gate which is basically going to tell if you require the fixed point operation or not. Else if as soon as that is selected, we iterate that to two convergence and then we optimize the prediction and introspection losses together. So in the below in the below architecture that you can see is basically three
three outputs that is possible, which is on difficult, easy or difficult uh or or very difficult problems. And then we iterate the fixed point loops accordingly.
Now that we've seen how mind decides where to think, here's how we actually teach it. So for the prediction loss, we use like standard cross-entropy or regression loss for on any out task output. For introspection loss, that's basically an a a a penalty that discourages excessive computation and we define it for example according to the computation cost to measure the flops, uh the the weights of each layers uh and again the gating mechanism that we have already introduced.
And we com and and we combine these laws into a total loss where we are taking the prediction as well as the intro uh introspection and we balance the accuracy against efficiency. In order for us to train the fixed point operation we use implicit im uh implicit differentiation where we are not really storing the uh storing our uh we are not really storing the gradients but we're actually having a one step calculation in that.
So to showcase our mind adaptability in a more intuitive setting, we turn into a classic random dot motion task, which is long used in psychology to probe uh, you know, decision making in smaller animals. So we generate two frames, an original dot frame and a shifted version of varying difficulty. So in this particular part, in the fully random case, which is the hardest one, which is on the lefts leftmost side, we see that uh we see that it's demanding more fixed point loops.
And the one which is more easiest, it's seen, we can see that it's actually just only a few loops can suffice. So notice how the number of layers c uh that has been selected by mind rises with difficulty and matches the human observable uh complexity.
Now to dig deep in how much actually depending on the input difficulty it it thinks we bucketize the image net images by confidence from a pre-trained resonant that is easy mid medium and difficult and on easy input it takes almost 50% of like only 50% needs fixed point loops for medium it only requires 24 % and for difficult it only requires 78 % on all the three loops so that that's a 50% reduction in layer evaluation
on easy causes and which causes no loss in accuracy and we actually see accuracy gain on the hard ones as well. So that actually confirms that it's thinking time is adaptive to the task at hand.
Coming to the results, we benchmark mine against two heavy-weight baselines on Cypher 100 and ImageNet. So despite having very few parameters, we see that on the ResNet as well as EfficientNet, it actually matches or even beats both in top one and top five accuracy in both the data sets. On ImageNet, it hits 88.3% for top one and 96.6% for top five. And we also see gains in multi-label accuracy as well as robustness.
this and in the just to have it more intuitive we also show the activation patterns for let's say a four-layer standard CNN as well as for mine model and we see that as for each subplot represents a represents an activation map of the layer and that illustrates the progressive feature extraction from the basic textures in the first layer to more abstract representation in deeper layer
Now, going to more, we compared deep, we compared mine to more static compression tricks as well, where that is pruning as well as 8-bit quantization. However, mine adapts per input averaging under 1G flops and hitting at 88% or around 88% top one accuracy. So that outpaces both static methods in accuracy and efficiency. And we also tested with early exit and deep equilibrium networks, which is there in the paper.
Next we bring, in order for me to show you the next results, we introduce something called the mind transformer, where we are basically at each attention head our introspection network decides via same gating mechanism whether to loop in this attention computation until it converges. And this per layer per input adaptivity gives mind transformer to the ability to spend more thinking time on long ambiguous sentences and easy to breathe in simple one.
So here we show the on language bench benchmarks. The mind transformer again shines because on WikiText 2, a s a standard transformer sits at ninety uh twenty nine perplexity. But mind adaptive uh depth actually cuts that to fourteen point five, which is nearly half the perplexity. And not and and on Squad we do, Word-based score is seventy six point eight F_ one and again, uh mind transformer actually beats them uh by only using like hundred well uh million parameter.
versus Roberta's parameters. So in conclusion to wrap up, we show that mine self-introspection lets the model loop only when required, skipping the work on easy inputs and investing extra cycles using fixed point operation on hard ones. We also show that across vision and language, it's performing really well. So we wanted to make sure that it is model agnostic as well. And
And we have also done extensive experiments on other like GPT style models as well as decoder style models as well, which is there in our paper. So thank you so much and please come see us at our poster 149. I would love to discuss the application, limitation and next step for this as well. Thank Great. you. Let's thank the speaker. So we have time for maybe one quick questions, please.
I'm quite curious about the scaling of raw work.
If we have more parameters, could this approach gaining another question is about could it apply to MOE architecture? Right. That's a great question. So this basically acts as a self-MOE as an architecture as well. And we have also shown experiments where for a normal MOE architecture, let's say Mamba 2 and Jama, it's performing much better in this case because there...
In order for you to select the number of experts for each input explicitly using some other, let's say, penalty, our mind model architecture is able to do it much faster. So we have done those experiments and it's showing better performance in that case as well.
