Lunar Boom Learning

5.4 · Similarity, Memorisation, and Attribution

Section 5.4 of 5.6

Similarity, Memorisation, and Attribution

Testing outputs against source material and preserving their history

Learn how to distinguish broad stylistic resemblance from recording, melodic, lyrical, and vocal similarity, test generated outputs against training or reference collections, investigate possible memorisation, attach provenance records and watermarks, and document models and datasets transparently.

About 18 minutes

Guiding question

When is two pieces of music being similar expected rather than suspicious?

By the end, you’ll be able to
  • Distinguish stylistic resemblance, influence, near-duplication, exact reproduction, memorisation, and training-set membership.
  • Explain why similarity depends on the representation, reference collection, comparison window, and threshold.
  • Build a layered screening system using hashes, audio fingerprints, embeddings, melodic features, symbolic comparisons, and human review.
  • Compare generated outputs with training data while controlling for common musical patterns and unrelated reference material.
  • Design memorisation tests using train-versus-held-out comparisons, prompted continuations, exposure analysis, and nearest-neighbour retrieval.
  • Evaluate possible voice or singer imitation using speaker embeddings, perceptual listening, and consent-aware reference handling.
  • Distinguish watermark detection from content provenance and from legal or creative attribution.
  • Explain how C2PA Content Credentials can record an audio asset's origin, transformations, ingredients, and AI involvement.
  • Describe the purposes and limitations of model cards and dataset datasheets.
  • Create an evidence package for reviewing and documenting a flagged generated asset.

A generated track can resemble existing music for many reasons.

It may use a familiar chord progression, genre rhythm, production convention, instrument combination, melodic fragment, vocal timbre, or complete section of a source recording. These relationships differ technically and should not be collapsed into one similarity score.

Evaluation therefore begins by asking:

  1. What kind of relationship is being investigated?
  2. Which reference collection is relevant?
  3. Which representation can detect that relationship?
  4. How strong is the evidence?
  5. What further review is required?
Related concepts that should remain separate

Swipe sideways to view the full comparison

ConceptQuestionWhat it does not establish alone
SimilarityHow close are two items under this comparison?Why they are similar
MemorisationDid the model retain example-specific training information?Whether a particular output violates a right
Training-set membershipWas this item likely present in the training set?Whether the model reproduced it
ReplicationDoes the output reproduce source material?Whether the model memorised rather than received it as an input
ProvenanceWhat recorded process produced this asset?Whether every recorded assertion is substantively true
AttributionWhich contributors and sources are credited?A definitive legal determination of authorship or ownership
Watermark detectionIs a detectable signal associated with a watermarking system present?Complete asset history or legal status

Style similarity and source reproduction

Style is distributed across recurring conventions such as rhythm, instrumentation, harmony, texture, performance, production, and form. Source reproduction concerns a more specific relationship with identifiable material.

A style-screening system should therefore avoid treating every common genre feature as evidence of copying. A four-on-the-floor kick, minor pentatonic melody, jazz turnaround, or distorted guitar tone may appear across many unrelated works.

The review becomes stronger when several source-specific features align over a meaningful duration.

A layered music-similarity stack

Swipe sideways to view the full comparison

LayerDetects wellOften misses
Cryptographic hashThe same digital fileAny edited, re-encoded, or re-rendered version
Audio fingerprintThe same recording under noise, compression, or short excerptsA reperformed melody or substantially transformed recording
Waveform or spectrogram alignmentClosely aligned acoustic materialTransposition, tempo change, or new instrumentation
Audio embedding retrievalBroad acoustic, semantic, or musical resemblanceExact explanation of which feature caused the match
Chroma and harmonic comparisonPitch-class and harmonic relationshipsTimbre, lyrics, and percussion
Melody or symbolic comparisonPitch, interval, onset, and contour relationshipsProduction and recording identity
Speaker or singer embeddingsVocal-identity cues represented by the encoderComplete expressive identity or proof of impersonation
Human aligned reviewContextual, perceptual, and multi-feature resemblanceScalable exhaustive search

Search within tracks, not only between complete tracks

A generated work may reproduce only one phrase, loop, vocal line, or transition. Comparing one embedding for each complete song can hide a short match.

Windowed screening divides generated and reference music into overlapping segments. Each generated window retrieves nearby reference windows. Candidate pairs can then be aligned over time and inspected using more specific measures.

Window duration and overlap determine which relationships are visible and how many false candidates are produced.

Melodic similarity

Melodies can remain recognisable after transposition, tempo change, ornamentation, note splitting, re-instrumentation, or reharmonisation.

Possible representations include:

    1. Absolute pitch sequence
    2. Pitch intervals
    3. Rhythmic onset sequence
    4. Pitch contour
    5. Note-duration pattern
    6. Chroma sequence
    7. Symbolic n-grams
    8. Transposition-normalised melody

A melodic comparison should state which transformations it treats as equivalent.

Interpreting combinations of similarity evidence

Swipe sideways to view the full comparison

EvidencePossible interpretationNext step
Exact file hashIdentical digital assetVerify asset lineage and file handling
Strong fingerprint match onlySame or closely transformed recording excerptAlign the waveform and identify the matched duration
Strong melody match but weak fingerprintReperformance, transformation, shared melody, or extraction errorReview melody, rhythm, harmony, and reference history
Strong broad embedding match onlyGenre, mood, instrumentation, or production resemblanceApply source-specific comparisons before escalation
Several metrics align over one long regionStronger evidence of source-specific reproductionConduct human and provenance review
One short common pattern matchesMusical convention or coincidental fragmentCompare prevalence across a broader catalogue

A screening system can only find indexed references

Comparing outputs with the training set requires a traceable training manifest and a searchable representation of the relevant source material.

The index should preserve:

    1. Stable asset and version identifiers
    2. Source and rights metadata
    3. Train, validation, and test membership
    4. Duplicate-cluster identifiers
    5. Audio hashes and fingerprints
    6. Window-level embeddings
    7. Optional melody, chroma, lyric, and vocal representations
    8. Preprocessing and encoder versions
    9. Removal or restriction status

A missing match does not show that no similar work exists outside the indexed collection.

Testing for memorisation

A generated output being close to a training item does not by itself reveal the mechanism. The source may have been provided as a prompt, prefix, melody condition, retrieval result, or production ingredient.

Memorisation tests should compare behaviour on training and non-training controls under matched conditions.

Useful tests include:

    1. Prompted continuation from known prefixes
    2. Generation from training captions and matched held-out captions
    3. Nearest-neighbour distance distributions
    4. Train-versus-held-out likelihood or reconstruction differences
    5. Output similarity as training duplication increases
    6. Repeated generation across seeds
    7. Extraction-oriented prompts using known context
    8. Canaries or synthetic markers inserted under controlled conditions

Real-world example: MusicLM memorisation analysis

MusicLM adapted earlier training-data memorisation methods to its music-generation pipeline. The study sampled training examples, supplied token prefixes, and compared model continuations with the true training continuations.

This tests whether known context can trigger unusually close continuation of material associated with the training example. It is more informative than comparing arbitrary outputs with arbitrary songs because the training membership and target continuation are known.

Real-world example: MusicGen memorisation analysis

MusicGen also examined memorisation using known training examples and continuations. Its analysis compared generated token sequences with ground-truth continuation tokens under different prompt lengths and model settings.

The study illustrates three important principles:

    1. Use known training examples rather than an unknown public catalogue alone
    2. Compare against held-out or unrelated baselines
    3. Define memorisation using an explicit representation and similarity threshold

Run a controlled memorisation audit

  1. Freeze the model and dataset version

    Identify the exact checkpoint, tokenizer or codec, training manifest, and duplicate map.

  2. Select training and held-out controls

    Match examples by genre, duration, quality, and other relevant properties.

  3. Define elicitation conditions

    Specify caption, prefix, melody, continuation length, seeds, and decoding settings.

  4. Generate repeated outputs

    Use several seeds and preserve all candidates rather than only the closest one.

  5. Apply complementary similarities

    Compare tokens, fingerprints, embeddings, melodies, and aligned audio where appropriate.

  6. Compare distributions

    Measure how training examples differ from matched held-out examples.

  7. Stratify by exposure

    Analyse duplicate count, duration, source type, and training frequency.

  8. Review flagged pairs

    Listen to aligned regions and inspect the provenance of both items.

  9. Report false positives and negatives

    Validate thresholds using known replicated and non-replicated controls.

  10. Define mitigation and retesting

    Remove duplicates, filter outputs, retrain, or restrict use, then rerun the same audit.

Vocal and singer-identity similarity

A generated vocal can resemble a person through timbre, pitch range, accent, articulation, vibrato, phrasing, breathiness, recording treatment, or performance style.

Automatic speaker-verification systems convert voice recordings into embeddings designed to distinguish speakers. Similarity between a generated vocal and reference recordings can support screening.

A speech-trained speaker encoder may not represent singing identity, expressive phrasing, or production effects reliably. Automatic screening should therefore be paired with singer-aware evaluation and blinded human listening.

Evidence in a vocal-identity review

Swipe sideways to view the full comparison

EvidenceContributionLimitation
Speaker-embedding similarityScalable identity-oriented screeningDepends on encoder and recording domain
Singer-identity embeddingBetter alignment with singing materialRequires representative singer data and validation
Pitch and formant statisticsTransparent acoustic comparisonCan overlap across unrelated singers
Phrasing and vibrato analysisCaptures performance characteristicsCan be affected by melody and production
Blind listener comparisonMeasures perceived identity resemblanceInfluenced by familiarity and listener population
Consent and provenance recordsShows authorised reference sources and intended useDoes not measure perceptual similarity

Audio watermarking

AudioSeal introduced a neural watermarking system designed for localised detection of AI-generated speech. Its detector can identify watermarked regions rather than only classify an entire file.

Watermark systems are evaluated on several competing properties:

    1. Detectability
    2. False-positive rate
    3. Perceptual imperceptibility
    4. Robustness to compression, resampling, filtering, noise, cropping, and editing
    5. Payload capacity
    6. Localisation
    7. Computational cost

Performance is specific to the watermarking method and tested transformations.

C2PA provenance for audio

The C2PA specification supports provenance assertions for digital media including audio. It defines actions relevant to audio workflows, including editing, mastering, mixing, remixing, speed changes, and the placement of source ingredients.

Ingredients can describe assets used as components or inputs. The specification also provides asset types for models, datasets, prompts, seeds, and AI generators.

This allows a system to record a chain such as:

licensed melody input -> model and prompt -> generated audio -> human edit -> mix -> master -> published asset

Durable provenance

Embedded metadata can be removed during transcoding, export, or platform processing. C2PA describes durable Content Credentials as a combination of hard bindings, such as cryptographic hashes, and soft bindings, such as fingerprints or watermarks that can help rediscover externally stored credentials.

A practical design should test what survives the actual distribution chain rather than assuming that embedded metadata remains intact.

Minimum generation and attribution record

Swipe sideways to view the full comparison

CategoryExample fields
OutputAsset ID, version, hash, duration, format, creation date
ModelModel name, checkpoint, architecture family, licence, model-card version
GenerationPrompt, negative prompt, seed, sampling settings, conditions, number of candidates
InputsReference audio, melody, stems, lyrics, captions, and permitted uses
Human contributionSelection, arrangement, editing, performance, mixing, mastering, and approval
Dataset contextTraining-dataset version, dataset documentation, removal requests, restrictions
EvaluationQuality scores, similarity results, human review, exceptions, and release gates
DistributionWatermark, Content Credential, distributor, release identifier, and publication date

What an AI music model card should disclose

  1. Model identity

    Name, version, developers, release date, architecture family, and licence.

  2. Intended uses

    Supported users, tasks, controls, languages, genres, and deployment contexts.

  3. Out-of-scope uses

    Unsupported, prohibited, or high-risk applications such as unauthorised voice imitation.

  4. Training context

    Dataset categories, scale, preprocessing, consent or rights framework, and documentation links.

  5. Evaluation

    Automated metrics, listening tests, prompt sets, subgroup results, and uncertainty.

  6. Similarity and memorisation

    Audit methods, reference coverage, thresholds, flagged rates, and known blind spots.

  7. Limitations

    Weak genres, languages, durations, controls, representations, and failure modes.

  8. Operational safeguards

    Output filtering, watermarking, provenance, access controls, monitoring, and incident response.

  9. Environmental and infrastructure context

    Training compute, hardware, energy reporting approach, and deployment requirements where relevant.

  10. Change history

    Checkpoint lineage, dataset updates, withdrawn versions, and known regressions.

What a music dataset datasheet should disclose

  1. Motivation

    Why the collection was created and which model tasks it supports.

  2. Composition

    Recordings, compositions, stems, MIDI, lyrics, captions, metadata, and demographic or geographic coverage.

  3. Collection process

    Sources, acquisition dates, permissions, consent, licences, and exclusions.

  4. Preprocessing

    Resampling, segmentation, loudness handling, captioning, tokenisation, and filtering.

  5. Duplicate handling

    Exact, near-duplicate, alternate-version, cover, and overlapping-segment policies.

  6. Split construction

    Training, validation, test, artist, composition, recording, and family-level separation.

  7. Known limitations

    Coverage gaps, metadata errors, cultural imbalance, uncertain rights, and detection blind spots.

  8. Maintenance

    Versioning, removal requests, correction process, access controls, and deprecation.

  9. Permitted and discouraged uses

    Restrictions inherited from sources and risks associated with reuse.

  10. Provenance

    Stable source IDs, manifests, checksums, transformations, and documentation lineage.

Review a flagged generated asset

  1. Preserve the evidence

    Freeze the generated file, model version, inputs, settings, candidate set, and screening output.

  2. Identify the claimed relationship

    Specify recording, melody, harmony, lyrics, voice, style, or another feature.

  3. Validate the reference

    Confirm the reference asset, source, version, and catalogue metadata.

  4. Localise the match

    Identify aligned timestamps or symbolic positions rather than relying on one global score.

  5. Apply complementary methods

    Use fingerprint, embedding, melody, voice, and human comparison as appropriate.

  6. Check provenance

    Determine whether the reference was a training item, generation input, retrieval result, or production ingredient.

  7. Compare controls

    Measure unrelated, same-genre, held-out, and known-match examples.

  8. Conduct blinded review

    Ask reviewers specific questions without revealing the preferred conclusion.

  9. Escalate where necessary

    Seek specialist musical, rights, voice, privacy, or legal review based on the risk.

  10. Record the decision

    Document evidence, uncertainty, action, reviewer, and any required model or data mitigation.

Possible screening outcomes

Swipe sideways to view the full comparison

OutcomeMeaningPossible action
No material match foundNo threshold was exceeded in the documented reference indexRelease subject to other gates and stated coverage limits
Broad style resemblanceSimilarity is distributed across common genre or production featuresRecord result and continue contextual review
Ambiguous source-specific matchSeveral features align but evidence remains uncertainEscalate to detailed musical and provenance review
Likely recording reuseFingerprint or aligned acoustic evidence indicates the same source recordingBlock release until source use and permission are resolved
Likely melodic or lyrical reproductionA substantial source-specific sequence aligns under relevant transformationsEscalate and consider regeneration or removal
High vocal-identity similarityAutomatic and perceptual evidence indicates resemblance to an identifiable performerReview consent, intended use, disclosure, and distribution restrictions
Provenance incompleteRequired generation or source records are missingHold the asset until the record is repaired or risk is accepted formally

Interactive lesson

Inspect Music Similarity, Memorisation, and Provenance

Try it: Begin with the exact-recording case and identify which metric should detect it. Then switch to a transposed melody, style-only resemblance, and singer-identity case. Calibrate each threshold using positive and negative controls before making a review decision. Complete the provenance and documentation panels before releasing the asset.

Similarity screening should begin with a precise claim and a documented reference collection. Exact hashes, fingerprints, embeddings, melody comparisons, vocal-identity models, and human review detect different relationships. Provenance, watermarks, model cards, and dataset datasheets document the process but do not replace contextual or legal review.

From a reviewed model to a usable service

A model may pass quality, similarity, and provenance review but still be difficult to operate as a product. Users need interfaces, latency targets, quotas, storage, moderation, rights controls, monitoring, and support.

The next section, Turning a Model Into a Product, explains how a trained model becomes a reliable generation service.

Check your understanding

Ready for a quick check?

Test whether you can distinguish similarity claims, design memorisation and voice audits, interpret watermark and provenance evidence, and document a music-generation system.

Ready to continue?

Save this section to your account and continue from any device.

Checking your account…
Sources for this lesson (19)
  1. MusicLM: Generating Music From Text — Andrea Agostinelli et al. (2023)
  2. Simple and Controllable Music Generation — Jade Copet et al. (2023)
  3. Towards Assessing Data Replication in Music Generation with Music Similarity Metrics on Raw Audio — Roser Batlle-Roca, Wei-Hsiang Liao, Xavier Serra, Yuki Mitsufuji, and Emilia Gómez (2024)
  4. MelodySim: Measuring Melody-Aware Music Similarity for Plagiarism Detection — Tianze Lu et al. (2025)
  5. An Industrial-Strength Audio Search Algorithm — Avery Li-Chun Wang (2003)
  6. mir_eval: A Transparent Implementation of Common MIR Metrics — Colin Raffel et al. (2014)
  7. mir_eval.melody Documentation — mir_eval contributors
  8. Quantifying Memorization Across Neural Language Models — Nicholas Carlini, Daphne Ippolito, Matthew Jagielski, Katherine Lee, Florian Tramèr, and Chiyuan Zhang (2023)
  9. Extracting Training Data from Large Language Models — Nicholas Carlini et al. (2021)
  10. ECAPA-TDNN: Emphasized Channel Attention, Propagation and Aggregation in TDNN Based Speaker Verification — Brecht Desplanques, Jenthe Thienpondt, and Kris Demuynck (2020)
  11. Two Decades of Speaker Recognition Evaluation at the National Institute of Standards and Technology — Craig Greenberg et al. (2020)
  12. Singer Identity Representation Learning using Self-Supervised Techniques — Research contributors (2024)
  13. Automatic Evaluation of Speaker Similarity — Deja Kamil, Sanchez Ariadna, Roth Julian, and Cotescu Marius (2022)
  14. Proactive Detection of Voice Cloning with Localized Watermarking — Robin San Roman et al. (2024)
  15. How Robust is Audio Watermarking in Generative AI Models? — Yuxin Wen et al. (2025)
  16. C2PA Technical Specification, Version 2.4 — C2PA (2026)
  17. C2PA and Content Credentials Explainer, Version 2.4 — C2PA (2026)
  18. Model Cards for Model Reporting — Margaret Mitchell et al. (2019)
  19. Datasheets for Datasets — Timnit Gebru et al. (2021)
Browse all contextual sources →