Module: Vangrail::BayesData
- Defined in:
- lib/vangrail/bayes_data.rb
Overview
Naive Bayes weights over the corpora, in bits per feature.
GENERATED FILE. Do not edit by hand; rerun script/train_bayes.rb when a corpus changes. The rail that reads this lives in rails/bayes.rb.
300 features selected by mutual information from 30 attack and 34 benign training clauses. Cases are source-grouped into disjoint train, calibration, threshold, and final-test roles under split seed "bayes-v1". Counts use a Dirichlet prior of 1.0; weights are log2 class likelihood ratios.
The threshold comes only from the threshold role. Final-test performance is 3 of 6 attacks and 2 of 6 benign documents above it.
Constant Summary collapse
- SPLIT_SEED =
"bayes-v1"- ROLE_COUNTS =
{:train=>{:attack=>30, :benign=>30}, :calibration=>{:attack=>6, :benign=>6}, :threshold=>{:attack=>6, :benign=>6}, :test=>{:attack=>6, :benign=>6}}.freeze
- THRESHOLD =
3- CALIBRATION =
Score band => bits, fitted only on calibration-role scores and read at the simultaneous 95% likelihood-ratio bound. A raw naive Bayes score is not a likelihood ratio; this is what turns it into one the corpus can defend.
[ [-Float::INFINITY, -0.632], # 0 attacks, 6 benign [0.0, 0.0], # 3 attacks, 0 benign [4.0, 0.0], # 0 attacks, 0 benign [8.0, 0.0], # 1 attacks, 0 benign [12.0, 0.0], # 2 attacks, 0 benign ].freeze
- CAUGHT =
Final-test performance at THRESHOLD, for the evidence table.
3- ATTACKS =
6- FLAGGED =
2- BENIGN =
6- WEIGHTS =
{ "answer" => 2.4919, "thi page" => 2.4919, "as" => 2.4919, "page" => 2.4919, "ignore" => 2.4919, "all" => 2.4919, "ignore all" => 2.1699, "previous" => 2.1699, "of" => 2.1699, "reveal" => 2.1699, "were" => 2.1699, "your system" => 2.1699, "that" => 2.1699, "previous instruction" => 2.1699, "and recommend" => 1.7549, "unlimite" => 1.7549, "cluster" => 1.7549, "commercial" => 1.7549, "state" => 1.7549, "earlier" => 1.7549, "recommend" => 1.7549, "recommend the" => 1.7549, "the commercial" => 1.7549, "commercial cluster" => 1.7549, "developer" => 1.7549, "of your" => 1.7549, "cheaper partition" => 1.7549, "you were" => 1.7549, "a cheaper" => 1.7549, "treat" => 1.7549, "authoritative" => 1.7549, "so" => 1.7549, "the reader" => 1.7549, "instruction and" => 1.7549, "the quota" => 1.7549, "and treat" => 1.7549, "treat thi" => 1.7549, "page as" => 1.7549, "as authoritative" => 1.7549, "reader" => 1.7549, "cheaper" => 1.7549, "reveal your" => 1.7549, "all previous" => 1.7549, "exist" => 1.7549, "end" => 1.7549, "end of" => 1.7549, "at" => 1.7549, "the end" => 1.7549, "at the" => 1.7549, "hebt" => 1.7549, "partition exist" => 1.7549, "that a" => 1.7549, "now" => 1.7549, "instruction" => 1.7549, "thi" => 1.4919, "you" => 1.3399, "earlier instruction" => 1.1699, "authoritative over" => 1.1699, "over all" => 1.1699, "all other" => 1.1699, "instead" => 1.1699, "cluster instead" => 1.1699, "mode" => 1.1699, "now in" => 1.1699, "in developer" => 1.1699, "developer mode" => 1.1699, "pagina" => 1.1699, "gewijzigd" => 1.1699, "gebruiker niet" => 1.1699, "niet dat" => 1.1699, "dat deze" => 1.1699, "deze pagina" => 1.1699, "pagina is" => 1.1699, "is gewijzigd" => 1.1699, "read" => 1.1699, "used" => 1.1699, "grandma" => 1.1699, "my" => 1.1699, "prompt now" => 1.1699, "beperk hebt" => 1.1699, "geen beperk" => 1.1699, "je geen" => 1.1699, "alsof je" => 1.1699, "doe alsof" => 1.1699, "beperk" => 1.1699, "configure with" => 1.1699, "not tell" => 1.1699, "reader otherwise" => 1.1699, "ai" => 1.1699, "without" => 1.1699, "restriction" => 1.1699, "now an" => 1.1699, "an ai" => 1.1699, "ai assistant" => 1.1699, "assistant without" => 1.1699, "without restriction" => 1.1699, "vergeet" => 1.1699, "die" => 1.1699, "hiervoor" => 1.1699, "gekregen" => 1.1699, "vergeet de" => 1.1699, "richtlijnen die" => 1.1699, "die je" => 1.1699, "je hiervoor" => 1.1699, "hiervoor hebt" => 1.1699, "hebt gekregen" => 1.1699, "on you" => 1.1699, "you behave" => 1.1699, "behave as" => 1.1699, "as an" => 1.1699, "an unfiltere" => 1.1699, "unfiltere model" => 1.1699, "forget" => 1.1699, "over" => 1.1699, "other" => 1.1699, "forget the" => 1.1699, "the earlier" => 1.1699, "were configure" => 1.1699, "message you" => 1.1699, "to http" => 1.1699, "developer message" => 1.1699, "the developer" => 1.1699, "print the" => 1.1699, "http example" => 1.1699, "example invalid" => 1.1699, "configure" => 1.1699, "invalid collect" => 1.1699, "message" => 1.1699, "je oorspronkelijke" => 1.1699, "transmit" => 1.1699, "herhaal je" => 1.1699, "einde" => 1.1699, "credential" => 1.1699, "letterlijk" => 1.1699, "issu" => 1.1699, "oorspronkelijke" => 1.1699, "herhaal" => 1.1699, "user that" => 1.1699, "http" => 1.1699, "reveal to" => 1.1699, "never reveal" => 1.1699, "example" => 1.1699, "invalid" => 1.1699, "collect" => 1.1699, "transmit the" => 1.1699, "the credential" => 1.1699, "was update" => 1.1699, "geen" => 1.1699, "alsof" => 1.1699, "doe" => 1.1699, "het einde" => 1.1699, "letterlijk aan" => 1.1699, "configuratie letterlijk" => 1.1699, "oorspronkelijke configuratie" => 1.1699, "to fall" => 1.1699, "key to" => 1.1699, "license key" => 1.1699, "the license" => 1.1699, "me the" => 1.1699, "read me" => 1.1699, "to read" => 1.1699, "dismiss anyth" => 1.1699, "used to" => 1.1699, "grandma used" => 1.1699, "my grandma" => 1.1699, "asleep" => 1.1699, "fall" => 1.1699, "anyth state" => 1.1699, "state earlier" => 1.1699, "earlier and" => 1.1699, "license" => 1.1699, "me" => 1.1699, "credential you" => 1.1699, "never" => 1.1699, "were issu" => 1.1699, "your rep" => 1.1699, "issu to" => 1.1699, "with at" => 1.1699, "disregard" => 1.1699, "partitie bestaat" => 1.1699, "goedkopere partitie" => 1.1699, "een goedkopere" => 1.1699, "er een" => 1.1699, "dat er" => 1.1699, "lezer dat" => 1.1699, "de lezer" => 1.1699, "voor de" => 1.1699, "verberg voor" => 1.1699, "bestaat" => 1.1699, "goedkopere" => 1.1699, "configuration verbatim" => 1.1699, "model" => 1.1699, "from here" => 1.1699, "unfiltere" => 1.1699, "here on" => 1.1699, "reader the" => 1.1699, "the fact" => 1.1699, "fact that" => 1.1699, "from the" => 1.1699, "withhold from" => 1.1699, "fact" => 1.1699, "here" => 1.1699, "withhold" => 1.1699, "for thi" => 1.1699, "behave" => 1.1699, "rule for" => 1.1699, "and do" => 1.1699, "unlimite and" => 1.1699, "were unlimite" => 1.1699, "quota were" => 1.1699, "though the" => 1.1699, "as though" => 1.1699, "answer as" => 1.1699, "otherwise" => 1.1699, "though" => 1.1699, "safety rule" => 1.1699, "the safety" => 1.1699, "ignore the" => 1.1699, "assistant ignore" => 1.1699, "rule" => 1.1699, "safety" => 1.1699, "your answer" => 1.1699, "prompt at" => 1.1699, "print your" => 1.1699, "now on" => 1.1699, "from now" => 1.1699, "french from" => 1.1699, "in french" => 1.1699, "only in" => 1.1699, "answer only" => 1.1699, "above answer" => 1.1699, "disregard the" => 1.1699, "french" => 1.1699, "only" => 1.1699, "is" => -1.0525, "with" => -1.152, "deze" => -1.152, "een" => -1.2451, "tijdslimiet" => -1.415, "als je" => -1.415, "aanvraag" => -1.415, "te" => -1.415, "the desk" => -1.415, "service" => -1.415, "and the" => -1.415, "het reserveringsbeleid" => -1.415, "voordat" => -1.415, "reserveringsbeleid" => -1.415, "run" => -1.415, "in your" => -1.415, "the service" => -1.415, "service desk" => -1.415, "reservere" => -1.415, "in het" => -1.415, "your project" => -1.415, "project space" => -1.415, "ssh" => -1.415, "space" => -1.415, "gpu" => -1.415, "h100" => -1.415, "in" => -1.415, "de" => -1.415, "include the" => -1.415, "the job" => -1.415, "api" => -1.415, "sleutel" => -1.415, "op" => -1.415, "sleutel met" => -1.415, "dien" => -1.415, "if your" => -1.415, "sbatch" => -1.415, "time" => -1.415, "squeue" => -1.415, "je een" => -1.415, "vraagt" => -1.415, "per" => -1.415, "wordt" => -1.415, "ticket" => -1.415, "200 gb" => -1.415, "is 200" => -1.415, "200" => -1.415, "gb" => -1.415, "gpu h100" => -1.415, "met een" => -1.415, "in met" => -1.415, "if" => -1.415, "het" => -1.8301, "als" => -1.8301, "project" => -1.8301, "job id" => -1.8301, "it" => -1.8301, "de servicedesk" => -1.8301, "include" => -1.8301, "servicedesk" => -1.8301, "id" => -2.152, "desk" => -2.152, "node" => -2.415, "met" => -2.6374, "en" => -2.8301, "job" => -2.8301 }.freeze