---
title: 'MUFFIN: User-Adaptive Frequency Filtering'
url: https://www.emergentmind.com/topics/mixture-of-user-adaptive-frequency-filtering-muffin
type: topic
---

# MUFFIN: User-Adaptive Frequency Filtering

Mixture of User-adaptive Frequency FIlteriNg (MUFFIN) is a frequency-domain sequential recommendation model that predicts a user’s next interaction by combining full-spectrum modeling, local band-sensitive emphasis, and user-specific frequency filtering. It is designed for the standard next-item sequential recommendation setting, where a user sequence \(S_u = [i_1, i_2, \dots, i_{|S_u|}]\) is used to estimate \(P_\theta(i = i_{|S_u|+1} \mid S_u)\). The model is motivated by two stated limitations of earlier frequency-domain sequential recommenders: limited frequency band coverage and lack of personalized frequency filtering. MUFFIN addresses these through a dual-branch architecture composed of a Global Filtering Module (GFM), a Local Filtering Module (LFM), and a User-Adaptive Filter (UAF) used in both branches [2508.13670].

## 1. Problem formulation and conceptual basis

MUFFIN treats user behavior sequences as objects with informative spectral structure. In the formulation used by the model, low-frequency components correspond to slow, smooth, long-term preference changes; high-frequency components correspond to abrupt transitions, short-term intent changes, or rapid item switching; and mixed spectra can reflect users who exhibit both stable core interests and intermittent exploration [2508.13670]. This spectral interpretation is used to motivate a recommendation architecture operating directly in the frequency domain rather than relying only on time-domain sequence encoders.

The model is introduced for the standard sequential recommendation problem. Let \(\mathcal U\) and \(\mathcal I\) denote the user and item sets, and let the observed interaction sequence for user \(u\) be
\[
S_u = [i_1, i_2, \dots, i_{|S_u|}],
\]
with \(i_j \in \mathcal I\). The learning objective is written as
\[
\theta^* = \arg\max_\theta P_\theta(i = i_{|S_u|+1} \mid S_u).
\]
Within this setting, MUFFIN argues that sequential behavior often requires both a comprehensive view over the full spectrum and selective emphasis on informative local frequency regions, because useful recommendation signals are not restricted to a single frequency range [2508.13670].

A central premise is that earlier frequency-domain sequential recommenders typically learn one shared spectral filter and apply it to every user. MUFFIN identifies this as a personalization deficiency: a filter that boosts low frequencies may help users with stable long-term interests but harm users whose behavior is dominated by high-frequency fluctuations. The model therefore combines three elements: global full-spectrum modeling, local band-sensitive emphasis, and user-adaptive filtering [2508.13670].

## 2. Dual-branch architecture

MUFFIN consists of two parallel filtering branches. The Global Filtering Module processes the entire frequency spectrum at once to capture overall behavioral patterns across all frequency ranges. The Local Filtering Module partitions the spectrum into multiple contiguous bands and softly emphasizes the most important ones while preserving information from all bands. Both branches use the same User-Adaptive Filter, which generates user-specific modulation weights from the user’s initial frequency representation [2508.13670].

The input sequence is embedded into
\[
\mathbf H^0 \in \mathbb R^{n \times d},
\]
where \(n\) is the maximum sequence length and \(d\) is the hidden dimension. MUFFIN then transforms \(\mathbf H^0\) into the frequency domain, generates a user-adaptive filter from the resulting spectrum, applies multiple layers of GFM and LFM processing with FFN refinement, concatenates the final branch outputs, projects them, adds a residual connection from the input embeddings, and predicts the next item [2508.13670].

The frequency transform is based on RFFT. For a real-valued sequence \(\mathbf S \in \mathbb R^N\), the model writes
\[
\mathbf F = \mathcal F_R(\mathbf S) \in \mathbb C^M, \quad M = \left\lfloor \frac N2 \right\rfloor + 1.
\]
For sequence embeddings, the initial frequency-domain representation is
\[
\mathbf X^0 = \mathcal F(\mathbf H^0) \in \mathbb C^{m \times d}, \quad
m = \left\lfloor \frac n2 \right\rfloor + 1.
\]
The generic filtering operation is
\[
f(\mathbf S) = \mathcal F^{-1}\big( \mathcal F(\mathbf S) \odot \mathbf W \big),
\]
where \(\mathbf W \in \mathbb C^M\) is a learnable complex-valued filter and \(\odot\) denotes element-wise multiplication [2508.13670].

In GFM, the layer-\(l\) input \(\mathbf H^l_{\text{global}}\) is transformed to \(\mathbf X^l_{\text{global}}\), modulated by a personalized complex filter, returned to the time domain, and passed through residual, dropout, and normalization:
\[
\tilde{\mathbf H}^l_{\text{global}}
=
\mathcal F^{-1}\left(
\mathbf X^l_{\text{global}} \odot \tilde{\mathbf W}^l_{\text{global}}
\right),
\]
\[
\mathbf O^l_{\text{global}}
=
\text{LayerNorm}\left(
\mathbf H^l_{\text{global}} + \text{Dropout}(\tilde{\mathbf H}^l_{\text{global}})
\right).
\]
The stated role of GFM is to ensure that no useful signal is missed because all frequencies are processed together [2508.13670].

In LFM, the spectrum is partitioned into \(K\) contiguous bands:
\[
\mathbf X^l_{\text{local}} = [\mathbf B_1^l; \mathbf B_2^l; \dots; \mathbf B_K^l].
\]
The band widths are defined by
\[
a_t = \left\lfloor \frac{t \cdot m}{K} \right\rfloor - \left\lfloor \frac{(t-1)\cdot m}{K} \right\rfloor,
\quad \sum_{t=1}^K a_t = m.
\]
For each band \(t\), the model filters only that band, zero-pads the remainder of the spectrum, applies inverse FFT, and obtains a band-specific time-domain representation. These band outputs are then softly aggregated rather than hard-selected [2508.13670].

This dual structure is the reason the model is described as a “mixture.” The term refers both to the combination of global and local filtering modules and to the soft gating mixture over multiple local frequency-band outputs within LFM [2508.13670].

## 3. User-Adaptive Filter and local band gating

The User-Adaptive Filter is the principal personalization mechanism in MUFFIN. It is generated from the initial frequency representation \(\mathbf X^0\), not from the layer-wise spectral states, and it uses only the amplitude of the complex spectrum:
\[
\|\mathbf X^0\| \in \mathbb R^{m \times d}.
\]
The construction is
\[
\mathbf C(\mathbf X^0) =
\text{BatchNorm1D}\left(\text{Conv1D}(\|\mathbf X^0\|^\top)\right)
\in \mathbb R^{d \times m},
\]
\[
h(\mathbf X^0) = \sigma\left(\mathbf C(\mathbf X^0)\right)^\top \in \mathbb R^{m \times d},
\]
where \(\sigma(\cdot)\) is the sigmoid and the convolution uses kernel \(\mathbf W_c \in \mathbb R^{d \times d \times c}\) with kernel size \(c\) [2508.13670].

This produces a real-valued, user-specific modulation map over frequency bins and channels. The map is then applied to the learnable complex filters in both branches:
\[
\tilde{\mathbf W}^l_{\text{global}} = h(\mathbf X^0) \odot \mathbf W^l_{\text{global}},
\]
\[
\tilde{\mathbf W}^l_{\text{local}} = h(\mathbf X^0) \odot \mathbf W^l_{\text{local}}.
\]
The model therefore personalizes spectral processing by modulating base filters using the user’s initial frequency-domain profile [2508.13670].

The paper explicitly compares this convolutional UAF with an MLP-based variant and reports that the convolutional version performs better. The explanation given is that convolution aggregates neighboring frequency amplitudes and captures local structure in the spectrum more effectively than an MLP that treats components more independently [2508.13670]. This suggests that MUFFIN’s notion of user adaptation is not merely per-user scaling, but localized adaptation over adjacent spectral bins.

The local branch supplements UAF with a second gating mechanism over the \(K\) contiguous bands. Using the amplitude spectrum at layer \(l\),
\[
\|\mathbf X^l_{\text{local}}\|,
\]
the model computes soft weights
\[
p_t = \text{Softmax}\big(g(\|\mathbf X^l_{\text{local}}\|)\big)_t,
\qquad \sum_{t=1}^K p_t = 1,
\]
where \(g(\cdot)\) is a three-layer MLP with GeLU. The final local output is
\[
\mathbf O^l_{\text{local}} = \sum_{t=1}^K p_t \cdot \mathbf o_t.
\]
The paper emphasizes that this is not hard band selection. All bands remain active; the model changes only their relative emphasis. This is used to mitigate information loss that could arise from rigid band pruning [2508.13670].

A load balancing term is added to avoid local-gate collapse onto a small number of bands:
\[
\mathcal L_{\text{bal}} = \frac{1}{K}\sum_{t=1}^K \left\| p_t - \frac{1}{K} \right\|_2^2.
\]
This regularizer encourages more balanced band usage while preserving selectivity [2508.13670].

## 4. Forward computation, losses, and optimization

After branch-specific filtering, each branch uses the same feed-forward block:
\[
\text{FFN}(\mathbf X) = \text{GeLU}(\mathbf X \mathbf W_1 + \mathbf b_1)\mathbf W_2 + \mathbf b_2,
\]
with
\[
\mathbf W_1 \in \mathbb R^{d \times 4d}, \quad
\mathbf W_2 \in \mathbb R^{4d \times d}, \quad
\mathbf b_1 \in \mathbb R^{4d}, \quad
\mathbf b_2 \in \mathbb R^d.
\]
For branch \(* \in \{\text{global}, \text{local}\}\),
\[
\mathbf H_*^{l+1} =
\text{LayerNorm}\left(
\mathbf O_*^l + \text{Dropout}\big(\text{FFN}(\mathbf O_*^l)\big)
\right).
\]
After \(L\) layers, the two outputs are concatenated and projected:
\[
\mathbf H^L = [\mathbf H^L_{\text{global}};\mathbf H^L_{\text{local}}]\mathbf W_p,
\qquad
\mathbf W_p \in \mathbb R^{2d \times d}.
\]
A residual connection from the original embeddings is then added:
\[
\hat{\mathbf H}^L =
\text{Dropout}\left(
\text{LayerNorm}(\mathbf H^0 + \mathbf H^L)
\right).
\]
The representation at the last interacted position is used for prediction:
\[
\hat{\mathbf y} = \text{Softmax}\left( \mathbf E \hat{\mathbf H}^L_{|S_u|} \right)
\in \mathbb R^{|\mathcal I|},
\]
where the item embedding matrix \(\mathbf E\) is shared between input embedding and output projection [2508.13670].

MUFFIN is trained with a three-part objective. The recommendation loss is cross-entropy:
\[
\mathcal L_{\text{rec}} =
-\sum_{i=1}^{|\mathcal I|} \mathbf y_i \log(\hat{\mathbf y}_i).
\]
The model also adds branch-specific auxiliary supervision,
\[
\hat{\mathbf y}^{\text{local}} = \text{Softmax}(\mathbf E \mathbf H^L_{\text{local}}),
\qquad
\hat{\mathbf y}^{\text{global}} = \text{Softmax}(\mathbf E \mathbf H^L_{\text{global}}),
\]
\[
\mathcal L_{\text{aux}} =
-\sum_{i=1}^{|\mathcal I|}
\left(
\mathbf y_i \log(\hat{\mathbf y}^{\text{local}}_i)
+
\mathbf y_i \log(\hat{\mathbf y}^{\text{global}}_i)
\right),
\]
to ensure that both branches learn predictive representations individually. The total loss is
\[
\mathcal L =
\mathcal L_{\text{rec}} + \alpha \mathcal L_{\text{aux}} + \beta \mathcal L_{\text{bal}},
\]
where \(\alpha\) and \(\beta\) weight the auxiliary and balancing losses [2508.13670].

The implementation details reported in the paper are specific. The framework is RecBole and RecBole-DA; the optimizer is Adam; the learning rate is \(0.001\); the batch size is \(256\); the hidden dimension is \(64\); the number of layers for frequency-based models is \(2\); the number of frequency bands satisfies
\[
K \in \{2,4,6,8,10\};
\]
the auxiliary loss weight satisfies
\[
\alpha \in \{0.05, 0.1, 0.2, 0.5, 1\};
\]
the balancing loss weight satisfies
\[
\beta \in \{0.05, 0.1, 0.2, 0.5, 1\};
\]
the UAF kernel size satisfies
\[
c \in \{3,5,7\};
\]
dropout is \(0.1\) on ML-1M and \(0.4\) on the other datasets; the maximum sequence length is \(50\); the validation metric is N@20; and early stopping uses patience of 15 epochs [2508.13670].

## 5. Experimental results and analytical findings

MUFFIN is evaluated on five benchmark datasets after 5-core preprocessing: Amazon Beauty, Amazon Toys, Amazon Sports, Yelp, and ML-1M. The reported statistics are Beauty: 22,363 users, 12,101 items, 198,502 interactions, avg length 8.9; Toys: 19,412 users, 11,924 items, 167,597 interactions, avg length 8.6; Sports: 35,598 users, 18,357 items, 296,337 interactions, avg length 8.3; Yelp: 30,499 users, 20,068 items, 317,182 interactions, avg length 10.4; and ML-1M: 6,041 users, 3,417 items, 999,611 interactions, avg length 165.5 [2508.13670].

The evaluation protocol is leave-one-out, using the last item for test, the second-last item for validation, and earlier items for training. Metrics are Recall@\(K\) and NDCG@\(K\) with \(K \in \{5,10,20\}\), averaged over all test users and over five random runs. Baselines include GRU4Rec, SASRec, BERT4Rec, DuoRec, FMLPRec, FEARec, BSARec, and SLIME4Rec [2508.13670].

MUFFIN is reported as achieving the best performance on all five datasets across nearly all metrics. Representative values listed in the paper include:

| Dataset | MUFFIN R@10 | Second-best R@10 | MUFFIN N@10 | Second-best N@10 |
|---|---:|---:|---:|---:|
| Beauty | 0.0919 | 0.0885 | 0.0487 | 0.0460 |
| Toys | 0.1005 | 0.0995 | 0.0542 | 0.0506 |
| Sports | 0.0570 | 0.0530 | 0.0281 | 0.0271 |
| Yelp | 0.0755 | 0.0729 | 0.0429 | 0.0412 |
| ML-1M | 0.3187 | 0.3103 | 0.1848 | 0.1798 |

The paper summarizes the average gains as \(+9.84\%\) in R@10 and \(+9.48\%\) in N@10 over the strongest transformer baseline DuoRec, and \(+4.12\%\) in R@10 and \(+5.48\%\) in N@10 over the strongest frequency-domain competitor SLIME4Rec [2508.13670].

The ablation studies on Beauty and ML-1M isolate the contributions of the main components. Removing UAF degrades performance: on Beauty, MUFFIN R@10/N@10 is \(0.0919 / 0.0487\) versus \(0.0906 / 0.0473\) without UAF; on ML-1M, MUFFIN is \(0.3187 / 0.1848\) versus \(0.3151 / 0.1803\) without UAF. Removing GFM gives \(0.0887 / 0.0460\) on Beauty and \(0.3086 / 0.1759\) on ML-1M. Removing LFM gives \(0.0906 / 0.0467\) on Beauty and \(0.3079 / 0.1798\) on ML-1M. Removing auxiliary loss causes one of the largest drops, and removing balancing loss also reduces performance [2508.13670].

The hyperparameter analysis reported in the paper shows that performance improves as \(K\) increases from 1 to a moderate value and then declines when too many bands are used. The stated interpretation is that \(K=1\) makes LFM equivalent to GFM, best values were around 4 or 6 depending on dataset, too few bands reduce granularity, and too many bands can overfit [2508.13670].

Runtime analysis in the paper states that Fourier transform via FFT/RFFT is \(O(N\log N)\), generally cheaper than quadratic self-attention over length \(N\). MUFFIN trains faster than SLIME4Rec in the reported runtime table: on Beauty, \(15.4\)s versus \(31.7\)s per epoch; on ML-1M, \(131.5\)s versus \(253.6\)s. Evaluation is slower than some baselines because MUFFIN runs both global and local branches: on Beauty, \(0.67\)s versus \(0.16\)s for SLIME4Rec; on ML-1M, \(0.21\)s versus \(0.13\)s [2508.13670].

## 6. Position within frequency-aware recommendation and common points of confusion

MUFFIN belongs to a line of recommendation research that interprets recommendation models through spectral filtering. In sequential recommendation, “Filtering with Time-frequency Analysis: An Adaptive and Lightweight Model for Sequential Recommender Systems Based on Discrete Wavelet Transform” introduces DWTRec, which replaces self-attention with an adaptive time-frequency filter based on discrete wavelet transform. DWTRec decomposes user-interest representations into approximation and detail components, adaptively weights the detail components, and reconstructs the filtered sequence representation. Its central claim is that self-attention behaves as a low-pass filter and tends to suppress high-frequency information corresponding to abrupt interest shifts. This places DWTRec close to MUFFIN in the broad sense that both models reject a single shared low-pass view of user behavior and instead emphasize multiband spectral structure [2503.23436].

The difference is architectural and conceptual. DWTRec uses wavelet-domain coefficient masks over localized time-frequency components and is not explicitly user-adaptive in the sense of a user-conditioned gating network. MUFFIN, by contrast, generates a user-specific modulation map \(h(\mathbf X^0)\) and applies it to both global and local frequency-domain filters. This suggests that DWTRec is best viewed as adaptive multiscale filtering, whereas MUFFIN is explicitly framed as user-adaptive frequency filtering [2503.23436].

A second related direction appears in graph-based collaborative filtering. “Frequency-aware Graph Signal Processing for Collaborative Filtering” proposes FaGSP, which combines an ideal high-pass filter, an ideal low-pass filter, and high-order neighborhood filters. FaGSP interprets low-frequency components as common characteristics and high-frequency components as unique characteristics, but it uses fixed global coefficients such as \(\alpha_1\) and \(\alpha_2\) rather than per-user adaptive weighting. This makes it a close conceptual precursor for multi-filter frequency-aware recommendation, but not for user-adaptive mixture filtering in the strict MUFFIN sense [2402.08426].

Subsequent work extends adaptive spectral filtering into other recommendation settings. “TimeMM: Time-as-Operator Spectral Filtering for Dynamic Multimodal Recommendation” constructs a bank of time-conditioned graph operators and mixes them through soft gating derived from temporal context. This suggests a different path toward adaptive spectral recommendation: instead of mixing contiguous Fourier bands, the model mixes temporal smoothing operators defined on different time-weighted graphs. A plausible implication is that MUFFIN and TimeMM exemplify two distinct forms of adaptive spectral modeling—one centered on explicit frequency-domain filtering over sequences, the other on operator-based graph filtering with temporal conditioning [2604.26247].

A recurring source of confusion is acronym reuse. “MUFFIN” is not unique to sequential recommendation. In “Multi-band Frequency Reconstruction for Neural Psychoacoustic Coding,” MUFFIN denotes a neural audio codec built around psychoacoustically guided multi-band frequency reconstruction and Multi-Band Spectral Residual Vector Quantization. That work does not refer to Mixture of User-adaptive Frequency Filtering and belongs to neural audio coding rather than recommender systems [2505.07235].

Within recommendation research, the defining features of MUFFIN are therefore precise: a dual-branch frequency-domain encoder, soft local band aggregation without hard band exclusion, and user-specific spectral modulation derived from the amplitude of the initial sequence spectrum [2508.13670].

Source: https://www.emergentmind.com/topics/mixture-of-user-adaptive-frequency-filtering-muffin