MaRI: Accelerating Ranking Model Inference via Structural Re-parameterization in Large Scale Recommendation System

summary

The gist

Ranking models serve as core components in large-scale recommendation systems.<ref:2602.23105#pg1,Ranking models serve as core components in large-scale recommendation systems responsible for scoring…

In short

MaRI is a framework that accelerates ranking model inference by structurally reparameterizing MatMul operations in large-scale recommendation systems. It achieves speedup by removing redundant user-side computations during feature fusion and uses a Graph Coloring Algorithm to automate the identification of optimizable nodes. The method maintains accuracy while significantly reducing computational load.

Key concepts

Structural Reparameterization
This technique decomposes a complex matrix multiplication operation into three simpler, separate computations. By decoupling user, item, and cross-feature computations during inference, it eliminates redundant calculations that were previously performed on the user side.
FLOPs Reduction Ratio
The efficiency gain is quantified by a relative saving ratio of Duser/(Duser + Ditem + Dcross). This ratio represents how much the total Floating Point Operations (FLOPs) are reduced compared to the original operation, specifically by removing unnecessary user-side computation.
Graph Coloring Algorithm (GCA)
The GCA is used to automatically find parts of the model's computation graph that can be optimized. It identifies specific 'Concat' nodes with mixed inputs (Yellow and Blue) and then traces all reachable MatMul nodes through non-computational paths, pinpointing them as targets for optimization.

Terminology used across episodes

This episode discusses

The paper

MaRI: Accelerating Ranking Model Inference via Structural Re-parameterization in Large Scale Recommendation System · Read on arXiv

Kuaishou Technology

Transcript

Introduction to the show: ident: Computer Science. The day in computer science: software, systems and theory on arXiv.

Tom: We're looking at the paper: "MaRI: Accelerating Ranking Model Inference via Structural Re-parameterization in Large Scale Recommendation System".

Title and authors: Tom: So we're talking about this paper now. It's called "MaRI: Accelerating Ranking Model Inference via Structural Re-parameterization in Large Scale Recommendation System". Basically, it tackles the problem of how slow those massive matrix multiplications get when you have tons of user, item, and cross features all mixed together.

Jane: Right. So we're looking at these huge ranking models that score every possible thing a user might like against every single item available. And this paper says they can speed up the scoring without losing any accuracy. That sounds like a big deal for real-time recommendations, you know?

Lu: Exactly. The core idea is using structural reparameterization to tackle the redundancy in feature fusion matrix multiplication that happens during inference, especially when dealing with user and item features combined in those DNN layers where MatMul does most of the heavy lifting <ref:2602.23105#pg3>.

Meng: Redundancy sounds like a pain at scale. When you have massive feature vectors, doing the multiplication in one go seems computationally wasteful, and if we can prune that waste, it helps us deploy faster models that don't choke our production systems <ref:2602.23105#pg3>.

Tom: And what they do is propose a way to break up that single massive matrix multiplication into three separate pieces. They look at the original matrix multiplication and show how it can be split based on where the user, item, and cross features come from <ref:2602.23105#pg3>.

Jane: So they take that big operation, say A times B, and they decompose it into three smaller multiplications—one for each feature type—and then tile the user features before multiplying them separately <ref:2602.23105#pg4>.

Lu: They show this decomposition mathematically as X tiled user multiplied by Wuser plus Xitem multiplied by Witem plus Xcross multiplied by Wcross <ref:2602.23105#pg3>. That allows them to re-parameterize the operation into something called MatMul MaRI, which is essentially Tile User and multiply that, add it to the item part, and add the cross part <ref:2602.23105#pg3>.

Meng: Wait, so they are separating the user side computation entirely from how much work needs to be done on the item side or cross features during inference? That sounds like it could let us offload some of that work, maybe to a faster runner <ref:2602.23105#pg3>.

Tom: That’s the primary gain they are talking about. They removed the redundant user-side computation in that MatMul operation <ref:2602.23105#pg3>, which they show reduces floating point operations by a factor related to the user dimension compared to the total feature dimension <ref:2602.23105#pg4>.

Jane: A factor of about one divided by five times the total feature size, roughly, if we look at the scaling when B is bigger than one <ref:2602.23105#pg3>. So it’s not just a small tweak; it’s a significant reduction in how much computation is happening per inference step.

Lu: And they also use this decomposition to decouple the item-side computation, which could potentially be offloaded to a near-line computation runner <ref:2602.23105#pg3>. They even mention using the Graph Coloring Algorithm, or GCA, to automatically find these optimizable MatMul operators in the model's graph <ref:2602.23105#pg3>.

Title and authors: Meng: Automating the detection of which parts are worth optimizing sounds useful for deployment because it saves us from having to manually hunt down those specific layers <ref:2602.23105#pg3>. But what about the setup? If this is so efficient, does it require a lot of headaches upfront?

Tom: The paper shows that they kept the model training pipeline exactly the same, which is important because we don't want to change how we train our models <ref:2602.23105#pg3>. It’s purely about re-parameterizing the inference side <ref:2602.23105#pg4>.

Jane: But the results they show are pretty solid, right? They ran offline simulations and online A/B tests to prove it works in practice <ref:2602.23105#pg4>. The offline simulations showed runtime speedup stayed stable for batch sizes of B greater than five hundred <ref:2602.23105#pg7>.

Lu: And the online A/B test confirmed that the business performance didn't drop at all; it maintained the same level as the baseline model <ref:2602.23105#pg7>. That’s strong evidence that this isn't just a theoretical speedup in a vacuum.

Meng: Maintaining baseline performance is what I care about most when I think about shipping something to production, especially when we’re dealing with real user traffic <ref:2602.23105#pg7>. So, if it keeps the business metrics stable while speeding things up, that’s a win for me.

Tom: And they also proved that a neat input layout is super critical to getting all this acceleration out of it <ref:2602.23105#pg4>. They found that if you fragment the input feature layout, performance degrades by nearly thirty-eight percent <ref:2602.23105#pg4>.

Jane: So they have to reorganize the input feature layout and remap those learnable parameters into a clean, unified structure for this to work well <ref:2602.23105#pg4>. It’s like making sure all the pieces fit together perfectly before you start assembling the whole machine.

Lu: That reorganization is what leads to a hardware resource reduction of about five point nine percent for the coarse-ranking stage <ref:2602.23105#pg7>. The paper concludes that MaRI eliminates user-side redundant computations and uses GCA to automate finding those nodes <ref:2602.23105#pg4>.

Meng: So, what does this mean for deployment? It means we have a framework that can potentially cut down on the processing power needed for inference significantly, provided we structure our inputs correctly <ref:2602.23105#pg7>.

Tom: The computational complexity analysis confirms this scaling. The total floating point operations for MatMul MaRI grow linearly with the sum of user dimension and the product of batch size B and the item and cross dimensions <ref:2602.23105#pg4>.

Jane: And they show that the relative saving ratio is about one divided by five times the total feature dimension when batch size B is bigger than one <ref:2602.23105#pg4>. So the speedup scales nicely with how much data you feed it.

Lu: It’s validating that for this method to actually work and get those gains, we need that reorganization of features and parameters <ref:2602.23105#pg7>. The paper concludes that MaRI eliminates user-side redundant computations and leverages GCA to automate node detection <ref:2602.23105#pg4>.

Title and authors: Meng: So the real world implication is that we can potentially run these large models much more efficiently on the same hardware, which translates to lower operational costs for serving recommendations <ref:2602.23105#pg7>.

Tom: It’s a structural change to how we look at feature fusion, moving away from just trying to optimize the hardware itself <ref:2602.23105#pg1>. The paper proposes MaRI as a MatMul acceleration framework for recommendation systems via structural reparameterization <ref:2602.23105#pg4>.

Jane: It’s about finding efficiencies in the math of how those features interact, rather than just buying faster chips or tweaking the kernel settings <ref:2602.23105#pg2>. We've seen how important it is to get that input layout right for this acceleration to even kick in <ref:2602.23105#pg4>.

Lu: So, if a system has user and item features, and we structure the matrix multiplication in a specific way—decomposing it into three parts—we can remove the redundant user-side work <ref:2602.23105#pg3>. That’s the core mechanism.

Meng: It sounds like something that could significantly cut down on inference latency in our recommendation pipelines, provided we can handle that initial input reorganization <ref:2602.23105#pg4>.

Tom: It’s about taking a complex operation and finding a simpler way to compute it with the same result, just faster <ref:2602.23105#pg4>. The results show this method is stable for large batch sizes and keeps performance consistent in testing <ref:2602.23105#pg7>.

Jane: So, we’re looking at a framework that simplifies the math by recognizing where the computation is redundant, using graph coloring to find those spots automatically <ref:2602.23105#pg4>.

Lu: It suggests that for large-scale systems, decoupling the item-side computation is a viable path because we can potentially offload it elsewhere <ref:2602.23105#pg3>. That's a big structural move here.

Meng: I need to see how easy it is to implement that GCA part and how much overhead that adds during the actual serving process <ref:2602.23105#pg4>. Does it introduce complexity in the runtime environment?

Tom: The paper shows the implementation of GCA automates node detection, which helps locate these optimizable nodes <ref:2602.23105#pg4>. It’s designed to work within the existing model structure, just finding the right spots <ref:2602.23105#pg4>.

Jane: So it sounds like they solved a scaling problem by changing the way they think about multiplying those big feature matrices <ref:2602.23105#pg4>. This whole paper is titled "MaRI: Accelerating Ranking Model Inference via Structural Re-parameterization in Large Scale Recommendation System".

Lu: Yeah, it’s a solid contribution because it shows that clever mathematical reparameterization can yield real speedups without sacrificing the accuracy of the ranking model <ref:2602.23105#pg1>. It suggests that getting the input structure right is as important as choosing the right algorithm <ref:2602.23105#pg4>.

Meng: For us, it means we need to focus on making sure our data pipelines are structured cleanly so this framework can actually find those optimization targets without spending all our time reformatting inputs <ref:2602.23105#pg4>.

Title and authors: Tom: It’s about using structural reparameterization to decompose feature fusion into three separate computations, reducing floating point operations by avoiding redundant user-side computation, achieving a relative saving ratio of one divided by the sum of user dimension and item dimension and cross dimension <ref:2602.23105#pg3>.

Jane: That saving ratio is what makes it interesting—it’s tied directly to the size of our feature sets, not just some abstract constant number <ref:2602.23105#pg4>. It’s about optimizing based on the actual data we have.

Lu: And that scaling analysis confirms that FLOPs and runtime speedup grow linearly with the user dimension peaking at ten point nine five times <ref:2602.23105#pg4>. So it scales with the size of your user feature vector <ref:2602.23105#pg7>.

Meng: Linear scaling is good, but I still need to know if that linear growth means we hit a wall sooner than we thought when our models get bigger <ref:2602.23105#pg4>.

Tom: The results validate that the necessity for feature and parameter reorganization is real for MaRI to achieve its full potential <ref:2602.23105#pg7>. It’s not a magic fix; it’s a structural one <ref:2602.23105#pg4>.

Jane: So, the main thing for us listening is that if you're dealing with massive feature vectors in recommendation systems, there might be a structural way to simplify the math underneath those layers <ref:2602.23105#pg4>. We’ll keep an eye on how this plays out in real traffic.

Lu: The paper proposes MaRI as a MatMul acceleration framework for RS via structural reparameterization <ref:2602.23105#pg4>. It's a practical approach to making those large feature interactions more efficient during inference <ref:2602.23105#pg1>.

Meng: Yeah, it’s about efficiency in the serving stage, which is where most of our latency issues are right now <ref:2602.23105#pg7>. We need to see if this translates to tangible improvements in our production metrics.

Tom: It’s a framework that eliminates user-side redundant computations and leverages a graph coloring algorithm to automatically locate optimizable nodes <ref:2602.23105#pg4>. That’s the mechanism we need to focus on implementing <ref:2602.23105#pg4>.

Jane: It sounds like they gave us a clear roadmap for tackling those redundancy issues in our feature fusion layers, which is really helpful for understanding how to approach this problem <ref:2602.23105#pg4>.

Lu: Ultimately, the paper shows that a neat input structure is critical to unlocking MaRI’s full acceleration potential <ref:2602.23105#pg4>. If your data layout is messy, you lose almost thirty-eight percent of the performance gain <ref:2602.23105#pg7>.

Meng: So, the practical advice for anyone in production is to prioritize a clean input feature layout because that's where we see the biggest immediate efficiency gains <ref:2602.23105#pg7>.

Tom: It’s about taking a complex operation and finding a simpler way to compute it with the same result, just faster, using structural reparameterization <ref:2602.23105#pg4>. The results validate its effectiveness and efficiency in both simulations and real-world tests <ref:2602.23105#pg7>.

Jane: So MaRI is a framework that lets us keep the model structure intact while making smart changes to the multiplication itself to speed things up <ref:2602.23105#pg4>. We’ll be watching how this impacts the future of large-scale recommendation systems.

Title and authors: Lu: It’s a very focused piece of research that addresses a known bottleneck in large-scale inference <ref:2602.23105#pg1>. The paper proposes MaRI as a MatMul acceleration framework for RS via structural reparameterization <ref:2602.23105#pg4>.

Meng: Yeah, it's about finding those places where the computation is truly redundant and making them disappear from the runtime <ref:2602.23105#pg4>. That’s what matters for us at scale <ref:2602.23105#pg7>.

Tom: So we have a paper called MaRI: Accelerating Ranking Model Inference via Structural Re-parameterization in Large Scale Recommendation System, which shows how to tackle redundant user-item and cross interaction MatMuls <ref:2602.23105#pg4>. It’s about using structural reparameterization to decompose the multiplication into three parts <ref:2602.23105#pg3>.

Jane: It's about finding that neat input structure, which is key, and using a graph coloring algorithm to find all the spots we can optimize automatically <ref:2602.23105#pg4>. That's the main idea for getting the speedup <ref:2602.23105#pg4>.

Lu: And it’s about showing that even with these structural changes, the business performance holds up during online tests <ref:2602.23105#pg7>. It proves that this approach is stable for large batch sizes <ref:2602.23105#pg7>.

Meng: So the big picture is that we can potentially run these massive models much more efficiently on the same hardware, which translates to lower operational costs for serving recommendations <ref:2602.23105#pg7>.

Tom: Exactly. The computational complexity analysis confirms that FLOPs and runtime speedup grow linearly with the user dimension peaking at ten point nine five times <ref:2602.23105#pg4>. That's a concrete number we can use to estimate our potential gains <ref:2602.23105#pg4>.

Jane: It’s about finding those places where the computation is truly redundant and making them disappear from the runtime, while keeping the accuracy intact <ref:2602.23105#pg1>. That’s what we're taking away from this paper <ref:2602.23105#pg4>.

Lu: So, if you're working on large-scale ranking models, MaRI shows that structural reparameterization is a viable path for acceleration <ref:2602.23105#pg4>. It’s about using the structure of the computation itself to find where we can make changes <ref:2602.23105#pg3>.

Meng: And it relies heavily on having that neat input structure, which is a prerequisite for unlocking its full potential <ref:2602.23105#pg4>. So if you want to deploy this, you better invest time in the data prep first <ref:2602.23105#pg7>.

Tom: Exactly. The paper concludes that MaRI eliminates user-side redundant computations and leverages GCA to automate node detection <ref:2602.23105#pg4>. It’s a practical framework for inference acceleration <ref:2602.23105#pg4>.

Jane: So we've talked about how it works, the numbers showing the speedup, and why getting that input layout right is critical <ref:2602.23105#pg7>. That’s what we have for this paper today.

Lu: I think MaRI is a really interesting piece of work because it shows that we can tackle scaling issues by looking at the structure of the computation rather than just brute-forcing hardware <ref:2602.23105#pg1>. It’s about finding elegant mathematical solutions <ref:2602.23105#pg4>.

Meng: Yeah, it’s interesting because it gives us a concrete path to reduce the computational load on our serving infrastructure <ref:2602.23105#pg7>. We'll be keeping an eye on its real-world impact.

The paper's summary: Tom: So, to recap, this paper says they found a way to speed up those ranking model inferences by changing how they structure the matrix multiplication itself <ref:2602.23105#pg1>.

Jane: Right, so instead of doing one huge multiplication with all the user and item stuff mixed up, they break that operation down into three smaller, separate pieces <ref:2602.23105#pg3>.

Tom: That decomposition lets them remove the redundant computation that happens on the user side during inference <ref:2602.23105#pg3>. It’s a structural reparameterization that keeps the training part exactly the same, but it changes how they compute during serving <ref:2602.23105#pg4>.

Jane: What does that actually mean for us? Basically, they found that when you have tons of user features and item features all multiplied together, a lot of the work is just doing the same thing repeatedly on the user side <ref:2602.23105#pg3>.

Tom: Exactly. They showed that by reparameterizing it like this, they are cutting down on floating point operations by removing that redundant user-side stuff <ref:2602.23105#pg4>. The math shows the relative saving ratio is about one divided by the sum of the user dimension and item dimension and cross dimension <ref:2602.23105#pg3>.

Jane: That saving ratio is tied directly to how big our feature sets are, which means it scales with the data we actually have <ref:2602.23105#pg4>. So, if you have bigger user features, the potential speedup is larger too.

Tom: And they also used something called a graph coloring algorithm to automatically find those specific parts of the math that are worth optimizing <ref:2602.23105#pg4>. It finds those nodes that matter without us having to manually hunt them down <ref:2602.23105#pg4>.

Jane: So, it's not just a theoretical trick; they have a way to automate finding the parts of the model multiplication that are most wasteful <ref:2602.23105#pg4>. It makes it much easier to find where we can make changes without rewriting code everywhere.

Tom: And the results, from both simulations and online tests, show that this method is stable for large batch sizes, like a batch size B bigger than five hundred <ref:2602.23105#pg7>. The business performance stayed exactly the same during those tests <ref:2602.23105#pg7>.

Jane: That stability is key for us because we don't want to introduce new bugs or drop our conversion rates when we try to speed things up <ref:2602.23105#pg7>. It proves the math works in the real world, not just on a clean test set.

Tom: So, what this means for deployment is that you need that neat input layout for this whole thing to work well <ref:2602.23105#pg4>. If you fragment your input features, the performance drops by nearly thirty-eight percent <ref:2602.23105#pg4>.

Jane: So, the practical advice is that before you try to use this framework, you have to reorganize your entire input feature layout into a clean structure for it to get its full potential <ref:2602.23105#pg4>. It's a prerequisite for the whole acceleration thing.

Tom: Yeah, the paper concludes that MaRI eliminates user-side redundant computations and uses that graph coloring algorithm to automatically locate those optimizable nodes <ref:2602.23105#pg4>. That’s the core mechanism of this framework <ref:2602.23105#pg4>.

Jane: It's a lot about finding elegant mathematical solutions to scaling problems in recommendation systems, moving away from just brute-forcing hardware <ref:2602.23105#pg1>. We have to keep an eye on how this structural change impacts our serving infrastructure next.

The paper's improvements: Tom: So, we're looking at what the paper proposes to actually do next <ref:2602.23105#pg4>. It’s not just about finding one optimization spot, but using that graph coloring algorithm to automatically locate all the places that are worth optimizing <ref:2602.23105#pg4>.

Jane: That sounds powerful because it takes the guesswork out of finding those optimization targets for the matrix multiplication <ref:2602.23105#pg4>. It suggests a systematic way to identify all the nodes that can be improved simultaneously <ref:2602.23105#pg4>.

Tom: Exactly. Instead of us manually looking at every layer and deciding if it's worth touching, this algorithm scans the model's computation graph and flags everything that fits the criteria for optimization <ref:2602.23105#pg4>. It automates the process <ref:2602.23105#pg4>.

Jane: That sounds like a big win for deployment because it reduces the manual effort required to make these kinds of speedups <ref:2602.23105#pg4>. It makes finding those computational savings much more scalable <ref:2602.23105#pg4>.

Tom: And the authors are saying that this whole approach, combining the structural reparameterization with the automatic node detection, is what unlocks MaRI’s full acceleration potential <ref:2602.23105#pg4>. It’s about using structure to find efficiency <ref:2602.23105#pg4>.

Jane: So, if we can get that automatic detection working reliably, it means we can apply this structural reparameterization technique to a much wider variety of different ranking models <ref:2602.23105#pg4>. It broadens the applicability of the method <ref:2602.23105#pg4>.

Tom: And they've already shown that this approach is stable for large batch sizes, which means it should hold up when we move to larger and larger candidate item batches <ref:2602.23105#pg7>. We saw the runtime speedup stay consistent even when B was bigger than five hundred <ref:2602.23105#pg7>.

Jane: That stability is crucial for us because we don't want to introduce new bugs or drop our conversion rates when we try to speed things up <ref:2602.23105#pg7>. It proves the math works in the real world, not just on a clean test set.

Tom: So, it’s about keeping the model structure intact while making smart changes to how those big feature matrices multiply <ref:2602.23105#pg4>. The paper shows this method is stable for large batch sizes and keeps performance consistent in testing <ref:2602.23105#pg7>.

Jane: It's about finding those places where the computation is truly redundant and making them disappear from the runtime, while keeping the accuracy intact <ref:2602.23105#pg4>. That’s what we're taking away from this paper <ref:2602.23105#pg4>.

Tom: Yeah, they’ve given us a clear roadmap for tackling those redundancy issues in our feature fusion layers, which is really helpful for understanding how to approach this problem <ref:2602.23105#pg4>.

Jane: So we've talked about how it works, the numbers showing the speedup, and why getting that input layout right is critical <ref:2602.23105#pg7>. That’s what we have for this paper today.

Conclusion: Tom: So to wrap things up, this paper calls itself "MaRI: Accelerating Ranking Model Inference via Structural Re-parameterization in Large Scale Recommendation System" <ref:2602.23105#pg4>. It shows that by changing the math structure instead of just optimizing hardware, you can speed up inference significantly <ref:2602.23105#pg1>.

Jane: Right, so the main point is that they found a way to prune redundant work in feature fusion matrix multiplications by breaking them down into three simpler parts <ref:2602.23105#pg3>.

Tom: It’s about using structural reparameterization to decompose the multiplication into three separate computations, which cuts down on floating point operations by removing that redundant user-side computation <ref:2602.23105#pg4>.

Jane: What this means for us is that we can potentially run these large models much more efficiently on the same hardware without losing accuracy <ref:2602.23105#pg7>. It’s about finding ways to make the math itself faster <ref:2602.23105#pg4>.

Tom: And they use a graph coloring algorithm to automatically find those specific parts of the model that are worth optimizing <ref:2602.23105#pg4>. That's the mechanism we need to focus on implementing <ref:2602.23105#pg4>.

Jane: It’s a lot about finding elegant mathematical solutions to scaling problems in recommendation systems, moving away from just brute-forcing hardware <ref:2602.23105#pg1>. They proved that this method is stable for large batch sizes and keeps performance consistent in testing <ref:2602.23105#pg7>.

Tom: Yeah, the computational complexity analysis confirms that floating point operations and runtime speedup grow linearly with the user dimension peaking at ten point nine five times <ref:2602.23105#pg4>. That's a concrete number we can use to estimate our potential gains <ref:2602.23105#pg7>.

Jane: So, if you're dealing with massive feature vectors in recommendation systems, MaRI shows that structural reparameterization is a viable path for acceleration <ref:2602.23105#pg4>. It’s about using the structure of the computation itself to find where we can make changes <ref:2602.23105#pg4>.

Tom: Exactly. The paper concludes that MaRI eliminates user-side redundant computations and leverages a graph coloring algorithm to automatically locate optimizable nodes <ref:2602.23105#pg4>. It’s a practical framework for inference acceleration <ref:2602.23105#pg4>.

Jane: So we've talked about how it works, the numbers showing the speedup, and why getting that input layout right is critical <ref:2602.23105#pg7>. That’s what we have for this paper today.

Lu: I think MaRI is a really interesting piece of work because it shows that we can tackle scaling issues by looking at the structure of the computation rather than just brute-forcing hardware <ref:2602.23105#pg1>. It’s about finding elegant mathematical solutions <ref:2602.23105#pg4>.

Meng: Yeah, it’s interesting because it gives us a concrete path to reduce the computational load on our serving infrastructure <ref:2602.23105#pg7>. We'll be keeping an eye on its real-world impact.

Lalam: I'm confident in this answer; the structural reparameterization method is very sure of its effectiveness in reducing inference latency <ref:2602.23105#pg1>. It’s a solid finding for anyone working on large recommendation models <ref:2602.23105#pg4>.

More episodes

← Home