Text2TTP
Collection
A Series of Models used for the paper entitled: "Semantic Ranking for Automated Adversarial Technique Annotation in Security Text" โข 4 items โข Updated
Run QCRI/SentSecBert_10k on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/QCRI/SentSecBert_10k. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/QCRI/SentSecBert_10k on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use QCRI/SentSecBert_10k with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("QCRI/SentSecBert_10k")
sentences = [
"That is a happy person",
"That is a happy dog",
"That is a very happy person",
"Today is a sunny day"
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [4, 4]This is a sentence-transformers model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search.
This is a model used in our work "Semantic Ranking for Automated Adversarial Technique Annotation in Security Text". The code is available at: https://github.com/qcri/Text2TTP
Using this model becomes easy when you have sentence-transformers installed:
pip install -U sentence-transformers
Then you can use the model like this:
from sentence_transformers import SentenceTransformer
sentences = ["This is an example sentence", "Each sentence is converted"]
model = SentenceTransformer('SentSecBert')
embeddings = model.encode(sentences)
print(embeddings)
@article{kumarasinghe2024semantic,
title={Semantic Ranking for Automated Adversarial Technique Annotation in Security Text},
author={Kumarasinghe, Udesh and Lekssays, Ahmed and Sencar, Husrev Taha and Boughorbel, Sabri and Elvitigala, Charitha and Nakov, Preslav},
journal={arXiv preprint arXiv:2403.17068},
year={2024}
}