Prior art and how Traceweave relates

How Traceweave's token-fingerprint baseline and evidence records relate to MOSS, JPlag, Dolos, SCANOSS, Software Heritage, C2PA, and in-toto.

Grounded in research/lanes/11-report-audit.md

Traceweave's core matching algorithm for source code is established prior art (winnowing over token k-grams, plus explicit boilerplate suppression and region merging). What Traceweave adds is an open, offline specification with one shared evidence format across profiles and deterministic, byte-identical reports — verified by two independent implementations as evidence that the specification can be implemented independently — separating extraction, private catalogues, comparison reports, and cryptographic attestations.

Every comparison below is restricted to what primary sources audited in research/lanes/11-report-audit.md (and spec/attestations.md / research/drafts/c2pa-mapping.md) directly verify.

Summary comparison#

System / standardWhat it does (audited primary sources)How Traceweave relates
MOSS / WinnowingSchleimer, Wilkerson, Aiken (Winnowing, SIGMOD 2003): local minimum selection over sliding windows (w = t − k + 1, density 2/(w+1)), robust winnowing for low-entropy runs, rolling hash, inverted index, boilerplate suppression via a special document ID, consecutive fingerprint merging. MOSS code is not public.Traceweave directly adopts winnowing (spec/extraction.md §8) and explicit boilerplate-catalogue suppression (spec/catalogue-report.md §5.2), using the plain local rightmost-minimum rule (handling low-entropy runs downstream via distinct-hash evidence and maxSeedsPerMode) and unkeyed SHA-256 first-8 bytes instead of a rolling hash.
JPlagOpen-source (GPL-3.0) token comparison using Wise's Greedy String Tiling (GreedyStringTiling.java). Default minimumTokenMatch is 8 for Go and Rust and 9 for Java (3ee7de91).Both work on lexer/token streams, but JPlag runs Greedy String Tiling over token sequences directly rather than comparing pre-extracted, source-free catalogues of winnowed hashes.
DolosOpen-source (MIT) code similarity tool using Tree-sitter (codeTokenizer.ts emits (, node type, ) per Tree-sitter node), rightmost-minimum winnowing (<=), defaultKgramLength = 23, defaultKgramsInWindow = 17, and a rolling hash modulo 33,554,393 (a 25-bit modulus; e236c446).Both use rightmost-minimum winnowing, but Dolos's k-gram units are Tree-sitter node parentheses and types (23 Dolos tokens cover only a handful of syntax nodes, not 23 lexer tokens), whereas Traceweave uses hand-written profile lexers pinned to language specs and Unicode 17.0.0 with no Tree-sitter dependency.
SCANOSSOpen-source snippet scanner (MIT client scanoss.py at 37f3508e; GPL-2.0 scanoss/wfp and scanoss/engine). .wfp files record file=<md5>,<size>,<path> and per-line CRC32C hashes of 30-byte normalized grams (GRAM = 30, WINDOW = 64).Closest prior art for source-free fingerprint exchange. However, lossless mapping between Traceweave catalogues and .wfp is impossible in either direction: .wfp requires file MD5, line numbers, and 30-byte CRC32C grams not derivable from 64-bit SHA-256 token-k-gram hashes and byte spans, while .wfp has no tokens, spans, or channels. Querying SCANOSS's hosted knowledge base would also upload fingerprints to an external service; a local MIT client comparison arm is deferred to gate STRUCT.1.
Software Heritage (SWHID)Intrinsic content identifiers officially adopted as ISO/IEC 18670:2025 on 2025-04-23 (swhid.org). A content SWHID (swh:1:cnt: + git blob SHA-1) identifies an exact whole file.Orthogonal and potentially additive: emitting content SWHIDs is feasible as an optional catalogue field (deferred to an owner decision / M5.5), discloses no more than the existing whole-file sha256, and identifies whole files only — never partial fragments.
C2PASigned content-provenance manifests (2.1 / 2.4 / 2.5) requiring a mandatory hard binding and allowing zero or more soft bindings (c2pa.soft-binding, typed watermark or fingerprint) for manifest recovery.Complementary, not redundant: C2PA carries signed assertions and soft bindings to locate an asset's manifest; it does not run pairwise multi-file similarity comparison. Traceweave does not claim C2PA compatibility (C2PA.1–C2PA.3 open); its draft mapping recommends keeping comparison reports in separate in-toto/DSSE statements rather than public C2PA manifests (Evidence & provenance).
in-toto & SLSAin-toto Statement v1 and DSSE define signed attestation envelopes matching subjects by digest; SLSA provenance is an in-toto predicate attesting how a build platform produced software artifacts.Complementary, not redundant: neither performs similarity matching. Traceweave reuses a restricted in-toto Statement v1 / DSSE envelope adapter (spec/attestations.md, gates M4.1–M4.5) to carry signed records separately from comparison logic.

Other tools and benchmarks audited in Lane 11#

  • SourcererCC (Sajnani et al., arXiv:1512.06448v1): bag-of-tokens function-level clone detector (≥ 6 lines, 70% token overlap; 91% precision on 355/390 sampled pairs; BigCloneBench recall T1 100%, T2 98%, VST3 93%, ST3 61%, MT3 5%, WT3/T4 0%). Rejected as a replacement for winnowing because bag-of-tokens loses byte-span localization below a block and still misses heavily rewritten clones (MT3/WT3/T4), though it may be evaluated as a later comparison arm under STRUCT.1.
  • BigCloneBench / BigCloneEval (Svajlenko & Roy, ICSME 2016; Krinke & Ragkhitwetsagul, arXiv:2505.04311v2): 25,000 Java systems and >8M clone pairs, but BigCloneEval measures recall only (no precision), covers Java only, and Krinke & Ragkhitwetsagul found 93.3% unweighted (379/406) / 93.9% population-weighted of sampled WT3/T4 labels false. Rejected as Traceweave's M3 evaluation corpus.
  • Mossad (Devore-McDonald & Berger, arXiv:2010.01700v1): demonstrates automatic statement insertion lowering similarity scores on MOSS, JPlag, Sherlock, and Fett — consistent with Traceweave's documented limit that inserting one token every k − 1 tokens breaks every k-gram.