acceptodds
Under review as a conference paper at ICLR 2027

COSTA: Code Watermarking via Statement-Level ASTs for Large Language Models

Abstract

Large language models exhibit strong code generation capabilities, accelerating software development and widespread adoption of AI coding assistants. As generated code becomes harder to distinguish from human-written code, legal, ethical, and security concerns motivate watermarking for provenance tracing. However, existing generation-time code watermarking methods rely mainly on token-level biases that can compromise functional correctness, while sentence-level text watermarking remains difficult to transfer directly from natural language to constrained code space. In this paper, we introduce COSTA, the first generation-time, statement-level code watermarking framework that encodes provenance in the abstract syntax trees (ASTs) of complete statements. Specifically, a secret key and a locality-sensitive hash of the preceding statement jointly determine the target parity of a selected AST node count. The generator requires no model retraining and embeds watermark signal through three stages: sample, repair, and bridge. The detector tests whether keyed parity matches occur more often than chance, requiring neither the original prompt nor access to the generator. Extensive experiments across models, benchmarks, programming languages, and code transformations demonstrate that COSTA combines strong detectability and robust watermark retention while largely preserving the quality of generated code.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
LLM watermarking, code generation

Reviews

Among:
Shape:
1234this paper, Bottom 27%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.00 over 3 reviews, above 27% of the others.
Reviewer_SmaUOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper proposes COSTA, a training-free statement-level code watermarking framework that embeds watermark signals into the parity of AST node statistics rather than directly modifying token probabilities. The method consists of three stages—sampling, LLM-based repair, and bridge insertion—to make generated statements satisfy keyed structural constraints. The authors evaluate COSTA across multiple code-generation models, benchmarks, programming languages, and code transformations.

Critical strengths

The main idea is novel, and using complete code statements and their AST structures as watermark carriers is an interesting departure from existing token-level code watermarking methods. In particular, the choice of watermark embedding position is innovative, and the paper provides extensive experiments showing that such structural signals can achieve strong detectability while largely preserving functional correctness.

Critical weaknesses

My main concern is the practical cost of the proposed framework. COSTA requires repeated statement-level resampling and, when sampling fails, additional LLM calls for Direct/Split/Merge repair, which introduces substantial inference overhead. Such a cost may be difficult to justify in realistic large-scale deployment, where watermarking is expected to introduce only limited additional latency and computation. Meanwhile, lightweight token-level watermarking methods such as SynthID are designed to introduce watermark signals with little or no degradation in generation quality and can also be applied to code generation. Therefore, the paper needs to more clearly justify why a substantially more expensive statement-level design is necessary. A second concern is that the robustness evaluation is not sufficiently adaptive to COSTA’s watermark structure. Several evaluated transformations, such as comment deletion and variable renaming, are inherently unlikely to affect AST-parity signals, while the detector explicitly filters some inserted dead-code patterns. Stronger structure-aware attacks that preserve functionality but directly perturb statement boundaries or AST parity would provide a more convincing robustness evaluation.

Questions for authors

Can COSTA work without LLM-based Repair and even without repeated resampling? In particular, how would a much cheaper single-sample + Bridge variant perform? Since Bridge can connect an unmatched statement without rewriting it, this seems to be an important efficiency baseline that is currently missing. How robust is COSTA against a structure-aware attacker who knows that the watermark is encoded in AST parity but does not know the secret key? For example, can semantics-preserving statement splitting, merging, temporary-variable insertion, or systematic AST rewriting substantially reduce detection performance?

5 comments
AuthorsOpenReview ↗

Response to Reviewer SmaUv (1/2)

We thank the reviewer for the thoughtful questions about generation cost and robustness. We address each concern below with additional analysis and experiments.

W1: COSTA motivation

  • Token-level limitations. Biasing individual token choices in code can easily compromise functional correctness, while routine edits such as variable renaming and comment removal can erase token-level watermark signals. SynthID can watermark code, but on HumanEval+, for example, it yields 0.470 AUROC and 70.4% pass@1 with Qwen2.5-Coder-14B, down from 89.6% pass@1 without watermarking (Table 12). [1] likewise report a trade-off between detectability and functional correctness when applying token-level watermarks during code rephrasing.
  • Statement-level advantages. Although COSTA incurs additional sampling cost, as do sentence-level text watermarks, choosing among functionally equivalent statements helps preserve code correctness and makes the watermark more robust to routine edits. This trade-off is worthwhile when code correctness and copyright protection are priorities.

[1] How Good is Post-Hoc Watermarking With Language Model Rephrasing?

W1 & Q1: Repair overhead

1. Offline Repair. COSTA can skip both resampling and Repair, but accepting the first statement leaves parity mismatches unresolved and yields weak detection. To accelerate generation, we used an LLM to prepare reusable rewrite templates offline, following the examples in Appendix G.3. COSTA applies the templates locally, and the library can be expanded as new patterns arise. One drawback is that a leaked library would expose the rewrite patterns to attackers. In our experiments, offline templates eliminated online Repair calls and substantially reduced generation time while matching or improving AUROC. The results are shown below, with each metric reported as Llama-3.1-8B / Qwen2.5-Coder-14B.

DatasetRepairTime (s)Pass@1AUROC
MBPP+Online5.00 / 8.660.66 / 0.700.8356 / 0.9068
MBPP+Offline2.27 / 5.090.62 / 0.740.8794 / 0.9120
HumanEval+Online10.29 / 14.470.48 / 0.820.9330 / 0.9414
HumanEval+Offline5.03 / 7.820.44 / 0.820.9532 / 0.9644
APPSOnline20.13 / 20.530.18 / 0.200.9140 / 0.9532
APPSOffline9.28 / 12.890.12 / 0.200.9496 / 0.9532

2. Single-sample + Bridge. We evaluated the suggested baseline by sampling each statement once and using Bridge to connect unmatched statements. It was faster than full COSTA, and a higher Bridge cap allowed it to surpass full COSTA’s clean AUROC in most settings. Because attackers can recognize and remove Bridge statements without changing program behavior, COSTA embeds most of its watermark in ordinary statements. Beyond improving detection at low generation cost, we use Bridge to verify the integrity of longer programs. Each retained Bridge authenticates the preceding code and helps determine whether an attacker has modified it.

DatasetGeneration variantρTime (s)Pass@1Clean AUROC
MBPP+Single sample only0.001.68 / 3.570.64 / 0.740.5654 / 0.5048
Single sample + Bridge0.101.65 / 3.610.64 / 0.740.5686 / 0.5090
Single sample + Bridge0.201.70 / 3.630.62 / 0.740.6032 / 0.5346
Single sample + Bridge0.501.80 / 3.370.62 / 0.740.7320 / 0.7964
Single sample + Bridge1.001.83 / 3.700.66 / 0.720.9320 / 0.9480
Full COSTA0.104.84 / 8.430.66 / 0.700.8356 / 0.9068
HumanEval+Single sample only0.003.31 / 4.500.62 / 0.920.4388 / 0.4900
Single sample + Bridge0.103.41 / 4.600.64 / 0.920.4558 / 0.5160
Single sample + Bridge0.203.14 / 4.950.64 / 0.900.6076 / 0.6172
Single sample + Bridge0.503.66 / 5.090.56 / 0.900.8714 / 0.8882
Single sample + Bridge1.003.83 / 5.470.50 / 0.820.9696 / 0.9748
Full COSTA0.109.76 / 12.690.48 / 0.820.9330 / 0.9414
APPSSingle sample only0.004.90 / 10.110.16 / 0.200.4686 / 0.4928
Single sample + Bridge0.104.87 / 10.210.16 / 0.200.5794 / 0.6088
Single sample + Bridge0.205.21 / 10.100.14 / 0.200.6800 / 0.7524
Single sample + Bridge0.505.57 / 10.270.16 / 0.180.8590 / 0.8942
Single sample + Bridge1.005.25 / 9.910.16 / 0.180.9502 / 0.9150
Full COSTA0.1020.57 / 20.550.18 / 0.200.9140 / 0.9532
AuthorsOpenReview ↗

Response to Reviewer SmaUv (2/2)

W2 & Q2. Structure-aware attacks

We agree that comment deletion and variable renaming provide limited evidence against an attacker who knows that COSTA uses AST parity. We therefore tested dead-code insertion with filtering disabled and evaluated an adaptive attack that directly targets AST parity. In both tables, each cell reports Llama3-8B / Qwen2.5-Coder-14B.

1. Dead-code insertion. We disabled dead-code filtering so that the detector processed the inserted statements. COSTA achieved higher AUC than both SWEET and STONE on all six model–dataset combinations at 10% and 25% insertion and on four of six at 50% insertion.

Insertion RatioMethodMBPP+ F1MBPP+ AUCHumanEval+ F1HumanEval+ AUCAPPS F1APPS AUC
0%COSTA0.8934 / 0.71130.9780 / 0.97010.8248 / 0.86130.9866 / 0.97280.9077 / 0.90000.9663 / 0.9792
SWEET0.7575 / 0.54250.9096 / 0.85460.7158 / 0.47850.9125 / 0.80760.8170 / 0.73750.8794 / 0.8733
STONE0.5951 / 0.34070.8274 / 0.73170.5030 / 0.21850.8319 / 0.77190.6782 / 0.41030.8869 / 0.8045
10%COSTA0.5386 / 0.53610.9283 / 0.92160.6161 / 0.50020.9179 / 0.93200.9028 / 0.81080.9702 / 0.9598
SWEET0.6977 / 0.37990.8824 / 0.77720.6354 / 0.35540.8634 / 0.75290.7930 / 0.71920.8824 / 0.8698
STONE0.5052 / 0.23260.8025 / 0.71790.3725 / 0.26230.7861 / 0.75300.6714 / 0.45050.8810 / 0.7890
25%COSTA0.3761 / 0.26410.8958 / 0.88820.3665 / 0.24330.8840 / 0.90320.8830 / 0.82160.9596 / 0.9516
SWEET0.6764 / 0.36040.8882 / 0.75780.5859 / 0.29770.8477 / 0.72020.7902 / 0.67870.8959 / 0.8782
STONE0.3721 / 0.20550.7789 / 0.69940.2670 / 0.20110.7600 / 0.74510.6126 / 0.36900.8667 / 0.7899
50%COSTA0.2389 / 0.14970.8079 / 0.79500.2033 / 0.20090.7838 / 0.80080.6664 / 0.60480.9080 / 0.8976
SWEET0.6222 / 0.24230.8557 / 0.72750.4778 / 0.26780.8262 / 0.70210.7868 / 0.60350.8793 / 0.8600
STONE0.3517 / 0.14830.7431 / 0.68390.2700 / 0.24870.7316 / 0.68290.5723 / 0.33040.8476 / 0.7892

2. Adaptive parity flipping. The attacker knows that COSTA encodes its watermark in AST parity but lacks the secret key. We randomly selected 10%, 25%, 50%, or 100% of each program’s statements and prompted an LLM to flip a specified parity while preserving functionality. The prompt allowed statement splitting, statement merging, temporary-variable insertion, and systematic AST rewriting. We targeted total, leaf, and inner node counts separately and also tested choosing the count randomly for each selected statement. AUC remained above 0.91 in every setting at 25% targeting. Although targeting every statement (100%) reduced AUC below 0.73 in all settings, attempting to rewrite the entire program while preserving functionality is costly for the attacker.

DatasetTarget AST node10% statements25% statements50% statements100% statements
MBPP+Total node0.9781 / 0.97480.9338 / 0.94660.8233 / 0.84550.6368 / 0.7052
Leaf node0.9783 / 0.97580.9450 / 0.91210.7740 / 0.73180.6127 / 0.6846
Inner node0.9781 / 0.97480.9338 / 0.94660.8233 / 0.84550.6368 / 0.7052
Random node0.9781 / 0.97480.9354 / 0.94220.8014 / 0.81800.5916 / 0.7020
HumanEval+Total node0.9871 / 0.97230.9382 / 0.95480.8006 / 0.79530.6655 / 0.6990
Leaf node0.9874 / 0.97040.9329 / 0.92130.7509 / 0.71250.6778 / 0.6591
Inner node0.9871 / 0.97230.9382 / 0.95480.8006 / 0.79530.6655 / 0.6990
Random node0.9870 / 0.97230.9331 / 0.95320.7876 / 0.77560.6479 / 0.6652
APPSTotal node0.9655 / 0.97720.9545 / 0.95690.8546 / 0.90860.6026 / 0.7076
Leaf node0.9605 / 0.97780.9366 / 0.94960.7164 / 0.71150.6937 / 0.6194
Inner node0.9655 / 0.97720.9545 / 0.95690.8546 / 0.90860.6026 / 0.7076
Random node0.9619 / 0.97880.9492 / 0.95660.8355 / 0.87410.6625 / 0.7210

Overall, these experiments support COSTA’s robustness to both attacks for two reasons. First, the attacker does not know whether COSTA checks the parity of the leaf, non-leaf, or total node count. Second, the secret key and the LSH of the preceding statement conceal the target parity, limiting the attacker’s ability to disrupt a match reliably. We hope these additional experiments and clarifications address reviewer's concerns about COSTA’s cost and robustness.

With the rebuttal deadline approaching, we would appreciate further feedback from the reviewer so that we can address any remaining questions promptly. If our responses have resolved the concerns raised, we hope these clarifications will inform the final assessment, and we sincerely thank the reviewer for the time and consideration.

Reviewer_of74OpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper presents a training-free framework named COSTA to watermark LLM-generated code at the statement level. It uses keyed AST-node parity and a three-stage process (sample, repair, bridge). The watermark can be detected without access to the generator or original prompt. The experimental results show that COSTA outperforms several generation-time baselines.

Critical strengths
  • This paper conducted a relatively extensive empirical study.
  • This paper proposed a novel and meaningful technical design for LM watermarking in code data. The watermarks in statements is better than tokens in reflecting structural and functional constraints.
Critical weaknesses
  • The trade-off is not very convincing (for example, Table 2), which is likely to indicate limited contributions and affects the actual practical values. How much are the additional cost and the correctness loss caused in the stages of repair and bridge? The authors can report a detailed effectiveness-efficiency trade-off in a fixed budget, or show potentials in avoiding the trade-off.
  • The case study examples in Appendix show that the produced code could be much longer than the unwatermarked samples, which indicates bad code smells that should be avoided in program development and maintenance.
  • The paper writing needs further refinements, for example, the results in tables are hard to recognize, so do figure details.
Questions for authors

How much are the additional cost and the correctness loss caused in the stages of repair and bridge? The authors can report a detailed effectiveness-efficiency trade-off in a fixed budget, or show potentials in avoiding the trade-off.

3 comments
AuthorsOpenReview ↗

Response to Reviewer of74

We appreciate the reviewer’s recognition of our empirical study and the motivation for embedding watermarks at the statement level. We address each concern below with additional analysis and experiments.

W1 & Q1: Repair and bridge cost

To quantify the additional generation time and any loss in functional correctness associated with Repair and Bridge, we compared statement-level sampling alone (S), sampling with Repair (S + R), and sampling with both Repair and Bridge (S + R + B). The results below show how these costs compare with the detection gains at each stage.

DatasetModelConfigurationAUROCPass@1 (%)Δ\Delta Pass@1 (pp)Generation time (s)Δ\Delta Time (s)
MBPP+Llama3-8B/Qwen2.5-Coder-14BS0.6246 / 0.533268.00 / 76.002.80 / 5.18
Llama3-8B/Qwen2.5-Coder-14BS + R0.8356 / 0.906466.00 / 70.00-2.00 / -6.004.60 / 8.37+1.80 / +3.18
Llama3-8B/Qwen2.5-Coder-14BS + R + B0.8356 / 0.906867.00 / 69.00-1.00 / -7.004.95 / 8.65+2.15 / +3.47
HumanEval+Llama3-8B/Qwen2.5-Coder-14BS0.5610 / 0.575254.00 / 92.004.91 / 6.88
Llama3-8B/Qwen2.5-Coder-14BS + R0.9330 / 0.941450.00 / 84.00-4.00 / -8.009.36 / 12.65+4.45 / +5.76
Llama3-8B/Qwen2.5-Coder-14BS + R + B0.9428 / 0.951948.00 / 82.00-6.00 / -10.009.42 / 12.73+4.51 / +5.84
APPSLlama3-8B/Qwen2.5-Coder-14BS0.7468 / 0.597220.00 / 22.009.37 / 12.59
Llama3-8B/Qwen2.5-Coder-14BS + R0.9102 / 0.953219.00 / 21.00-1.00 / -1.0019.26 / 19.90+ 9.89 / +7.32
Llama3-8B/Qwen2.5-Coder-14BS + R + B0.9236 / 0.963718.00 / 20.00-2.00 / -2.0020.72 / 19.98+11.35 / +7.39

The results demonstrate that Repair accounts for most of the improvement in detection and most of the additional generation time. Although Bridge provides a smaller detection gain, it can also help verify the integrity of longer programs. Each retained Bridge statement carries an authentication value bound to the preceding code, so a failed check can indicate that part of that code has been deleted or modified. We hope these results address the reviewer’s concerns about the additional generation time and loss of functional correctness at each stage.

W2: Watermarked code length

Table 2 shows that COSTA produces shorter code on average than other watermarking methods. Specifically, COSTA averages 91.95 tokens per solution, compared with 94.58 to 102.37 for the baselines, and exceeds the unwatermarked code average by only 8.96 tokens. Thus, the few longer examples in Appendix J are insufficient to conclude that excessive verbosity is a common code smell in code generated by COSTA. We will clarify this variation in the discussion of the case studies.

W3: Presentation

We will improve the readability of the tables and figures by increasing the font size and enlarging the markers in the figures.

With the rebuttal deadline approaching, we would appreciate further feedback from the reviewer so that we can address any remaining questions promptly. If our responses have resolved the concerns raised, we hope these clarifications will inform the final assessment, and we sincerely thank the reviewer for the time and consideration.

Dear Reviewer,

With about 1 hours remaining in the rebuttal period, we would be grateful if you could take a moment to review our responses. Thank you again for your time and thoughtful feedback.

Best wishes,

The Authors

Reviewer_fmtfOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
1
Read review
Paper summary

This work proposes COSTA, a statement-level code watermarking framework that encodes provenance in ASTs.

The authors propose some new technical idea directions and conduct the corresponding experiments. The paper is well-written and is easy to follow.

However, I consider the contribution of the paper is not enough for publication at ICLR.

Critical strengths

(1) The paper is well-written and easy to follow.

(2) COSTA is a training-free watermarking framework that requires only code for testing, without requiring access to the original generation model or prompt.

Critical weaknesses

My main concern on the work is regarding the method design and experiments of this work, especially the robustness.

(1) COSTA relies on AST node-count parity to encode watermark signals, making it inherently fragile, even simple semantics-preserving code modifications can flip node parity and disrupt watermark detection.

(2) The robustness evaluation is unconvincing because the defense is crafted for the tested attacks. For example, the detector explicitly removes dead code, making the dead-code insertion attack largely ineffective by design. The experimental design is not enough to demonstrate the robustness of the method.

Based on the above, I consider the proposed method being fragile and showing limited robustness, with the lack of application values.

Questions for authors

Please kindly answer the questions in the above weaknesses (1) and (2).

5 comments
AuthorsOpenReview ↗

Response to Reviewer fmtf

We thank the reviewer for the careful reading and constructive suggestions. We address each concern below with additional analysis and experiments.

W1: Parity-flipping attack

COSTA has two mechanisms that make parity-flipping attack more difficult. First, the detector selects among three AST node counts (total, leaf, and inner). Although a statement’s AST reveals all three parities, it does not reveal which one is checked. Moreover, because the total count equals the sum of the leaf and inner counts, no rewrite can flip all three parities simultaneously. Second, the target parity depends on the LSH of the preceding statement and a secret key. Without the key, an attacker cannot determine whether a rewritten statement’s parity matches the target.

To evaluate this adaptive attack, we randomly selected statements and used an LLM to rewrite their expressions to flip the parity of the total, leaf, or inner node count. In the random setting, the target count was sampled independently for each statement. Each cell reports AUC for Llama3-8B / Qwen2.5-Coder-14B.

DatasetTarget AST node10% statements25% statements50% statements100% statements
MBPP+Total node0.9781 / 0.97480.9338 / 0.94660.8233 / 0.84550.6368 / 0.7052
Leaf node0.9783 / 0.97580.9450 / 0.91210.7740 / 0.73180.6127 / 0.6846
Inner node0.9781 / 0.97480.9338 / 0.94660.8233 / 0.84550.6368 / 0.7052
Random node0.9781 / 0.97480.9354 / 0.94220.8014 / 0.81800.5916 / 0.7020
HumanEval+Total node0.9871 / 0.97230.9382 / 0.95480.8006 / 0.79530.6655 / 0.6990
Leaf node0.9874 / 0.97040.9329 / 0.92130.7509 / 0.71250.6778 / 0.6591
Inner node0.9871 / 0.97230.9382 / 0.95480.8006 / 0.79530.6655 / 0.6990
Random node0.9870 / 0.97230.9331 / 0.95320.7876 / 0.77560.6479 / 0.6652
APPSTotal node0.9655 / 0.97720.9545 / 0.95690.8546 / 0.90860.6026 / 0.7076
Leaf node0.9605 / 0.97780.9366 / 0.94960.7164 / 0.71150.6937 / 0.6194
Inner node0.9655 / 0.97720.9545 / 0.95690.8546 / 0.90860.6026 / 0.7076
Random node0.9619 / 0.97880.9492 / 0.95660.8355 / 0.87410.6625 / 0.7210

Among the attack budgets tested, only rewriting all statements reduces AUC below 0.73 across every setting. This imposes a substantial attack cost, especially for long programs, as it requires rewriting the entire program while preserving functionality. Under more common edits such as variable renaming and comment removal, COSTA outperforms the evaluated token-level watermarks, supporting its practical utility.

W2: Dead-code insertion

We agree that removing inserted dead code before detection may overestimate COSTA’s robustness. Our original preprocessing was motivated by the availability of static analysis tools for identifying common dead code, allowing COSTA to focus on statements suitable as watermark carriers. To address this concern directly, we repeated the attack without dead-code removal. The results reported in each cell for Llama3-8B / Qwen2.5-Coder-14B show that COSTA still achieves the highest AUC in most settings.

Insertion RatioMethodMBPP+ F1MBPP+ AUCHumanEval+ F1HumanEval+ AUCAPPS F1APPS AUC
0%COSTA0.8934 / 0.71130.9780 / 0.97010.8248 / 0.86130.9866 / 0.97280.9077 / 0.90000.9663 / 0.9792
SWEET0.7575 / 0.54250.9096 / 0.85460.7158 / 0.47850.9125 / 0.80760.8170 / 0.73750.8794 / 0.8733
STONE0.5951 / 0.34070.8274 / 0.73170.5030 / 0.21850.8319 / 0.77190.6782 / 0.41030.8869 / 0.8045
10%COSTA0.5386 / 0.53610.9283 / 0.92160.6161 / 0.50020.9179 / 0.93200.9028 / 0.81080.9702 / 0.9598
SWEET0.6977 / 0.37990.8824 / 0.77720.6354 / 0.35540.8634 / 0.75290.7930 / 0.71920.8824 / 0.8698
STONE0.5052 / 0.23260.8025 / 0.71790.3725 / 0.26230.7861 / 0.75300.6714 / 0.45050.8810 / 0.7890
25%COSTA0.3761 / 0.26410.8958 / 0.88820.3665 / 0.24330.8840 / 0.90320.8830 / 0.82160.9596 / 0.9516
SWEET0.6764 / 0.36040.8882 / 0.75780.5859 / 0.29770.8477 / 0.72020.7902 / 0.67870.8959 / 0.8782
STONE0.3721 / 0.20550.7789 / 0.69940.2670 / 0.20110.7600 / 0.74510.6126 / 0.36900.8667 / 0.7899
50%COSTA0.2389 / 0.14970.8079 / 0.79500.2033 / 0.20090.7838 / 0.80080.6664 / 0.60480.9080 / 0.8976
SWEET0.6222 / 0.24230.8557 / 0.72750.4778 / 0.26780.8262 / 0.70210.7868 / 0.60350.8793 / 0.8600
STONE0.3517 / 0.14830.7431 / 0.68390.2700 / 0.24870.7316 / 0.68290.5723 / 0.33040.8476 / 0.7892

In summary, our additional experiments demonstrate COSTA’s robustness to parity flipping attack and dead-code insertion even without dead-code removal. Combined with Fig. 4 on comment removal, variable renaming, mixed edits, and LLM rephrasing, these results support its robustness across all five attacks. We sincerely hope they address the reviewer’s concerns and respectfully ask for a reassessment of our contributions.

With the rebuttal deadline approaching, we would appreciate further feedback from the reviewer so that we can address any remaining questions promptly. If our responses have resolved the concerns raised, we hope these clarifications will inform the final assessment, and we sincerely thank the reviewer for the time and consideration.

Reviewer_fmtfOpenReview ↗

Thanks for the response from authors

The additional experiments partially address my concerns.

However, the F1 degradation under increasing dead-code insertion ratios and the lack of evidence regarding the actual success rate and functionality preservation of parity-flipping attacks leave the practical robustness insufficiently established.

Please clarify whether detection thresholds are fixed or recalibrated after attacks, and provide TPR results at 1% FPR using an independent calibration set.

Moreover, please provide the parity-flipping success rate and corresponding functionality-preservation rate to demonstrate the robustness claims.

Comments on the paper

1 comment
AuthorsOpenReview ↗

Rebuttal Summary

We thank the reviewers and the Area Chair for their careful assessment and constructive feedback. We summarize our responses below:

  • Statement-level watermarking (SmaU). We clarified the motivation for statement-level watermarking and its trade-offs in functional correctness, robustness to routine code edits, and generation cost.
  • Robustness to structural attacks (fmtf, SmaU). We added dead-code insertion experiments with detector filtering disabled and targeted AST parity-flipping attacks, evaluating COSTA’s robustness across different attack intensities.
  • Generation efficiency (of74, SmaU). We quantified the costs and detection gains of Repair and Bridge, evaluated offline Repair templates that reduced generation time while maintaining or improving AUROC, and added the proposed single-sample + Bridge baseline.
  • Code length (of74). We clarified that COSTA produces shorter code on average than the evaluated watermarking baselines and that the longer illustrative examples do not establish excessive verbosity as a general issue.

We hope our additional experiments and clarifications address the remaining concerns and would greatly appreciate the ACs’, SACs’, and PCs’ consideration.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.