A code watermark that survives full identifier renaming kept 82 to 84 percent of its bits, and separately improved Pass@1 by up to 11 points
AspireAI community · arXiv (Xu, Liu & Yin)
Watermarking generated code has to survive the edits that happen downstream - identifier renaming, structural refactoring - because routing derived from surface-token prefixes desynchronizes the moment a name changes. SynMark replaces surface-dependent routing with learned semantic coordinates. Scope learns those coordinates from aligned prefixes of functionally equivalent variants and applies a syntax-aware adaptive bias during generation, while Traced recomputes semantic routes from transformed code and uses reliability-weighted aggregation to suppress unreliable token contributions.
Under 100% identifier renaming, SynMark retains 82.27% and 83.77% BitAcc on CodeLlama and DeepSeek-Coder respectively. Across three code LMs it also improves clean BitAcc and Pass@1 by up to 4.53 and 11.18 percentage points over the strongest watermarked baselines - so the routing change does not cost code quality.
The limitation is honest arithmetic: 82 to 84 percent BitAcc means a substantial share of embedded bits still fails to recover after renaming, so the guarantee is degraded rather than intact. The results also cover three code models and two watermark baselines, not a general survey of code-generation stacks.
https://arxiv.org/abs/2610.32017
Read the story and explore more from the AspireAI community.
Two sparse-autoencoder analyses have resisted scaling: matching semantically similar features across layers, and compressing large feature circuits into interpretable supernodes. This paper argues both are the same underlying problem, estimating semantic distances between SAE features that sit on different activation manifolds. Its representation treats each feature not as a single decoder vector but as an activation-weighted distribution over the hidden states expressing it, projects those distributions into a shared reference space, and compares them with Wasserstein distance. The representation is proved invariant to activation rescaling and stable under perturbation, and recovers true matches under finite-sample margin conditions. Empirically it outperformed decoder-vector and LLM-based baselines and captured subtle functional distinctions between related features, and it compressed large feature circuits into interpretable supernodes automatically. The limitation is that this is interpretability tooling: the paper demonstrates better feature matching and circuit compression, not that downstream interpretability claims become more accurate.