Blog

Making WAF ML models go brrr: saving decades of processing time

We save decades of processing time across WAF ML by optimizing the path from input preprocessing through model execution. We reduced allocations and sped up n-gram lookups, enabled faster SIMD/XNNPACK inference, and shared cached results for recurring inputs.

“Next, we upgraded TensorFlow Lite from version 2.6.0 to 2.16.1, enabled XNNPack, and implemented pre-processing optimizations. This further reduced WAF ML total execution time by ~40.77%, bringing it down from 932 ➔ 552 μs on average. The initial average time of 932 μs was slightly higher than the previous 884 μs due to the increased number of customers using this feature and the months that passed between changes.”

The LRU cache adds another lever: recurring inputs can bypass both preprocessing and inference.

Read the entire blog here