Skip to content

Exploring Methods to Detect Recommender System Data Memorization in Large Language ModelsExploring Approaches for Detecting Memorization of Recommender System Data in Large Language Models

arXiv· arXiv:2601.02002· Antonio Colacicco, Vito Guida, Dario Di Palma, Fedelucio Narducci, Tommaso Di Noia·Indexed by this site · 2026-10-12· Originally publishedAttacks

Quick read

Analysis and theory

Based on the paper PDF (AI-generated); refer to the original

Compare three probes: APE on LLaMA-3B at temperature 0.7 achieves 26% exact-match on movies, and below 0.1% on numeric users and ratings.

Questions
LLMs have been used for recommendation, but training corpora are not public. Di Palma et al. found that MovieLens-1M is memorized by the LLaMA and OpenAI families, but extraction relies only on manual prompts; the authors state that it is also a common recommendation benchmark, and if the test set is already memorized, evaluation results would be affected.
Methods
On MovieLens-1M, compare three types of methods: jailbreak prompts, reading LLaMA-1B activations with CCS and Cluster-Norm, and APE. APE generates 100 candidate prompts from an LLM based on 5 demonstrations, filters them with exact-match, and iterates.
Experiments and results
Jailbreaks only occasionally recall, with no quantitative evaluation. On movie titles, CCS and Cluster-Norm balanced accuracy are 0.92 and 0.94; users and ratings the authors state are indistinguishable from random guessing. APE on LLaMA-3B at temperature 0.7 achieves 26% exact-match for movies, with users and ratings below 0.1%.
Limitations and future work
The authors state that high scores cannot be confirmed as memory; confirmation requires next-token prediction of the original text. The authors believe APE should be run on larger models such as LLaMA-70B and more datasets, and should handle numeric fields. The paper does not report the activation layer, top-k value, or number of repetitions.
Experimental setupLLaMA-1B、LLaMA-3B · MovieLens-1M · balanced accuracy、exact-match accuracy
Evaluated models
LLaMA-1BLLaMA-3B
Benchmarks
MovieLens-1M
Metrics
balanced accuracyexact-match accuracy
AI summaryResearchers explore methods to detect memorization of recommender system data by large language models, comparing three approaches on MovieLens-1M: jailbreak prompt engineering, unsupervised latent knowledge discovery, and automatic prompt engineering (APE). Previous extraction of memorized data from MovieLens-1M relied solely on manual prompt engineering. Experiments with LLaMA models show that jailbreak prompts do not improve retrieval of memorized entries and are unstable; unsupervised methods probing internal activations via CCS and Cluster-Norm reliably distinguish real from fictional movie titles but fail on numerical data for users and ratings; APE retrieves entry-level information with moderate success but struggles to recover numerical interactions. The authors consider automatically optimized prompts the most promising strategy for extracting memorized samples.

Researchers explore methods to detect memorization of recommender system data by large language models, comparing three approaches on MovieLens-1M: jailbreak prompt engineering, unsupervised latent knowledge discovery, and automatic prompt engineering (APE). Previous extraction of memorized data from MovieLens-1M relied solely on manual prompt engineering. Experiments with LLaMA models show that jailbreak prompts do not improve retrieval of memorized entries and are unstable; unsupervised methods probing internal activations via CCS and Cluster-Norm reliably distinguish real from fictional movie titles but fail on numerical data for users and ratings; APE retrieves entry-level information with moderate success but struggles to recover numerical interactions. The authors consider automatically optimized prompts the most promising strategy for extracting memorized samples.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Compare jailbreaks, activation probing, and APE to see whether MovieLens-1M memories in LLaMA can be detected.

    Can manual prompts be strengthened, can memory be detected by methods other than prompts, and can MovieLens-1M data leakage be discovered automatically.

    • Scenario: The authors state that LLMs are already used for recommendations, and training corpora are not public, so data leakage is a concern. Di Palma et al. report that MovieLens-1M is memorized by the LLaMA and OpenAI families, e.g., GPT-4o extracts 80.76% of item samples and LLaMA-3.3 70B extracts 7.65%, with recommendation performance correlated with the degree of memorization; this dataset is also often evaluated under classic recommendation protocols, and the authors state that if the test set is already memorized, evaluation results would be affected.
    • Gap in existing approaches: The authors state that previous extraction relied only on manual prompt engineering. This raises three questions: can manual prompts be strengthened; can memory be detected beyond manual prompts; and can leakage detection be automated.
    • This paper's work: On MovieLens-1M and public LLaMA, it compares jailbreak prompts, CCS and Cluster-Norm unsupervised probing, and Automatic Prompt Engineering (APE), examining effects by item, user, and rating fields. The authors state that to their knowledge, this is the first comprehensive comparison of manual, unsupervised, and automatic probing on recommendation system data.
    • Access settings: The introduction labels jailbreaks and APE as white-box and unsupervised as black-box. Table 2 labels manual prompts and APE as Black-box and unsupervised as Activation access. In the methods section, jailbreaks only query Llama-1B outputs, and CCS uses LLaMA-1B hidden activations.
  2. What related research exists?

    Related work covers membership inference, LLM memory quantification, and recommendation data memorization; the comparison is against Di Palma et al.'s manual prompts.

    Membership Inference

    • Shokri et al. [5] formalize Membership Inference Attack as determining whether a given record was in the training set of a trained model; in the black-box setting, shadow models are trained to distinguish in from out posteriors.
    • Nasr et al.'s [6] white-box variant uses internal signals such as gradients and model updates, and extends to federated learning. The paper only uses this as background and does not compare against this method.

    LLM Memory Quantification

    • Carlini et al. [7] report that GPT-J-6B memorized at least 1% of the Pile.
    • Al-Kaswan et al. [9] extracted 56% of code samples used to train GPT-Neo. The paper uses both to illustrate that generative models memorize training samples, without criticizing these two works.

    Memory in Recommendation Data

    • Di Palma et al. [10] report that MovieLens-1M is memorized by the LLaMA and OpenAI families; examples include GPT-4o extracting 80.76% of item samples and LLaMA-3.3 70B extracting 7.65%, with recommendation performance correlated with the degree of memorization. The authors state that this work only uses manual prompt engineering, and this paper directly extends it.
    • The authors also note that this dataset is often evaluated under classic RecSys protocols [11–14], and the test set may already be memorized by the models.

    Techniques Borrowed in This Paper

    • Jailbreak-related work includes prompt injection [18], prompt leakage [19], and role-playing, obfuscating restricted words, and multi-turn reasoning traps [20, 21]. This paper uses the template from Russinovich and Salem [22]. These citations are method sources; the paper does not criticize each one.
    • Burns et al.'s [15] Contrast–Consistent Search (CCS) uses hidden activations and optimizes consistency on negation pairs to discover knowledge in models in an unsupervised way. Laurito et al.'s [16] Cluster-Norm normalizes within clusters to reduce irrelevant but salient features. Language-nature, fact, and belief probing [23–26] is only used as interpretability background.
    • Zhou et al.'s [17] APE treats prompt design as optimization: an LLM generates candidates, evaluates them on downstream tasks, and iteratively improves; the original work achieves human-level instruction synthesis on sentiment analysis and summarization. This paper adapts it to field extraction from MovieLens-1M.

    Baselines and Data

    • The extraction comparison is against Di Palma et al.'s [10] manual prompts. Table 4 lists their exact-match as Item 1.93%, User 10.98%, Rating 6.49% for LLaMA-1B, and 2.68%, 13.26%, 6.22% for LLaMA-3B. The unsupervised comparison is Table 3's Random 0.50. The data is MovieLens-1M.

    The authors position this paper after recommendation data memorization research that only uses manual prompts, probing item, user, and rating simultaneously with jailbreaks, unsupervised probes, and automatic prompts.

  3. How does the paper address this problem?

    Jailbreak queries the output, CCS and Cluster-Norm read activations, and APE uses exact-match to iteratively filter prompts.

    The authors evaluate three types of probing in parallel on MovieLens-1M and examine whether item, user, and rating can be extracted or classified on public LLaMA-1B and LLaMA-3B.

    Data and Access Labels

    • Three files: users.dat, movies.dat, ratings.dat. Table 1 records users as 6.040 entries with 5 features, movies as 3.952 entries with 3 features, and ratings as 1.000.209 entries with 4 features; the dots are thousands separators in the table. The field formats are userID::gender::age::occupation::zip, movieID::title::genres, and userID::movieID::rating::timestamp.
    • Why these: The authors state this allows fair comparison with prior work and uses methods requiring internal access.
    • Table 2 labels: Manual prompts are Black-box, high manual cost, flexible but unreliable for structured data and prone to prompt leakage; unsupervised is Activation access, low manual cost, can discover latent structure, limited for numeric data; APE is Black-box, medium manual cost, automatically searches, may fail on non-text fields. The introduction's white-box/black-box labeling differs; Table 2 is authoritative here.

    Jailbreak Prompt Engineering

    • Process: Figure 1 shows selecting item, user, or rating samples, embedding the original sample in few-shot, adding chain-of-thought and jailbreak-style instructions, querying Llama-1B, then manually checking validity, repetition, hallucination, and whether numbers are reasonable, then revising exemplars and instructions.
    • Template: Follows Russinovich and Salem's approach, fabricating a dialogue history to encourage compliance. Input is a dataset key, expected output is the corresponding field. Appendix A (Figure 2) gives the full prompt; not reproduced here.
    • Stopping: The authors state they iterate until recall and accuracy are balanced. The paper does not state the number of iterations or numeric thresholds.

    Unsupervised Latent Knowledge Discovery

    • CCS: Frames knowledge discovery as question answering, using probabilities related to yes and no in activations to find directions corresponding to true statements, and optimizes consistency on negated statement pairs, giving true statements high scores and false statements low scores.
    • Cluster-Norm: First clusters activations, then normalizes within clusters to reduce irrelevant salient features that could mislead unsupervised probes.
    • Positive and negative examples: True statements assert that a movie belongs to MovieLens-1M; text fields are split into bi-grams and randomly sampled to create fake names, and alphanumeric fields are randomly generated. Appendix Figure 3 illustrates statements, hidden activation extraction, linear probe optimization, and scoring; the statement text is not reproduced.
    • Training: 80% training and 20% evaluation on constructed positive and negative examples, with representations from LLaMA-1B. The main text reports classification accuracy; Table 3 reports balanced accuracy; the table is authoritative below. The paper does not state the activation layer, total number of positive and negative examples, or probe dimension. This is classification of true and false statements, not reproduction of original records.

    Automatic Prompt Engineering

    1. Generation: An LLM generates 100 candidate prompts based on 5 input–output demonstrations. The paper does not state whether the generator is the same LLaMA being tested.
    2. Evaluation: On a validation subset, Di Palma et al.'s exact-match is used to evaluate memory coverage. The paper does not state the validation subset size.
    3. Improvement: Top-k prompts are sent back to the generation stage. The paper writes top-𝑘, without giving k or the number of outer rounds.
    • Temperature: Additionally, temperature is varied from 0.1 to 2.0 to see whether diversity yields prompts that better extract memorized samples. Table 4 lists 0.1, 0.5, 0.7, 0.9, 1.2, 2.0.
  4. What experiments did the paper conduct?

    Cluster-Norm on movie titles is 0.94; APE on LLaMA-3B at temperature 0.7 achieves 26% exact-match on movies.

    Experimental Setup

    • Models: Jailbreak queries Llama-1B; CCS and Cluster-Norm use LLaMA-1B representations; the APE results table is for LLaMA-1B and LLaMA-3B. The GPT-4o and LLaMA-3.3 70B mentioned in the introduction are not experiments in this paper.
    • Data: Only the three files of MovieLens-1M; sizes are in Table 1.
    • Baselines: Random 0.50 in Table 3; the last row of Table 4 is the exact-match from Di Palma et al. [10].
    • Metrics: Unsupervised is balanced accuracy. APE is exact-match accuracy; below 0.1% is recorded as (–) and the specific value is not reported. The text also refers to Di Palma et al.'s item numbers as Item Coverage.
    • Judgment: Jailbreaks are judged by humans for validity, repetition, hallucination, and numerical plausibility; there is no LLM judge. The paper does not report the number of repetitions or human agreement.
    • Splits and Unreported Parameters: CCS/Cluster-Norm use an 80/20 split. APE uses 100 candidate prompts and 5 demonstrations. The paper does not report the activation layer, total number of positive and negative examples, validation subset size, top-k value, or number of queries.

    Main Results

    The two APE rows in the table above are the temperature settings with the highest Item for each model in Table 4, not a separate row summarized by the paper; other temperatures are below.

    Swipe horizontally to read the table

    MethodModelmovies/Itemusers/Userratings/RatingSource
    RandomLLaMA-1B0.500.500.50Table 3
    CCSLLaMA-1B0.920.510.53Table 3
    Cluster-NormLLaMA-1B0.940.520.51Table 3
    APE, temperature 0.9LLaMA-1B18.1%– (below 0.1%)– (below 0.1%)Table 4
    APE, temperature 0.7LLaMA-3B26%– (below 0.1%)– (below 0.1%)Table 4
    Di Palma et al. manual promptsLLaMA-1B1.93%10.98%6.49%Table 4
    Di Palma et al. manual promptsLLaMA-3B2.68%13.26%6.22%Table 4
    • The authors state that CCS can distinguish real movie titles from fictional ones, and Cluster-Norm provides only a small improvement; for users and ratings, the authors state that they are indistinguishable from random guessing.
    • The authors state that APE's Item exceeds the Item Coverage reported by Di Palma et al. for the same models, and that the larger LLaMA-3B is consistently stronger at item extraction. Table 4 has counterexamples at low and high temperatures; the numbers are in the ablations below, not in the table above.
    • The authors state that APE extraction of users and ratings is near zero at all temperatures. In the table above, the User and Rating values for the Di Palma rows are above APE's reporting threshold. The authors hypothesize that the main obstacle is the tokenizer splitting alphanumeric sequences into fragments that lose semantics.

    Jailbreak Manual Analysis

    • What was tested: Following Figure 1, iterating few-shot, chain-of-thought, and jailbreak templates on Llama-1B, manually checking three types of fields.
    • Results: The authors state that target records are recalled only in a few cases; most are hallucinated titles, or random numbers for users and ratings. The text of Figure 1 states that jailbreaks increase recall and also increase hallucination, and lists hallucinated titles, copied examples, and random numbers, without giving values.
    • Authors' interpretation: The qualitative results are insufficient for quantitative evaluation; the tested Jailbreak Template plus manual prompts is not a practical way to extract structured MovieLens-1M. The paper does not report success rates or the number of successful cases.

    Representation Visualization

    • What was tested: PCA on LLaMA-1B representations; Appendix Figure 4 has (a) Item embeddings and (b) User embeddings.
    • Authors' interpretation: The authors state that movies are separable, while users and ratings clusters overlap; and that the yes/no representations capture some pattern of truthfulness, so the model can recognize that certain movies belong to this dataset. High scores could also just be distinguishing real from synthetic titles; the authors state that this cannot be confirmed as memory.
    • Figure-text correspondence: The caption of Figure 4 only names the two projections; there is no ratings figure and no annotation of the degree of separation; the converted text cannot show point positions, so separability is only recorded as the authors' claim.

    Cross-Method and Prompt Qualitative Analysis

    • Three methods: In Section 3.4, the authors state that manual prompts only succeed occasionally and are labor-intensive; unsupervised accuracy is high, but the discovered patterns cannot be confirmed as memory; APE is the only method that gives moderate exact-match, with moderate labor cost, and can be applied to other datasets to study memory.
    • Fields: The authors state that items are the easiest to extract, while users and ratings are difficult to extract with all methods. The authors believe this may come from the textual semantics of movie titles, relative to the numeric and anonymous nature of user IDs and ratings.
    • Prompts: The authors state that high-scoring prompts on LLaMA-3B frame the task as explicit instructions with examples; low-scoring prompts ask for similar movies instead of exact matches. For users and ratings, even well-written prompts rarely produce correct results; the model usually repeats the input or fabricates numbers.

    Other Ablations and Analyses

    The following Item values are all from Table 4; User and Rating at each setting are (–) below 0.1%.

    • Temperature 0.1: LLaMA-1B Item 8%, LLaMA-3B Item 7%.
    • Temperature 0.5: 12.1% and 16%.
    • Temperature 0.7: 14.2% and 26%.
    • Temperature 0.9: 18.1% and 25%.
    • Temperature 1.2: 5.2% and 1%.
    • Temperature 2.0: 1.1% and 0.2%.
  5. What are some points that can be further explored?

    The authors state that high unsupervised scores cannot be confirmed as memory, and believe APE should be continued on larger models and numeric fields.

    Limitations and Future Directions Noted by the Authors

    The paper does not have a separate Limitations section. Only the shortcomings and future directions explicitly stated in Results and Conclusion and Future Work are included below.

    • Meaning of high scores (Sections 3.2 and 4): The authors state that high scores can have multiple interpretations, such as the model being able to distinguish real from synthetic movie titles; the learned features cannot be confirmed as memory, and these signals cannot be definitively interpreted as memory.
    • How to confirm (Section 3.2): The authors state that to confirm memory, one can only verify whether the model can correctly predict the original data in next-token prediction; the real challenge is automatically optimizing prompts and testing memory.
    • Numeric records (Section 3.3): The authors state that tokenizer effects need further study, and automatic prompt optimization needs to be developed for records that have no semantics outside the dataset context.
    • Larger models and more data (Section 4): The authors believe future work should test APE on larger open-source models (e.g., LLaMA-70B) and more diverse datasets.
    • Prompt optimization for numeric data (Section 4): The authors believe automatic prompt engineering should be developed for memory tasks, focusing on numeric data.

    Experimental Coverage

    • The models with reported results are LLaMA-1B and LLaMA-3B; jailbreak and CCS/Cluster-Norm numbers come only from LLaMA-1B (Sections 2.2–2.3, Table 3, Table 4).
    • The data are movies.dat, users.dat, and ratings.dat from MovieLens-1M (Table 1).
    • The unsupervised metric is balanced accuracy, compared against Random 0.50, with an 80% and 20% split for constructing positive and negative examples (Section 2.3, Table 3).
    • APE generates 100 candidate prompts, uses 5 demonstrations, with temperatures 0.1, 0.5, 0.7, 0.9, 1.2, 2.0, and the metric is exact-match (Section 2.4, Table 4).
    • The paper does not report the activation layer, total number of positive and negative examples, validation subset size, top-k value, number of queries, number of repetitions, or agreement in the manual analysis.
  6. Summarize the main content of the paper

    The authors state that automatically optimized prompts are the most promising for extracting movies, but neither numeric fields nor high scores can confirm leakage.

    The authors compare jailbreaks, activation probing, and automatic prompts to see whether public LLaMA can extract or detect memorized content from MovieLens-1M.

    • Question: The authors state that this dataset is a common recommendation benchmark, and if the test set is already memorized, evaluation would be affected. Previous extraction relied only on manual prompts; this paper asks whether prompts can be strengthened, whether internal states can detect it, and whether the process can be automated.
    • Approach: Jailbreaks iterate few-shot, chain-of-thought, and fabricated dialogue history on Llama-1B. CCS and Cluster-Norm score true and false statements on LLaMA-1B activations, with 80% training and 20% evaluation. APE generates 100 candidates, uses 5 demonstrations, filters by exact-match, and scans temperature.
    • Jailbreaks: Only occasionally recall target records, mostly hallucinations or random numbers; the paper gives no success rate, and the authors state that this template plus manual prompts is impractical.
    • Unsupervised: In Table 3, Cluster-Norm for movie titles is 0.94 and CCS is 0.92; for users and ratings the authors write approximately 0.51–0.53, with Random at 0.50. The authors state this cannot be confirmed as memorization.
    • APE: In Table 4, movie exact-match is 26% on LLaMA-3B at temperature 0.7 and 18.1% on LLaMA-1B at temperature 0.9; users and ratings are below 0.1%. In the same table, Di Palma et al.'s movies are 1.93% and 2.68%, and users are 10.98% and 13.26%. At temperatures 0.1, 1.2, and 2.0, the larger 3B is not higher.
    • Authors' conclusion: The authors consider automatically optimized prompts the most promising strategy for extracting memorized samples, but numeric interactions remain below reported thresholds; unsupervised high scores cannot be definitively treated as memorization. The authors consider movie titles easier than anonymized numeric values and hypothesize that tokenizer segmentation is an obstacle for numeric fields.

Related papers

Read originalarxiv.org