HyperAIHyperAI

Command Palette

Search for a command to run...

GOLDCOIN : Ancrer les grands modèles de langage dans les lois sur la vie privée via la théorie de l'intégrité contextuelle

Wei Fan Haoran Li Zheye Deng Weiqi Wang Yangqiu Song

Résumé

Les problèmes de vie privée surgissent de manière prééminente lors de la transmission inappropriée d'informations entre entités. Les travaux existants étudient principalement la vie privée en explorant diverses attaques, défenses et évaluations dans des schémas prédéfinis restreints, en négligeant le fait que la vie privée n'est pas un concept isolé et décontextualisé, limité aux données traditionnellement sensibles (par exemple, les numéros de sécurité sociale), mais qu'elle est imbriquée dans des contextes sociaux complexes qui compliquent l'identification et l'analyse des violations potentielles. L'avènement des grands modèles de langage (LLM) offre des opportunités sans précédent pour intégrer les scénarios nuancés énoncés dans les lois sur la vie privée afin de traiter ces problématiques complexes. Toutefois, la rareté des études de cas ouvertes pertinentes limite l'efficacité des LLM à s'aligner sur des textes juridiques spécifiques. Pour relever ce défi, nous proposons un nouveau cadre, GOLDCOIN, conçu pour ancrer efficacement les LLM dans les lois sur la vie privée en vue d'une évaluation judiciaire des violations. Notre cadre s'appuie sur la théorie de l'intégrité contextuelle comme pont, en créant de nombreux scénarios synthétiques ancrés dans les textes juridiques pertinents en matière de vie privée (par exemple, HIPAA), afin d'aider les LLM à comprendre les contextes complexes nécessaires à l'identification des risques pour la vie privée dans le monde réel. De nombreux résultats expérimentaux démontrent que GOLDCOIN améliore considérablement la capacité des LLM à reconnaître les risques pour la vie privée dans de véritables cas judiciaires, dépassant les références sur différentes tâches judiciaires.

One-sentence Summary

HKUST proposes GOLDCOIN, a framework that grounds LLMs in privacy laws by leveraging contextual integrity theory to synthesize scenarios aligned with statutes such as HIPAA, enabling judicial assessment of privacy violations in real court cases beyond narrowly predefined privacy patterns.

Key Contributions

  • The paper introduces GOLDCOIN, a framework that grounds large language models in privacy laws by translating legal statutes such as the HIPAA Privacy Rule into contextual-integrity norms that model senders, recipients, subjects, information types, and transmission principles.

  • The paper constructs a synthetic-case generation and evaluation pipeline for HIPAA, producing the GOLDCOIN-HIPAA dataset and a benchmark sourced from real U.S. court cases in the Caselaw Access Project, with automatic filtering and diversity ranking used to improve generated case quality.

  • Experiments with instruction-tuned transformer-based LLMs show that GOLDCOIN improves HIPAA applicability assessment by 8% to 23% and privacy-risk detection by 8% to 18% over baselines on real court cases, while ablation studies and human analysis support the contribution of contextual integrity and data-quality components.

Introduction

Automated privacy compliance matters because violations often arise from improper information transmission across regulated contexts such as healthcare, education, and employment, and laws like HIPAA, COPPA, and GDPR set norms for when such flows are allowed. Prior approaches often relied on predefined patterns, manual rules, or formalized legal logic, which are narrow and expert dependent, while legal LLMs trained on statutes or scarce open court cases generalize poorly and yield unstable improvements on privacy tasks. The authors leverage contextual integrity to abstract privacy clauses into structured norms involving sender, recipient, information subject, information type, and transmission principles. Their GOLDCOIN framework uses GPT-4, automatic filtering, and diversity ranking to generate synthetic court-case-like backgrounds from seed privacy-law norms, and instruction-tuned LLMs improve HIPAA applicability judgment by 8% to 23% and privacy risk detection by 8% to 18% over baselines.

Dataset

  • The authors use GOLDCOIN-HIPAA, a legal grounding dataset built from two sources: the HIPAA Privacy Rule statute text and real privacy-related court cases from the Caselaw Access Project.

  • For the statute source, the authors download the HIPAA Privacy Rule from the official Code of Federal Regulations website and convert it into a structured graph. Nodes represent regulation sections, with each node containing a labeled section identifier and paragraph content. Edges capture two relation types: subsume, for hierarchical section relationships, and refer, for cross-references between sections.

  • The authors derive legal norms by aggregating content along each root-to-leaf path in the graph. Each norm is labeled as permit, forbid, or other. Only permit and forbid norms are retained for case generation. The resulting seed set contains 269 permit norms and 40 forbid norms.

  • For the synthetic case subset, the authors use GPT-4 to generate multiple cases from each filtered norm. Each case is parsed into a fixed schema with five components: a background description, contextual features, the related norm, an applicability conclusion, and a compliance conclusion.

  • The contextual features include key privacy transmission elements such as sender, sender role, recipient, recipient role, subject, subject role, and information type. This structured metadata is used to keep each generated case aligned with the HIPAA privacy context.

  • The authors apply three postprocessing steps to the synthetic cases. First, they remove cases that omit vital contextual features. Second, they remove cases whose parsed norm, applicability conclusion, or compliance conclusion conflicts with the seed norm. Third, they use ROUGE-L based diversity ranking to select one case for each norm. After filtering, the synthetic subset contains 309 cases.

  • For real court cases, the authors collect privacy-related cases from the Caselaw Access Project, a corpus developed by Harvard Law School. They convert these real cases into the same schema as the synthetic cases using GPT-4 and manual annotation.

  • The real-case subset is divided by label. The authors collect 309 HIPAA-irrelevant privacy violation cases for training the applicability task as negative examples. For evaluation, they identify 107 HIPAA-relevant court cases as ground truth for compliance evaluation, and they sample an equal number of HIPAA-irrelevant cases to form the applicability test set together with those 107 relevant cases.

  • The authors combine the synthetic norm-grounded cases and the real court case pool into the final GOLDCOIN-HIPAA dataset. The cases are used for applicability and compliance tasks, where the model or system determines whether a case applies to the HIPAA Privacy Rule and whether the relevant norm permits or forbids the described privacy transmission.

  • The paper does not report an explicit mixture ratio between synthetic and real cases, and no cropping strategy is described. Dataset construction relies mainly on graph-based norm extraction, GPT-4 generation, schema parsing, consistency filtering, contextual feature filtering, and diversity-based selection.

Method

GOLD-COIN is a law-grounded pipeline for generating privacy judgment data and instruction tuning language models on legal applicability and compliance tasks. The method targets two decisions: applicability, which asks whether a privacy law L\mathcal{L}L applies to a case background sss, and compliance, which asks whether the information transmission described in sss satisfies L\mathcal{L}L. The framework combines statutory preprocessing, law-grounded case generation, quality filtering, real case alignment, and stepwise instruction construction. As shown in the figure below:

The first module preprocesses the legal statute before any case synthesis. The authors apply the method to the HIPAA Privacy Rule and convert the legal text into a structured graph G\mathcal{G}G. Nodes correspond to statutory sections, and edges encode two kinds of relations. The subsume relation captures hierarchical containment, while the refer relation captures cross references between sections. Each node contains a labeled identifier and the corresponding paragraph content. Starting from a leaf node vilv_i^lvil​, the system recursively follows parent nodes until the root, aggregating all content along that path. Such a leaf-to-root path is treated as a norm, which is then used as a legal seed for case generation.

The norm construction process is shown in the figure below:

After norms are extracted, the pipeline classifies and filters them. The authors use GPT-4 to label leaf norms and retain those that express permission or prohibition under the law. Norms that define general terms, exceptions, or requirements are excluded from generation because they do not directly specify whether a transmission is allowed or forbidden. The resulting norm set N={n1,n2,…,nm}\mathcal{N}=\{n_1,n_2,\dots,n_m\}N={n1​,n2​,…,nm​} becomes the source material for synthetic case creation. Each case ki∈Kk_i\in\mathcal{K}ki​∈K is anchored to one selected norm nin_ini​, which makes the downstream legal grounding explicit.

Case generation is guided by contextual integrity theory, which models privacy violations through structured transmission features. Given a seed norm and its associated conclusion type, the authors compile instructions that instruct GPT-4 to produce a case background consistent with the legal rule. The prompt asks the model to preserve the transmission context, including entities, roles, information type, and transmission principles. Multiple responses are sampled for each norm, and the outputs are parsed into a fixed schema. The parsed components include the background description sis_isi​, contextual features {(Pi,Ri),Ti,Ωi}\{(\mathcal{P}_i,\mathcal{R}_i),\mathcal{T}_i,\Omega_i\}{(Pi​,Ri​),Ti​,Ωi​}, the related legal norm nin_ini​, the applicability conclusion ciapplc_i^{appl}ciappl​, and the compliance conclusion cicompc_i^{comp}cicomp​.

The postprocessing module improves consistency, completeness, and diversity. First, a contextual feature integrity filter removes cases that omit required transmission elements such as sender, sender role, recipient, recipient role, subject, subject role, or information type. This ensures that each background contains enough structure for contextual integrity reasoning. Second, a consistency filter checks whether the generated case aligns with its seed norm and expected conclusion. The authors define

fnorm(n,n^)=1(n=n^),f_{\mathrm{norm}}(n,\hat{n})=\mathbb{1}(n=\hat{n}),fnorm​(n,n^)=1(n=n^),

where nnn is the seed norm and n^\hat{n}n^ is the norm identified in the generated case. They also require the applicability and compliance conclusions to match the intended legal category:

fconc(cappl)=1(cappl=applicable),fconc(n+/−,ccomp)=1(n+/−=ccomp).f_{\mathrm{conc}}(c^{appl})=\mathbb{1}(c^{appl}=\mathrm{applicable}),\qquad f_{\mathrm{conc}}(n^{+/-},c^{comp})=\mathbb{1}(n^{+/-}=c^{comp}).fconc​(cappl)=1(cappl=applicable),fconc​(n+/−,ccomp)=1(n+/−=ccomp).

Cases that fail these checks are discarded. Third, a diversity ranking step uses pairwise ROUGE-L similarity to reduce redundant backgrounds and preserve semantic variation across generated cases.

For validation and grounding, the authors also retrieve real court cases involving the HIPAA Privacy Rule and transform them into the same structured format used for synthetic cases. These cases are processed with model-assisted extraction and manual annotation. In addition, they collect privacy-related cases that do not fall under HIPAA, providing negative examples for the applicability task and discouraging overgeneralization of HIPAA judgments.

The final training stage compiles instruction-response pairs from the filtered case pool. The instructions are designed as multi-step chain-of-thought prompts. For applicability, the target response first extracts context-specific features and then decides whether HIPAA applies. For compliance, the response extracts the relevant transmission features, retrieves the related legal norm, and determines whether that norm permits or forbids the transmission. These structured instruction datasets are used to instruction tune LLMs, enabling them to perform the two privacy judgment tasks through explicit legal reasoning steps.

Experiment

Experiments evaluate GOLDCOIN for grounding LLMs in HIPAA judgments using synthetic cases and real court cases, comparing instruction-tuned open-source models with baselines and GPT-series models on applicability and compliance tasks. The results show that synthetic, law-grounded case tuning and multi-step reasoning improve LLMs’ ability to determine HIPAA relevance and legal outcomes, while simpler baselines offer limited or unstable gains. Ablation studies further confirm that contextual feature filtering, consistency checks, diversity ranking, and contextual integrity features are important for high-quality judgments.

Expert human review indicates that the synthetic cases are highly consistent with HIPAA and closely aligned with their seed norms. The evaluation also shows that compliance labels and field validity are nearly always correct. All cases were judged to fall under HIPAA. Cases are almost always strongly related to their seed norms. Compliance judgments and field validity receive near full agreement.

GOLDCOIN generally improves reported accuracy and Macro F1 for HIPAA applicability tasks across four open-source LLMs relative to zero-shot, law recitation, and direct prompting. For compliance tasks, it also produces notable Macro F1 gains, although the benefits vary by model and are less uniform than in applicability. The results support grounding model alignment in law-aligned synthetic cases rather than relying on abstract legal text or prompt-only instructions. GOLDCOIN gives the strongest reported applicability performance among the compared methods, especially for Mistral-7B and Llama2-13B. MPT-7B shows clear Macro F1 gains when using GOLDCOIN despite its weaker baseline behavior. Direct prompting can improve some applicability scores but is less reliable for compliance judgments. Detailed instructions alone do not consistently stabilize performance without case-grounded alignment.

The ablation results show that contextual feature filtering, consistency checks, and diversity ranking help preserve Macro F1 performance for privacy-law judgments. Removing these components lowers scores on both applicability and compliance, with the largest declines appearing when all safeguards are disabled. Conclusion filtering and diversity ranking are especially important for stable applicability judgments, while norm consistency supports reliable compliance judgments. Cases missing key contextual features produce weaker applicability and compliance performance. Incorrect conclusions and reduced case diversity lead to more noticeable performance drops, particularly in applicability judgments.

Omitting contextual feature extraction reduces norm retrieval accuracy for all listed open-source LLMs and also lowers conclusion Macro F1 scores. Llama2-13B shows the strongest norm retrieval with contextual features and a noticeable decline in conclusion performance when those features are removed. The results indicate that contextual features help models connect case details to relevant privacy norms and make better compliance judgments. Contextual feature extraction improves norm retrieval accuracy across MPT-7B, Llama2-7B, Mistral-7B, and Llama2-13B. Removing contextual features also reduces conclusion Macro F1 scores for all models. Llama2-13B has the best norm retrieval with contextual features and experiences a clear conclusion performance drop without them.

Expert review validates that the generated HIPAA cases are closely aligned with seed norms, with compliance labels and field validity judged as correct in nearly all instances. Across open-source LLMs, grounding alignment with law-related synthetic cases via GOLDCOIN improves HIPAA applicability and compliance judgments over prompting-only approaches, especially for applicability tasks. Ablations further show that contextual features, consistency filtering, and diversity preservation are important for stable performance, as removing them reduces norm retrieval and judgment quality.


Créer de l'IA avec l'IA

De l'idée au lancement — accélérez votre développement IA avec le co-codage IA gratuit, un environnement prêt à l'emploi et le meilleur prix pour les GPU.

Codage assisté par IA
GPU prêts à l’emploi
Tarifs les plus avantageux

HyperAI Newsletters

Abonnez-vous à nos dernières mises à jour
Nous vous enverrons les dernières mises à jour de la semaine dans votre boîte de réception à neuf heures chaque lundi matin
Propulsé par MailChimp