SHIP: Structured and Hierarchical Insight with Privacy
Organizations: University of Virginia · Google Research
Abstract
Extracting insights from textual data while protecting user privacy is increasingly important. Existing methods produce private insights in diverse forms for different analytical purposes, making their utility difficult to assess and compare. In this work, we formulate differentially private (DP) insights as reusable representations for answering analytical queries, providing a common basis for utility assessment. Answering these queries, however, requires fine-grained details and cross-attribute statistics that existing representations may omit. To capture this information, we introduce Structured and Hierarchical Insight with Privacy (SHIP), which automatically maps queries to attributes, builds a hierarchical hybrid taxonomy, and releases a DP synthetic table for further analysis. We also develop an evaluation protocol based primarily on QA performance and structured fidelity. Our experiments demonstrate SHIP's strong performance on both measures relative to existing private insight baselines, while identifying queries that remain challenging for structured representations.
Figures & tables
| Method | DP | Depth | Breadth | Open-Set | Workload |
|---|---|---|---|---|---|
| Clio | ✗ | ✓ | ✗ | ✓ | ✗ |
| Urania | ✓ | ✓ | ✗ | ✓ | ✗ |
| Chatterji et al. | ✗ | ✗ | ✓ | ✗ | ✗ |
| Flat-Open | ✓ | ✗ | ✗ | ✓ | ✗ |
| Flat-Close | ✓ | ✗ | ✓ | ✗ | ✗ |
| SHIP (Ours) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Algorithm | WildChat | SynChat | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Single-Attr | Multi-Attr | Overall | Single-Attr | Multi-Attr | Overall | ||||||||
| Avg Score | Acc | Avg Score | Acc | Avg Score | Acc | Avg Score | Acc | Avg Score | Acc | Avg Score | Acc | ||
| 1.0 | Urania | 1.27 | 6.0 | 1.24 | 6.0 | 1.26 | 6.0 | 1.27 | 6.7 | 1.10 | 0.0 | 1.18 | 3.3 |
| Flat-Close | 2.43 | 32.7 | 2.59 | 37.3 | 2.51 | 35.0 | 1.81 | 20.0 | 1.70 | 17.3 | 1.76 | 18.7 | |
| Flat-Open | 3.01 | 46.0 | 3.13 | 44.7 | 3.07 | 45.3 | 2.27 | 30.7 | 1.88 | 21.3 | 2.07 | 26.0 | |
| SHIP (Ours) | 4.05 | 72.7 | 3.56 | 53.3 | 3.80 | 63.0 | 3.54 | 59.3 | 4.41 | 83.3 | 3.97 | 71.3 | |
| Algorithm | CFPB | ChatDoctor | WildChat | ||||
|---|---|---|---|---|---|---|---|
| 1-way Div | 2-way Div | 1-way Div | 2-way Div | 1-way Div | 2-way Div | ||
| 1.0 | Flat-Close | 0.2215 | 0.3469 | 0.1142 | 0.1917 | 0.1696 | 0.2966 |
| Flat-Open | 0.1581 | 0.2529 | 0.1178 | 0.1831 | 0.1581 | 0.2585 | |
| Hie-Close | 0.1465 | 0.2182 | 0.0745 | 0.1139 | 0.1564 | 0.2353 | |
| Hie-Open | 0.1314 | 0.1980 | 0.0900 | 0.1396 | 0.1324 | 0.2155 | |
| SHIP (Ours) | 0.1313 | 0.1896 | 0.0762 | 0.1129 | 0.1201 | 0.1942 | |
| Dataset | Records | Mid-Tokens | 95%-Tokens | Open-ended Workload |
|---|---|---|---|---|
| WildChat | 838k | 1,061 | 4,463 | {What are the users’ primary task intents and topic domains, what specific constraints or output formatting requirements are requested, and what types of solutions or response strategies do the assistants provide to resolve the requests?} |
| ChatDoctor | 112k | 252 | 531 | {What are the users’ primary symptoms and chief complaints, and for those symptoms, what diagnostic tests or examinations do the doctors suggest, and what are the doctors’ diagnosis conclusions?} |
| CFPB | 10k | 192 | 885 | {What are the primary problems or grievances encountered by the users, and what specific inquiries, requests, or corrective actions do the users seek to resolve the issues?} |
| SynChat | 10k | 217 | 636 | [Same as WildChat] |
| SynChat_topic | 10k | 532 | 879 | {Which topics come up in each conversation session? For sessions covering several topics, what are the most common complete paths from the first topic to the last, and how often does each occur?} |
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
| Category | Query Content |
|---|---|
| Single-Attribute Yes/No | Query: Across all user interactions, do direct information retrieval and text transformation tasks collectively constitute more than 65% of all primary user intents? Answer: Yes. |
| Single-Attribute Comparison | Query: Across user conversation intents, do users more frequently ask the assistant to modify, summarize, or transform existing text, or to generate original creative writing pieces? Answer: Transforming and modifying existing text. |
| Single-Attribute Ask for Number | Query: Within user requests aimed at modifying and transforming existing text, what proportion specifically request content summarization into condensed formats such as bullet point extractions, executive summaries, or single-sentence abstracts? Answer: 0.3994 (39.94%). |
| Multi-Attribute Yes/No | Query: Among user requests focused on software coding tasks (such as code generation, bug fixing, performance optimization, and unit testing), does the computer programming topic domain account for more than 35% of all conversations? Answer: Yes. |
| Multi-Attribute Comparison | Query: When users engage with topics in computer programming, do their requests more frequently involve text transformation tasks (such as summarization, translation, paraphrasing, and proofreading) or creative writing tasks (such as narrative fiction, poetry, scriptwriting, and roleplay)? Answer: Text transformation tasks. |
| Multi-Attribute Ask for Number | Query: In discussions focused on the mathematics domain (covering geometry, calculus, number theory, and probability and statistics), what proportion of assistant responses adopt a clarification-seeking strategy (such as disambiguation, slot filling, preference elicitation, or intent confirmation)? Answer: 0.2003 (20.03%). |
| Raw Dialogue | Algorithm & Categorization |
|---|---|
| user : Can you proofread this calculus passage and fix the punctuation errors, while also organizing your final explanations using a markdown table? Here is the draft: The derivative in differential calculus measures the rate of change. It derives from the Latin word differentia meaning difference. ai : Here is the corrected text with proper punctuation, followed by a breakdown of the etymological origin presented as a markdown table: The derivative, in differential calculus, measures the rate of change. It derives from the Latin word differentia , meaning difference. | Term | Language of Origin | Etymological Meaning | | :— | :— | :— | | Derivative | Latin (derivativus) | To draw off, lead down, or derive from a source | | Differential | Latin (differentia) | A variance, distinction, or difference between quantities | user : That table is very clear, thank you. Could you double-check if any extra punctuation marks are missing around the word differentia? ai : The punctuation is correct as written. To be thorough, the term differential calculus itself originates from the Latin differentia , where the root relates to the infinitesimal differences studied in calculus. | Ground Truth • Intent: text transformation > proofreading > punctuation correction • Topic: mathematics > calculus > differential calculus • Constraint: output_format > tabular_format > markdown_table • Strategy: direct_information > factual_definition > etymological_origin |
| SHIP • Intent: text editing > proofreading & correction > punctuation correction • Topic: stem > mathematics in stem > mathematical calculus • Constraint: formatting and structure > tabular formatting > markdown table • Strategy: direct answer > correction > linguistic correction | |
| Flat-Close • Intent: text processing • Topic: stem • Constraint: formatting and structure • Strategy: structured presentation | |
| Flat-Open • Intent: text editing • Topic: stem • Constraint: formatting • Strategy: step-by-step explanation | |
| Urania • Cluster: Technical Mathematics, Precise Translation, and Backend Development • Keywords: mathematical definition, literal translation, ... • Description: User queries spanning advanced mathematics, precise linguistic translation, and backend development. Users seek rigorous mathematical definitions in differential geometry and calculus, literal translations under length constraints, and ... |
| Query & Ground Truth | SHIP (Ours) | Flat-Close | Flat-Open | Urania |
|---|---|---|---|---|
| Query: Across the entire dataset, when users specify constraints on their requests, do they more frequently demand specific output formatting requirements or enforce explicit length limits? Answer: Output formatting | Formatting rules Score: 5/5 ✓ | Formatting rules Score: 5/5 ✓ | Formatting rules Score: 5/5 ✓ | Formatting rules Score: 5/5 ✓ |
| Query: Within web development conversations in computer programming, what proportion of user requests specify tabular presentation formats in their output constraints? Answer: 16.07% | 15.91% Score: 5/5 ✓ | “I don’t know” Score: 1/5 | “I don’t know” Score: 1/5 | “I don’t know” Score: 1/5 |
| Query: Across user requests with a primary intent of software coding, what proportion specify output format constraints? Answer: 41.77% | 43.15% Score: 5/5 ✓ | 39.80% Score: 5/5 ✓ | 21.40% Score: 2/5 | 62.80% Score: 2/5 |
| Query: Within web development topic discussions under computer programming, what proportion of queries concentrate on frontend component development and UI construction? Answer: 6.73% | “I don’t know” Score: 1/5 | “I don’t know” Score: 1/5 | “I don’t know” Score: 1/5 | “I don’t know” Score: 1/5 |
| Algorithm | WildChat | SynChat | |||||
|---|---|---|---|---|---|---|---|
| Recall | Precision | Recall | Precision | ||||
| 1.0 | Urania | ||||||
| Flat-Close | |||||||
| Flat-Open | |||||||
| SHIP (Ours) | |||||||
| 5.0 | Urania | ||||||
| Generated Report (Compacted) | Extracted Statement Examples |
|---|---|
| SHIP: ## Executive Summary Empirical investigation reveals a structured ecosystem of user inquiries, cognitive intents, domain distributions, and assistant strategies ... ## Macro Domain Breakdown * User Intent: Anchored in Information Seeking ( ), followed by Text Editing ( ), Creative Writing ( ), and Coding ( ) ... ## In-Depth Single- & Multi-Attribute Analysis * Intent-Domain Synergy: STEM-driven information seeking represents the single largest cross-attribute intersection in the dataset ... ## Strategic Takeaways 1. Technical Specialization: STEM ( ) and Information Seeking ( ) mandate rigorous factual verification and step-by-step derivations ... | • Information seeking accounts for roughly 43% of all conversational interactions. • STEM disciplines command roughly 68% of all inquiries. • Within computer science topics, software engineering and database administration dominate the volumetric load. • In mathematics, geometry and calculus inquiries drive detailed analytical requests. • STEM-driven information seeking represents the single largest intersection in the dataset. • Technical coding tasks frequently incorporate rigorous formatting constraints, such as requiring code blocks or diff patches, alongside computational constraints. … (69 total decomposed statements) |
| Flat-Close: ## Executive Summary Investigation into chat conversations reveals dialogues spanning cognitive goals, thematic domains, and operational constraints ... ## Macro Domain Breakdown * User Intent: Information seeking and content generation represent the dominant volume drivers, accounting for nearly half of all prompts ... ## In-Depth Single- & Multi-Attribute Analysis * Cross-Tabulation: Coding prompts within STEM almost universally trigger executable code delivery with step-by-step debugging explanations ... ## Strategic Takeaways 1. Programmable Interfaces: High prevalence of formatting constraints indicates users view chat assistants as programmable tools ... | • Information seeking and content generation represent the most dominant volume drivers, accounting for nearly half of all user prompts. • Technical and professional domains (STEM and productivity) dominate the thematic distribution across topical domains. • Formatting and structure constraints, such as markdown tables and JSON schemas, represent a major constraint category. • When users initiate programming tasks within the STEM domain, assistants almost universally respond with executable code blocks and step-by-step explanations. • Creative or professional writing within business or humanities simultaneously invokes tone/style and length constraints in roughly two-thirds of cases. … (59 total decomposed statements) |
| Generated Report (Compacted) | Extracted Statement Examples |
|---|---|
| Flat-Open: ## Executive Summary Dialogues are anchored in information seeking and creative writing, with STEM serving as the thematic backbone capturing over two-thirds of allocations ... ## Single-Attribute Distribution Breakdown * User Intent: Information Seeking accounts for , followed by Creative Writing ( ), Reasoning ( ), and Code Generation ( ) ... ## Multi-Attribute Relationships & Cross-Tabulations * Intent-Domain Dynamics: Within Code Generation and Debugging, the STEM domain captures over of instances ... ## Strategic Takeaways 1. Ecosystem Specialization: Rigorous technical problem-solving (STEM + Code Generation) coexists with extensive creative workflows ... | • Information seeking represents the single largest intent category, accounting for approximately 30.3% of all interactions. • STEM topics dominate the entire conversation corpus, accounting for approximately 68.8% of all topic assignments. • Formatting constraints govern approximately 43.1% of all interactions where user constraints are specified. • Within code generation and debugging, the STEM domain captures over 85% of instances. • Humanities topics capture roughly 20% to 22% of creative and editing workflows. … (67 total decomposed statements) |
| Urania: ## Executive Summary The dataset demonstrates an orientation toward complex problem-solving where technical computing, formal sciences, and creative tasks intersect ... ## Macro Domain Breakdown * Root Cluster 94 ( ): Software Engineering, Mathematics, Linguistics, and Creative Writing (merges poetry, Python scripts, and transliteration) ... ## Granular Topic & Keyword Analysis * Mathematical Reasoning: Prominence of ‘euclidean geometry‘ ( ) and ‘differential calculus‘ ( ), coupled with ‘markdown table‘ ( ) ... ## Strategic Takeaways 1. Multi-Constraint Integration: Users rarely separate technical computation from presentation formatting; math queries demand code and markdown tables ... | • Software engineering, mathematics, linguistics, and creative writing represent the largest single macro-domain at approximately 29.4% of total volume. • Advanced mathematics, technical computing, and structured formatting account for approximately 26.5% of all interactions. • Mathematical inquiries in Root Cluster 1 focus on Euclidean and analytic geometry, differential calculus, and the Riemann zeta function. • Enterprise data architecture topics in Root Cluster 63 include PostgreSQL database migration, schema design, and query optimization. • Key thematic drivers in technical workflow clusters include version control, git reset, backend API development, and web state management. … (47 total decomposed statements) |
| Raw Dialogue (Compressed) | Algorithm & Categorization |
|---|---|
| user: I am looking at an H-NMR spectrum for an unknown organic compound with the molecular formula C4H8O2. There is a triplet at 1.2 ppm, a quartet at 4.1 ppm, a singlet at 2.0 ppm … Can you help me piece this together? … user: On a completely different matter, we are heading into trial preparations for a breach of contract case, and opposing counsel just served a massive batch of unorganized emails. What is the best way to handle this electronic discovery dump? … user: This legal wrangling is tedious … Let’s talk about something entirely different. What are the key turning points in the early political career of Alexander Hamilton? | Ground Truth • Topic path (level-1 categories only): chemistry litigation history SHIP • Topic path (level-1 categories only): chemistry law history |
| user: I have a monolithic function in my Python backend …How should I break this down to follow the single responsibility principle? … user: While sorting out those backend services, I also need to record our petty cash expenditures and reconcile the February bank statement. … user: Speaking of discrepancies, my Diels-Alder reaction keeps yielding the wrong stereoisomer. How can I control endo and exo selectivity? … user: That chemistry problem is getting too complicated. Instead, I need to draft a request to the judge to throw out the plaintiff’s complaint. … user: This legal drafting is overwhelming …drop this entire line of questioning. How do modern historians analyze the biases in 19th-century colonial archives? | Ground Truth • Topic path (level-1 categories only): programming finance chemistry litigation history SHIP • Topic path (level-1 categories only): programming |
| Level | Open-Set | Close-Set | Other & None | |
|---|---|---|---|---|
| L0 | 13.5 (83.9%) | 4.5 (2.5%) | 1.8 (13.7%) | |
| L1 | 35.8 (80.2%) | 43.0 (8.3%) | 23.0 (11.5%) | |
| L2 | 29.8 (46.7%) | 152.0 (37.6%) | 74.0 (15.7%) | |
| L0 | 16.3 (86.5%) | 4.3 (1.0%) | 1.8 (12.5%) | |
| L1 | 52.8 (89.3%) | 37.3 (5.8%) | 24.8 (5.0%) | |
| L2 | 55.0 (55.5%) | 137.5 (32.1%) | 93.0 (12.3%) |
| Comparison | WildChat | SynChat | CFPB | ChatDoctor | |||||
|---|---|---|---|---|---|---|---|---|---|
| Score | Score | Score | Score | ||||||
| 1.0 | SHIP vs. Urania | ||||||||
| SHIP vs. Flat-Close | |||||||||
| SHIP vs. Flat-Open | |||||||||
| 5.0 | SHIP vs. Urania | ||||||||
| SHIP vs. Flat-Close | |||||||||
| Gemini | Sonnet | |||
|---|---|---|---|---|
| Avg Score | Acc (%) | Avg Score | Acc (%) | |
| 1.0 | 3.97 | 71.3 | 4.00 | 71.0 |
| 5.0 | 4.04 | 72.0 | 3.99 | 71.7 |
| 10.0 | 3.82 | 67.0 | 3.81 | 68.0 |
| Query: Among user conversation constraints specifying output formatting, do list format requests (such as bulleted lists, numbered lists, checklists, and description lists) exceed 45% of all output formatting constraints? | |
|---|---|
| Code | STDOUT |
| Step 1: Identify the reference population and inspect its categories. | |
| formatting_rows = df[ df[’user_constraints (level 1)’] == ’formatting’ ] print(f"Total formatting constraint rows: {len(formatting_rows)}") print( formatting_rows[’user_constraints (level 2)’] .value_counts(dropna=False) ) print( formatting_rows[’user_constraints (level 3)’] .value_counts(dropna=False) ) | Total formatting constraint rows: 4677 user_constraints (level 2) bullet points: 241 numbered list formatting: 107 checklist formatting: 100 [other categories omitted] user_constraints (level 3) bulleted list: 349 numbered list structured output: 247 general bullet points: 178 checklist structured output: 100 markdown checklist: 91 numbering style constraint: 73 [other categories omitted] |
| Step 2: Combine matching categories across levels and calculate the proportion. | |
| df_formatting = formatting_rows list_formatting_count = len(df_formatting[ df_formatting[’user_constraints (level 2)’].isin([ ’bullet points’, ’numbered list formatting’, ’checklist formatting’ ]) | df_formatting[’user_constraints (level 3)’] .str.contains( ’bullet|list|checklist|numbered’, case=False, na=False ) ]) print( f"List formatting constraints count: " f"{list_formatting_count} / " f"{len(formatting_rows)} = " f"{list_formatting_count/len(formatting_rows)*100:.2f}%" ) | List formatting constraints count: 1144 / 4677 = 24.46% |
| Final answer: No. List format requests account for 1,144 out of 4,677 output formatting constraint rows in the released DP synthetic table (24.46%), which does not exceed 45%. | |