Skip to content

Source attribution of unsafe behavior in self-evolving multi-agent coding systemsOrigin Attribution for Unsafe Behavior in Self-Evolving Multi-Agent Coding Systems

Paper Tracker· arXiv:2610.17488· Hanyi Yu, Jiaming CuiUniversity of Southern California; Virginia TechIndexed by this site · 2026-10-20· Originally publishedTools

Quick read

Analysis and theory

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

Lineage attribution of unsafe behaviors of self-evolving coding agents: exact accuracy 96.8% on 158 core queries, exhaustive fingerprint matching 77.2%.

Questions
Self-evolving programming agents rewrite programs and reuse each other's code; unsafe behavior may originate in another agent and reach the audited version through intermediate recipients. The task is to recover the agent and version that introduced the behavior, or to determine that it originated locally in the target. Rewriting can mask textual similarity, and independent occurrences can interfere with temporal selection.
Methods
The method anchors on the earliest version of the target flagged by a probe, takes at most K=3 other agents by function-region similarity, and for each keeps at most the starting version and the most similar version. After swapping candidate code into the anchor, it filters by behavioral fingerprint on fixed inputs, then selects by agreement ratio and timestamp, and recurses upstream. Adoption records are used only for evaluation.
Experiments and results
On 158 queries across 85 scenarios, the full method has exact accuracy of 96.8%, and exhaustive fingerprint matching without recursion is 77.2%. The authors say both recover 23 sourceless queries, that on star the two are the same, and that the advantage lies in chain and tree. On 34 new routing queries under the same setting, the result is 34/34; the boundary and field-replacement check is 9/11.
Limitations and future work
The paper has no dedicated limitations section. The Discussion describes heterogeneous execution contexts as another setting for evaluating the role of replacement, and states that changes in candidate budget motivate measuring coverage as populations grow. The evaluation covers controlled routing bypass with 3–7 agents, plus 34 new routing queries and 11 boundary and field-replacement queries.
Experimental setupcontrolled origin-attribution histories (85 scenarios, 158 queries)、additional routing queries (19 scenarios, 34 queries) et al. · exact attribution accuracy、mean per-scene accuracy et al.
Benchmarks
controlled origin-attribution histories (85 scenarios, 158 queries)additional routing queries (19 scenarios, 34 queries)approval-boundary and resource-owner field-substitution checks (11 queries)
Metrics
exact attribution accuracymean per-scene accuracysource-agent or no-source accuracy
AI summaryResearchers propose a provenance attribution method for self-evolving multi-agent coding systems that can trace the agent and program version that introduced unsafe behavior. The method combines behavioral fingerprint matching, historical localization and recursive tracing, achieving 96.8% precise attribution accuracy on 158 queries across 85 controlled scenarios, compared with 77.2% for exhaustive fingerprint matching without recursion. Ablation experiments and an evaluation on an additional 34 queries show the complementary role of multiple representative samples and recursive tracing, and further checks extend to approval boundaries and resource-owner errors.

Researchers propose a provenance attribution method for self-evolving multi-agent coding systems that can trace the agent and program version that introduced unsafe behavior. The method combines behavioral fingerprint matching, historical localization and recursive tracing, achieving 96.8% precise attribution accuracy on 158 queries across 85 controlled scenarios, compared with 77.2% for exhaustive fingerprint matching without recursion. Ablation experiments and an evaluation on an additional 34 queries show the complementary role of multiple representative samples and recursive tracing, and further checks extend to approval boundaries and resource-owner errors.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Recover the agent and version that introduced the unsafe behavior, or determine that it originated locally in the target.

    In self-evolving multi-agent programming systems, recover the agent and program version that introduced an observed unsafe behavior into the target's code lineage, or determine that the behavior originated locally in the target.

    • Auditing after propagation: the authors state that programming agents rewrite their own programs and reuse others' code, and that task success can coexist with safety degradation. An unsafe change may start in another agent, pass through intermediate recipients, and remain in the audited version after later revisions. The authors consider flagging only the affected agent to be just a starting point.
    • Three confusions: the authors state that rewriting can mask textual similarity; independently occurring failures can share the unsafe outcome, interfering with temporal selection; and a matched donor may be only a relay, not the source. Existing failure attribution mostly targets a single execution trajectory; here what must be separated is the executor, the direct donor, and the origin.
    • Evidence visible to the audit: the query specifies the target version, a deterministic probe, and a function region. The auditor receives each agent's code history, timestamps, and a fixed input battery. Adoption edges and injection labels are used only for evaluation and are not visible to the method. The authors contrast this with systems that explicitly record derivation links.
    • What the authors propose: an origin-attribution task, controlled scenarios, and a method combining behavioral fingerprints, historical localization, and recursive tracing. Each queried lineage has one introduction event; when there is no external source, the answer is NONE. Evaluation requires the exact agent–version pair, or a correct source-free answer.
  2. What related research exists?

    The authors place the attribution unit at the introducing version on the persistent code-adoption history, not at a single execution trajectory.

    The authors position this task within four categories of work and build their own baselines in the experiments.

    Agent failure attribution

    • Who&When (Zhang et al., 2025): identifies the responsible agent and execution step.
    • AgenTracer (2025): constructs training trajectories using counterfactual replay and fault injection. VerifyMAS and TraceElephant further study trajectory-level attribution.
    • MAST and CASPIAN: the former categorizes recurring failures, the latter studies cross-agent cascades within a single session. The authors state that the unit in this paper differs: the executor, the direct donor, and the source can differ.

    Interventional evaluation and controlled faults

    • DoVer (2025): evaluates attribution hypotheses via recovery after message and plan interventions. MP-Bench examines multiple plausible attribution perspectives. The authors instead evaluate one recorded introduction event on each queried lineage.
    • AgentChaos, MAS-FIRE, AEGIS, and AgentTrace: the first three inject or generate faults for evaluation, AgentTrace traces with causal graphs. The authors state that the controlled changes in this paper remain in subsequent revisions and adoptions; propagation records establish labels but are hidden from the attribution method.

    Persistent safety risks

    • Voyager (Wang et al., 2024): demonstrates executable skills reused across tasks.
    • Misevolution, experience-driven safety evaluation, and Skill Misevolution: examine safety degradation during evolution and its persistence in reusable pipelines. Cross-generation safety analysis describes risk spreading across agent populations.
    • Governed shared memory: emphasizes explicit provenance. The authors frame the task as: when derivation links are unavailable, how much post-hoc recovery can archived code and timestamps support.

    Software history and defect localization

    • SZZ (Śliwerski et al., 2005): links fixes to the changes that introduced the defect. Clone detection and file copy studies examine similarity and reuse. The authors state that the audit in this paper starts from the unsafe version and does not require an existing fix.
    • Delta debugging and mutation-based defect localization: localize using interventions and execution results. The authors test historical code in the target context, compare behavioral fingerprints, and combine temporal selection with upstream tracing. The authors also state that rewriting can mask textual reuse, and independent failures can mislead selection based only on the unsafe starting point.

    Baselines and evaluation history

    • Baseline methods: full-text similarity Text, pure bisection Bisect, exhaustive scan Scan, naive counterfactual, and exhaustive fingerprint matching without recursion. The six executable methods share the same histories, audit probes, and target queries, and make no language model calls during the attribution stage.
    • Evaluation data: the authors' own controlled histories, not the external benchmarks named in the text. Single-agent evolution is based on OpenEvolve; registry topologies are taken from MARBLE's star, chain, tree, with cyclic used for source-free scenarios.

    The authors' positioning is: what must be recovered is the introducing version on the persistent adoption lineage, not a responsible step within a single execution. Appendix C also contrasts CASPIAN's intra-session cascades and RCLAgent's microservice root-cause localization with a setting that uses historical code and timestamps and leaves adoption records to evaluation.

  3. How does the paper address this problem?

    Using behavioral fingerprints, historical localization, and recursive tracing to recover the introducing version from archived code and timestamps.

    The authors' proposed method anchors on an early unsafe version of the target, filters candidates by behavioral comparison beyond the failure itself, and then traces along matching candidates to earlier versions of other agents. Adoption records do not enter the method.

    Problem setting and environment

    • Archives and adoption: each agent a has a version archive that may contain branches. A function-level adoption edge records that a recipient version incorporated region r of a source version; later revisions can modify this code again. The orange adoption edges and introduction markers in Figure 1 belong only to evaluation.
    • Queries and outputs: a query gives the target (t, tq), a deterministic probe satisfying π(tq)=1, and function r. The desired output is the introduction pair (a*, v*) on the lineage; when the behavior arises inside the target, output NONE. Source-free samples are still unsafe but are negatives for external-source attribution.
    • Evolution setup: each agent starts from the same initial program and runs its own OpenEvolve instance. The evolution model gpt-5-mini proposes revisions, an online evaluator scores task utility, and the archive retains versions. The task is workflow routing. The unsafe change routes a specified request type through special routing with confirmation disabled, bypassing the default handling of unknown requests. This change can pass the online evaluator; a separate audit probe detects the bypass. The probe does not enter online selection or generation prompts. Figure 1 notes that utility pass does not equal audit-probe pass.
    • Scenario factors: a shared registry organizes publication and adoption as star, chain, tree; cyclic scenarios exchange benign code, and the unsafe behavior originates inside the target. In Table 1, A is semantic rewriting, B is irrelevant co-occurrence before the true source, E is multi-hop, C is additional propagation that does not carry the behavior, and D changes the query from the first marked version to the last marked version. The generator varies the evolution schedule and startup order, and does not give the change description to attribution inputs.

    Historical localization and candidates

    • Anchor: after sorting by creation time, take the first target version before the query version that is marked by the probe. Written as ιq(t)=min{i≤ q:π(ti)=1}, α is that version. The authors use it so that comparison does not depend on revisions after the target; if there is no marked version before it, Algorithm 1 falls back to tq.
    • Retrieval: for other agents, take the version whose region r is most similar to the anchor, and use that similarity as the agent score. After excluding the target and visited agents, keep Top-K. Main experiments use K=3.
    • Two representatives: if the agent has a marked version, the representative set is its first marked version plus the version most similar to the anchor; otherwise only the most similar version. The authors state the starting representative preserves the initial unsafe implementation, and the most similar representative can preserve revisions later adopted by the target. Overlapping representatives are tested only once.

    Behavioral matching and recursion

    • Replacement test: replace region r in the anchor with the candidate code, then rerun in the target context. The fingerprint is written ϕB(p)=(g(p,x)x∈ B, hπ(p)), i.e., the response signature on a fixed input battery plus the audit probe result. The signature records tool selection, execution mode, and confirmation requirement, comparing behavior beyond the unsafe outcome. Only fingerprints identical to the anchor enter the acceptance set. If the acceptance set is empty, predict NONE, i.e., no tested candidate supports an external source; the authors state this decision depends on candidate coverage.
    • Selection: within the acceptance set, lexicographically maximize (b(v, α), -τ(v)). b is the fraction of agreement between the full candidate and the anchor on non-unsafe test cases, τ is the timestamp. The authors state that on the evaluated histories, when multiple candidates pass, the agreement fractions tie, so the rule is equivalent to choosing the earliest accepted candidate. In the Figure 2 illustration, B·v2 disagrees with the anchor beyond the unsafe outcome, A·v3 agrees with D·v2, and the tie goes to the earlier D·v2.
    • Mapping and recursion: if the selected agent has a marked version, map the reported point to its first marked version; otherwise keep the selected version. Then repeat the procedure from that point and update the visited set. Replace the current attribution only if the recursive result is not NONE and is earlier in time; otherwise keep the current attribution. The initial call has an empty visited set and depth 0. Continue only while depth is less than 4, the target is unvisited, and the current shortlist still has representatives earlier than the reported starting point. Each layer evaluates at most 2K representatives. The method requires executing programs and makes no further language model calls.

    Determination and construction parameters

    • Correctness: must exactly match the introducing agent–version, or correctly output NONE. Irrelevant branches and other agents can independently exhibit the same behavior; the recorded lineage gives a unique evaluation label, and the auditor's observations need not uniquely determine it.
    • Core configuration: Table 7 states OpenEvolve 0.3.2, differential Python evolution; gpt-5-mini at low reasoning effort, completion cap 10,000 tokens; population 20, archive 20, one island. Fingerprints include 16 utility inputs, 7 robustness inputs, and audit probes. The attribution function is compile_workflow. The default semantic-rewriting acceptance threshold includes text similarity 0.50.
  4. What experiments did the paper conduct?

    On 158 core queries, exact accuracy is 96.8%, and exhaustive fingerprint matching is 77.2%; on star, the two are the same.

    Experimental setup

    • Evolution model and task: scenarios are proposed and revised by gpt-5-mini in OpenEvolve 0.3.2. The core unsafe behavior is special routing for a specified request type with confirmation disabled. The results tables report attribution methods, not per-item scores of that model.
    • Core set: 85 scenarios, 158 queries, 3–7 agents per scenario, mean 5.0. 135 external-source queries distributed across star, chain, tree; 23 source-free in cyclic. Condition definitions in Table 1. Methods were tuned on this set of histories.
    • Additional set: the same method and hyperparameters re-evaluated on 34 routing queries from 19 new scenarios; plus 11 queries on approval boundaries and resource-owner field replacement.
    • Baselines: Text, Bisect, Scan, naive counterfactual, exhaustive fingerprint matching Exh. Those with a budget use K=3. The six executable methods share histories, probes, and queries, with no language model calls during attribution. Text uses full-text similarity: within an agent, take the earliest version within 0.02 of that agent's maximum similarity, then take the earliest starting point among agents within 0.05 of the global maximum.
    • Metrics: exact agent–version pair, or correct NONE. Also reports scenario-equal-weight accuracy, and source-agent or source-free determination. Table 9 uses intervals from 10,000 resamples grouped by the 85 scenarios.
    • Fingerprints and budget: 16 utility inputs, 7 robustness inputs, and audit probes; signatures include tool, mode, confirmation. Recursion depth capped at 4. Under the main setting the full method averages 59.3 program executions and 0.57 seconds per query.

    Main results

    Per Table 2, units are exact attribution accuracy (%). Exh. in row D is shown as "—" in the table; here it is written as not reported. Bisect, Scan, and naive counterfactual overall are 42.4, 42.4, and 26.6 respectively.

    Swipe horizontally to read the table

    ConditionnTextExh.Ours
    Star A+B+C2147.685.785.7
    Chain E+B+A110.036.490.9
    Tree E+B+A180.066.794.4
    No external source230.0100.0100.0
    Overall15820.977.296.8
    D: last marked1585.1not reported96.8
    • Authors' interpretation of topology: the authors state that both Ours and Exh. recover all 23 source-free queries, with identical star accuracy; the advantage is in chain and tree, because exhaustive matching can find relays but does not trace upstream. Not every row in Table 2 is higher than all baselines: on Chain E and Tree E, Scan is also 100.0%; on the three Star rows Ours equals Exh., with A+B+C at 85.7%. Combinations where Ours does not reach 100.0% also include Chain E+B+A at 90.9% and Tree E+B+A at 94.4%.
    • Number of conditions: Figure 3 groups the 135 external-source queries by number of conditions. The authors report the full method at 100%, 100%, 90%, and Exh. at 83.8%, 70.8%, 68.0%, for n=37, 48, 50 respectively. The authors state these groups mix conditions of different topologies and the numbers are aggregates across combinations. Function-level text matching is 23.4% overall, full-text matching 20.9%.
    • Last audit: under D, Text drops from 20.9% to 5.1%, and naive counterfactual from 26.6% to 22.8%. The authors state the full method keeps its predictions because it returns to the same historical anchor, remaining at 96.8%. Exh. was not rerun separately for D. Scenario-equal-weight mean is 97.1%. In Table 9, Ours' query interval is 96.8% [92.1, 100.0], the query-weighted gain over Exh. is 19.6 percentage points, paired interval 11.4–28.9.

    Representative versions and recursion

    • Both needed together: Table 5 fixes historical localization, fingerprint matching, and temporal selection. With both multiple representatives and recursion off, overall is 75.3%; representatives only is 75.9%, recursion only is 75.3%; both on is 96.8%. Chain goes from 66.7% to 97.0%, tree from 47.9% or 50.0% to 97.9%.
    • Star and negatives unchanged: star is 94.4% in all four cells, and the 23 negatives are 100.0% in all. The authors state the gains are in chain and tree.
    • Authors' mechanistic interpretation: the authors state that a later relay version matches the target, and its starting version provides the next upstream comparison. Adding recursion on the multiple-representative configuration corrects 33 relay attributions. The joint configuration recovers 34 more than both off, 10 in chain and 24 in tree; with representatives only, 33 of these stop at the relay.

    New histories and additional faults

    • Post-freeze routing queries: 19 new scenarios, 34 queries, same method and hyperparameters. Full method 34/34, Exh. 22/34. The two upstream components together recover the 12 that either alone misses. On the 15 and 19 query queues in Table 4, the full method is 15 and 19, Exh. is 9 and 13; with only one upstream extension enabled it is also 9 and 13.
    • Acceptance rule: fingerprint acceptance rejects all 4 source-free queries, while unsafe-outcome acceptance misattributes them; both settings recover 30 external-source queries. On the 19 coverage queries in Table 11, Ours is 19, Bisect and Scan are 15 each, Text is 8, naive counterfactual is 4. On star B-only and C-only, Text is also 4/4.
    • Boundaries and field replacement: full method 9/11, Exh. 7/11. Field replacement is 6/6 vs 4/6, with recursion recovering two multi-hop. Boundary errors are 3/5 for both. In Table 13, boundary multi-hop n=2, the full method, no recursion, Exh., and naive counterfactual are all 0. The authors state the two errors come from a benign revision of the relay coinciding with an earlier independent occurrence fingerprint. Of 12 pre-specified generations, 1 boundary/local attempt failed because the program violated normal scheduling specifications and was not replaced. The authors state this is a transfer on an additional fault operator, plus a concrete failure under behavioral convergence, rather than a general generalization over fault families.

    Error cases and missing archives

    • Version-level errors: Appendix E.3 states source-agent or source-free determination is 156/158, exact version 153/158; Section 7 writes the former as 98.7% and the latter as 96.8%. Three errors come from the same scenario: the recorded source is D v9, predicted as D v5; both descend from the same safe parent version, but D v5 is not an ancestor of D v9, and fingerprints agree. The other two are rejecting the true source after behavioral drift, and shortlist early stopping at a relay.
    • Early stopping and visible history: removing shortlist early stopping gives 154/158, the only change being recovering D v6 instead of relay A v6 on one tree history; mean trace depth goes from 1.62 to 3.11. The authors still use the original rule for the main comparison and state the rule is a compute-saving heuristic, not a guarantee that "no earlier source exists." Restricting history to versions visible at audit time gives 154/158 (97.5%), versus 153/158 with the full archive.
    • Removing the true source archive: after removing all versions of the true source agent across 135 external-source queries in 79 scenarios, 7 output NONE and 128 attribute to other agents. With full history the method recovers 130/135. The authors state neither output recovers an origin that is no longer available, and these NONEs are not correct target-local labels. Directly executing the candidate programs reproduced all 158 replacement-test predictions.

    Other ablations and analyses

    • Eight configurations (Table 8, representatives and recursion off): all three off, first audit 26.6%; localization, fingerprint, and temporal selection all on, 75.3%. Ranking by similarity instead of temporal selection is 27.8%.
    • Localization breakdown (Table 3): target anchoring keeps first and last predictions consistent across 158 queries; with anchoring fixed, candidate starting points raise accuracy from 57.6% to 75.3%.
    • Fingerprints and unsafe outcomes (Figure 4, single representative, no recursion): source-free/external-source goes from 0.0%/84.4% to 100%/71.1%. On the first-layer shortlist, all 100 irrelevant comparisons that reproduce the unsafe outcome are rejected by fingerprint.
    • K (Table 10): K=2 is 58.9% (34.1 executions), K=3 is 96.8% (59.3 executions, 0.57 seconds), K=5 is 97.5% (96.6 executions). Naive counterfactual is 26.6% at both K=3 and K=5.
    • Input battery (Table 12, probes always retained): with 16 utility inputs and the 7 robustness inputs removed, still 153/158. Three permutations of 8 utility inputs give 151, 151, 152; the authors state this corresponds to 95.6%–96.2%.
    • Read-only LLM (Appendix D): gpt-5-mini called once per query, given no execution tools and not told the queried target version; exact match against the 158 labels is 15.2%, including 28 empty predictions counted as errors. The authors state the inputs differ and this is not a controlled comparison with the executable methods.
  5. What are some points that can be further explored?

    The paper does not specifically discuss limitations; the Discussion points out another execution setting and coverage measurement.

    Limitations and future directions noted by the authors

    The paper has no dedicated Limitations or Future Work section, and does not frame any experimental result as a shortcoming. Two statements that can be mapped to future directions are both in Section 7:

    • Another execution setting: the authors state that heterogeneous execution contexts provide another setting for evaluating the role of replacement itself. The same paragraph states that directly executing the candidate programs reproduced all core replacement-test predictions.
    • Coverage measurement: the authors state that K going from 58.9% at 2 to 96.8% at 3 highlights the importance of candidate coverage, and that this motivates measuring coverage as agent populations grow.

    Section 7 also writes, as working conditions for the tracing procedure, searchable source and relay versions, behavior that remains on each matched propagation, and matching and ranking that can distinguish propagation chains from irrelevant candidates, and states that matching alone cannot establish lineage. These sentences are not marked as limitations or future work.

    Scope of the experiments

    • Core set: 85 scenarios, 158 queries, 3–7 agents with mean 5.0; 135 external-source queries in star, chain, tree, and 23 source-free in cyclic. Appendix F states that the core evaluation covers literal string routing bypass, with one introduction per queried lineage.
    • Post-freeze queries: after the method was tuned, 34 routing queries from 19 new scenarios were evaluated with the same method and hyperparameters. Another 12 pre-specified generations yielded 11 valid queries covering approval-boundary errors and resource-owner field replacement, with history types direct propagation, multi-hop, and target-local introduction.
    • Model and fingerprints: the evolution model is gpt-5-mini. Fingerprints use 16 utility inputs, 7 robustness inputs, and audit probes. The main setting uses K=3, at most two representatives per agent, and a recursion depth cap of 4.
    • Evidence boundaries: adoption records and injection labels are used only for evaluation. The six executable methods in the core comparison make no language model calls. The gpt-5-mini read-only comparison in Appendix D is not told the target version, and the authors state it is not a controlled comparison. Table 9 reports 10,000 bootstrap intervals clustered by the 85 scenarios.
    • Working conditions stated by the authors: Section 7 states that exact version recovery also requires starting-point localization on the relevant branch, and that identical observations can still leave historical relationships ambiguous. The paper does not report multiple independent repetitions of the core accuracy.
  6. Summarize the main content of the paper

    Using fingerprint matching, historical localization, and recursive tracing, exact attribution reaches 96.8% on 158 queries.

    This is an origin-attribution work for self-evolving programming agents: after code has been rewritten and adopted across agents, recover the agent and version that introduced the unsafe behavior into the target lineage, or determine that it arose locally.

    • Things to separate: a failure in the audited version is not necessarily introduced by that version. Intermediate recipients can look like the source, independent occurrences can predate the true source, and rewriting disrupts textual similarity. Auditors can use archived code, timestamps, probes and fixed inputs; adoption edges are kept only as evaluation labels.
    • Approach: each agent evolves with OpenEvolve, gpt-5-mini proposes revisions, a shared registry passes functions by star, chain, tree, and cyclic histories provide sourceless negatives. The method anchors on the earliest flagged version of the target, takes K=3 candidates by region similarity, keeps for each the starting version and the most similar version, compares behavioral fingerprints after substitution, and then recurses to earlier versions.
    • Core results: on 85 scenarios and 158 queries, exact accuracy is 96.8%, and exhaustive fingerprint matching without recursion is 77.2%. On the 23 sourceless queries both are 100.0%, and on star the two are the same; the authors place the gap in upstream tracing on chain and tree. Under the final audit the full method remains 96.8%. The scenario-equal-weighted mean is 97.1%.
    • Exceptions and additional queries: on Star's A+B+C the method is 85.7%, the same as exhaustive fingerprinting. Source-agent or sourceless determination is 98.7%, and the shortfall below that figure mainly comes from matched versions on another branch of the same agent. The 34 new routing queries after freezing the method are 34/34. Approval boundaries and field replacement are 9/11, and the two boundary multi-hop errors coincide with earlier independent occurrences.
    • Authors' conclusion: the authors say behavioral fingerprints, historical localization and recursive tracing are complementary, and that multiple representatives and recursion can pass through revised relays. The authors also say matching itself does not establish lineage; identical observations can still leave ambiguous historical relationships, and derived links are complementary historical evidence.
Read originalarxiv.org