You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

TROPT EmbOptBench

Adversarial triggers found by 15 discrete optimizers from TROPT against four embedding models, in GASLITE's concept-specific corpus-poisoning setting (Ben-Tov & Sharif, 2025): each trigger ends a passage carrying a malicious statement, so that the passage ranks high for one concept's MSMARCO queries. Each passage comes with its retrieval evaluation on the concept's held-in and held-out queries.

Contents

File Rows One row is
triggers.parquet 28,800 one optimization run's best trigger at one FLOP checkpoint
eval_triggered_messages/<model_short>.parquet 28,800 one trigger's retrieval evaluation on its concept's held-in and held-out queries
  • Models (4): sentence-transformers/all-MiniLM-L6-v2 (minilm), intfloat/e5-base-v2 (e5), Qwen/Qwen3-Embedding-0.6B (qwen3emb), Qwen/Qwen3-Embedding-8B (qwen3emb8b)
  • Optimizers (15): adv_decoding, arca, autoprompt, beast, gaslite, gbda, gcg, gcq, hotflip, mac, mcpal, pal, pez, ral, random_search. mcpal is PAL's search configuration (128 candidates, top-256 sampling, single-token replacement) with MAC's gradient momentum (ΞΌ = 0.6).
  • Loss: Similarity (minus the cosine similarity to the target) in every run.
  • Concepts (8): boston, flower, golf, iphone, mortgage, potter, sandwich, vaccine. Each passage is optimized on half of its concept's queries and evaluated on both halves.
  • Trigger lengths (2): 30 and 100 tokens.
  • Seeds (3): 42, 123, 777.

Loading

from datasets import load_dataset

R = "MatanBT/tropt-emb-optbench"
triggers = load_dataset(R, "triggers", split="triggers")
evals    = load_dataset(R, "eval_triggered_messages",
                        split="eval_triggered_messages")

Concepts

concept names a split of MatanBT/msmarco-concepts: its queries config holds the concept's MSMARCO queries, and its corpus config the n_corpus passages they are ranked against. Each run splits the concept's queries in half by its seed (random.Random(seed).shuffle of the queries in dataset order): the first half is held-in (heldin_queries) and sets the target, the second is held-out and is only evaluated on.

triggers

Each model has one FLOP budget per run, counting any auxiliary model the optimizer runs (google/gemma-2-2b-it, for beast and adv_decoding):

model_short Budget (FLOPs)
minilm 2.16e14
e5 7.8e15
qwen3emb 7.8e15
qwen3emb8b 1.26e17

Every run is capped at 167% of its budget; hotflip and pez can stop earlier at 1,500 and 60,000 steps, and beast and adv_decoding after one step per trigger token. Its best trigger so far (lowest best_loss) is recorded at ten checkpoints, labeled by their share of the budget: 2pct, 3pct, 8pct, 17pct, 33pct, 50pct, 70pct, 100pct, 133pct, 167pct. A checkpoint excludes the step that crosses it, so trigger_flops never exceeds budget_flops; a checkpoint past a run's end holds the run's best trigger.

Identity

  • uid β€” {model_short}|{optimizer_name}|{concept}|s{seed}|t{trigger_len}|{budget_label}, e.g. qwen3emb|gcg|potter|s42|t30|100pct. Referenced by eval_triggered_messages.trigger_uid.
  • model_name, model_short β€” the target encoder.
  • optimizer_name β€” the optimization method.
  • loss_name β€” the training loss (Similarity).
  • concept β€” the concept attacked.
  • seed β€” the run's random seed; it also splits the queries.
  • trigger_len β€” the trigger's length in tokens (30 or 100).
  • run_id, run_name β€” wandb run identifiers, for provenance only.

Budget

  • budget_label, budget_fraction, budget_flops β€” the checkpoint: its label, its share of the model's budget, and its FLOPs.

Trigger & result

  • best_trigger_str β€” the optimized trigger.
  • best_loss β€” its training loss (lower is better).
  • best_cos_sim β€” -best_loss: the passage's cosine similarity to the target.
  • trigger_flops β€” cumulative FLOPs at the step that found this trigger.
  • n_steps_within_budget β€” optimizer steps counted toward this checkpoint.
  • run_total_flops, run_total_steps β€” the full run's totals.

Inputs

  • optimized_instruction β€” the passage template optimized: passage_prefix + mal_info + {{OPTIMIZED_TRIGGER}}, the placeholder the trigger replaces.
  • adv_passage β€” the template with best_trigger_str in place: the adversarial passage.
  • mal_info β€” the concept's malicious statement, verbatim from GASLITE.
  • passage_prefix, query_prefix β€” the encoder's input prefixes: passage: and query: for e5, an instruction before each query for the Qwen3 models, none for minilm.
  • initial_trigger β€” the trigger the run started from.
  • target_kind, heldin_queries, n_held_in, n_held_out β€” the target (heldin_query_centroid): the normalized mean embedding of the n_held_in held-in queries, each with query_prefix; n_held_out counts the held-out ones.

eval_triggered_messages

One file per model, with one row per triggers row (every checkpoint). The trigger's own encoder embeds adv_passage, the concept's queries (with query_prefix) and its corpus passages (with passage_prefix); for each query, the passage is ranked against the concept's corpus.

Trigger identity (copied from triggers)

  • trigger_uid β€” triggers.uid.
  • model_name, model_short, optimizer_name, loss_name, concept, seed, trigger_len, budget_label, best_cos_sim β€” as in triggers.

Retrieval ({split} is heldin or heldout)

  • {split}_cos_sim β€” the passage's cosine similarity to the centroid of the split's queries; heldin_cos_sim is the training objective, recomputed from adv_passage.
  • {split}_mean_cos_sim β€” the passage's mean cosine similarity to the split's queries.
  • {split}_appeared@10 β€” the share of the split's queries whose top 10 results include the passage.
  • {split}_ranks β€” the passage's rank against the concept's corpus, per query (1 is first; 101 means below the top 100); heldin_ranks is aligned with triggers.heldin_queries.
  • n_{split}_eval β€” the number of queries in the split.
  • n_corpus β€” the number of passages in the concept's corpus.

For example, the mean held-out appeared@10 per optimizer and model, for 30-token triggers at the budget (100pct):

df = evals.to_pandas()
heldout = (df[(df.trigger_len == 30) & (df.budget_label == "100pct")]
             .groupby(["model_short", "optimizer_name"])["heldout_appeared@10"]
             .mean().unstack(0))

License and citation

MIT. If you use this dataset, please cite the TROPT toolbox (https://github.com/matanbt/tropt).

Downloads last month
60

Collection including MatanBT/tropt-emb-optbench

Paper for MatanBT/tropt-emb-optbench