Skip to main content
Scientific Reports logoLink to Scientific Reports
. 2026 Mar 22;16:14518. doi: 10.1038/s41598-026-44839-0

Deep maximum margin matrix factorization

Shailendra Kumar 1,✉, Venkateswara Rao Kagita 1,✉, Vikas Kumar 2, Gaurav Niranjan 3
PMCID: PMC13149986  PMID: 41866600

Abstract

Collaborative filtering (CF) over ordinal feedback is naturally organized as a problem of matrix completion, where the input consists of a partially observed user-item interaction matrix. Maximum Margin Matrix Factorization (MMMF) has achieved widespread popularity for effectively completing such partially observed ordinal matrices from its inception. Geometrically, MMMF embeds items as points and users as linear hyperplanes, separating items with similar ratings from others. The all-threshold hinge loss function ensures that the user hyperplane maximizes the margin between distinct classes of rated items. However, the restriction that the user hyperplane be linear limits the performance of MMMF substantially, as user features are often intricate and do not exhibit linear patterns. To address this, we have proposed a deep variant of maximum margin matrix factorization that can easily predict user-item interactions by accommodating complex, non-linear user tastes and item feature representations. We have experimentally shown over the three benchmark datasets that the proposed deep variant of MMMF outperforms various state-of-the-art CF methods in terms of the Normalized Mean Absolute Error (NMAE) metric.

Keywords: Collaborative filtering, Deep learning, Deep MMMF, Recommender systems

Subject terms: Engineering, Mathematics and computing

Introduction

Recommender systems (RS) leverage sophisticated algorithms to analyze users’ explicit preferences, implicit behavioral patterns, and other relevant contextual information to provide personalized recommendations tailored to individual users’ interests and needs1. These systems aim to improve user experience, increase engagement, drive sales growth, and improve user satisfaction. Collaborative filtering (CF) is a widely adopted recommendation approach that identifies patterns in user interactions to suggest items that align with the preferences of a target user2. CF-based approaches are broadly categorized into Neighborhood-Based Approaches (NBA) and Model-Based Approaches (MBA). The NBA computes direct similarity, such as user-user or item-item similarity, from user-item interactions. Recommendations in the NBA are generated through two primary mechanisms. In user-based CF, items are recommended based on the assumption that users with similar preference patterns will rate items similarly; thus, items liked by similar users are suggested to the target user. In item-based CF, recommendations are made by identifying items that share similar patterns with those the target user has previously rated favorably. Model-based CF leverages techniques such as Matrix Factorization (MF)3,4 and Deep Learning (DL)5,6 to learn latent representations of users and items, thereby improving recommendation accuracy.

MF is an extensively used and effective model-based CF method that accurately represents and predicts user-item interactions. Let Y be a user-item rating matrix such that Inline graphic where n and m represent the number of users and items and the maximum rating level is denoted by Inline graphic. Each entry Inline graphic represents the rating given by user u to item i. The absence of an interaction or an unrated item is represented by 0. The matrix factorization approach decomposes the user-item interaction matrix Inline graphic (Inline graphic) into two lower-dimensional matrices: a user latent factor matrix Inline graphic and an item latent factor matrix Inline graphic, where Inline graphic represents the dimensionality of the latent factors. The Inline graphic-th row of Inline graphic (Inline graphic) captures the latent preferences of user Inline graphic, while the Inline graphic-th row of Inline graphic (Inline graphic) represents the latent attributes of item Inline graphic. The predicted rating for user Inline graphic and item Inline graphic is calculated as Inline graphic.

Several MF methods have been proposed in the field of RS. These include Regularized MF7, Non-negative MF8, Probabilistic MF9, Bayesian Probabilistic MF10, Maximum Margin MF (MMMF)11, Proximal MF4, and Singular Value Decomposition (SVD)12 along with several of its variations, such as SVD++13, Asymmetric SVD14, and Group-specific SVD15. These methods differ based on the optimization objectives they aim to solve, the regularization techniques they employ, and the constraints they impose during optimization. MMMF16 is a highly intriguing and prominent MF algorithm that offers a distinct geometric interpretation of matrix factorization. In this approach, the latent factors of items (users) are represented as points in a k-dimensional space, while the user (item) latent factors are modeled as hyperplanes that separate items with different ratings. However, the problem with this approach is that it attempts to project the items’ latent factors onto a k-dimensional subspace so that the various ratings are separable along parallel hyperplanes. This constraint of parallel hyperplanes makes the learning problem overly restrictive and limits the model to capturing only linear user–item interactions. As a result, MMMF and related linear ordinal models struggle to represent complex, nonlinear rating patterns that commonly arise in real-world recommendation scenarios.

This work addresses the fundamental limitation of conventional MMMF, namely its reliance on linear separability of ordinal ratings via parallel hyperplanes in a fixed latent space. Such a formulation inherently restricts the model to linear ordinal decision boundaries, which may be insufficient for capturing complex user–item interactions observed in real-world recommendation data. While several nonlinear recommender models have been proposed, they typically enhance representational capacity by increasing latent dimensionality or by adopting deep architectures that depart from the original maximum-margin ordinal structure. Consequently, improvements in performance often conflate the effect of nonlinearity with that of dimensional expansion, making it difficult to isolate the true contribution of nonlinear modeling.

To overcome this limitation, we propose Deep MMMF, a principled extension of MMMF that introduces nonlinear modeling while preserving its ordinal and geometric foundations. Specifically, Deep MMMF applies learnable nonlinear transformations to the fixed-dimensional user, item, and rating-dependent latent embeddings produced by MMMF. These transformations enable the model to learn complex, non-parallel ordinal decision boundaries in the latent space without altering the embedding dimensionality. As a result, the enhanced expressiveness arises purely from functional nonlinearity rather than from dimensional growth. This design ensures compact and interpretable latent representations, enables fair and controlled comparison with linear MMMF, and isolates the impact of nonlinear modeling itself. To the best of our knowledge, Deep MMMF is the first maximum-margin ordinal matrix factorization framework that achieves nonlinear decision boundaries through functional transformations of fixed-dimensional latent embeddings, thereby bridging the gap between ordinal max-margin modeling and modern deep nonlinear representation learning.

The key contributions are given as follows:

  • We propose Deep MMMF, a novel and principled extension that introduces nonlinear functional transformations over user, item, and rating-dependent embeddings, enabling nonlinear ordinal decision boundaries while preserving the original latent dimensionality.

  • We demonstrate that Deep MMMF enhances representational power without increasing embedding size, thereby isolating the benefit of nonlinearity from dimensional expansion and enabling fair comparison with existing matrix factorization approaches.

  • Extensive experiments across multiple benchmark datasets show that Deep MMMF consistently outperforms linear MMMF and state-of-the-art collaborative filtering methods, validating the effectiveness of nonlinear modeling in ordinal recommendation.

The next section (“Related work”) provides an overview of existing models and highlights limitations of State-of-the-Art (SOTA) techniques. The “Deep maximum margin matrix” factorization section describes the proposed methodology. The “Experimental results” section describes the performance of the proposed model. The summarization of the work and future direction is defined in the “Conclusion”.

Related work

DL techniques have shown remarkable success in learning hierarchical representations from raw data, driving transformative advancements in the domain of information retrieval. The integration of Deep Neural Networks (DNN) with Collaborative Filtering (CF) has emerged as a powerful paradigm for recommendation systems, offering superior performance compared to traditional MF approaches. Over the past few years, the increasing growth of sophisticated architectures that represent complicated user-item interactions while being computationally efficient. This section explores existing approaches that integrate DL with MF for collaborative filtering.

Building on the idea of understanding user-item dynamics, Fu et al.17 use a two-step framework that initially learns both user and item low-dimensional representations independently, capturing the underlying semantic relationships within user-user and item-item correlation. Subsequently, they employed a multilayer neural architecture to model a user-item interactions, utilizing these pre-computed embeddings as input features. Bobadilla et al.18 introduced a novel DL framework for CF that operates in three stages. First, the model uses MF to estimate the reliability of individual predictions. Then, it learns the complex relationships between accuracy and reliability for accurate recommendations. Lara et al.19 use a DeepMF approach which was a combination of DL with MF to improve the accuracy of the recommendation. This approach employs a multi-layered architecture, where each layer refines the MF model by leveraging the knowledge gained in the preceding layers. Xue et al.20 learned low-dimension representations for both user and items respectively, using user-item interaction matrix as an input. Their model leverages both explicit ratings and implicit feedback to enhance the rating prediction. A neural architecture is used in place of inner product in21, a revolutionary genric framework for Neural Collaborative Filtering (NCF) which learn any function from data. The proposed framework can be used with any DL model to provide recommendations. In a related study, Yi et al.22 used a Deep Matrix Factorization (DMF) framework that improves recommendation accuracy by integrating side information through a channel-based structure. Instead of relying solely on observed data, DMF utilizes a feature transformation function to directly learn low-dimensional embeddings for users and items. Additionally, the authors propose Implicit Feedback Embedding (IFE), which maps users and items from an implicit feedback information graph into real-valued low-dimensional vectors. This approach reduces the number of model parameters and enhances training efficiency. Wu et al.23 used a dual-regularized multilayer deep matrix factorization model that leverages Convolutional Neural Networks (CNNs) and Gated Recurrent Neural Networks (GRNNs) to learn user and item representations from textual descriptions. The integration of neural network architectures with MF has substantially enhanced recommendation accuracy by capturing complex patterns in the data24–26.

DL-based MF has significantly improved recommendation accuracy by capturing complex user-item interactions. However, these methods primarily focus on numerical prediction and are ill-suited for ordinal data, like user ratings, where the order is crucial. Treating ordinal ratings as numerical values ignores this inherent order and can lead to poor recommendations. For instance, a small numerical difference between predicted ratings (e.g., 3.9 vs. 4) might be inconsequential, while a large ordinal error (e.g., predicting a 2 instead of a 4) significantly impacts recommendation quality. To address this, we propose a Deep Maximum Margin-Based Collaborative Filtering approach that explicitly models the ordinal nature of ratings. Building on the MMMF, our method ensures the predicted ratings maintain the correct relative order, leading to better recommendations.

Deep maximum margin matrix factorization

Given a user-item rating matrix Inline graphic, where rows represent users, columns represent items, and each entry Inline graphic represents the rating user i gave to the item j. Here, n is the number of users, m is the number of items, and Inline graphic is the maximum rating. An entry of Inline graphic indicates an unobserved or missing rating. Given this partially observed rating matrix, the goal is to predict the missing ratings, which are then used to generate personalized item recommendations for each user.

MF16 is a widely adopted technique that models user and item interactions by learning latent factor matrices, Inline graphicand Inline graphic, where each entry in these matrices is treated as a model parameter. The Inline graphic row of U Inline graphic, represents the latent representation of user i, capturing their underlying preferences. Similarly, the Inline graphic row of V Inline graphic, encodes the latent attributes of item j. The predicted rating Inline graphic for user i on item j is obtained by computing the dot product Inline graphic, which estimates the user’s affinity for the item based on these learned representations. MF with ordinal entries is a special case that requires a more sophisticated approach to properly capture the ordinal nature of the data. Traditional factorization methods may not fully exploit the ordered structure of ratings, necessitating techniques that impose appropriate constraints. Among such approaches, maximum margin matrix factorization (MMMF) is one of the most popular, as it effectively integrates margin-based learning principles to enhance predictive performance.

MMMF16 provides a rich geometrical interpretation to the user and item latent features. The method treats item latent representations, rows of V, as points in a k-dimensional space, while user latent features, rows of U, are modeled as hyperplanes that partition the space according to the user’s rating preferences. Alternatively, item features can be interpreted as hyperplane coefficients, with users represented as points in the space. For each user (or equivalently, each item) i, the model also learns Inline graphic threshold values, Inline graphic, which, together with Inline graphic (or Inline graphic), define Inline graphic parallel hyperplanes. These hyperplanes divide the space into Inline graphic distinct regions, each corresponding to a specific rating level, effectively capturing the ordinal nature of the rating data. The original MMMF formulation employs a smooth hinge loss, which enforces a maximum margin separation between these regions16. This ensures that the learned hyperplanes not only partition the space effectively but also maximize the separation between adjacent rating levels, leading to better generalization and robustness in prediction. The objective of MMMF is formulated as follows.

graphic file with name d33e569.gif 1

where Inline graphic denotes Frobenius norm of a matrix A, Inline graphic is the regularization parameter, Inline graphic is the set of observed ratings, Inline graphic is smoothed hinge loss27 and is defined as:

graphic file with name d33e598.gif

Inline graphic ensures the placement of a point relative to the learned hyperplanes. Specifically, it acts as an indicator that determines whether the predicted rating for user i and item j falls above or below a given threshold associated with rating level r. This constraint enforces the correct ordering of ratings by ensuring that each data point is positioned in the appropriate region of the partitioned space, preserving the ordinal nature of the rating data. The definition of the transformation function is given below.

graphic file with name d33e615.gif

After learning the parameters U, V, and Inline graphic, the predicted rating r ( Inline graphic) for any entry Inline graphic is obtained by discretizing the real-valued prediction Inline graphic based on its position relative to the learned threshold values, following the condition:

graphic file with name d33e653.gif 2

For notational simplicity, the boundary conditions are set as Inline graphic and Inline graphic, ensuring that all possible ratings are properly assigned within the defined partitions. This formulation effectively models the ordinal nature of the rating data by enforcing a structured separation between rating levels through learned thresholds.

Although MMMF provides an elegant geometric interpretation by maximizing margins, its reliance on linear modeling, as formulated in Eq. (1), imposes significant limitations. MMMF assumes that both user preferences and item features can be captured through linear interactions, leading to parallel decision boundaries that separate rating levels in a fixed manner. However, real-world user preferences are often complex and highly nonlinear, making this assumption overly restrictive in many scenarios. Consider a movie recommendation scenario where preferences are shaped by two key factors: action and intensity. User A enjoys movies with a moderate balance of both action and intensity but dislikes extremes, avoiding films that are either too slow or overwhelmingly intense. User B prefers high-action movies but only if they are not excessively intense. User C, in contrast, consistently favors high-action movies regardless of intensity. These diverse and non-monotonic preferences cannot be effectively captured by the rigid, parallel decision boundaries imposed by MMMF. Since MMMF assumes a linear relationship between user tastes and item features, it struggles to model scenarios where user preferences follow more intricate patterns (Fig. 2).

Fig. 2.

Fig. 2

Architecture of the proposed deep MMMF model.

To overcome these limitations, we propose a deep MMMF framework that utilizes DNN to learn nonlinear representations of users, items, and thresholds. Figure 1 presents our neural network-based interpretation of MMMF, incorporating linear representation learning for user and item features. In this framework, we transform a user’s one-hot encoding through multiplication with a weight matrix Inline graphic to obtain their dense representation. More formally, when representing all users’ one-hot encodings as a matrix Inline graphic, the embedding layer performs the multiplication Inline graphic to generate their latent factors. Since Inline graphic is an identity matrix, Inline graphic and U are equivalent. We apply the same process for items, multiplying their one-hot encoding matrix Inline graphic with Inline graphic to obtain V. For threshold parameters, we compute Inline graphic by multiplying Inline graphic with Inline graphic. After obtaining U, V, and Inline graphic, we optimize the loss function given in Eq. (1) to determine the optimal parameters.

Fig. 1.

Fig. 1

MMMF with neural network mindset.

We extend this formulation by introducing deep neural layers to refine the initial representations U, V, and Inline graphic. Specifically, each of these representations is processed through distinct neural collaborative layers, yielding transformed embeddings that serve as learnable functions of the original inputs. We define these transformations as Inline graphic, Inline graphic, Inline graphic, where each Inline graphic represents a sequence of nonlinear transformations. By incorporating these deep mappings, the model learns more expressive and adaptive projections, effectively capturing complex rating patterns that the original MMMF’s linear embeddings fail to represent. This enhancement enables a more flexible and nuanced understanding of user preferences and item characteristics. The number of neural layers in each path and their corresponding sizes are treated as hyperparameters of the model and are optimized through a systematic hyperparameter tuning process. The optimal layer structure for each dataset and experimental setting is given in Table 2 in “Hyperparameter tuning”.

graphic file with name d33e782.gif 3

where Inline graphic denotes the smooth hinge loss function, Inline graphic represents the set of observed user–item interactions, and W is the set of all trainable parameters of the deep transformation networks. The predicted rating for the interaction between user i and item j is determined as

graphic file with name d33e805.gif

We set Inline graphic and Inline graphic to properly handle the boundary conditions. Algorithm 1 presents the overall procedure of the proposed approach.

Table 2.

Architecture and training configuration of deep MMMF.

Hyper-parameter MovieLens (weak) MovieLens (strong) EachMovie (weak) EachMovie (strong) Prime Pantry (weak) Prime Pantry (strong)
Inline graphic Embedding size 32 32 32 32 32 32
User embedding size 100 100 100 100 100 100
Item embedding size 100 100 100 100 100 100
Batch size 512 512 512 512 512 512
Inline graphic Hidden layers Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic
User network layers Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic
Item network layers Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic
Activation function LeakyReLU LeakyReLU LeakyReLU LeakyReLU LeakyReLU LeakyReLU
Optimizer Adam Adam Adam Adam Adam Adam
Dropout (embeddings) 0.2 0.2 0.3 0.3 0.2 0.2
Dropout (hidden layers) 0.2 0.2 0.3 0.3 0.2 0.2
L2 regularization (Inline graphic) Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic
Item weight transfer No Yes (frozen) No Yes (frozen) No Yes (frozen)
User weight transfer No No No No No No
Training strategy End-to-end Two-stage (base Inline graphic new users) End-to-end Two-stage (base Inline graphic new users) End-to-end Two-stage (base Inline graphic new users)

Algorithm 1.

Algorithm 1

Deep maximum margin matrix factorization (deep MMMF).

To demonstrate the efficacy of the proposed approach compared to the base MMMF, we consider a representative user from the MovieLens 1M dataset and visualize how the learned thresholds (Inline graphic) in both models classify ratings based on the computed scores (obtained via the inner product of user and item latent factors). Figure 3 presents a comparative analysis between MMMF and Deep MMMF in terms of their rating classification behavior for a set of representative users. In the figure, different symbols denote distinct rating levels. The visualization shows that Deep MMMF achieves a clearer and more distinct separation of rating classes compared to the traditional MMMF for the same users’ consumed items, thereby highlighting the enhanced discriminative capability of the proposed approach.

Fig. 3.

Fig. 3

Rating classification by MMMF and Deep MMMF for two Movielens 1M dataset users. Subfigures (a,b) correspond to one user, while (c,d) correspond to another user.

Empirical results

This section represents the performance of the proposed model and compares the performance of the model with various SOTA techniques on benchmark datasets. Table 1 describes the dataset used for experimentation.

Table 1.

Description of the dataset.

Dataset #Ratings #Users #Items Ratings
MovieLens 1M 1,000,209 6,040 3,952 {1,2,3,4,5}
EachMovie 2,811,983 72,916 1,628 {0, 0.2, 0.4, ..., 1}
Prime Pantry 471,614 247659 10814 {1,2,3,4,5}

Experimental setup

We conduct our experiments with two standard setups in the RS area: weak generalization and strong generalization16. Weak generalization uses the subset of ratings as the test set and assesses the model’s performance by how closely its predictions match the actual values. On the other hand, in the strong generalization setting, a subset of users is completely excluded during model training. During testing, the model predicts ratings for these unseen users by inferring only their latent representations, while keeping the previously learned item embeddings fixed and without re-optimizing the item parameters. We refer the reader to Rennie et al.16 for more details.

Hyperparameter tuning

All the hyperparameters mentioned above were carefully selected through a systematic tuning process. We employed a randomized grid search strategy, wherein predefined candidate values were specified for each hyperparameter. For example, dropout was evaluated at six levels (0.0, 0.2, 0.3, 0.4, 0.5, and 0.6), while the regularization coefficient Inline graphic was varied from Inline graphic to Inline graphic. Other hyperparameters considered include the embedding dimension, number of layers, layer sizes, and learning rate. The first column of Table 2 summarizes all the hyperparameters explored. We systematically evaluated different combinations of these hyperparameters and selected the configuration that minimized the validation error. Each combination was tested using three different random seeds, and the results were averaged to ensure robustness. The final model was then retrained using the selected optimal configuration and evaluated on the test sets. To illustrate this process, Fig. 4 presents the combinations of learning and dropout rates explored across two settings and two datasets. In each plot, the red marker indicates the optimal configuration. The remaining hyperparameters were selected following the same procedure. The optimal hyperparameters for the different datasets and experimental setups are presented below. Table 2 summarizes these configurations.

  • MovieLens weak generalization: in this scenario, the embedding layer sizes for Inline graphic, Inline graphic, and Inline graphic were set to 32, 100, and 100, respectively. Following the embedding layer, the subsequent two layers for Inline graphic were configured with sizes 16 and 4. Similarly, the user and item networks shared identical 256, 128, and 100 layer sizes. Dropout regularization with a probability of 0.2 was applied between these layers to prevent overfitting. The LeakyReLU activation function was employed throughout the model to introduce non-linearity. Additionally, L2 regularization with a regularization parameter (Inline graphic) value of 0.000001 was applied to all layer weights to enhance generalization further.

  • MovieLens strong generalization: for strong generalization on the MovieLens dataset, we selected 1,040 users for the test set Inline graphic, which is not shown to the model during the training process. Initially, a base model was trained using the training set, excluding the users in the test set. In this base model, the embedding layer sizes for Inline graphic, user, and item were set to 32, 100, and 100, respectively. A dropout layer with a probability of 0.2 was applied after each embedding layer to prevent overfitting. The subsequent Inline graphic layers were configured with sizes of 16 and 4, with a dropout of 0.2 applied between them. Consistent with the weak generalization model, the user and item layers shared identical layer sizes of 256, 128, and 100, with a dropout of 0.2 applied between these layers. To further enhance generalization, L2 regularization with a regularization parameter (Inline graphic) value of 0.0001 was applied to all layer weights. Next, we trained a new model to predict ratings for a new set of users in Inline graphic while maintaining the same collection of items as before. We used the identical structure for the item layers as in the previous model. We transferred the layer weights learned in the base model to these new item layers and froze them, preventing their further training in this new model. The embedding sizes for Inline graphic and the user were set to 32 and 100, respectively, followed by a dropout of 0.2 after both layers. The Inline graphic layers held sizes of 16 and 4, with a dropout of 0.2 applied between them. Following the user embedding layer, the user layer had a size of 256, 128 and 100 and used a 0.2 dropout between its layers. Throughout the model, the LeakyReLU activation function was used. Additionally, L2 regularization with a regularization parameter (Inline graphic) value of 0.0001 was applied to all layer weights.

  • EachMovie weak generalization: in this setting, the embedding layer sizes for Inline graphic, U, and V were assigned to 32, 100, and 100, respectively. After each embedding layer, a dropout layer of 0.3 is used. The subsequent three Inline graphic layers following the embedding layer had sizes 16, and 5, with a dropout of 0.3 between the layer sizes 16 and 5. Similarly, the user and item layers shared 256, 128, and 100 layer sizes. Dropout regularization with a probability of 0.3 is applied between these layers. Throughout the model, the LeakyReLU activation function is used. Furthermore, L2 regularization with a regularization parameter (Inline graphic) value of 0.000001 was applied to all layer weights.

  • EachMovie strong generalization: for strong generalization on the EachMovie dataset, we selected 6,656 users for the test set Inline graphic.

    Initially, a base model was trained using the same hyperparameters outlined for the weak generalization scenario. Subsequently, a new model was trained to predict ratings for a new set of users while retaining the same set of items. The item layers in this new model followed the same structure as in the base model. To leverage previously learned item representations, the layer weights from the base model were transferred to these item layers and frozen, preventing further training in the new model. The embedding sizes for Inline graphic and the user were set to 32 and 100, respectively, with a dropout rate of 0.3 applied after both layers. The Inline graphic layers were configured with sizes of 16 and 5, with a dropout of 0.2 applied between them. The user layers were designed with sizes of 256, 128, and 100, with a dropout rate of 0.3 applied between these layers. The LeakyReLU activation function was used throughout the model to introduce non-linearity. Additionally, L2 regularization with a regularization parameter (Inline graphic) value of 0.0001 was applied to all layer weights to improve generalization.

  • Prime Pantry weak generalization: in this setting, the Prime Pantry dataset is preprocessed by removing users with fewer than 20 ratings and items with fewer than 2 ratings; that is, Inline graphic and Inline graphic. After pre processing, we obtained 1,058 users, 3,991 items, and 32,625 ratings with a sparsity of 0.992. Both MovieLens 1M, and the EachMovie dataset are preprocessed with the same criteria. The embedding layer sizes for Inline graphic, Inline graphic, and Inline graphic were set to 32, 100, and 100, respectively. Following the embedding layer, the subsequent two layers for Inline graphic were configured with sizes 16 and 4. Similarly, the user and item networks shared identical 256, 128, and 100 layer sizes. Dropout regularization with a probability of 0.2 was applied between these layers to prevent overfitting. The LeakyReLU activation function was employed throughout the model to introduce non-linearity. Additionally, L2 regularization with a regularization parameter (Inline graphic) value of 0.000001 was applied to all layer weights to enhance generalization further.

  • Prime Pantry strong generalization: for strong generalization on the Prime Pantry dataset, the data preprocessing procedure is identical to that used for weak generalization. we selected 173 users for the test set Inline graphic, which is not shown to the model during the training process. Initially, a base model was trained using the training set, excluding the users in the test set. In this base model, the embedding layer sizes for Inline graphic, user, and item were set to 32, 100, and 100, respectively. A dropout layer with a probability of 0.2 was applied after each embedding layer to prevent overfitting. The subsequent Inline graphic layers were configured with sizes of 16 and 4, with a dropout of 0.2 applied between them. Consistent with the weak generalization model, the user and item layers shared identical layer sizes of 256, 128, and 100, with a dropout of 0.2 applied between these layers. To further enhance generalization, L2 regularization with a regularization parameter (Inline graphic) value of 0.0001 was applied to all layer weights. Next, we trained a new model to predict ratings for a new set of users in Inline graphic while maintaining the same collection of items as before. We used the identical structure for the item layers as in the previous model. We transferred the layer weights learned in the base model to these new item layers and froze them, preventing their further training in this new model. The embedding sizes for Inline graphic and the user were set to 32 and 100, respectively, followed by a dropout of 0.2 after both layers. The Inline graphic layers held sizes of 16 and 4, with a dropout of 0.2 applied between them. Following the user embedding layer, the user layer had a size of 256, 128 and 100 and used a 0.2 dropout between its layers. Throughout the model, the LeakyReLU activation function was used. Additionally, L2 regularization with a regularization parameter (Inline graphic) value of 0.0001 was applied to all layer weights (Table 3).

Fig. 4.

Fig. 4

Hyperparameter tuning of Deep-MMMF over dropout and regularization under weak and strong generalization settings across MovieLens, EachMovie, and Prime Pantry datasets.

Table 3.

Comparison of algorithms in terms of average NMAE under weak and strong generalization settings across MovieLens, EachMovie, and Prime Pantry datasets.

Algorithms MovieLens EachMovie Prime Pantry
Strong Weak Strong Weak Strong Weak
URP 0.4941 0.4444 0.4422 0.5557 0.3426 0.2967
Attitude 0.4320 0.4375 0.4520 0.4550 0.3221 0.3564
Fast MMMF 0.4156 0.4203 0.4397 0.4341 0.2869 0.2176
E-MMMF 0.4029 0.4071 0.4287 0.4295 0.3375 0.2186
PMF 0.4332 0.4413 0.4466 0.4579 0.3674 0.3756
BPMF 0.4235 0.4450 0.4352 0.4445 0.3762 0.3209
GP-LVM 0.4026 0.3994 0.4179 0.4134 0.3737 0.3797
iPMMMF & iBPMMMF 0.4031 0.4089 0.4211 0.4224 0.3776 0.4155
Gibbs MMMF & iPMMMF 0.4037 0.4040 0.4134 0.4142 0.2852 0.2172
HMF 0.4019 0.4032 0.4118 0.4095 0.2436 0.2452
AutoRec 0.4536 0.4659 0.5512 0.5185 0.3318 0.3439
DMF 0.4401 0.4413 0.5034 0.5020 0.3489 0.3252
NCF 0.4839 0.4400 0.4540 0.4584 0.3134 0.2893
Deep MMMF 0.3890 0.3984 0.4094 0.4089 0.2170 0.2136

Significant values are in bold.

Evaluation metrics and results

The performance of the proposed model is evaluated using two metrics: Mean Absolute Error (MAE) and Normalized Mean Absolute Error (NMAE). The NMAE is computed by dividing the MAE by a factor dependent on the maximum rating R, representing the expected MAE when rating values and predictions are uniformly distributed. For the MovieLens dataset (Inline graphic), this factor is 1.6, while for the EachMovie dataset (Inline graphic), it is 1.94428. The reported results represent the average performance over three runs.

We have compared our approach with ten prominent state-of-the-art algorithms, including URP29, Attitude30, Fast MMMF16, E-MMMF31, PMF9, BPMF10, GP-LVM32, iPMMMF and iBPMMMF33, Gibbs MMMF and iPMMMF34, HMF3, AutoRec35, DMF20, NCF21. The analysis shows that Deep MMMF consistently outperforms other methods in terms of NMAE under both strong and weak generalization settings. In the strong generalization scenario, where the testing data includes entirely unseen user-item interactions, Deep MMMF achieves a significantly lower NMAE compared to competing approaches. This demonstrates the model’s ability to generalize effectively to new instances by capturing complex user-item relationships. Furthermore, even in weak generalization scenarios, where the testing data contains partially seen interactions, Deep MMMF maintains its superiority over the other methods. Its lower NMAE suggests it can accurately predict user preferences, even with limited available data. The results demonstrate the robustness and reliability of Deep MMMF for CF tasks. The superior performance of Deep MMMF can be attributed to its DL architecture, which enables it to capture intricate patterns and dependencies in user-item interactions. By leveraging the power of DNN, Deep MMMF can effectively model nonlinear relationships, surpassing traditional MF approaches.

Statistical analysis

A statistical analysis is conducted to evaluate the significance of the proposed approach compared to other algorithms. Table 4 indicates that the Friedman test36 rejects the null hypothesis at the Inline graphic significance level for both generalization settings. Here, N denotes the number of datasets and K denotes the number of algorithms compared. These results confirm statistically significant differences among the algorithms across all evaluation metrics.

Table 4.

Summary of the Friedman statistical Inline graphic analysis.

Metric Inline graphic Critical value (Inline graphic) Inline graphic N K CD
Weak generalization 3.352 2.0719 3.354 3 14 11.456
Strong generalization 3.579 2.0719 3.354 3 14 11.456

To further evaluate the performance of the proposed approach relative to the comparison algorithms, the post-hoc Nemenyi test36 is applied. This test determines whether the performance of two algorithms differs significantly by comparing their average ranks. Specifically, two algorithms are considered significantly different if their average ranks differ by at least the critical difference (CD), which is computed as follows:

graphic file with name d33e1850.gif 4

where Inline graphic denotes the critical value. The results in Fig. 5 indicate that the proposed model achieves statistically superior performance compared to the baseline methods.

Fig. 5.

Fig. 5

Critical difference (CD) diagrams comparing algorithms under weak and strong generalization settings.

Conclusion

In this work, the Deep MMMF model is proposed to overcome the limitation of traditional MMMF, which relies on linear modeling and parallel decision boundaries in the latent space. By incorporating DNNs, our approach introduces nonlinear transformations of user, item, and threshold representations, enabling more flexible modeling of complex rating patterns while preserving the original embedding dimensionality. The learned deep representations allow the model to capture user preferences and item characteristics that are difficult to represent through purely linear embeddings. The experimental findings demonstrate that Deep MMMF improves recommendation accuracy by better aligning with the diverse and nonlinear nature of real-world user–item interactions. The performance gains observed across multiple datasets indicate that introducing nonlinear transformations within the max-margin ordinal framework provides a practical advantage without increasing latent dimensionality.

There are several possible extensions of this work. Contextual information, such as temporal dynamics, location-based signals, or auxiliary user attributes, can be incorporated by conditioning the embedding transformations on additional inputs or by augmenting the neural layers to learn context-aware representations. Such extensions would allow the model to adapt more effectively to dynamic recommendation environments. In terms of interpretability, the preservation of the original embedding structure and ordinal margin formulation provides opportunities for further analysis. Future work may explore techniques such as attention-based weighting, structured regularization, or margin analysis to better understand the contribution of user, item, and threshold components in the prediction process. Additionally, the proposed formulation opens the possibility of exploring kernelized variants of MMMF, where suitable kernel functions can be applied to latent features to model nonlinear relationships while retaining the max-margin learning principle.

Author contributions

1. Shailendra Kumar: Design, development, Experimentation, Software, Writing – original draft. 2. Venkateswara Rao Kagita: Problem formulation, Architecture design, Methodology, Writing – review & editing. 3. Vikas Kumar: Problem formulation, Architecture design, Writing – review & editing. 4. Gaurav Niranjan: Prototype implementation.

Data availability

MovieLens 1M dataset is publicly available at the GroupLens repository: https://grouplens.org/datasets/movielens/. EachMovie dataset is publicly available at the GroupLens repository: https://grouplens.org/datasets/eachmovie/. Prime Pantry dataset is publicly available at Amazon Review Data (2018) https://cseweb.ucsd.edu/ jmcauley/datasets/amazonv2/.

Declarations

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Contributor Information

Shailendra Kumar, Email: sk22csr1r02@student.nitw.ac.in.

Venkateswara Rao Kagita, Email: venkat.kagita@nitw.ac.in.

References

  • 1.Lu, J., Wu, D., Mao, M., Wang, W. & Zhang, G. Recommender system application developments: A survey. Decis. Support Syst.74, 12–32 (2015). [Google Scholar]
  • 2.Papadakis, H., Papagrigoriou, A., Panagiotakis, C., Kosmas, E. & Fragopoulou, P. Collaborative filtering recommender systems taxonomy. Knowl. Inf. Syst.64, 35–74 (2022). [Google Scholar]
  • 3.Kumar, V., Pujari, A. K., Sahu, S. K., Kagita, V. R. & Padmanabhan, V. Collaborative filtering using multiple binary maximum margin matrix factorizations. Inf. Sci.380, 1–11 (2017). [Google Scholar]
  • 4.Kumar, V., Pujari, A. K., Sahu, S. K., Kagita, V. R. & Padmanabhan, V. Proximal maximum margin matrix factorization for collaborative filtering. Pattern Recognit. Lett.86, 62–67 (2017). [Google Scholar]
  • 5.Martins, G. B. A., Papa, J. A. P. & Adeli, H. Deep learning techniques for recommender systems based on collaborative filtering. Expert Syst.37, e12647 (2020).
  • 6.Wang, H., Wang, N. & Yeung, D.-Y. Collaborative deep learning for recommender systems. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. 1235–1244 (2015).
  • 7.Tran, T., Lee, K., Liao, Y. & Lee, D. Regularizing matrix factorization with user and item embeddings for recommendation. In Proceedings of the 27th ACM International Conference on Information and Knowledge Management. 687–696 (2018).
  • 8.Lee, D. D. & Seung, H. S. Learning the parts of objects by non-negative matrix factorization. Nature401, 788–791 (1999). [DOI] [PubMed]
  • 9.Mnih, A. & Salakhutdinov, R. R. Probabilistic matrix factorization. Adv. Neural Inf. Process. Syst.20 (2007).
  • 10.Salakhutdinov, R. & Mnih, A. Bayesian probabilistic matrix factorization using markov chain Monte Carlo. In Proceedings of the 25th International Conference on Machine Learning. 880–887 (2008).
  • 11.Srebro, N., Rennie, J. & Jaakkola, T. Maximum-margin matrix factorization. Adv. Neural Inf. Process. Syst.17 (2004).
  • 12.Lange, K. & Lange, K. Singular value decomposition. Numer. Anal. Stat. 129–142 (2010).
  • 13.Koren, Y. Factorization meets the neighborhood: A multifaceted collaborative filtering model. In Proceedings of the 14th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. 426–434 (2008).
  • 14.Paterek, A. Improving regularized singular value decomposition for collaborative filtering. In Proceedings of KDD Cup and Workshop. Vol. 2007. 5–8 (2007).
  • 15.Bi, X., Qu, A., Wang, J. & Shen, X. A group-specific recommender system. J. Am. Stat. Assoc.112, 1344–1353 (2017). [Google Scholar]
  • 16.Rennie, J. D. & Srebro, N. Fast maximum margin matrix factorization for collaborative prediction. In Proceedings of the 22nd International Conference on Machine learning. 713–719 (2005).
  • 17.Fu, M., Qu, H., Yi, Z., Lu, L. & Liu, Y. A novel deep learning-based collaborative filtering model for recommendation system. IEEE Trans. Cybern.49, 1084–1096 (2018). [DOI] [PubMed] [Google Scholar]
  • 18.Bobadilla, J., Alonso, S. & Hernando, A. Deep learning architecture for collaborative filtering recommender systems. Appl. Sci.10, 2441 (2020). [Google Scholar]
  • 19.Lara-Cabrera, R., González-Prieto, Á. & Ortega, F. Deep matrix factorization approach for collaborative filtering recommender systems. Appl. Sci.10, 4926 (2020). [Google Scholar]
  • 20.Xue, H.-J., Dai, X., Zhang, J., Huang, S. & Chen, J. Deep matrix factorization models for recommender systems. In IJCAI. Vol. 17. 3203–3209 (2017).
  • 21.He, X. et al. Neural collaborative filtering. In Proceedings of the 26th International Conference on World Wide Web. 173–182 (2017).
  • 22.Yi, B. et al. Deep matrix factorization with implicit feedback embedding for recommendation system. IEEE Trans. Indus. Inform.15, 4591–4601 (2019). [Google Scholar]
  • 23.Wu, H. et al. Dual-regularized matrix factorization with deep neural networks for recommender systems. Knowl.-Based Syst.145, 46–58 (2018). [Google Scholar]
  • 24.Da’u, A. & Salim, N. Recommendation system based on deep learning methods: A systematic review and new directions. Artif. Intell. Rev.53, 2709–2748 (2020).
  • 25.Zhang, S., Yao, L., Sun, A. & Tay, Y. Deep learning based recommender system: A survey and new perspectives. ACM Comput. Surv. (CSUR)52, 1–38 (2019). [Google Scholar]
  • 26.Liu, H. et al. Edmf: Efficient deep matrix factorization with review feature learning for industrial recommender system. IEEE Trans. Indus. Inform.18, 4361–4371 (2021). [Google Scholar]
  • 27.Rennie, J. D. & Srebro, N. Loss functions for preference levels: Regression with discrete ordered labels. In Proceedings of the IJCAI Multidisciplinary Workshop on Advances in Preference Handling. Vol. 1 (AAAI Press, 2005).
  • 28.Marlin, B. & Zemel, R. S. The multiple multiplicative factor model for collaborative filtering. In Proceedings of the Twenty-First International Conference on Machine learning. Vol. 73 (2004).
  • 29.Marlin, B. M. Modeling user rating profiles for collaborative filtering. Adv. Neural Inf. Process. Syst.16 (2003).
  • 30.Marlin, B. Collaborative filtering: A machine learning perspective (2004).
  • 31.DeCoste, D. Collaborative prediction using ensembles of maximum margin matrix factorizations. In Proceedings of the 23rd International Conference on Machine Learning. 249–256 (2006).
  • 32.Lawrence, N. D. & Urtasun, R. Non-linear matrix factorization with gaussian processes. In Proceedings of the 26th Annual International Conference on Machine Learning. 601–608 (2009).
  • 33.Xu, M., Zhu, J. & Zhang, B. Nonparametric max-margin matrix factorization for collaborative prediction. Adv. Neural Inf. Process. Syst.25 (2012).
  • 34.Xu, M., Zhu, J. & Zhang, B. Fast max-margin matrix factorization with data augmentation. In International Conference on Machine Learning. 978–986 (PMLR, 2013).
  • 35.Sedhain, S., Menon, A. K., Sanner, S. & Xie, L. Autorec: Autoencoders meet collaborative filtering. In Proceedings of the 24th International Conference on World Wide Web. 111–112 (2015).
  • 36.Demšar, J. Statistical comparisons of classifiers over multiple data sets. J. Mach. Learn. Res.7, 1–30 (2006). [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

MovieLens 1M dataset is publicly available at the GroupLens repository: https://grouplens.org/datasets/movielens/. EachMovie dataset is publicly available at the GroupLens repository: https://grouplens.org/datasets/eachmovie/. Prime Pantry dataset is publicly available at Amazon Review Data (2018) https://cseweb.ucsd.edu/ jmcauley/datasets/amazonv2/.


Articles from Scientific Reports are provided here courtesy of Nature Publishing Group

RESOURCES