File size: 1,070 Bytes
133854a
 
 
7d0d228
 
133854a
 
 
 
fb14d7b
133854a
0763cf4
 
7d0d228
0763cf4
133854a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0763cf4
133854a
bae1c3e
133854a
29f7013
 
 
133854a
 
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
38
39
40
---
pipeline_tag: sentence-similarity
tags:
- cybersecurity 
- sentence-embedding
- sentence-similarity

---

# ATT&CK BERT: a Cybersecurity Language Model

ATT&CK BERT is a cybersecurity domain-specific language model based on [sentence-transformers](https://www.SBERT.net).
ATT&CK BERT maps sentences representing attack actions to a semantically meaningful embedding vector. 
Embedding vectors of sentences with similar meanings have a high cosine similarity.


<!--- Describe your model here -->

## Usage (Sentence-Transformers)

Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:

```
pip install -U sentence-transformers
```

Then you can use the model like this:

```python
from sentence_transformers import SentenceTransformer
sentences = ["Attacker takes a screenshot", "Attacker captures the screen"]

model = SentenceTransformer('basel/ATTACK-BERT')
embeddings = model.encode(sentences)

from sklearn.metrics.pairwise import cosine_similarity
print(cosine_similarity([embeddings[0]], [embeddings[1]]))
```