Skip to content

Commit

Permalink
GenAiLab Updated Instructions (#1651)
Browse files Browse the repository at this point in the history
* GenAiLab Updated Instructions

Combined instructions from across multiple releases and ensured the most accurate information was available, removed information that was no longer relevant, and ensured the major feature releases found in releases 6.5.0-6.8.0 have been been distributed throughout the help document.

* updates of the Gen AI Lab documentation

---------

Co-authored-by: diatrambitas <JSL.Git2018>
  • Loading branch information
mildly-rosie authored Dec 4, 2024
1 parent a270f1b commit 5bbed56
Show file tree
Hide file tree
Showing 5 changed files with 173 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ Users can confidently upload and import files, knowing that the system will enfo


### There should be a way to "batch" clear predicted labels in a Section after pre-annotation
Version 6.2 of Generative AI Lab introduces a significant enhancement improving the application's security and robustness by restricting the types of files that can be uploaded or imported. This change ensures that only supported and safe file types are processed, providing a more secure and efficient user experience, maintaining the platform's integrity and reliability while enhancing its security.
Version 6.2 of Generative AI Lab introduces a tool to allow annotators to remove large sections of pre-annotated labels in bulk instead of removing them individually.

**Key Features of This Improvement:**

Expand Down
123 changes: 49 additions & 74 deletions docs/en/alab/de_identify.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ seotitle: Generative AI Lab | John Snow Labs
title: De-Identification
permalink: /docs/en/alab/de_identify
key: docs-training
modify_date: "2024-08-26"
modify_date: "2024-12-03"
use_language_switcher: "Python-Scala"
show_nav: true
sidebar:
Expand All @@ -15,19 +15,12 @@ sidebar:

<div class="h3-box" markdown="1">

## Introducing Support for De-Identification in Generative AI Lab 6.4
We are happy to announce the release of Generative AI Lab 6.4, bringing exciting new features and enhancements. Leading this release is the support for de-identification projects, which enables users to anonymize documents containing sensitive data, such as PII (Personally Identifiable Information) and PHI (Protected Health Information). This ensures robust data privacy and compliance with privacy regulations while maintaining the utility of the data for further analysis and processing.

Additionally, version 6.4 enhances collaboration and quality control in the annotation process by allowing annotators to view completions submitted by reviewers. Annotators can now view and clone reviewed submissions, make corrections, or add comments directly on the annotated chunks, providing clear communication and improving overall annotation quality. The new release also simplifies the identification of differences between two completions by automatically highlighting discrepancies, streamlining the validation process.

Alongside these major updates, this release includes numerous improvements and bug fixes, making Generative AI Lab more efficient and user-friendly than ever.

</div><div class="h3-box" markdown="1">

## Support for De-identification
Version 6.4 of the Generative AI Lab introduces a new de-identification feature, enabling users to anonymize documents containing sensitive information such as PII (Personally Identifiable Information) and PHI (Protected Health Information). This functionality is intended to protect data privacy and ensure compliance with privacy regulations while preserving the data’s usefulness for subsequent analysis and processing.
Version 6.4 of Generative AI Lab introduces a new de-identification feature, enabling users to anonymize documents containing sensitive information such as PII (Personally Identifiable Information) and PHI (Protected Health Information). This functionality is intended to protect data privacy and ensure compliance with privacy regulations while preserving the data’s usefulness for subsequent analysis and processing.

Version 6.7 of Generative AI Lab improves on the original feature to allow for custom methods of de-identification for each entity label and support for the newest John Snow Labs De-identification Pipeline.

**De-identification Projects:** When creating a new project in the Generative AI Lab, users can mark it as De-Identification specific. These projects allow the use of manually trained or pre-trained text-based NER models, together with prompts, rules, and custom labels created by the user for identifying sensitive data inside of tasks. Once the sensitive data is identified (either automatically or manually) and validated by human users, it can be exported for further processing.
**De-identification Projects** When creating a new project in the Generative AI Lab, users can mark it as De-Identification specific. These projects allow the use of manually trained or pre-trained text-based NER models, together with prompts, rules, and custom labels created by the user for identifying sensitive data inside of tasks. Once the sensitive data is identified (either automatically or manually) and validated by human users, it can be exported for further processing.
When creating De-identification projects make sure you only target sensitive entities as part of your project configuration and avoid annotating relevant data you need for downstream processing as all those entities will be removed when exporting the project tasks as de-identified documents. The best practice, in this case, is to re-use de-identification specific models combined with custom prompts/rules.

**Exporting De-identified Documents:** The tasks of your project with PII/PHI labeled entities can be exported as de-identified documents. During the export process, labeled entities will be replaced by the label names, or special characters (such as "*"), or obfuscated and replaced with fake data. This ensures that sensitive information is removed and not available for downstream analysis.
Expand All @@ -47,110 +40,92 @@ Generative AI Lab supports four kinds of de-identification:

### Working with de-identification projects

**Step 1.** When creating a new project, after defining the project name and general settings, check the de-identification option at the bottom of the Project setup page, and select the type of anonymization you prefer.
To create a De-identification project, in the first step ot he Project Configuration wizzard, select the `De-identification` template available under the `TEXT` tab.

![GenaiImage](/assets/images/annotation_lab/6.4.0/1.png)
</div><div class="h3-box" markdown="1">

**Step 2.** Configure your project to reuse sensitive labels from existing NER Models, Rules, Prompts. It is also possible to create custom labels that can be used to manually annotate the entities you want to anonymize in your documents.
### Creating a De-identification Project
Users can use the de-identification feature if a valid license is available in the application:
1. **Create a New Project**:
During the project configuration, select **De-identification** as the project type.
2. **Automatic Pipeline Download**:
A default de-identification pipeline (`clinical_deidentification`) will automatically download if not previously available or it will use the default de-identification project template. All the downloaded pipelines are available on the **Pipeline** page.

![670image](/assets/images/annotation_lab/6.7.0/1.png)

When selecting pre-annotation resources for your project, ensure that no critical downstream data is inadvertently identified and removed. For instance, if you pre-annotate documents with models, rules, or prompts that identify diseases, those labels will be anonymized upon export, rendering them unavailable to document consumers.
</div><div class="h3-box" markdown="1">

To mitigate this, employ pre-trained or custom de-identification models and augment them with rules and prompts tailored to your specific use cases (e.g., unique identifiers present in your documents). You can also selectively include specific labels from each model in your project configuration. For example, if age information is essential for your consumers, you can exclude this label from the project configuration to retain the data in your document.
### New Pipeline Tab and Customization
In the **Reuse Resource** page, a new **Pipelines Tab** is now available for de-identification projects. Here, all the downloaded de-identification pipelines are listed. Users can also use and apply pre-trained and trained models, rules, and zero-shot prompts.

![GenaiImage](/assets/images/annotation_lab/6.4.0/2.png)

**Step 3.** Pre-annotate your documents, then have your team review them for any overlooked sensitive data. Once your project is set up and tasks are imported, use the pre-annotation feature to automatically identify sensitive information.
Incorporate a review process where your team checks the pre-annotations using the standard annotation workflow, making manual corrections or annotations to any sensitive segments as necessary. Ensure that all sensitive information is accurately labeled for effective de-identification.
![670image](/assets/images/annotation_lab/6.7.0/2.png)

![GenaiImage](/assets/images/annotation_lab/6.4.0/3.png)

**Step 4.** Export De-identified Documents. After completing the labeling process, proceed to export the de-identified documents. Ensure the "Export with De-identification" option is selected on the export page to generate de-identified documents.
In the **Customize Labels** page, users can first select the overall de-identification strategies to use. Furthermore, it is also possible to specify parand use entity level configurations.

During the export process, de-identification is executed based on the type of anonymization selected during project setup. This de-identification option can be updated at any time if necessary.
![670image](/assets/images/annotation_lab/6.7.0/3.png)

![GenaiImage](/assets/images/annotation_lab/6.4.0/4.png)
Users can also upload custom obfuscation configurations in JSON format via the Customize Labels page, enabling the seamless reuse of obfuscation rules across multiple projects.

**Step 5.** Import the de-identified tasks in a new project for further processing. These tasks, once exported, can be re-imported into any text-based project in case you need to extract additional data or in case you want to use them for model training/tuning.
![670image](/assets/images/annotation_lab/6.7.0/4.gif)

![GenaiImage](/assets/images/annotation_lab/6.4.0/5.png)
</div><div class="h3-box" markdown="1">

> **_HOW TO:_** De-identification projects can be easily identified without opening them. A small de-identification icon is displayed in the bottom left corner of the project card, clearly indicating the project's status.
### De-identification Process

The de-identification process is similar to the existing pre-annotation workflow:

> **_LIMITATION:_** Projects must be designated as de-identification projects during their initial creation. It is not possible to convert existing projects or newly created non-de-identification projects into de-identification projects.
1. **Import Tasks**

</div><div class="h3-box" markdown="1">

### Export of De-identified tasks
**Completion Submission:** Pre-annotations alone are not sufficient for exporting de-identified data. Only starred completions are considered during the export of de-identified tasks. This means that each task intended for de-identified export must be validated by a human user, with at least one completion marked with a star by an annotator, reviewer, or manager.
Initially, tasks are imported, and the `NonDeidentified` tag is automatically added to the tasks. It helps users know which tasks have been deidentified and which are yet to be de-identified.

**Multiple Submissions:** In instances where multiple submissions exist from various annotators, the de-identification process will prioritize the starred completion from the highest priority user as specified on the Teams page. This ensures that de-identification is based on the most relevant and prioritized annotations.
![670image](/assets/images/annotation_lab/6.7.0/5.gif)

This new de-identification feature significantly enhances data privacy by anonymizing sensitive document information. We are confident that this feature will empower users to handle sensitive data responsibly while maintaining the integrity and usability of their datasets.
2. **Pre-annotate/De-identify**

</div><div class="h3-box" markdown="1">

## Support for De-identification Pipelines
Version 6.7.0 updates the existing de-identification feature, which has been significantly expanded to give more control over how de-identification is applied, how different entities are treated, and how to integrate pre-trained de-identification pipelines, models, rules, and zero-shot prompts to help identify and anonymize sensitive data.
Click the **De-identification (pre-annotate)** button to deploy the de-identification pipeline and pre-annotate your tasks. During the pre-annotation stage, there is a status indicator (the colored circle) next to each task that changes to either green, red, or grey, just like the pre-annotation status.

De-identification has now moved from the Project Details page to the Content Type page during Project Configuration, where it is a separate project type.
![670image](/assets/images/annotation_lab/6.7.0/6.gif)

</div><div class="h3-box" markdown="1">
3. **Labeling Page**

### Creating a De-identification Project:
Users can use the de-identification feature if a valid license is available in the application:
1. **Create a New Project**:
During the project configuration, select **De-identification** as the project type.
2. **Automatic Pipeline Download**:
A default de-identification pipeline (`clinical_deidentification`) will automatically download if not previously available or it will use the default de-identification project template. All the downloaded pipelines are available on the **Pipeline** page.

![670image](/assets/images/annotation_lab/6.7.0/1.png)

### New Pipeline Tab and Customization:
In the **Reuse Resource** page, a new **Pipelines Tab** is now available for de-identification projects. Here, all the downloaded de-identification pipelines are listed. Users can also use and apply pre-trained and trained models, rules, and zero-shot prompts.
On the labeling page, users can either make corrections or accept the predictions made by the pipeline.

![670image](/assets/images/annotation_lab/6.7.0/2.png)
![670image](/assets/images/annotation_lab/6.7.0/7.gif)

In the **Customize Labels** page, users can configure the type of de-identification. Apart from all the deidentification types that are already supported, in version 6.7.0, users can even configure **different de-identification types for different labels** as well.
4. **Re-run De-identification**

![670image](/assets/images/annotation_lab/6.7.0/3.png)

Additionally, users can upload custom obfuscation files in JSON format on the Customize Labels page.
After saving and submitting the tasks, users can click the de-identify button again to run the de-identification process. This will change the content of your tasks by applying the specified de-identification configurations on all automatic and manual annotations. You can then view the de-identification results on the labeling page. Users can click the **De-identification View** button (located next to the Compare Completion button), to view the de-identified tasks in comparison with the original version. All de-identified completions will show **(De-identified)** next to the completion ID.

![670image](/assets/images/annotation_lab/6.7.0/4.gif)
![670image](/assets/images/annotation_lab/6.7.0/8.gif)

</div><div class="h3-box" markdown="1">
</div>

### De-identification Process:
The de-identification process remains similar to the existing pre-annotation workflow:
### Exporting De-identified Tasks

1. **Import Tasks**:
Initially, tasks are imported, and the `NonDeidentified` tag is automatically added to the tasks. It helps users to know which tasks have been deidentified and which are yet to be de-identified.

![670image](/assets/images/annotation_lab/6.7.0/5.gif)
Only de-identified completions submitted as **ground truth** are exported. Also, if a task has multiple ground truths from different users, the completion from the user with the **highest priority** will be exported.

3. **Pre-annotate/De-identify**:
Click the **De-identification (pre-annotate)** button to deploy the de-identification pipeline and pre-annotate and de-identify tasks. Once the task is pre-annotated and de-identified, the de-identification status changes to either green, red, or grey, just like pre-annotation status.
![670image](/assets/images/annotation_lab/6.7.0/9.gif)

![670image](/assets/images/annotation_lab/6.7.0/6.gif)
These updates are built on top of the current structure, ensuring ease of use and a smooth transition without disrupting productivity.

5. **Labeling Page**:
On the labeling page, users can either make corrections or accept the predictions made by the pipeline.
> **_HOW TO:_** De-identification projects can be easily identified without opening them. A small de-identification icon is displayed in the bottom left corner of the project card, clearly indicating the project's status.
![670image](/assets/images/annotation_lab/6.7.0/7.gif)

7. **Re-run De-identification**:
After saving or submitting the tasks, users can click the de-identify button again to run the process on either manually annotated completions or all completions and can view the de-identification in real-time from the labeling page. Users can click the **De-identification View** button (located next to the Compare Completion button), to view the de-identified tasks in real-time. All de-identified completions will show **(De-identified)** next to the completion ID.
> **_LIMITATION:_** Projects must be designated as de-identification projects during their initial creation. It is not possible to convert existing projects or newly created non-de-identification projects into de-identification projects.
![670image](/assets/images/annotation_lab/6.7.0/8.gif)

</div><div class="h3-box" markdown="1">
### Export of De-identified tasks

### Exporting De-identified Tasks:
Only de-identified completions submitted as **ground truth** are exported. Also, if a task has multiple ground truths from different users, the completion from the user with the **highest priority** will be exported.

![670image](/assets/images/annotation_lab/6.7.0/9.gif)
**Submitted Completions:** Pre-annotations alone are not sufficient for exporting de-identified data. Only starred completions are considered during the export of de-identified tasks. This means that each task intended for de-identified export must be validated by a human user, with at least one completion marked with a star by an annotator, reviewer, or manager.

These updates are built on top of the current structure, ensuring ease of use and a smooth transition without disrupting productivity.
**Multiple Completions:** In cases where multiple submissions exist from various annotators, the de-identification process will prioritize the starred completion from the highest priority user as specified on the Teams page. This ensures that de-identification is based on the most relevant and prioritized annotations.

</div>
This new de-identification feature significantly enhances data privacy by anonymizing sensitive document information. We are confident that this feature will empower users to handle sensitive data responsibly while maintaining the integrity and usability of their datasets.
Loading

0 comments on commit 5bbed56

Please sign in to comment.