| from pathlib import Path | |
| def test_report_theory_sections_and_equations_exist(): | |
| report_tex = Path(__file__).resolve().parents[2] / "report" / "assignment_template.tex" | |
| text = report_tex.read_text(encoding="utf-8") | |
| required_sections = [ | |
| r"\section{Complete Theoretical Foundations}", | |
| r"\subsection{Security Theory: Backdoor Model and Neural Cleanse}", | |
| r"\subsection{Privacy Theory: Differential Privacy and Laplace Mechanism}", | |
| r"\subsection{Fairness Theory: Metrics and Mitigation Principles}", | |
| r"\subsection{Theory Robustness Guardrails}", | |
| r"\section{Requirement Coverage Checklist}", | |
| r"\appendices", | |
| r"\section{Extended Security Derivation and Detection Rule}", | |
| r"\section{Extended Differential Privacy Derivation}", | |
| r"\section{Extended Fairness Derivation and Optimization View}", | |
| ] | |
| for item in required_sections: | |
| assert item in text | |
| required_equation_tokens = [ | |
| r"\mathcal{T}(x; m, p)", | |
| r"\mathrm{MAD}(s)", | |
| r"\mathrm{ASR}", | |
| r"\Pr[\mathcal{M}(D)\in S]", | |
| r"\tilde{q}(D)=q(D)+\eta", | |
| r"\Delta f_{\mathrm{unbounded}}", | |
| r"\mathrm{DI}", | |
| r"w(s,y)=", | |
| r"\mathcal{L}_y(m,p)", | |
| r"F_{\mathrm{Lap}}(x;0,b)", | |
| r"\hat{R}_w(\theta)", | |
| r"(\tau_0^\star,\tau_1^\star)", | |
| ] | |
| for token in required_equation_tokens: | |
| assert token in text | |
| def test_report_contains_extended_understanding_figures(): | |
| report_tex = Path(__file__).resolve().parents[2] / "report" / "assignment_template.tex" | |
| text = report_tex.read_text(encoding="utf-8") | |
| required_figures = [ | |
| "security_unlearning_sweep.png", | |
| "privacy_epsilon_sweep.png", | |
| "fairness_swapk_sweep.png", | |
| "security_confusion_before_after.png", | |
| "privacy_tail_curves.png", | |
| "fairness_tradeoff.png", | |
| ] | |
| for fig in required_figures: | |
| assert fig in text | |
Xet Storage Details
- Size:
- 1.97 kB
- Xet hash:
- 0f0400dad3b7cc7a0aad27eb8403dd094d4d24152861d45bba491a41de273c66
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.