NightmareNet
A training platform that repeats a four-phase cycle to build adversarial robustness into a text-classification model without eroding the defenses learned in earlier cycles, and generates EU AI Act compliance reports.
NightmareNet implements a cyclic adversarial training loop it calls Wake, Dream, Nightmare and Compress: a Wake phase does standard fine-tuning for clean-data competence, a Dream phase builds invariance to plausible distribution shift through synonym, paraphrase and syntactic augmentation, a Nightmare phase hardens the model against worst-case character, word and sentence-level perturbations through curriculum adversarial training, and a Compress phase distills and prunes the result before the next cycle begins using the compressed model as its starting point. After three to five cycles, robustness is reported to saturate and the cycle ends.
The project's own documentation is explicit that it is not a runtime guardrail like Lakera or an evaluation library like TextAttack, but a training method meant to produce measurably more robust models, paired with a hosted platform for running the training cycle and generating EU AI Act Article 15 compliance reports for high-risk AI systems.
It is built with FastAPI and PyTorch, is Dockerized, and is released under the Apache-2.0 license.