Purpose IR: Compiling User Purpose for Privacy-Preserving Agent Workflow StatePurpose IR: Compiling User Purpose for Privacy-Preserving Agent Workflow State
The authors propose Purpose IR, which compiles user tasks into typed semantic dataflow programs to constrain agents' reusable state; on 1,200 cases, PCS is 83.3%, 27.5 percentage points higher than Fides.
The defender constrains reusable state in LLM agent workflows: observations may be legitimately viewed as task evidence, but only semantics authorized by the user's purpose may enter reusable state via declared sinks; environment-level side effects are outside the scope of the formal properties.
- LLM agent workflows turn rich observations into reusable state such as plans, summaries, and memories; the authors state that the semantics retained therein may exceed what the user's purpose authorizes, forming a purpose-to-state semantic gap.
- The authors propose Purpose IR: tasks are proposed by a Qwen3.5-0.8B front end, a deterministic compiler generates a typed acyclic dataflow program, and at runtime reusable state is reconstructed only from the outputs of verified sinks.
- On the 1,200-case main benchmark, PCS 83.3% and Privacy 99.6%, which the authors state is 27.5 percentage points higher than Fides; on PrivacyLens, Safe Action Rate 77.3%, 10.4 percentage points higher than the next-highest method.
- The authors state that the formal properties are conditioned on the compiled program and the binding, operator, and reconstruction contracts, and that the semantic accuracy of task-to-program translation relies on empirical evaluation; environment-level side effects are outside the scope of the two propositions. The main benchmark consists of English cases, and the figure shows results on that distribution identical to those of the flat schema.
- Evaluated models
- Qwen3.5-0.8B27B semantic frontend
- Benchmarks
- 1,200-case main workflow-state benchmark (LangGraph, CrewAI, MobileRun)PrivacyLens (493 trajectories)300-instance compositional suite
- Metrics
- PrivacyTask Success RatePrivacy-Compliant Success (PCS)Privacy PassHelpfulness ≥ 2Safe Action RateSemantic contract accuracyValid IR
Purpose IR is a bounded typed intermediate representation that compiles natural-language user purpose into an executable semantic boundary for reusable state of LLM agents, achieving release constraints and purpose non-interference under an explicit execution contract. Across 1,200 cases covering LangGraph, CrewAI, and MobileRun, it achieves 99.6% Privacy, 83.3% Task, and 83.3% PCS, exceeding the strongest high-privacy baseline by 27.5 PCS points; on 493 PrivacyLens trajectories it achieves the highest Safe Action Rate at 77.3%, leading the second-best method by 10.4 points.
Paper analysis
What problem does this paper attempt to solve?
The authors state that the semantics retained in an agent's reusable state often exceed what the user's purpose authorizes, forming a purpose-to-state semantic gap.
Core problem: The reusable state of LLM agent workflows (plans, summaries, memory, handoffs) retains observation semantics beyond what the user's purpose authorizes, which the authors call the purpose-to-state semantic gap.
- Problem scenario: Workflows convert rich observations into intermediate artifacts for reuse by later steps; for example, the user only asks "is there a meeting reminder" (Boolean), but the sender, time, location, phone number, and body in the notification may propagate all the way into memory and handoff state (Figure 1). The authors hold that task relevance determines only what may serve as evidence, not what may be persisted.
- Three challenges: The authors summarize them as (P1) semantic specification—the task does not specify the boundary between evidence semantics and persistable semantics; (P2) purpose compilation—natural-language purposes cannot be executed directly; (P3) semantic preservation—the compiled boundary must remain authoritative across heterogeneous workflow representations.
- Shortcomings of existing methods: The authors state that span-level privacy tools, contextual privacy models, runtime policies, and information flow control address only partial problems such as detecting sensitive content, judging relevance, or restricting propagation, and lack a common semantic boundary derived from the task and executable.
- Proposed approach: The paper proposes Purpose IR, which compiles natural-language purposes into bounded typed semantic dataflow programs, and gives two formal properties: release confinement and purpose noninterference.
- Threat model:
- Protected object: The fact semantics retained in reusable workflow state and downstream actions.
- Boundary assumption: Observations may legitimately be inspected as evidence, but only semantics authorized by the user's purpose may cross the reusable-state boundary; "evidence authority is not release authority".
- Out of scope: Environment-level side effects are outside the scope of FactSem and the two propositions; agent control flow such as tool selection, planning, and retries is outside the IR.
What related research exists?
Related work falls into three groups: agent privacy leakage research, task-aware privacy and execution constraints, and purpose and information-flow policy languages.
Privacy leakage in agent workflows
- Green et al. (2025)—note that personal agents' reasoning traces can contain sensitive user data.
- AgentLeak (El Yagoubi et al., 2026)—detects internal channels such as inter-agent messages, shared memory, and tool parameters, and states that auditing only outputs misses internal leakage.
- Multi-agent context privacy (Li et al., 2025) and CIPL (Huang et al., 2026)—study upstream privacy errors propagating along the topology and model cross-pipeline leakage as a channel inversion problem, respectively.
Task-aware privacy and agent execution constraints
- AirGapAgent (Bagdasarian et al., 2024)—minimizes private source information exposed to the conversational agent; context privacy methods (Ngong et al., 2025) assess disclosure by goal relevance and necessity.
- Fides et al. (Costa et al., 2025; Siddiqui et al., 2025; Kolluri et al., 2026)—impose deterministic information-flow control on agent planning and LLM calls; AgentSpec (Wang et al., 2026) provides a runtime safety constraint DSL.
- Agent firewalls, MNC, CXI (Abdelnabi et al., 2025; Xu et al., 2026; Santos-Grueiro, 2026) and AgentSecBench (Alpay & Alpay, 2026)—introduce structured or typed boundaries for agent communication and execution.
Purpose, declassification, and policy languages
- Purpose-based access control (Byun & Li, 2008; Kebede et al., 2023)—treats purpose as an explicit authorization dimension.
- Classical information-flow control and declassification (Sabelfeld & Myers, 2003; Sabelfeld & Sands, 2005), and Jeeves, Thoth, Lifty (Yang et al., 2012; Elnikety et al., 2016; Polikarpova et al., 2020)—enforce privacy constraints via declarative policies or types.
Baselines and benchmarks: main benchmark baselines are No Guard, Presidio, IBM Contextual Privacy LLM, Clean Task-text Guard, Task-derived Structured Projection, Fides constrained inspection, AgentSpec; on PrivacyLens they are Full trajectory, Task-text reduction, Presidio, AgentSpec, Fides (Section 4.1). Authors' positioning: Purpose IR contributes to this setting a task-derived semantic representation that compiles natural-language purpose into typed evidence requirements, authorization derivation, and release sinks governing the observation-to-state boundary.
How does the paper address this problem?
Purpose IR compiles tasks into typed acyclic semantic dataflow programs, and at runtime reconstructs reusable state only from the outputs of verified sinks.
Overall approach: Purpose IR compiles a user task T into a Purpose program P, with the flow P = Compile(T ), B = Bind(P, O), C = Interpret(P, B), Aout = Release(P, C); observation O only provides evidence, and P defines the semantic authorization for results to enter reusable state (Figure 2).
Typed semantic dataflow
- Program structure: P = (V, E, S), where V is typed nodes, E is authorization dependencies, and S is the set of release or action sinks; the graph is acyclic and expresses semantic dependencies rather than agent control flow.
- Three node classes (Table 1): leaf nodes (EXISTS, COUNT, GET VALUE, DIAGNOSE) bind evidence; derived nodes (COMPOSE) consume only predecessor typed results; sinks (ACTION or direct release) produce reusable values or actions.
- Core invariant: for any derived or sink node v, RawAccess(v) = ∅ and Inputs(v) ⊆ {Cu : u ∈ Pred(v)}, i.e., downstream cannot reopen the raw observations that produced the result.
Natural-language purpose compilation
- Task-specific front end: Qwen3.5-0.8B reads only the task text and proposes candidate operators, semantic goals, cardinality, and decomposition; proposals carry no execution or release authorization.
- Deterministic compiler: parses proposals into a canonical graph P, assigning semantic goals, operator contracts, schemas, cardinality, dependencies, and sinks, and validates; generic carriers (such as text, notification, message body) cannot become release targets.
- Validation rejections: duplicate identifiers, unknown references, cycles, invalid guards or schemas, unsupported cardinality, malformed action arguments, derived nodes referencing raw observations, etc. The authors state the compiler provides executable authorization, not a guarantee that the program perfectly captures user intent; semantic accuracy is assessed empirically.
Evidence binding and typed execution
- Binding: adapters produce transient BoundEvidence for each leaf; Direct Binding reads explicitly declared native carriers, and Recovery Binding can recover missing values from sealed raw observations via declared carrier mappings, but recovered values must still satisfy type, assertions, cardinality, and codec.
- Interpreted execution: executes in topological order; EXISTS distinguishes three values PRESENT/ABSENT/UNKNOWN, COUNT counts distinct records, GET VALUE checks type, codec, and cardinality, DIAGNOSE produces only the bounded fields declared by the schema.
- Fail closed: on ambiguous values, missing evidence, invalid cardinality, schema mismatch, or incomplete sinks, the result remains unresolved, and the runtime does not expand semantic release.
Purpose-constrained release
- Release rule: Aout = Reconstruct({Cs : s ∈ S, Cs valid}), reconstructing a fresh host-framework artifact only from valid sink outputs; source text, evidence records, provenance, front-end candidates, compilation diagnostics, and non-sink results are not reusable by virtue of participating in computation.
- Cross-workflow sharing: the language, interpreter, and release rules are shared across LangGraph, CrewAI, and MobileRun, and workflow-specific code is limited to evidence adapters and native reconstruction (Table 7).
Formal properties
- Release confinement (Proposition 1): every factual semantic value x in a reusable artifact must belong to some sink's semantic output, and its factual provenance is limited to the semantics authorized by that sink's ancestors.
- Purpose noninterference (Proposition 2): if two observations induce the same typed results on all sink-relevant leaves (O1 ≡P O2), then under deterministic valid execution they produce the same reusable factual semantic state; the proof is by induction over the DAG topology (Appendix F).
What experiments did the paper conduct?
On the main benchmark's 1,200 cases, PCS 83.3%, Privacy 99.6%; on PrivacyLens, Safe Action Rate 77.3%, plus runtime ablations and compilation attribution.
Experimental Setup
- Main benchmark: 1,200 English workflow cases, 400 each for LangGraph, CrewAI, and MobileRun, sharing a semantic task space but retaining their own native state representations; all methods receive the same tasks and fixed workflow inputs.
- External transfer: 493 PrivacyLens privacy-sensitive action trajectories (Shao et al., 2024), evaluating downstream actions rather than reusable state.
- Composition suite: 300 instances (60 semantic scenarios × 5 rewrites), covering parameter binding, record composition, conditional routing, grouping, and multi-stage dependencies.
- Metrics: for the main benchmark, Privacy, Task Success Rate, and per-case conjunctive PCS; for PrivacyLens, Privacy Pass, Helpfulness ≥ 2, and per-trajectory conjunctive Safe Action Rate.
- Evaluation method: the main benchmark uses a unified deterministic evaluator to post-hoc evaluate the fixed outputs of all methods; PrivacyLens uses a fixed local Mistral-7B-Instruct-v0.2 judge model.
- Model roles (Table 15): the task-semantics front end is Qwen3.5-0.8B (task input only); upstream workflow artifacts for the base cases are generated by a 35B model; the Fides baseline uses Qwen3.5-0.8B for semantic checking; the IBM baseline uses llama3.2:3b.
Main Results
According to Table 2 (main benchmark (a), PrivacyLens (b)):
Swipe horizontally to read the table
Method Main metric Privacy/Priv. Pass Task/Help.≥2 No Guard / Full traj. 23.9 / 61.7 24.7 / 62.5 80.5 / 98.8 Presidio 20.8 / 62.3 26.0 / 79.5 71.0 / 81.1 IBM Context. / Task-text 32.3 / 66.9 49.0 / 74.0 64.1 / 92.3 Task-text Guard / AgentSpec 25.3 / 56.2 96.2 / 91.1 26.5 / 65.1 Struct. Proj. / Fides 24.4 / 34.1 85.0 / 95.9 26.5 / 37.3 Fides / Purpose IR 55.8 / 77.3 99.1 / 86.6 55.9 / 90.1 AgentSpec (main benchmark) 16.2 87.7 25.0 Purpose IR (main benchmark) 83.3 99.6 83.3 Note: the main metric is PCS on the main benchmark and Safe Action Rate on PrivacyLens; the method rows for the two benchmarks are listed in correspondence with the order of the paper's table.
- The authors state that at a similar privacy level, Purpose IR's PCS is 27.5 percentage points higher than the strongest high-privacy baseline, Fides; Structured Projection achieves only 24.4% PCS, on which basis the authors argue that task-aware field selection alone is insufficient.
- By workflow (Table 10): Privacy 99.5–99.8%, PCS 79.8–85.5%, and Valid IR 100.0% for all three frameworks.
- On PrivacyLens, the authors state that Purpose IR's Safe Action Rate is 10.4 percentage points higher than the next-highest, Task-text reduction, making it the strongest point on the privacy-utility conjunction (Figure 3b).
Runtime Mechanism Ablation
- Setup: all variants reuse the same 1,200 compiled programs, with no additional model calls, using the same deterministic evaluator (Table 11).
- Removing recovery binding: Privacy 99.8%, but Task Success and PCS drop from 83.3% to 13.5%.
- Removing sink-constrained reconstruction: Task Success retains 71.2%, Privacy drops from 99.6% to 34.9%, and PCS is 24.2%; the average released artifact increases from 203.16 bytes to 679.40 bytes. On this basis the authors distinguish two runtime roles: recovery binding provides the typed evidence required by the task, and reconstruction determines which semantics can persist.
Front-End and Compiler Attribution
- Composition suite results (Table 12): the number of accurate semantic contracts goes from 25/300 with the minimal full-IR prompt, to 139/300 with the balanced prompt, to 194/300 with 0.8B semantic proposals plus deterministic lowering; under the same protocol, the 27B front end reaches 288/300; Privacy is 300/300 for all variants.
- Depth breakdown (Appendix I.4): of 270 depth-one instances, the 0.8B front end satisfies 182 and the 27B satisfies 266; of 30 deeper instances, the respective numbers are 12 and 22.
- Authors' interpretation: this progression separates executable IR construction from semantic interpretation, and the authors state that both deterministic lowering and a stronger semantic front end yield gains.
Other Ablations and Analyses
- Contract mutation testing: invalid cardinality, dangling dependencies, raw observation references, invalid sinks, and dependency cycles are rejected before execution (Section 4.3).
- Cardinality semantics (Appendix I.2): the main benchmark has 3 cases where a scalar requirement meets multiple candidates; after removing the cardinality constraint, the results are Privacy 1185/1200, Task 1014/1200, PCS 1005/1200.
- Flat schema (Appendix I.3): the main benchmark's canonical programs do not require COMPOSE, multi-leaf sinks, or depth ≥2; after switching to a flat state schema, the three aggregate metrics are the same as with the full Purpose IR.
- Language boundary validation: Appendix H.2 reports the details of the above interventions, and the authors state that the implementation enforces the structural constraints of the formal assumptions.
What are some points that can be further explored?
The authors write that the formal properties are conditioned on the compiled program and the execution contract, and that semantic accuracy relies on empirical evidence; the experiments cover three frameworks and English cases.
Limitations and future directions noted by the authors
- Semantic accuracy is not guaranteed (Section 3.2): The compiler provides executable authorization, not a guarantee that the program perfectly captures user intent; the formal properties are conditional on the compiled program P and the binding, operator, and reconstruction contracts, and the semantic accuracy from task to program relies on empirical evaluation.
- Limited scope of the properties (Section 3.5): The two propositions concern only the fact semantics released into reusable state; environment-level side effects are outside the scope of FactSem and the two propositions.
- Bounded language boundary (Appendix A.1, C.3): Purpose IR is not a complete agent execution language; tool selection, navigation, retries, loops, recursion, and arbitrary user-defined computation are outside the IR.
- Graph representation is not required (Appendix I.3): The canonical programs in the main benchmark do not require COMPOSE, multi-leaf sinks, or depth of at least two, and a flat state schema yields the same aggregate results on that distribution; compositional semantics are evaluated separately by the composition suite.
- Frontend capability gap (Appendix I.4): The 0.8B frontend satisfies only 12 of 30 deeper instances, while the 27B frontend satisfies 22.
Experimental coverage
- The workflow frameworks tested are LangGraph, CrewAI, and MobileRun, 3 in total; the main benchmark has 1,200 English cases, 400 per framework (Section 4.1).
- External transfer covers 493 action trajectories from PrivacyLens, with judging by a fixed local Mistral-7B-Instruct-v0.2 (Appendix G.2).
- The composition suite has 300 instances, of which 270 are depth one and 30 are depth two (Appendix I.4).
- The main benchmark evaluator is a deterministic evaluator; the paper does not report human evaluation or consistency checks for the main benchmark results.
- The paper does not report runtime or computational cost comparisons across methods; the cardinality ablation involves only 3 scalar ambiguity cases in the main benchmark (Appendix I.2).
Summarize the main content of the paper
Purpose IR compiles user purposes into executable semantic boundaries, with PCS 83.3% on the main benchmark and Safe Action 77.3% on PrivacyLens.
A defense paper on LLM agent privacy, whose core is turning "what semantics may enter reusable state" into an executable artifact.
- Problem: The authors state that when workflows convert rich observations into reusable state such as plans, summaries, and memory, the retained semantics can exceed what the user's purpose authorizes, i.e., the purpose-to-state semantic gap; the key distinction is that evidence authority is not release authority.
- Method: Purpose IR is proposed by a Qwen3.5-0.8B task-specific frontend and generated by a deterministic compiler into a typed acyclic dataflow program; leaves bind evidence, derived nodes combine typed results, and declared sinks determine the values or actions that may be released; at runtime, reusable state is reconstructed only from verified sink outputs, and failure closes it.
- Formalization: Two propositions are given: release confinement (the fact semantics released must originate from sink-authorized ancestors) and purpose noninterference (observations with identical sink-relevant leaf results produce identical reusable fact state).
- Main results: On 1,200 cases across LangGraph, CrewAI, and MobileRun, Privacy 99.6%, Task Success 83.3%, PCS 83.3%; the authors state this is 27.5 percentage points higher than Fides (Table 2a).
- Transfer and mechanism: On 493 PrivacyLens trajectories, Safe Action Rate 77.3%, 10.4 percentage points higher than the next-highest method; ablations show that removing sink-constrained reconstruction lowers Privacy to 34.9%, and removing recovery binding lowers PCS to 13.5% (Table 11).
- Authors' conclusion: Protecting agent state privacy cannot rely only on filtering sensitive or irrelevant content; it also requires an explicit executable representation of the semantics that survive user-purpose authorization; the authors also state that the properties are conditional on the compiled program and execution contract, and that semantic accuracy relies on empirical evidence.
Related papers
- AgentPrivArena评测/基准arXiv