LGJul 8, 2025

Kamae: Bridging Spark and Keras for Seamless ML Preprocessing

arXiv:2507.06021v1h-index: 33Has CodeRecSys
Originality Synthesis-oriented
AI Analysis

This addresses a practical engineering challenge for production ML teams, though it is incremental as it builds on existing frameworks like Spark and Keras.

The paper tackles the problem of feature preprocessing inconsistency between training and inference in recommender systems by introducing Kamae, an open-source library that translates PySpark pipelines into Keras models, enabling seamless and consistent preprocessing across environments.

In production recommender systems, feature preprocessing must be faithfully replicated across training and inference environments. This often requires duplicating logic between offline and online environments, increasing engineering effort and introducing risks of dataset shift. We present Kamae, an open-source Python library that bridges this gap by translating PySpark preprocessing pipelines into equivalent Keras models. Kamae provides a suite of configurable Spark transformers and estimators, each mapped to a corresponding Keras layer, enabling consistent, end-to-end preprocessing across the ML lifecycle. Framework's utility is illustrated on real-world use cases, including MovieLens dataset and Expedia's Learning-to-Rank pipelines. The code is available at https://github.com/ExpediaGroup/kamae.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes