File size: 1,730 Bytes
9070e2e
 
 
 
 
 
6140d4a
d63bc19
 
 
 
e60a761
 
 
 
 
 
 
 
 
 
 
 
 
 
ca8acdc
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
language:
- en
pipeline_tag: token-classification
tags:
- legal
license: mit
---

# Knowledge Graph Extraction for Cyber incidents
This model has been finetuned with SecureBERT (https://arxiv.org/abs/2204.02685)
on the CASIE dataset (https://ieeexplore.ieee.org/document/9776031). We have implemented the approach described in the CASIE paper.

# Model Description
The following description is taken from the CASIE paper:

- An **event nugget** is a word or phrase that most clearly expresses the event occurrence. These differ from event triggers in that they can be multi-word phrases.

- An **event argument** is an event participant or property value. They can be taggable entities involved in the event, such as person or organization, or attributes that specify important information, such as time or amount.

- A **role** is a semantic relation between an event nugget and an argument. Each event type specifies the roles it can have and constraints on the arguments that can fill them.

- A **realis** value specifies whether or not an event occurred and can be one of the three values: Actual (event actually happened), Other (failed event, future event), or Generic (an undetermined/non-specific event, such as referring to the concept of phishing attacks).

# Example
![Graph](Graph.png)

# Usage
```
from transformers import AutoModelForTokenClassification
model = AutoModelForTokenClassification.from_pretrained("CyberPeace-Institute/Cybersecurity-Knowledge-Graph", trust_remote_code=True)

input_text = "This is a Cybersecurity-related text."

output = model(input_text)
```
IMPORTANT! : To get the Argument to Role coreferences, use the dedicated **space**! You can download the models under "arg_role_models/".