From e1c6eb284787612b2381a8c3122897416218d864 Mon Sep 17 00:00:00 2001 From: mohmd Date: Sat, 10 Oct 2026 12:39:36 +0000 Subject: [PATCH] docs: archive research findings and proposed roadmap --- README.md | 1 + docs/research/2026-10-10/DESIGN-audit.md | 82 ++++ docs/research/2026-10-10/README.md | 53 +++ .../2026-10-10/numerical-ablation-seed-42.log | 6 + .../2026-10-10/numerical-ablation-seed-43.log | 6 + .../2026-10-10/numerical-ablation-seed-44.log | 6 + .../2026-10-10/numerical-ablation.json | 382 ++++++++++++++++++ .../research/2026-10-10/numerical_ablation.py | 168 ++++++++ .../pqc-2025-2026/literature-notes.md | 53 +++ .../recent-graph-2025-2026-addendum.md | 63 +++ .../2026-10-10/research-2025-2026-addendum.md | 67 +++ docs/research/2026-10-10/research-review.md | 85 ++++ docs/research/2026-10-10/roadmap-proposed.md | 182 +++++++++ docs/research/2026-10-10/roadmap-review.md | 63 +++ .../2026-10-10/search-provenance.json | 82 ++++ 15 files changed, 1299 insertions(+) create mode 100644 docs/research/2026-10-10/DESIGN-audit.md create mode 100644 docs/research/2026-10-10/README.md create mode 100644 docs/research/2026-10-10/numerical-ablation-seed-42.log create mode 100644 docs/research/2026-10-10/numerical-ablation-seed-43.log create mode 100644 docs/research/2026-10-10/numerical-ablation-seed-44.log create mode 100644 docs/research/2026-10-10/numerical-ablation.json create mode 100644 docs/research/2026-10-10/numerical_ablation.py create mode 100644 docs/research/2026-10-10/pqc-2025-2026/literature-notes.md create mode 100644 docs/research/2026-10-10/recent-graph-2025-2026-addendum.md create mode 100644 docs/research/2026-10-10/research-2025-2026-addendum.md create mode 100644 docs/research/2026-10-10/research-review.md create mode 100644 docs/research/2026-10-10/roadmap-proposed.md create mode 100644 docs/research/2026-10-10/roadmap-review.md create mode 100644 docs/research/2026-10-10/search-provenance.json diff --git a/README.md b/README.md index b1241fc..111e137 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,7 @@ Encrypted linear head test acc: 0.492 ## 📚 Documentation - [roadmap.md](roadmap.md) – Project roadmap and development phases +- [Research archive (10 October 2026)](docs/research/2026-10-10/README.md) – 2025–2026 literature findings, numerical results, and a proposed roadmap review - [README_INSTRUCTION.md](README_INSTRUCTION.md) – Detailed PoC documentation - [CONTRIBUTING.md](CONTRIBUTING.md) – Contribution guidelines - [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) – Community guidelines diff --git a/docs/research/2026-10-10/DESIGN-audit.md b/docs/research/2026-10-10/DESIGN-audit.md new file mode 100644 index 0000000..04e5782 --- /dev/null +++ b/docs/research/2026-10-10/DESIGN-audit.md @@ -0,0 +1,82 @@ +# DESIGN: source audit for PrivNetAI + +Review date: 2026-10-10. This is a literature and static source review, not a reproduced benchmark, security proof, or code execution audit. No PrivNetAI source was changed. + +## Verified identity and publication status + +- Paper: **DESIGN: Encrypted GNN Inference via Server-Side Input Graph Pruning**, Kaixiang Zhao, Joseph Yousry Attalla, Qian Lou, and Yushun Dong. +- [Original arXiv record](https://arxiv.org/abs/2507.05649): first submitted **8 July 2025**, revised **14 July 2025**, current accessible version **v2**. The arXiv comment says “Under Review in Conference on Neural Information Processing Systems (NeurIPS 2025).” This does not establish conference acceptance. +- [Hugging Face paper page](https://huggingface.co/papers/2507.05649) displays “Published on Jul 14, 2025,” corresponding to the revision, and links the author repository. Its presence is a paper listing; the page does not provide a model, dataset, or Space implementing the method. +- [Author GitHub repository](https://github.com/LabRAI/DESIGN), inspected at commit `859225550559b96dc025b7ceaa5819c919da1c5e`. The repository README also identifies the work as NeurIPS 2025 under review. +- The original paper, Hugging Face page and pinned author source were inspected on the review date. Persistent primary-source and commit-pinned code links are provided below; downloaded source snapshots are omitted from this archive. + +## What the authors propose + +The paper targets **inference**, with a model trained in plaintext. A client supplies an encrypted adjacency matrix and encrypted node features; the server computes encrypted node degrees, compares them homomorphically with thresholds, and forms encrypted importance masks. It then masks less important nodes and incident edges and combines polynomial activations of different degrees using encrypted level masks. The client decrypts the result. The appendix specifies a two-layer GCN with only **two hidden channels**, initially trained with a quadratic activation. + +This is directly relevant prior art for graph-private HE inference and degree-guided adaptive polynomial execution. It does not demonstrate encrypted training, post-quantum transport/authentication, differential privacy of outputs, or verified correctness against a malicious server. + +## Strengths and useful ideas + +1. It treats graph topology as confidential rather than limiting encryption to a final classifier. +2. Degree-based importance is cheaper to compute than many richer encrypted graph statistics. +3. It explicitly acknowledges the cost and approximation errors of encrypted comparisons. +4. It releases inspectable source and describes ablations and polynomial-degree tradeoffs. + +These are research ideas and author-reported evaluations, not independently established performance for our application. + +## Central efficiency issue: encrypted masking does not itself skip work + +The paper explicitly describes **logical** pruning. Equation (3) multiplies features and adjacency entries by encrypted keep masks. Equation (5) evaluates multiple activation polynomials and combines them with encrypted importance masks. + +The pinned implementation confirms the fixed-size computation: + +- [`design_model.py`, lines 254–269](https://github.com/LabRAI/DESIGN/blob/859225550559b96dc025b7ceaa5819c919da1c5e/design_model.py#L254) encrypts every adjacency diagonal and each feature vector. +- [Lines 394–426](https://github.com/LabRAI/DESIGN/blob/859225550559b96dc025b7ceaa5819c919da1c5e/design_model.py#L394) mask every feature vector and every adjacency diagonal, append every result, and preserve their counts. +- [Lines 272–330](https://github.com/LabRAI/DESIGN/blob/859225550559b96dc025b7ceaa5819c919da1c5e/design_model.py#L272) aggregate over all `self.N` diagonals. This dimension is not reduced after pruning. +- [Lines 458–479](https://github.com/LabRAI/DESIGN/blob/859225550559b96dc025b7ceaa5819c919da1c5e/design_model.py#L458) evaluate **each** importance level's polynomial on the entire packed hidden-feature ciphertext, then multiply by masks and sum. They do not execute only the chosen polynomial for each hidden node. + +**Our assessment:** The shown implementation does not physically compact the graph, omit ciphertexts, or provide a public schedule that skips the work represented by encrypted zeros. Its encrypted pruning adds operations, while its adaptive activation computes all polynomial branches before selection. A secret encrypted zero is not a known plaintext zero that an evaluator can exploit to skip an operation. Consequently, the claimed reduction in graph-processing volume and average activation work needs a reproducible explanation beyond the visible masking implementation. + +This finding does not prove that every possible encrypted-pruning scheme is inefficient. It means this specific implementation does not establish the proposed mechanism's claimed cost reduction. Efficient compaction, public preprocessing, public workload schedules, or an explicit leakage allowance would need separate specification and measurement. + +## Numerical and reproducibility caveats + +### Comparison approximation domain + +The implementation uses `p(t) = -0.25*t^3 + 0.75*t + 0.5` on degree minus threshold. Its own [lines 198–200](https://github.com/LabRAI/DESIGN/blob/859225550559b96dc025b7ceaa5819c919da1c5e/design_model.py#L198) note that the difference must be approximately in `[-1, 1]` and that normalization may be needed. The inspected path uses raw degrees and thresholds such as `[5.0, 2.0]`; no corresponding normalization is evident. For example, `p(3) = -4`, which cannot act as an approximate binary selection mask. Approximation-domain coverage and resulting mask error must be validated before relying on pruning results. + +### Accuracy claims conflict across artifacts + +The repository README says “up to 2× latency reduction with ≤2 pp accuracy loss vs. plaintext.” The paper's Table 2 instead reports: + +| Dataset | Plaintext | DESIGN | Difference | +|---|---:|---:|---:| +| Cora | 84.00% | 74.00% | −10.00 pp | +| CiteSeer | 60.00% | 45.00% | −15.00 pp | +| PubMed | 80.00% | 55.00% | −25.00 pp | + +Report these as conflicting **author claims**, not as a verified ≤2 pp fidelity result. Table 1 also does not show DESIGN winning every comparison: on ogbn-proteins it reports 8.49 s versus OpenFHE's 7.69 s. + +### Evaluation scope + +- [`utils.py`, lines 70–76](https://github.com/LabRAI/DESIGN/blob/859225550559b96dc025b7ceaa5819c919da1c5e/utils.py#L70) computes classification accuracy over **all nodes**, despite comments elsewhere describing test-mask evaluation. The multi-label metric likewise uses all flattened labels and thresholded predictions. +- [Lines 106–113](https://github.com/LabRAI/DESIGN/blob/859225550559b96dc025b7ceaa5819c919da1c5e/utils.py#L106) subsample PubMed, Yelp, and ogbn-proteins to 4,000 nodes and generate new random splits. This matters when interpreting large-dataset scalability claims. +- The visible code calls `to_dense_adj` without importing it in `utils.py`, and calls `get_A_bar` without importing it in `design_model.py`. These are static reproducibility blockers; we did not install bindings or run/fix the authors' code. +- Code sets ring degree 8,192 with coefficient-modulus bit sizes totaling 230, whereas the paper describes degrees 32,768/65,536. Official SEAL's default classical 128-bit limit at degree 8,192 is 218 bits ([source](https://github.com/microsoft/SEAL/blob/main/native/src/seal/util/hestdparms.h#L29)); its default context requests `tc128` ([source](https://github.com/microsoft/SEAL/blob/main/native/src/seal/context.h#L500)). Parameter validity and the selected Python binding must therefore be checked. A classical 128-bit setting should also not be silently relabeled as 128-bit quantum security. + +## Threat-model interpretation + +The intended server sees encrypted adjacency, features, scores, and masks and lacks the client's decryption key. Graph dimensions, ciphertext counts, public thresholds, model architecture, execution schedule, and inference output disclosure are not hidden merely by encrypting numerical contents. The demonstration generates a decryptor in the same process for benchmarking; that does not by itself establish or refute an independently deployed client/server boundary. A real implementation must separate client key material from server execution. + +The reviewed paper inherits confidentiality claims from CKKS; the material examined does not establish a separate malicious-server correctness protocol, a model-extraction guarantee, or an output differential-privacy guarantee. Any server-visible schedule that changes based on secret pruning decisions needs explicit leakage analysis. + +## Implications for PrivNetAI + +1. **Cite DESIGN as 2025 prior art** for encrypted degree scoring, graph masking, and adaptive polynomial selection. Do not claim those broad ideas as ours alone. +2. **Reproduce pruning complexity before importing its speedup.** Count ciphertext multiplications, rotations, depth, packing occupancy, transmitted ciphertexts, preprocessing, and elapsed time. Distinguish logical masked gating from a physical reduction of work. +3. Start with a correct complete polynomial GCN under an explicit threat model and identical float-versus-HE architecture. Our fixed-point ablation already shows why head changes and arithmetic errors must be separated from cryptographic costs. +4. If introducing adaptive schedules, define whether topology, retained-node counts, importance assignments, or schedule decisions become public. Compare against fixed-schedule masking and any proposed compaction protocol using the same leakage and security conditions. +5. A promising new research question is **which graph-aware optimizations actually lower observable HE work while preserving a stated leakage policy and classifier fidelity**. That is a proposed question, not an established novelty claim. + +Keep equivariant obfuscation literature separate: a secret feature transformation is not automatically semantically secure HE and requires its own attack/threat analysis. diff --git a/docs/research/2026-10-10/README.md b/docs/research/2026-10-10/README.md new file mode 100644 index 0000000..578a6b5 --- /dev/null +++ b/docs/research/2026-10-10/README.md @@ -0,0 +1,53 @@ +# PrivNetAI research archive — 10 October 2026 + +This archive preserves the research findings, numerical diagnosis and roadmap proposal reviewed on **2026-10-10** for future work. The repository baseline was [`be0400f8e8d22fcfff2d011bc1c1dd9b7a2f4767`](https://github.com/aliaslany/PrivnetAI/tree/be0400f8e8d22fcfff2d011bc1c1dd9b7a2f4767). The [existing roadmap](../../../roadmap.md) and application code remain unchanged; the proposed milestones below are not implemented or adopted by this archive. + +## Findings to carry forward + +- Build a matched-model, real-CKKS inference baseline before combining encrypted training, private topology and verifiable computation. Specify the permitted disclosures, output recipients and security parameters first. +- Separate model-adaptation loss from arithmetic error. The current CLI compares a complete GCN with a different ridge classifier, and its simulator rounds weights without a weight scale. +- Compare with recent work on sparse graph packing, interactive protocols, compiler layouts and bounded activation ranges. The review covers 2025–2026 papers, GitHub artifacts and targeted Hugging Face searches; it is not exhaustive and does not establish novelty. +- Assign cryptographic primitives distinct roles. SIDH/SIKE cannot underpin the proposal; CKKS computation, standardized post-quantum communication and signatures address different requirements. + +## Documents and evidence + +| Artifact | Contents | +|---|---| +| [Research review](research-review.md) | Overall proposal improvements, implementation findings and numerical diagnosis | +| [2025–2026 review](research-2025-2026-addendum.md) | Recent papers, GitHub/Hugging Face coverage and comparison limits | +| [Graph literature notes](recent-graph-2025-2026-addendum.md) | FicGCN, CryptGNN, PrivGNN and TGHE primary-paper details | +| [Arithmetic and compiler notes](pqc-2025-2026/literature-notes.md) | EinHops, 2026 overflow/range work and PKC 2025 output-security considerations | +| [DESIGN static audit](DESIGN-audit.md) | Commit-pinned source findings; third-party code was not executed | +| [Roadmap assessment](roadmap-review.md) | Changes recommended to the current roadmap | +| [Proposed roadmap](roadmap-proposed.md) | Future deliverables, dependency order and proposed acceptance gates | +| [Numerical results](numerical-ablation.json) | Original three-seed measurements and configuration | +| [Reproduction helper](numerical_ablation.py) | Portable replay of the arithmetic experiment | +| [Search provenance](search-provenance.json) | Review date, baseline commit, Hugging Face queries and selected metadata | + +Primary-source links and access limitations are recorded in the notes. Publication, submission and revision dates are distinguished. Third-party timings and accuracy figures are author-reported and were not reproduced. Raw downloaded papers, source snapshots and large search dumps are omitted. + +## Numerical result + +The Cora experiment uses the standard Planetoid split, 50 training epochs and the best validation checkpoint for seeds 42, 43 and 44. The corrected simulation uses feature and weight scales of 4096. + +| Seed | Full float GCN accuracy | Float ridge accuracy | Current shim accuracy | Corrected simulation accuracy | Test prediction agreement with float ridge | +|---|---:|---:|---:|---:|---:| +| 42 | 82.7% | 77.7% | 51.2% | 77.7% | 100.0% | +| 43 | 82.4% | 79.3% | 57.0% | 79.3% | 100.0% | +| 44 | 81.5% | 77.4% | 67.9% | 77.4% | 99.8% | + +These are **fixed-point simulations, not homomorphic-encryption results or privacy guarantees**. Bias is added in plaintext to match the existing CLI. The full GCN and ridge classifier have different architectures. Three seeds on one dataset provide an exploratory diagnosis; roadmap accuracy thresholds are future targets. The original training traces are retained for [seed 42](numerical-ablation-seed-42.log), [seed 43](numerical-ablation-seed-43.log) and [seed 44](numerical-ablation-seed-44.log). + +## Reproduction + +Run from the repository root using an environment with the repository dependencies installed. The recorded environment used Python 3.12.14, PyTorch 2.6.0+cpu, PyTorch Geometric 2.8.0.post1, NumPy 2.5.3 and SciPy 1.18.1, with two CPU threads. These versions document the run; the repository dependency manifest is not a frozen environment. + +```bash +OMP_NUM_THREADS=2 MKL_NUM_THREADS=2 python docs/research/2026-10-10/numerical_ablation.py +``` + +The helper resolves the repository root from its own location, reads the Cora dataset through the existing loader and writes new JSON/results to a fresh temporary directory, whose path it prints. If Cora is absent, the PyTorch Geometric loader downloads and processes it under `data/Cora`; network access to its dataset source is then required. The recorded run used cached Cora data. To retain a replay, supply `--output-dir /path/to/fresh-results`. The helper rejects the archive directory and existing result files to preserve recorded evidence. Timestamps and training times vary; dependency/platform changes can also change numerical values. + +The portable helper was replayed on the recorded environment before archiving. All three seeds matched every archived numerical metric exactly, excluding timestamps and training times. Local Markdown links and JSON validity were also checked. + +The original onboarding test run reported **7 passed, 1 failed**. The diagnosed failure is the existing simulator precision assertion in `tests/test_encryption.py`; the encrypted-evaluation CLI also has an import-path issue. This archive documents those application defects and does not fix them. Real CKKS execution, encrypted training, private topology and proof-system integration remain unvalidated. diff --git a/docs/research/2026-10-10/numerical-ablation-seed-42.log b/docs/research/2026-10-10/numerical-ablation-seed-42.log new file mode 100644 index 0000000..f0f3874 --- /dev/null +++ b/docs/research/2026-10-10/numerical-ablation-seed-42.log @@ -0,0 +1,6 @@ +Epoch 001 | loss=1.9458 | train=0.257 | val=0.156 | test=0.170 +Epoch 010 | loss=1.7470 | train=0.957 | val=0.708 | test=0.725 +Epoch 020 | loss=1.3528 | train=0.964 | val=0.774 | test=0.786 +Epoch 030 | loss=0.9377 | train=0.971 | val=0.804 | test=0.811 +Epoch 040 | loss=0.6351 | train=0.979 | val=0.806 | test=0.829 +Epoch 050 | loss=0.4529 | train=0.979 | val=0.802 | test=0.825 diff --git a/docs/research/2026-10-10/numerical-ablation-seed-43.log b/docs/research/2026-10-10/numerical-ablation-seed-43.log new file mode 100644 index 0000000..c5412c7 --- /dev/null +++ b/docs/research/2026-10-10/numerical-ablation-seed-43.log @@ -0,0 +1,6 @@ +Epoch 001 | loss=1.9461 | train=0.543 | val=0.356 | test=0.399 +Epoch 010 | loss=1.7685 | train=0.943 | val=0.714 | test=0.733 +Epoch 020 | loss=1.4218 | train=0.950 | val=0.760 | test=0.785 +Epoch 030 | loss=1.0071 | train=0.957 | val=0.792 | test=0.809 +Epoch 040 | loss=0.7109 | train=0.971 | val=0.804 | test=0.824 +Epoch 050 | loss=0.4916 | train=0.979 | val=0.802 | test=0.822 diff --git a/docs/research/2026-10-10/numerical-ablation-seed-44.log b/docs/research/2026-10-10/numerical-ablation-seed-44.log new file mode 100644 index 0000000..b41953b --- /dev/null +++ b/docs/research/2026-10-10/numerical-ablation-seed-44.log @@ -0,0 +1,6 @@ +Epoch 001 | loss=1.9461 | train=0.279 | val=0.180 | test=0.167 +Epoch 010 | loss=1.7645 | train=0.971 | val=0.742 | test=0.753 +Epoch 020 | loss=1.3958 | train=0.964 | val=0.768 | test=0.786 +Epoch 030 | loss=0.9843 | train=0.964 | val=0.782 | test=0.803 +Epoch 040 | loss=0.6633 | train=0.971 | val=0.786 | test=0.811 +Epoch 050 | loss=0.4986 | train=0.986 | val=0.794 | test=0.815 diff --git a/docs/research/2026-10-10/numerical-ablation.json b/docs/research/2026-10-10/numerical-ablation.json new file mode 100644 index 0000000..dcfaa9c --- /dev/null +++ b/docs/research/2026-10-10/numerical-ablation.json @@ -0,0 +1,382 @@ +{ + "created_at_utc": "2026-10-10T12:01:18.426652+00:00", + "scope": "Controlled same-model arithmetic ablation; simulated fixed-point arithmetic only, no real encryption or privacy guarantee.", + "configuration": { + "dataset": "Cora / Planetoid standard split, NormalizeFeatures", + "epochs": 50, + "hidden_channels": 64, + "dropout": 0.5, + "learning_rate": 0.01, + "weight_decay": 0.0005, + "ridge_lambda": 0.001, + "device": "cpu", + "threads": 2, + "torch_version": "2.6.0+cpu", + "baseline": "float32 ridge classifier on identical first-GCN-layer hidden features; bias matches main.py", + "checkpoint": "best validation accuracy within 50 training epochs, same as repository trainer", + "seeds": [ + 42, + 43, + 44 + ] + }, + "results": [ + { + "seed": 42, + "gcn": { + "train_acc": 0.9785714149475098, + "val_acc": 0.8140000104904175, + "test_acc": 0.8270000219345093, + "time_sec": 0.8670961856842041 + }, + "plain_ridge": { + "test_accuracy": 0.777, + "prediction_agreement_all": 1.0, + "prediction_agreement_test": 1.0, + "max_absolute_logit_error_all": 0.0, + "mean_absolute_logit_error_all": 0.0, + "max_absolute_logit_error_test": 0.0, + "mean_absolute_logit_error_test": 0.0, + "test_prediction_certified_by_margin_fraction": 1.0 + }, + "current_shim_unscaled_weight_rounding": { + "test_accuracy": 0.512, + "prediction_agreement_all": 0.6255539143279173, + "prediction_agreement_test": 0.585, + "max_absolute_logit_error_all": 1.0709839463233948, + "mean_absolute_logit_error_all": 0.186513281042293, + "max_absolute_logit_error_test": 1.018387883901596, + "mean_absolute_logit_error_test": 0.18576522223110287, + "test_prediction_certified_by_margin_fraction": 0.099 + }, + "weights": { + "minimum": -6.565699100494385, + "maximum": 5.330244541168213, + "mean_absolute": 1.437973141670227, + "fraction_zero_after_unscaled_rounding": 0.23883928571428573 + }, + "correctly_scaled_simulations": [ + { + "test_accuracy": 0.779, + "prediction_agreement_all": 0.9767355982274741, + "prediction_agreement_test": 0.972, + "max_absolute_logit_error_all": 0.07746425038203597, + "mean_absolute_logit_error_all": 0.013192587845358447, + "max_absolute_logit_error_test": 0.07746425038203597, + "mean_absolute_logit_error_test": 0.013308059860343098, + "test_prediction_certified_by_margin_fraction": 0.871, + "feature_scale": 256, + "weight_scale": 256, + "output_scale": 65536, + "bias_added_in_plaintext_like_current_main": true, + "masked_and_unmasked_integer_products_identical": true, + "maximum_absolute_unmasked_integer_accumulator": 208986 + }, + { + "test_accuracy": 0.778, + "prediction_agreement_all": 0.9771048744460856, + "prediction_agreement_test": 0.973, + "max_absolute_logit_error_all": 0.07787623768672347, + "mean_absolute_logit_error_all": 0.013150725172781439, + "max_absolute_logit_error_test": 0.07787623768672347, + "mean_absolute_logit_error_test": 0.013281384787098172, + "test_prediction_certified_by_margin_fraction": 0.868, + "feature_scale": 256, + "weight_scale": 1024, + "output_scale": 262144, + "bias_added_in_plaintext_like_current_main": true, + "masked_and_unmasked_integer_products_identical": true, + "maximum_absolute_unmasked_integer_accumulator": 833620 + }, + { + "test_accuracy": 0.778, + "prediction_agreement_all": 0.9774741506646972, + "prediction_agreement_test": 0.973, + "max_absolute_logit_error_all": 0.07814898854121566, + "mean_absolute_logit_error_all": 0.013145762372249384, + "max_absolute_logit_error_test": 0.07814898854121566, + "mean_absolute_logit_error_test": 0.013275921362364898, + "test_prediction_certified_by_margin_fraction": 0.87, + "feature_scale": 256, + "weight_scale": 4096, + "output_scale": 1048576, + "bias_added_in_plaintext_like_current_main": true, + "masked_and_unmasked_integer_products_identical": true, + "maximum_absolute_unmasked_integer_accumulator": 3334620 + } + ], + "joint_feature_weight_precision_simulations": [ + { + "test_accuracy": 0.782, + "prediction_agreement_all": 0.9929837518463811, + "prediction_agreement_test": 0.992, + "max_absolute_logit_error_all": 0.019210112746804953, + "mean_absolute_logit_error_all": 0.0032878283645286486, + "max_absolute_logit_error_test": 0.017668160144239664, + "mean_absolute_logit_error_test": 0.003352505364357577, + "test_prediction_certified_by_margin_fraction": 0.969, + "feature_scale": 1024, + "weight_scale": 1024, + "output_scale": 1048576, + "bias_added_in_plaintext_like_current_main": true, + "masked_and_unmasked_integer_products_identical": true, + "maximum_absolute_unmasked_integer_accumulator": 3323216 + }, + { + "test_accuracy": 0.777, + "prediction_agreement_all": 1.0, + "prediction_agreement_test": 1.0, + "max_absolute_logit_error_all": 0.004947423469275236, + "mean_absolute_logit_error_all": 0.0008244851347405064, + "max_absolute_logit_error_test": 0.004796268884092569, + "mean_absolute_logit_error_test": 0.0008263906088291801, + "test_prediction_certified_by_margin_fraction": 0.989, + "feature_scale": 4096, + "weight_scale": 4096, + "output_scale": 16777216, + "bias_added_in_plaintext_like_current_main": true, + "masked_and_unmasked_integer_products_identical": true, + "maximum_absolute_unmasked_integer_accumulator": 53206040 + } + ] + }, + { + "seed": 43, + "gcn": { + "train_acc": 0.9785714149475098, + "val_acc": 0.8140000104904175, + "test_acc": 0.8240000009536743, + "time_sec": 0.977649450302124 + }, + "plain_ridge": { + "test_accuracy": 0.793, + "prediction_agreement_all": 1.0, + "prediction_agreement_test": 1.0, + "max_absolute_logit_error_all": 0.0, + "mean_absolute_logit_error_all": 0.0, + "max_absolute_logit_error_test": 0.0, + "mean_absolute_logit_error_test": 0.0, + "test_prediction_certified_by_margin_fraction": 1.0 + }, + "current_shim_unscaled_weight_rounding": { + "test_accuracy": 0.57, + "prediction_agreement_all": 0.6528803545051699, + "prediction_agreement_test": 0.635, + "max_absolute_logit_error_all": 1.5250285994261503, + "mean_absolute_logit_error_all": 0.26817317449027483, + "max_absolute_logit_error_test": 1.3913865946233273, + "mean_absolute_logit_error_test": 0.2661883594432958, + "test_prediction_certified_by_margin_fraction": 0.007 + }, + "weights": { + "minimum": -4.110416889190674, + "maximum": 4.813670635223389, + "mean_absolute": 1.195392370223999, + "fraction_zero_after_unscaled_rounding": 0.31026785714285715 + }, + "correctly_scaled_simulations": [ + { + "test_accuracy": 0.792, + "prediction_agreement_all": 0.9863367799113737, + "prediction_agreement_test": 0.99, + "max_absolute_logit_error_all": 0.06445084598090034, + "mean_absolute_logit_error_all": 0.01126712747085781, + "max_absolute_logit_error_test": 0.054685399794834666, + "mean_absolute_logit_error_test": 0.011164793744922788, + "test_prediction_certified_by_margin_fraction": 0.902, + "feature_scale": 256, + "weight_scale": 256, + "output_scale": 65536, + "bias_added_in_plaintext_like_current_main": true, + "masked_and_unmasked_integer_products_identical": true, + "maximum_absolute_unmasked_integer_accumulator": 176728 + }, + { + "test_accuracy": 0.792, + "prediction_agreement_all": 0.9859675036927622, + "prediction_agreement_test": 0.99, + "max_absolute_logit_error_all": 0.06341324832465034, + "mean_absolute_logit_error_all": 0.011259633443861584, + "max_absolute_logit_error_test": 0.05395627085817978, + "mean_absolute_logit_error_test": 0.011168329565438659, + "test_prediction_certified_by_margin_fraction": 0.902, + "feature_scale": 256, + "weight_scale": 1024, + "output_scale": 262144, + "bias_added_in_plaintext_like_current_main": true, + "masked_and_unmasked_integer_products_identical": true, + "maximum_absolute_unmasked_integer_accumulator": 707328 + }, + { + "test_accuracy": 0.792, + "prediction_agreement_all": 0.9863367799113737, + "prediction_agreement_test": 0.99, + "max_absolute_logit_error_all": 0.06367169406439643, + "mean_absolute_logit_error_all": 0.01125381979659597, + "max_absolute_logit_error_test": 0.054045916243921965, + "mean_absolute_logit_error_test": 0.011158572779542608, + "test_prediction_certified_by_margin_fraction": 0.901, + "feature_scale": 256, + "weight_scale": 4096, + "output_scale": 1048576, + "bias_added_in_plaintext_like_current_main": true, + "masked_and_unmasked_integer_products_identical": true, + "maximum_absolute_unmasked_integer_accumulator": 2828174 + } + ], + "joint_feature_weight_precision_simulations": [ + { + "test_accuracy": 0.794, + "prediction_agreement_all": 0.9959379615952733, + "prediction_agreement_test": 0.997, + "max_absolute_logit_error_all": 0.01622225258324761, + "mean_absolute_logit_error_all": 0.0028413273970904073, + "max_absolute_logit_error_test": 0.01622225258324761, + "mean_absolute_logit_error_test": 0.002866170817818264, + "test_prediction_certified_by_margin_fraction": 0.981, + "feature_scale": 1024, + "weight_scale": 1024, + "output_scale": 1048576, + "bias_added_in_plaintext_like_current_main": true, + "masked_and_unmasked_integer_products_identical": true, + "maximum_absolute_unmasked_integer_accumulator": 2834058 + }, + { + "test_accuracy": 0.793, + "prediction_agreement_all": 0.9996307237813885, + "prediction_agreement_test": 1.0, + "max_absolute_logit_error_all": 0.003810345267993398, + "mean_absolute_logit_error_all": 0.0007047189934258839, + "max_absolute_logit_error_test": 0.0037170789000811055, + "mean_absolute_logit_error_test": 0.0007083133253573318, + "test_prediction_certified_by_margin_fraction": 0.998, + "feature_scale": 4096, + "weight_scale": 4096, + "output_scale": 16777216, + "bias_added_in_plaintext_like_current_main": true, + "masked_and_unmasked_integer_products_identical": true, + "maximum_absolute_unmasked_integer_accumulator": 45358993 + } + ] + }, + { + "seed": 44, + "gcn": { + "train_acc": 0.9857142567634583, + "val_acc": 0.7940000295639038, + "test_acc": 0.8149999976158142, + "time_sec": 1.1391186714172363 + }, + "plain_ridge": { + "test_accuracy": 0.774, + "prediction_agreement_all": 1.0, + "prediction_agreement_test": 1.0, + "max_absolute_logit_error_all": 0.0, + "mean_absolute_logit_error_all": 0.0, + "max_absolute_logit_error_test": 0.0, + "mean_absolute_logit_error_test": 0.0, + "test_prediction_certified_by_margin_fraction": 1.0 + }, + "current_shim_unscaled_weight_rounding": { + "test_accuracy": 0.679, + "prediction_agreement_all": 0.7311669128508124, + "prediction_agreement_test": 0.716, + "max_absolute_logit_error_all": 1.642973780632019, + "mean_absolute_logit_error_all": 0.22028962953724618, + "max_absolute_logit_error_test": 0.8977009654045105, + "mean_absolute_logit_error_test": 0.21744257385010443, + "test_prediction_certified_by_margin_fraction": 0.017 + }, + "weights": { + "minimum": -4.999329566955566, + "maximum": 4.953383445739746, + "mean_absolute": 1.2739726305007935, + "fraction_zero_after_unscaled_rounding": 0.2924107142857143 + }, + "correctly_scaled_simulations": [ + { + "test_accuracy": 0.771, + "prediction_agreement_all": 0.9819054652880355, + "prediction_agreement_test": 0.971, + "max_absolute_logit_error_all": 0.06957578656147234, + "mean_absolute_logit_error_all": 0.011998383357584212, + "max_absolute_logit_error_test": 0.06957578656147234, + "mean_absolute_logit_error_test": 0.011937708111573426, + "test_prediction_certified_by_margin_fraction": 0.882, + "feature_scale": 256, + "weight_scale": 256, + "output_scale": 65536, + "bias_added_in_plaintext_like_current_main": true, + "masked_and_unmasked_integer_products_identical": true, + "maximum_absolute_unmasked_integer_accumulator": 269821 + }, + { + "test_accuracy": 0.772, + "prediction_agreement_all": 0.9819054652880355, + "prediction_agreement_test": 0.971, + "max_absolute_logit_error_all": 0.06740140912006609, + "mean_absolute_logit_error_all": 0.011965674935378047, + "max_absolute_logit_error_test": 0.06740140912006609, + "mean_absolute_logit_error_test": 0.011902460924812269, + "test_prediction_certified_by_margin_fraction": 0.885, + "feature_scale": 256, + "weight_scale": 1024, + "output_scale": 262144, + "bias_added_in_plaintext_like_current_main": true, + "masked_and_unmasked_integer_products_identical": true, + "maximum_absolute_unmasked_integer_accumulator": 1079883 + }, + { + "test_accuracy": 0.772, + "prediction_agreement_all": 0.981536189069424, + "prediction_agreement_test": 0.97, + "max_absolute_logit_error_all": 0.0677685737318825, + "mean_absolute_logit_error_all": 0.011963441284226245, + "max_absolute_logit_error_test": 0.0677685737318825, + "mean_absolute_logit_error_test": 0.011903090187026205, + "test_prediction_certified_by_margin_fraction": 0.884, + "feature_scale": 256, + "weight_scale": 4096, + "output_scale": 1048576, + "bias_added_in_plaintext_like_current_main": true, + "masked_and_unmasked_integer_products_identical": true, + "maximum_absolute_unmasked_integer_accumulator": 4322126 + } + ], + "joint_feature_weight_precision_simulations": [ + { + "test_accuracy": 0.777, + "prediction_agreement_all": 0.9933530280649926, + "prediction_agreement_test": 0.993, + "max_absolute_logit_error_all": 0.017167093072202988, + "mean_absolute_logit_error_all": 0.003019315576163216, + "max_absolute_logit_error_test": 0.01663780104718171, + "mean_absolute_logit_error_test": 0.0030318563751841015, + "test_prediction_certified_by_margin_fraction": 0.963, + "feature_scale": 1024, + "weight_scale": 1024, + "output_scale": 1048576, + "bias_added_in_plaintext_like_current_main": true, + "masked_and_unmasked_integer_products_identical": true, + "maximum_absolute_unmasked_integer_accumulator": 4326634 + }, + { + "test_accuracy": 0.774, + "prediction_agreement_all": 0.9992614475627769, + "prediction_agreement_test": 0.998, + "max_absolute_logit_error_all": 0.004168390150880441, + "mean_absolute_logit_error_all": 0.0007541812879902212, + "max_absolute_logit_error_test": 0.004168390150880441, + "mean_absolute_logit_error_test": 0.0007516626440982301, + "test_prediction_certified_by_margin_fraction": 0.989, + "feature_scale": 4096, + "weight_scale": 4096, + "output_scale": 16777216, + "bias_added_in_plaintext_like_current_main": true, + "masked_and_unmasked_integer_products_identical": true, + "maximum_absolute_unmasked_integer_accumulator": 69268066 + } + ] + } + ] +} diff --git a/docs/research/2026-10-10/numerical_ablation.py b/docs/research/2026-10-10/numerical_ablation.py new file mode 100644 index 0000000..2dd650d --- /dev/null +++ b/docs/research/2026-10-10/numerical_ablation.py @@ -0,0 +1,168 @@ +"""Controlled arithmetic ablation of PrivnetAI's Cora ridge head. + +This is simulated fixed-point arithmetic, not homomorphic encryption. +Application sources are read without modification. The repository dataset +loader may download and process Cora when its cache is absent. +""" +from __future__ import annotations + +import argparse +import contextlib +import datetime +import io +import json +import pathlib +import sys +import tempfile + +ROOT = pathlib.Path(__file__).resolve().parents[3] +sys.path.insert(0, str(ROOT)) + +import torch +import torch.nn.functional as F + +from core.utils import set_seed +from crypto.encryption import EncryptionShim +from datasets import load_planetoid +from ml.models.models import GCN +from ml.training.trainer import TrainConfig, train_and_eval + + +def metrics(logits, baseline, labels, test_mask): + pred = logits.argmax(1) + reference_pred = baseline.argmax(1) + error = (logits.to(torch.float64) - baseline.to(torch.float64)).abs() + top2 = baseline.topk(2, dim=1).values.to(torch.float64) + margin = top2[:, 0] - top2[:, 1] + local_error = error.amax(dim=1) + return { + 'test_accuracy': (pred[test_mask] == labels[test_mask]).double().mean().item(), + 'prediction_agreement_all': (pred == reference_pred).double().mean().item(), + 'prediction_agreement_test': (pred[test_mask] == reference_pred[test_mask]).double().mean().item(), + 'max_absolute_logit_error_all': error.max().item(), + 'mean_absolute_logit_error_all': error.mean().item(), + 'max_absolute_logit_error_test': error[test_mask].max().item(), + 'mean_absolute_logit_error_test': error[test_mask].mean().item(), + 'test_prediction_certified_by_margin_fraction': (margin[test_mask] > 2 * local_error[test_mask]).double().mean().item(), + } + + +def run(seed, output_dir): + set_seed(seed) + dataset, data = load_planetoid(root=str(ROOT / 'data'), name='Cora') + model = GCN(dataset.num_node_features, 64, dataset.num_classes, 0.5) + capture = io.StringIO() + with contextlib.redirect_stdout(capture): + stats = train_and_eval(model, data, TrainConfig(lr=0.01, weight_decay=5e-4, epochs=50), 'cpu') + print(f'seed={seed}: ' + capture.getvalue().strip().splitlines()[-1], flush=True) + model.eval() + with torch.no_grad(): + H = model.forward_hidden(data.x, data.edge_index) + X = H[data.train_mask] + Y = F.one_hot(data.y[data.train_mask], num_classes=dataset.num_classes).to(torch.float32) + W = torch.linalg.solve(X.T @ X + 1e-3 * torch.eye(X.size(1)), X.T @ Y) + b = (Y - X @ W).mean(dim=0) + plain_logits = H @ W + b + shim = EncryptionShim(scale=256.0) + enc_H = shim.encrypt_tensor(H) + current_logits = shim.decrypt_tensor(shim.matmul_linear_only(enc_H, W)) + b + quantized_H = torch.round(H * 256.0).to(torch.int64) + result = { + 'seed': seed, + 'gcn': stats, + 'plain_ridge': metrics(plain_logits, plain_logits, data.y, data.test_mask), + 'current_shim_unscaled_weight_rounding': metrics(current_logits, plain_logits, data.y, data.test_mask), + 'weights': { + 'minimum': W.min().item(), + 'maximum': W.max().item(), + 'mean_absolute': W.abs().mean().item(), + 'fraction_zero_after_unscaled_rounding': (W.round() == 0).double().mean().item(), + }, + 'correctly_scaled_simulations': [], + 'joint_feature_weight_precision_simulations': [], + } + for weight_scale in (256, 1024, 4096): + quantized_W = torch.round(W.to(torch.float64) * weight_scale).to(torch.int64) + integer_product = quantized_H @ quantized_W + masked_product = enc_H.payload @ quantized_W - enc_H.mask @ quantized_W + masked_equal = torch.equal(integer_product, masked_product) + assert masked_equal, 'Masked and unmasked simulated arithmetic disagree.' + scaled_logits = integer_product.to(torch.float64) / (256.0 * weight_scale) + b.to(torch.float64) + row = metrics(scaled_logits, plain_logits, data.y, data.test_mask) + row.update({ + 'feature_scale': 256, + 'weight_scale': weight_scale, + 'output_scale': 256 * weight_scale, + 'bias_added_in_plaintext_like_current_main': True, + 'masked_and_unmasked_integer_products_identical': masked_equal, + 'maximum_absolute_unmasked_integer_accumulator': integer_product.abs().max().item(), + }) + result['correctly_scaled_simulations'].append(row) + for joint_scale in (1024, 4096): + precise_shim = EncryptionShim(scale=float(joint_scale)) + precise_enc_H = precise_shim.encrypt_tensor(H) + precise_H = torch.round(H * joint_scale).to(torch.int64) + precise_W = torch.round(W.to(torch.float64) * joint_scale).to(torch.int64) + integer_product = precise_H @ precise_W + masked_product = precise_enc_H.payload @ precise_W - precise_enc_H.mask @ precise_W + masked_equal = torch.equal(integer_product, masked_product) + assert masked_equal, 'Masked and unmasked simulated arithmetic disagree.' + precise_logits = integer_product.to(torch.float64) / (joint_scale * joint_scale) + b.to(torch.float64) + row = metrics(precise_logits, plain_logits, data.y, data.test_mask) + row.update({ + 'feature_scale': joint_scale, + 'weight_scale': joint_scale, + 'output_scale': joint_scale * joint_scale, + 'bias_added_in_plaintext_like_current_main': True, + 'masked_and_unmasked_integer_products_identical': masked_equal, + 'maximum_absolute_unmasked_integer_accumulator': integer_product.abs().max().item(), + }) + result['joint_feature_weight_precision_simulations'].append(row) + (output_dir / f'numerical-ablation-seed-{seed}.log').write_text(capture.getvalue()) + print(json.dumps(result, indent=2), flush=True) + return result + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--output-dir', type=pathlib.Path, + help='Directory for new results; defaults to a fresh temporary directory.') + args = parser.parse_args() + output_dir = (args.output_dir.resolve() if args.output_dir is not None + else pathlib.Path(tempfile.mkdtemp(prefix='privnetai-ablation-'))) + archive_dir = pathlib.Path(__file__).resolve().parent + if output_dir == archive_dir or archive_dir in output_dir.parents: + parser.error('Choose an output directory outside the research archive.') + outputs = ['numerical-ablation.json', + *[f'numerical-ablation-seed-{seed}.log' for seed in (42, 43, 44)]] + if any((output_dir / name).exists() for name in outputs): + parser.error('Output files already exist; choose a fresh output directory.') + output_dir.mkdir(parents=True, exist_ok=True) + torch.set_num_threads(2) + report = { + 'created_at_utc': datetime.datetime.now(datetime.timezone.utc).isoformat(), + 'scope': 'Controlled same-model arithmetic ablation; simulated fixed-point arithmetic only, no real encryption or privacy guarantee.', + 'configuration': { + 'dataset': 'Cora / Planetoid standard split, NormalizeFeatures', + 'epochs': 50, + 'hidden_channels': 64, + 'dropout': 0.5, + 'learning_rate': 0.01, + 'weight_decay': 5e-4, + 'ridge_lambda': 1e-3, + 'device': 'cpu', + 'threads': torch.get_num_threads(), + 'torch_version': torch.__version__, + 'baseline': 'float32 ridge classifier on identical first-GCN-layer hidden features; bias matches main.py', + 'checkpoint': 'best validation accuracy within 50 training epochs, same as repository trainer', + 'seeds': [42, 43, 44], + }, + 'results': [run(seed, output_dir) for seed in (42, 43, 44)], + } + path = output_dir / 'numerical-ablation.json' + path.write_text(json.dumps(report, indent=2) + '\n') + print(f'Results written to {path}', flush=True) + + +if __name__ == '__main__': + main() diff --git a/docs/research/2026-10-10/pqc-2025-2026/literature-notes.md b/docs/research/2026-10-10/pqc-2025-2026/literature-notes.md new file mode 100644 index 0000000..4b96346 --- /dev/null +++ b/docs/research/2026-10-10/pqc-2025-2026/literature-notes.md @@ -0,0 +1,53 @@ +# PrivnetAI: 2025–2026 primary literature notes + +Checked 2026-10-10. Sources downloaded through the normal configured HTTP proxy with TLS verification. These are literature findings, not replicated experiments. + +## EinHops (10 July 2025) + +Karthik Garimella, Austin Ebel, Brandon Reagen. *EinHops: Einsum Notation for Expressive Homomorphic Operations on RNS-CKKS Tensors*. arXiv:2507.07972v1. + +- Primary paper: https://arxiv.org/html/2507.07972v1 +- Submission record: https://arxiv.org/abs/2507.07972 +- Hugging Face discovery: https://huggingface.co/papers/2507.07972 . Query provenance is summarized in [search-provenance.json](../search-provenance.json). +- Author-linked code: https://github.com/baahl-nyu/einhops +- The author-linked code README was inspected. Code available; not executed in this review. + +Methods: Einsum expressions are lowered to permutation, broadcasting, slotwise products, contraction reductions and masks. Permutations use baby-step/giant-step (BSGS), with single hoisting. Single-ciphertext working sets and explicit packing make layouts inspectable. + +Paper evaluations use degree 2^15 (16,384 slots), Xeon Platinum 8480+ CPU and H100 GPU. Memory-efficient power-of-two keys use about 3 GB; full BSGS key configuration about 32 GB. Its encrypted attention-score example takes 28.57 s, about 23 s spent aligning data. These numbers are author-reported, hardware-specific, and not graph benchmarks. + +Limits (paper section 5.3): single-ciphertext tensors; product of expanded input dimensions must fit N/2; no bootstrapping-placement policy; eager execution has no cross-call layout optimization. No demonstrated sparse-graph/GNN benchmark. Current GitHub README supports low-memory mode and a Torch simulation backend; simulated execution must remain separate from actual CKKS validation. + +Proposal consequence: use EinHops as a transparent dense tensor/packing baseline rather than claiming it solves scalable encrypted message passing. For fixed public graph topology, test sparse diagonal aggregation versus dense einsum, graph reordering and partitioned ego-graph layouts. Report rotations, layout-conversion time, ciphertext counts, occupied-slot ratio, evaluation-key memory, and amortized key generation. Large dense adjacency is unsuitable; Cora adjacency alone is 2708^2 entries, far beyond the paper's 16,384-slot single-ciphertext setup. Expanded contraction dimensions may be even larger. + +## Encrypted Neural Networks without Overflows (21 May 2026; revised 25 August 2026) + +Philipp Kern, Lorenzo Rovida, Samuel Teuber, Edoardo Manino, Carsten Sinz, Alberto Leporati. *Encrypted Neural Networks without Overflows*. arXiv:2605.23096v2. Submission record describes it as a preprint. + +- Primary paper: https://arxiv.org/html/2605.23096v2 +- Submission record: https://arxiv.org/abs/2605.23096 +- Author-linked code: https://github.com/lorenzorovida/encrypted-neural-networks-without-overflows +- The author-linked code README marks itself WIP and requires an author OpenFHE fork for Chebyshev SIMD polynomials. Not executed here. +- Hugging Face paper API returned 404 for this identifier during research; verification instead uses primary arXiv text and author-linked GitHub. + +Finding: sampled activation ranges can miss legitimate bounded-domain inputs. Out-of-range polynomial activations can diverge, causing unusable CKKS outputs. Paper reports 5.18% naturally occurring overflow on a MNIST-to-USPS test shift and up to 46.7% for a deeper CIFAR model under searched realistic perturbations. Those are their workloads; they do not establish a corresponding failure rate for PrivnetAI. + +Methods: sound input-domain range propagation, Remez polynomial synthesis, certified local and network-level approximation bounds; heterogeneous per-neuron polynomial evaluation via generalized Paterson–Stockmeyer in CKKS. Smooth activations such as GELU can approximate more accurately than ReLU at fixed degree. Evaluations cover fully connected and convolutional networks, not graph neural networks. + +Scope: theorem guarantees hold on the declared bounded input domain. Certified polynomial approximation bounds do not natively include all cryptographic CKKS noise; CKKS errors in their table are sampled, and the limitations section explicitly proposes adding probabilistic cryptographic-noise modeling. Deeper arbitrary networks require bootstrapping/co-design; bounds may become loose; ill-scaled coefficients can reduce precision. Some reported parameter sets are marked slightly below 128-bit security, so benchmark parameters must be reselected for PrivnetAI's chosen security target. + +Proposal consequence: extend certified-range design to fixed-topology GCN aggregation viewed as a sparse linear operator and bounded node-feature domain. This is a proposed research extension, not an established result. Compare sampled versus certified activation ranges, ReLU versus GELU/polynomial student activations, uniform versus per-channel polynomial degrees. Evaluate across graphs with different degrees and feature shifts. Record per-layer range violations, decoding failures, polynomial-approximation error, actual CKKS numeric error, class-margin preservation, accuracy, depth and latency. Hidden or changing adjacency requires a separate verifier/model, because the operator becomes variable or bilinear. Keep correctness/overflow robustness distinct from privacy/security. + +## Revisiting Approximate FHE with Noise-Flooding (PKC 2025) + +Flavio Bergamaschi, Anamaria Costache, Dana Dachman-Soled, Hunter Kippen, Lucas LaBuff, Rui Tang. *Revisiting the Security of Approximate FHE with Noise-Flooding Countermeasures*. PKC 2025, pp. 102–134. Publisher first-online date: 5 May 2025. Earlier preprint: ePrint 2024/424. + +- Verified publisher page and primary abstract: https://link.springer.com/chapter/10.1007/978-3-031-91832-2_4 +- Author page corroboration: https://www.ece.umd.edu/~danadach/ +- Author-linked estimator: https://github.com/hunterkipt/Geometric-LWE-Estimator (associated estimator research; do not assume turnkey reproduction of PKC paper). +- The publisher abstract, author page and estimator README were inspected on the review date; downloaded copies are omitted from this archive. +- Full paper not obtained: ePrint PDF returned 403 and Springer PDF redirected to a gated landing page. Claims here are restricted to the publisher abstract and author material. + +Primary abstract states that CKKS noise flooding can restore the stronger IND-CPA-D security notion at the cost of message precision. The paper studies a broad semi-honest attack class: adversary sees an honest party's public-key view and can query evaluation/decryption, with submitted ciphertexts either fresh or resulting from circuits on fresh independent ciphertexts. It estimates concrete security versus allowed decryption count before key refreshing and flooding variance, using techniques scaled to FHE-size dimensions and moduli. + +Proposal consequence: standard ciphertext CPA security alone does not certify protocols that reveal decrypted approximate outputs. State who sees decrypted results and whether outputs return across a trust boundary; report queries per key, key-refresh policy, flooding variance and precision/accuracy cost. Distinguish this analyzed attack model from arbitrary malicious ciphertext attacks. Proposed graph experiment: hold model/graph and base CKKS parameters constant while varying bounded query budget, result-release policy and flooding strength; evaluate numerical error and classification-margin loss. Noise flooding addresses a cryptographic leakage channel, not differential privacy of individual records or malicious-server computation correctness. diff --git a/docs/research/2026-10-10/recent-graph-2025-2026-addendum.md b/docs/research/2026-10-10/recent-graph-2025-2026-addendum.md new file mode 100644 index 0000000..d80164c --- /dev/null +++ b/docs/research/2026-10-10/recent-graph-2025-2026-addendum.md @@ -0,0 +1,63 @@ +# Focused 2025–2026 graph privacy literature addendum + +Reviewed 2026-10-10. This addendum supersedes the earlier inaccessible-primary-source status for CryptGNN. Primary sources from arXiv, Crossref and PMLR were accessible during this review. ACM's article page returned HTTP 403; its publisher-deposited Crossref record corroborated venue, author and publication metadata. All quantitative results below are **authors' reported results, not benchmarks reproduced by us**. + +Search coverage: focused arXiv query for graph neural/GNN AND homomorphic encryption/secure inference/secure multi-party computation/two-party computation, submissions 2025-01-01 through 2026-10-10, sorted newest; also checked primary GitHub repositories and exact name searches. This is a focused review, not exhaustive proof of novelty. Hugging Face coverage is documented in the [expanded research review](research-2025-2026-addendum.md). Temporary search responses and downloaded source caches are not included in this archive; persistent primary-source URLs are recorded below. + +## FicGCN — published ICML 2025 + +**FicGCN: Unveiling the Homomorphic Encryption Efficiency from Irregular Graph Convolutional Networks**. Zhaoxuan Kan, Husheng Han, Shangyi Shi, Tenghui Hua, Hang Lu, Xiaowei Li, Jianan Mu, Xing Hu. Proceedings of the 42nd International Conference on Machine Learning, PMLR 267:28832–28848, July 13–19, 2025. + +Primary publisher: https://proceedings.mlr.press/v267/kan25a.html . Publisher's full PDF via its GitHub repository: https://raw.githubusercontent.com/mlresearch/v267/main/assets/kan25a/kan25a.pdf . Matching paper repository: https://github.com/TielingDurant/FicGCN (README says `ICML2025FicGCN`; root contains only `README.md` and `Re_FicGCN.pdf`, so this is a paper mirror, not a verified code release). + +- Mechanisms: latency-aware feature packing, sparse intra-ciphertext aggregation to reduce rotations, and region-based graph node reordering. Balances sparse aggregation with dense feature transformation rather than maximizing slot utilization in isolation. +- Threat model Section 2.4: **server has plaintext adjacency A and model weights W**, client encrypts features X and keeps secret key, server honest-but-curious. Thus this is a particularly relevant efficient feature-private CKKS comparator, but it does not hide graph topology or model weights from the server. +- Evaluation: Cora (2,708 nodes, 1,433 features), CiteSeer (3,327 / 3,703), CoraFull (19,793 / 8,710) use two-layer graph autoencoders with square activations and 32/16 hidden/output feature dimensions; also NTU skeleton STGCN. Single-thread Intel i7-9750H, Microsoft SEAL 3.7.2. Table 6 says 128-bit security for citation graphs, ≥80-bit for NTU; equal-security comparisons are necessary. +- Main Table 3: Cora 64.12 s vs Penguin 128.82 s (~2.01x); CiteSeer 79.98 s vs Penguin 142.90 s (~1.78x); CoraFull 7,733 s vs CryptoGCN 31,735 s (~4.10x). These are specific graph/model/platform results, not expected PrivnetAI performance. Do not use its speedups over weaker baselines as universal claims. +- Improvement implication: adopt a real packing/rotation cost model, sparse aggregation and data layout scheduling first; implement normalized adjacency and the trained square model consistently and compare with the same graph, model and cryptographic strength. Task is GAE in these benchmarks, not our node classifier, so reproduce the adapted protocol before numerical cross-paper comparisons. + +## CryptGNN — published CCS 2025 + +**CryptGNN: Enabling Secure Inference for Graph Neural Networks**. Pritam Sen, Yao Ma, Cristian Borcea. arXiv 2509.09107v1 submitted **September 11, 2025**. Publisher-deposited Crossref metadata verifies *Proceedings of the 2025 ACM SIGSAC Conference on Computer and Communications Security*, DOI **10.1145/3719027.3765232**, print publication **November 19, 2025**, online **November 22, 2025**. + +Primary abstract/full text: https://arxiv.org/abs/2509.09107 and https://arxiv.org/html/2509.09107v1 . Publisher metadata: https://api.crossref.org/works/10.1145/3719027.3765232 . No linked public author implementation identified in its paper or exact-name GitHub repository searches; secondary reading lists are not code artifacts. + +- Distributed MPC, not CKKS/FHE: additive shares protect client node features and source/destination edge indices; model parameters are also shared. CryptMPL secures message passing using masked rotations/batches; CryptMUL avoids a trusted server for matrix/elementwise products. +- Authors' threat model permits up to P−1 colluding **honest-but-curious** computing parties, also collusion with model owner or a controlled client. Architecture/type/order/number of layers are public. Secure channels assumed. This is not active/malicious security. Section 8 explicitly lists active adversaries/verifiable computation and secure training as future work. +- Main whole-model experiments: GIN graph classification on FAUST, PROTEINS and ENZYMES, plus synthetic graphs. Cora, CiteSeer and PPI primarily test the message-passing primitive, not full-model Cora classification accuracy. 64-bit additive shares; 3.4 GHz Intel i7 with parties in separate processes, plus an AWS experiment; each timing averaged over 30 repetitions. +- Authors report matching plaintext classification accuracy in their whole-model experiments, FAUST ~22.3 s in three-party inference (6,890 nodes / 41,328 edges), synthetic 20,000 nodes / 200,000 edges ~75 s. Primary performance comparison excludes the initial server preprocessing. Separate FAUST accounting gives ~0.9 s client preprocessing, 7.5 s Beaver setup, 23.1 s online inference. Explain cold-start vs repeated-query costs. +- Authors compare message passing to SecGNN (~1.5x on one synthetic setup), and to a **hypothetical dense adjacency CrypTen baseline** (25x on PPI with six parties). These are not comparisons against the most efficient packed-HE algorithms. Communication for large synthetic graphs: 81.9 MB per party versus 6,103 MB in their CrypTen baseline; upload 12 MB versus 3,050 MB. +- Improvement implication: make topology privacy and model privacy explicit, separate leakage from numeric approximation, and compare interactive MPC with single-server HE under matched threat models. Malicious integrity/verifiability could differentiate future work but is not achieved by simply adding transport encryption or a PQC handshake. + +## PrivGNN — 2025 preprint, a distinct name collision + +**PrivGNN: High-Performance Secure Inference for Cryptographic Graph Neural Networks**. Fuyi Wang, Zekai Chen, Mingyuan Fan, Jianying Zhou, Lei Pan, Leo Yu Zhang. arXiv **2511.02185v1**, **November 4, 2025**. No published venue verified in reviewed metadata; treat as a preprint. **This is distinct from earlier DP PrivGNN/PrivGnn work.** + +Primary abstract/full text: https://arxiv.org/abs/2511.02185 and https://arxiv.org/html/2511.02185v1 . No author implementation link identified in the paper; exact GitHub search yielded only a survey list, not this paper's code. + +- Client-server interactive 2PC combines additive secret sharing with function secret sharing. Both client's graph and server's weights are private. Both participants semi-honest; active security not established. +- Offline-online secure protocols include linear transforms, quadratic/arbitrary-degree polynomial evaluation, ReLU and piecewise polynomial approximations of sigmoid/tanh. The online quadratic protocol uses one communication round; offline work must be counted separately. +- Evaluation covers MNIST/CIFAR CNNs and **QM9 molecular graphs**, not Cora node classification. Testbed: two servers with 64-core CPUs, 128 GB RAM and 2 RTX 2080 Ti GPUs; LAN 1 Gbps / 0.1 ms; 32-bit arithmetic ring (also scalability plots for 32/64/128/256 bits). Fixed-point truncation and reformulated activations cause accuracy differences. +- QM9 reported secure accuracy 96.42% vs plaintext 97.93% (**1.51 percentage-point loss**, not 0.1%). Table 3 reports 2.48 s online + 5.45 s offline = 7.93 s total, versus SecMPNN 102.57 s. The paper states existing baseline results were sourced from prior papers, so independent implementation/hardware matching is not established. +- Crucial correction: the abstract's 1.3–4.7x speedup range appears in Section 6.3 for **ResNet32/CIFAR100**, not a universal GNN speedup. Do not use it as direct evidence for Cora. QM9 framing as accuracy is itself the authors' metric; do not reinterpret it as standard regression MAE. +- Improvement implication: evaluate approximation/truncation explicitly, include offline costs and WAN sensitivity, and assess interactive ReLU/piecewise protocols if a hybrid MPC branch is within project scope. + +## TGHE — June 2026 preprint + +**TGHE: Template-based Graph Homomorphic Encryption for Privacy-Preserving GNN Inference in Edge-Cloud Systems**. Ngoc Bao Anh Le, Thai T. Vu, John Le, Heath Cooper, Jun Shen. arXiv **2606.26664v1**, **June 25, 2026**. No conference/journal venue verified; treat as a preprint. + +Primary abstract/full text: https://arxiv.org/abs/2606.26664 and https://arxiv.org/html/2606.26664v1 . Paper links backbone https://github.com/storyandwine/GEARSage-DGraphFin; that is not necessarily the released TGHE implementation. No clear TGHE-specific code link identified. + +- Ego-centric inference: trusted edge extracts/canonicalizes bounded 2-hop computation trees, groups identical shapes, SIMD-packs many queries under CKKS. Approximate template fitting handles unmatched shapes; topology collapse locally preaggregates linear hop-2 neighbors, reducing encrypted operations. Target: two-layer GEARSage with trainable quadratic activations, degree caps 10/5, 17 features → 32 hidden channels. +- Server honest-but-curious, client keeps secret key. Protects features and outputs; **explicitly accepts structural leakage**. Server sees template signatures, degrees/per-hop child counts, and plaintext edge type/direction/timestamp correction metadata. It does not claim full topology hiding. Paper suggests client-precomputed correction terms as a hardening option. +- Evaluation: 10,000 sampled query nodes drawn from DGraphFin (3.7 million nodes / 4.3 million edges), not a full encrypted computation on all 3.7 million nodes. Google Cloud n2-standard-16, 16 vCPUs / 64 GB, Microsoft SEAL CKKS degree 16,384, authors state 128-bit security; batch capacity 128. +- Reported sequential encrypted baseline: 7,751.7 s, AUC 0.7973. Template-base: 576.0 s, AUC 0.7950. Collapse: 115.9 s, AUC 0.7959, 66.9x vs sequential baseline and 5.0x vs base. **Reported <0.002 loss compares packed HE with adapted sequential HE (0.0014)**. Original plaintext GEARSage backbone AUC 0.8460; total backbone → collapse loss ≈ 0.0501. The paper itself explains square/polynomial adaptation and degree caps create the earlier loss. Do not say 66.9x vs FicGCN, or no accuracy loss vs original ReLU model. +- Improvement implication: batch structurally compatible encrypted queries, move allowed linear preprocessing to the client, and report each accuracy-loss source separately. Check whether degree/template/edge metadata exposure meets the intended privacy goal before adopting the design. + +## Other reviewed 2025–2026 source coverage + +- DESIGN 2507.05649v2 (July 2025), https://github.com/LabRAI/DESIGN; original paper and author repository inspected. See the [detailed static audit](DESIGN-audit.md). +- Rotom, 2025 ePrint / USENIX Security 2026, and its official CMU repository were previously reviewed; it is a tensor compiler transfer source, not a direct private-GNN evaluation. See the [research review](research-review.md). +- [FedGraph 2410.06340](https://arxiv.org/abs/2410.06340) has a verified **v4 update September 2, 2025** and primary abstract that now discusses encrypted low-rank communication and scale to 100-million-node graphs; initial submission remains October 8, 2024. Do not confuse revision date with a new 2025 paper or whole encrypted inference of 100 million nodes. + +Suggested final prioritized comparators: **FicGCN 2025** for packed feature-private HE; **CryptGNN 2025** for topology/model-private MPC; **TGHE 2026** for workload-batched CKKS with explicit leakage and preprocessing; **DESIGN 2025** subject to independent implementation consistency audit. PrivGNN 2025 is an additional interactive/molecular comparator with concrete approximation and preprocessing caveats. diff --git a/docs/research/2026-10-10/research-2025-2026-addendum.md b/docs/research/2026-10-10/research-2025-2026-addendum.md new file mode 100644 index 0000000..a522c2e --- /dev/null +++ b/docs/research/2026-10-10/research-2025-2026-addendum.md @@ -0,0 +1,67 @@ +# PrivnetAI: expanded 2025–2026 research review + +Checked 10 October 2026. This follow-up fills the gaps in the first review: Hugging Face had not previously been searched, and several 2025 papers had only secondary metadata. The environment's network configuration subsequently changed, enabling direct scholarly-source checks. Repository source files were not modified. + +## What was actually reviewed + +- **Hugging Face Papers:** six searches covering homomorphic graph learning, secure GNN inference, private graph learning, encrypted neural networks, CryptGNN, and encrypted graph training. Relevant paper abstracts were inspected; original papers and author code were then checked where available. Hugging Face AI-generated summaries were not used as substitutes for paper abstracts. +- **Hugging Face Hub:** targeted model searches for `homomorphic`, `CryptGNN`, and `LinGCN`, and dataset searches for `homomorphic` and `federated_graph`. These queries returned no matching entries. This does not establish that the Hub contains no relevant artifacts under other names. +- **GitHub:** author implementations, publication mirrors, primary project repositories, and exact-name repository searches. A repository update date does not establish a new paper date, and a PDF-only repository does not establish released runnable code. +- **Original publications:** focused 2025–2026 arXiv searches, full-text papers, PMLR proceedings, and publisher-deposited metadata. Where only an abstract was accessible, the evidence level is stated below. + +Compact Hugging Face query provenance and selected paper metadata are archived in [search-provenance.json](search-provenance.json). The specialist notes retain primary-source URLs and verification limits; raw search dumps and downloaded papers are omitted. Searches were targeted, not exhaustive. No third-party paper's reported performance was reproduced here. + +## Direct recent graph-computation comparators + +| Paper and verified year | Sources inspected | What it contributes | Comparison boundary | +|---|---|---|---| +| **FicGCN**, ICML 2025 | [PMLR paper and full PDF](https://proceedings.mlr.press/v267/kan25a.html); [GitHub PDF mirror](https://github.com/TielingDurant/FicGCN) | Latency-aware packing, sparse intra-ciphertext aggregation, and adjacency-based node reordering reduce rotations and balance aggregation against feature transformation. | Server sees adjacency and weights; client features are encrypted. Citation-graph experiments use graph autoencoders with square activations, not our node classifier. The identified GitHub repository is a paper mirror, not an implementation release. | +| **CryptGNN**, September 2025 preprint; CCS 2025 | [Original paper](https://arxiv.org/abs/2509.09107); [publication DOI](https://doi.org/10.1145/3719027.3765232) corroborated by publisher metadata | Multiparty secret sharing protects features, edge indices, and model parameters. Secure message passing is a central contribution. | Honest-but-curious participants and collusion model; active/malicious security and training are future work. Secure channels assumed. No public author implementation identified. | +| **DESIGN**, July 2025 preprint | [Hugging Face](https://huggingface.co/papers/2507.05649), [paper](https://arxiv.org/abs/2507.05649), [author GitHub](https://github.com/LabRAI/DESIGN) | Encrypted degree-based importance masks, graph pruning, and adaptive polynomial activations. | Acceptance was not verified; accessible paper/repo say under review. Static code and paper inconsistencies warrant reproduction before treating speedups or accuracy as established. Details below. | +| **PrivGNN**, November 2025 preprint | [Original paper](https://arxiv.org/abs/2511.02185) | Interactive two-party inference with additive and function secret sharing; polynomial and ReLU protocols. | Distinct from older differential-privacy papers with similar names. Semi-honest assumptions. QM9 graph experiments and offline costs differ from our Cora workflow; no public author code identified. | +| **TGHE**, June 2026 preprint | [Original paper](https://arxiv.org/abs/2606.26664) | Canonical ego-graph templates, SIMD batching, and permitted client-side linear preprocessing reduce CKKS evaluation cost. | Template signatures, degrees, and some edge metadata are disclosed. Evaluates 10,000 sampled DGraphFin queries, not encrypted processing of the entire multi-million-node graph. No confirmed TGHE-specific implementation release. | + +Specific reported results illustrate why comparison boundaries matter: + +- **FicGCN:** reports Cora 64.12 s versus Penguin 128.82 s on its graph-autoencoder experiment, and CoraFull 4.10× versus CryptoGCN. These are particular models, hardware, and security settings. They are not predicted PrivnetAI speedups. +- **TGHE:** reports 66.9× versus its sequential encrypted baseline. Its approximately 0.0014 AUC loss compares two adapted encrypted models, while original plaintext backbone AUC 0.8460 versus final packed result 0.7959 gives approximately 0.0501 total loss. Separate model adaptation from packing loss. +- **CryptGNN:** includes graph classification and message-passing benchmarks. Online performance excludes some setup; cold-start and repeated-query costs must be reported separately. Its MPC topology protection cannot be compared directly with topology-public HE as if the privacy guarantees were identical. +- **PrivGNN:** reported QM9 secure accuracy differs from plaintext by 1.51 percentage points, and offline preprocessing is substantial. Its headline 1.3–4.7× range concerns a CNN experiment, not a universal GNN result. + +Full source-backed details: [graph-paper notes](recent-graph-2025-2026-addendum.md). + +## Relevant 2025–2026 arithmetic, compiler, and security work + +| Work | Sources and evidence level | Implication for PrivnetAI | +|---|---|---| +| **EinHops**, 10 July 2025 | [Hugging Face](https://huggingface.co/papers/2507.07972), [full paper](https://arxiv.org/abs/2507.07972), [author GitHub](https://github.com/baahl-nyu/einhops) | Makes CKKS tensor packing inspectable through einsum. Use as a dense-tensor baseline; compare sparse aggregation and graph layouts. Its single-ciphertext and expanded-dimension limits matter for large adjacency matrices. Include evaluation-key memory, which is large in its reported configurations. | +| **Rotom**, 2025 ePrint / USENIX Security 2026 | [Official author repository](https://github.com/cmu-cryptosystems/Rotom); author-declared publication and substantive implementation documentation inspected in the first pass | Automated layout search and fewer rotations support compiler-assisted implementation. GNN-specific gains must be measured independently. | +| **Encrypted Neural Networks without Overflows**, submitted 21 May 2026; revised 25 August 2026 | [Full paper](https://arxiv.org/abs/2605.23096), [author GitHub](https://github.com/lorenzorovida/encrypted-neural-networks-without-overflows); HF identifier returned 404 | Certified activation ranges and polynomial-error analysis can improve robustness under distribution shifts. Certification assumes a bounded input domain and does not fully include CKKS cryptographic noise. Experiments are FC/CNN, not GNN; code is WIP. | +| **Revisiting the Security of Approximate FHE with Noise-Flooding Countermeasures**, PKC 2025, online 5 May 2025; earlier preprint 2024/424 | [Primary publisher abstract](https://link.springer.com/chapter/10.1007/978-3-031-91832-2_4) and author page; full text unavailable. [Author-linked estimator](https://github.com/hunterkipt/Geometric-LWE-Estimator) | Connect output exposure, observed decryptions per key, flooding, and concrete security. State who receives scores and query/key-refresh policies. This evidence does not establish arbitrary malicious-ciphertext security or a numerical flooding recommendation. | + +Full arithmetic notes: [2025–2026 numerical/compiler review](pqc-2025-2026/literature-notes.md). + +Hugging Face also surfaced **FHAIM** ([February 2026 paper](https://huggingface.co/papers/2602.05838), [linked code](https://github.com/mayank64ce/mbi)), combining encrypted tabular synthetic-data generation with differential privacy. This was screened at abstract level and is an adjacent training direction, not a direct GNN-inference comparator. Equivariant-encryption/representation-obfuscation work likewise requires its own security analysis rather than being treated as interchangeable with HE. + +## DESIGN implementation audit + +The author repository was inspected at commit `859225550559b96dc025b7ceaa5819c919da1c5e`. It was not installed, executed, or repaired. Findings describe that snapshot and do not establish that every possible implementation of the paper is invalid. + +1. Masked-zero adjacency entries remain in the same diagonals and feature ciphertexts; aggregation continues over the same representation. Adaptive activation evaluates each level's polynomial over the complete vector, then masks and sums. Logical pruning alone does not demonstrate fewer HE operations. An actual compaction, public schedule, or another independently verified cost-saving mechanism is needed before importing a speedup claim. +2. The comparison polynomial is applied to raw degree differences despite its documented limited interval. For its cubic, `p(3) = -4`, outside a useful mask range. +3. README's claimed ≤2 percentage-point accuracy loss does not match the paper's Cora/CiteSeer/PubMed table losses of 10/15/25 points. +4. The inspected accuracy routine evaluates all nodes despite comments describing test-mask evaluation; some datasets are sampled to 4,000 nodes. Missing imports and differing encryption parameters further complicate reproduction. + +Detailed primary-paper and code references: [DESIGN audit](DESIGN-audit.md). These findings reinforce the need to audit runnable artifacts rather than accepting GitHub or paper headline claims. + +## Revised improvement priorities + +The earlier numerical diagnosis still holds: weight encoding largely explains the shim's accuracy loss. The recent literature strengthens the next steps and makes a generic “graph packing plus adaptive polynomial activations” novelty claim insufficient. + +1. Establish matched float, fixed-point, and genuine CKKS baselines before optimizing. Preserve graph operator, weights, bias, splits, and activation definitions across corresponding comparisons. +2. Adapt **FicGCN** as a feature-private, topology-public packing baseline. Compare **TGHE** only where client preprocessing and disclosed metadata fit the intended threat model. Use **CryptGNN/PrivGNN** to evaluate the additional cost of private topology and interactive computation. +3. Explore graph-specific certified activation ranges and precision allocation, building on the 2026 overflow paper. Report approximation error and real CKKS error separately. Investigate varying graph degrees and feature shifts; do not claim a GNN certificate from the non-GNN paper alone. +4. Count the work an optimization actually removes: rotations, ciphertext multiplications, keys, bytes, and online/offline cost. Show whether graph masking merely changes values or also reduces computation. +5. Evaluate topology leakage, output exposure, and numerical fidelity jointly. A potentially stronger research question is: **which graph-aware optimizations measurably reduce encrypted-inference cost while satisfying explicit disclosure limits and prediction-error bounds?** Establish novelty through systematic comparison and reproducible experiments. + +The targeted review now includes both GitHub and Hugging Face and several direct 2025–2026 research papers. Coverage depth varies and is documented. Published papers, preprints, revised older papers, abstract-only sources, code audits, author-reported results, and our simulated numerical experiment remain distinct. diff --git a/docs/research/2026-10-10/research-review.md b/docs/research/2026-10-10/research-review.md new file mode 100644 index 0000000..ba754ef --- /dev/null +++ b/docs/research/2026-10-10/research-review.md @@ -0,0 +1,85 @@ +# PrivnetAI: research review and improved proposal + +Reviewed and expanded 10 October 2026. Inputs: the repository's May 2025 `Report.pdf`, README, roadmap, current implementation, onboarding measurements, research papers and code, Hugging Face Papers/Hub searches, and a new controlled numerical experiment. Repository source files were not changed. See [the expanded 2025–2026 review](research-2025-2026-addendum.md) for direct recent comparators and updated proposal implications. + +## Main recommendation + +Develop a reproducible, real-CKKS private graph-inference benchmark before attempting encrypted training, private topology, and zero-knowledge verification together. A promising research direction is joint optimization of graph-specific ciphertext packing, activation placement, and numerical precision under an explicit leakage model. Novelty remains to be established against the complete literature. + +## Search coverage and evidence + +The first review used accessible author repositories while the HTTPS proxy rejected several scholarly sites; Hugging Face had not been searched. After the runtime network configuration changed, the follow-up searched Hugging Face Papers and targeted model/dataset catalogs, GitHub, arXiv, and publication records. Relevant original papers and author code were inspected where accessible. Some individual publication routes remain unavailable. This is a targeted review with sources through 2026, not an exhaustive search or proof of novelty. Repository update dates and Hugging Face ingestion/revision dates were not treated as first publication dates. The cited systems were not installed or benchmarked here. + +| Work | Evidence inspected | Connection to PrivnetAI | Limits | +|---|---|---|---| +| **Rotom: Bridging Usability and Performance: A Tensor Compiler for Autovectorizing Homomorphic Encryption**, Edward Chen, Fraser Brown, Wenting Zheng; ePrint 2025/1319, USENIX Security 2026 | [Author repository](https://github.com/cmu-cryptosystems/Rotom) explicitly names the paper and venue, and describes layout search, autovectorization, roll rewrites, and reduced ciphertext rotations. | Treat ciphertext layout as a compiler optimization problem. Evaluate layouts for graph aggregation and feature projection; measure rotations, ciphertext count, and evaluation-key storage. | General tensor compilation does not establish a graph-specific speedup. Current repository backend features may postdate the paper. | +| **Fhelipe: A Tensor Compiler with Automatic Data Packing for Simple and Efficient Fully Homomorphic Encryption**, PLDI 2024 | [Author repository](https://github.com/fhelipe-compiler/fhelipe) describes automatic packing and links the [paper DOI](https://doi.org/10.1145/3656382). | A useful compiler baseline for packing and reducing manual HE implementation effort. | Its application results must not be transferred to Cora or our hardware without reproduction. | +| **FedGraph: A Research Library and Benchmark for Federated Graph Learning**, 2024 preprint, arXiv:2410.06340 | [Author repository](https://github.com/FedGraph/fedgraph) supplies the citation and documents cross-client edges, node/link/graph tasks, and non-IID settings. | Use established partitioning and communication benchmarks if the proposal moves toward collaborative training. | Federated training is a different threat model from outsourced single-client encrypted inference. Encryption is optional in its examples. Current threshold/OpenFHE paths are implementation developments, not verified 2024-paper results. | +| **LinGCN: Structural Linearized Graph Convolutional Network for Homomorphically Encrypted Inference**, NeurIPS 2023 | [Official implementation](https://github.com/harveyp123/LinGCN-Neurips23) describes differentiable structural linearization, teacher-guided node-wise polynomial replacement, and operator fusion. | Reduce nonlinear depth deliberately; retrain or distill the HE-compatible model rather than inserting arbitrary polynomials into a frozen model. | Experiments concern STGCN skeleton recognition, not Cora node classification. Its reported latency reductions are not predictions for PrivnetAI. | +| **CryptoGCN: Fast and Scalable Homomorphically Encrypted Graph Convolutional Network Inference**, NeurIPS 2022 | [Official implementation](https://github.com/ranran0523/CryptoGCN) links the NeurIPS paper and implements real HE. | Establishes that encrypted GCN inference already exists. The proposal needs a specific efficiency, fidelity, leakage, or reproducibility contribution. | An older baseline, not new research. Historical code vendors old SEAL; reproduce only after addressing current library compatibility and security updates. | + +**Updated primary verification:** [CryptGNN: Enabling Secure Inference for Graph Neural Networks](https://arxiv.org/abs/2509.09107) is now verified from original text and publisher-deposited metadata: September 2025 preprint, CCS 2025, DOI [10.1145/3719027.3765232](https://doi.org/10.1145/3719027.3765232). It uses multiparty secret sharing to protect graph, features, and model under an honest-but-curious collusion model; malicious security is not established. Additional direct recent comparators include DESIGN (2025), FicGCN (ICML 2025), PrivGNN (November 2025), and TGHE (June 2026), detailed in the linked addendum. These materially strengthen the required baseline comparison and narrow any novelty claim about graph packing or adaptive activations. + +## New finding: isolate numerical loss from model changes + +The existing CLI compares a complete two-layer GCN against a separately fitted ridge classifier on first-layer features. Those are different models: the ridge head omits the GCN's second graph convolution. Consequently, their accuracy difference cannot be attributed entirely to encryption. + +We ran the existing 50-epoch Cora training pipeline for seeds 42, 43, and 44, selected the best validation checkpoint as the repository does, then evaluated identical hidden features, ridge weights, and bias in three arithmetic paths. + +| Seed | Complete float GCN | Same float ridge head | Existing shim | Correctly scaled integer simulation, feature and weight scales 4096 | Test prediction agreement with float ridge | +|---|---:|---:|---:|---:|---:| +| 42 | 82.7% | 77.7% | 51.2% | 77.7% | 100.0% | +| 43 | 82.4% | 79.3% | 57.0% | 79.3% | 100.0% | +| 44 | 81.5% | 77.4% | 67.9% | 77.4% | 99.8% | + +The existing shim rounds weights directly to integers. A weight 0.4 becomes zero. Correct encoding uses separate scales: `round(s_x H) @ round(s_w W) / (s_x s_w)`, with consistently represented bias. The experiment records observed integer accumulator magnitudes; establishing safe bounds for the declared input domain remains a requirement. At feature/weight scale 4096, maximum test-logit error was approximately 0.0037–0.0048. Increasing weight scale alone plateaued because feature quantization then dominated. + +These are **simulated integer arithmetic results, not CKKS results or privacy guarantees**. Bias was added in plaintext to match the current CLI. Three seeds on one public benchmark are an exploratory diagnosis, not a broad statistical evaluation. Choose future hyperparameters using validation data, then lock them before final test evaluation. + +Reproduction from the checkout root with dependencies installed: `OMP_NUM_THREADS=2 MKL_NUM_THREADS=2 python docs/research/2026-10-10/numerical_ablation.py`. New results go to a fresh temporary directory printed by the script. The original [JSON results](numerical-ablation.json), script and seed logs are retained beside this review; see [archive instructions](README.md) for prerequisites and environment details. + +## Correct the security foundation + +1. **Retire SIDH/SIKE as the proposed security foundation.** [Microsoft's official warning](https://github.com/microsoft/PQCrypto-SIDH#warning) states they were proven insecure and cites the 2022 Castryck–Decru attack. This does not mean all isogeny-based schemes are broken. A signature scheme such as SQIsign is not an HE engine. +2. **Assign each primitive a specific role.** CKKS supplies approximate encrypted computation. [ML-KEM / FIPS 203](https://csrc.nist.gov/pubs/fips/203/final) establishes shared secrets; [ML-DSA / FIPS 204](https://csrc.nist.gov/pubs/fips/204/final) and [SLH-DSA / FIPS 205](https://csrc.nist.gov/pubs/fips/205/final) supply signatures. Their standardized status is corroborated by [official OQS documentation](https://github.com/open-quantum-safe/liboqs). A KEM does not enable homomorphic learning, and a signature does not prove correct model execution. +3. **Keep the shim explicitly educational.** `EncTensor` bundles the additive mask with the masked payload. If a recipient sees both, recovering the quantized input is immediate. The deterministic generator, plaintext features/training, and reversible-string Kyber mock establish no cryptographic privacy or post-quantum security. Removing the mask field alone is insufficient: computing the correction `rW` requires an actual protocol. +4. **Specify output and integrity rules.** Who decrypts? Who receives plaintext predictions? Does the client accept server-chosen ciphertexts or reveal decryptions? [SEAL's security guidance](https://github.com/microsoft/SEAL/blob/main/SECURITY.md) warns about CKKS output leakage and decryption-oracle behavior and documents missing ciphertext authentication/circuit privacy. Address these in protocol design rather than assuming HE solves them. +5. **Use maintained backends and documented security parameters.** [OpenFHE](https://github.com/openfheorg/openfhe-development) supports CKKS, threshold operations, and scheme switching. Its [parameter guidance](https://github.com/openfheorg/openfhe-development/blob/main/src/pke/examples/README.md) and [security definitions](https://github.com/openfheorg/openfhe-development/blob/main/src/core/include/lattice/stdlatticeparms.h) distinguish classical and quantum levels; `HEStd_NotSet` disables checks. A working demo parameter set is not a security claim. For any future SEAL backend, its [v4.4.0 security update](https://github.com/microsoft/SEAL/blob/v4.4.0/CHANGES.md), dated July 2026 in the tagged README, is relevant; PrivnetAI currently has no installed SEAL dependency. + +## Improved research question + +**How can graph-specific ciphertext layouts, HE-compatible model structure, and numerical precision jointly reduce private-inference cost while preserving prediction fidelity under a stated security and leakage model?** + +Suggested proposal wording: + +> PrivNet.AI studies private inference for graph neural networks under specified lattice-based encryption assumptions. We first protect node features while treating topology as public, and evaluate numerical fidelity and system cost against identical plaintext models. We investigate graph-specific packing, reduced nonlinear depth, and precision allocation, with authenticated post-quantum communication as a separate protocol layer. Private topology, collaborative training, and verifiable computation are subsequent research targets. + +The original report also discusses GNN-assisted lattice/isogeny cryptanalysis. That is a separate research track from privacy-preserving GNN execution and needs its own task definition, attack baselines, and citations. Do not present learned parameter recommendations as cryptographic proofs. The report's bare reference to “zkGNNs (2022)” needs authors, title, venue, and a stable identifier before it can support a claim. + +## Practical milestones and acceptance criteria + +### 1. Matched-model real-HE baseline + +Keep identical features, weights, and biases across float, fixed-point simulator, and real CKKS evaluation. Encrypt the hidden-feature classifier first because it is the smallest circuit matching the current PoC. The client holds the secret key; the server receives ciphertexts and necessary evaluation keys. Label this encrypted-head inference, not encrypted graph training. Confirm correctness, parameter security estimates, and end-to-end encryption/evaluation/decryption costs. + +### 2. Complete GCN inference with public topology + +Encrypt input features and implement the entire chosen inference circuit, including adjacency aggregation. Compare the original float GCN, the plaintext HE-compatible GCN, and its CKKS execution separately. Use low-degree polynomial activations with calibration/retraining or distillation; measure their approximation ranges. Explore fusion and layout search guided by LinGCN, Fhelipe, and Rotom. Do not assume their existing speedups transfer. + +### 3. Graph-specific experiments + +Start with Cora, then CiteSeer/PubMed and a different graph task where useful. Vary graph size, degree, feature width, model depth, and packing strategy. Record accuracy, same-model prediction agreement, maximum/mean logit error, rotations, key switches, multiplicative depth, ciphertext/evaluation-key bytes, memory, and separate setup versus online latency. Report hardware and all security-relevant parameters. Compare methods at matched privacy targets, security parameters, and accuracy. + +For each input, a sufficient fidelity condition is `winning_float_margin > 2 * max_absolute_logit_error`; then the predicted class is unchanged. This is a numerical condition, not a security proof. A useful follow-up is to derive conservative graph/activation error bounds and use validation margins to allocate precision. Do not certify unseen data merely from observed test errors. + +### 4. Stronger threat models after the baseline + +Private edges require a protocol that hides adjacency and relevant access patterns; encrypting features alone leaves topology public. Benchmark HE/MPC alternatives under the same leakage model. Multi-institution training requires explicit collusion assumptions, handling of cross-client edges, and potentially threshold HE/secure aggregation. Federated learning alone does not prevent gradient or graph leakage; differential privacy needs a defined node/edge/graph adjacency relation and a stated privacy budget. + +### 5. Verifiability as a separate contribution + +Choose a concrete malicious-server problem and specify what a proof attests to, including model identity, preprocessing, arithmetic, and input commitments. Budget proving and verification costs. Conventional proof-system assumptions are not automatically post-quantum. Avoid promising full encrypted training plus post-quantum zero-knowledge before demonstrating a specific protocol. + +## Deliverables and current limits + +This archive preserves the authored reviews, compact search provenance, numerical reproduction script, JSON results and seed logs. Primary-source URLs are retained; downloaded third-party papers and source snapshots are omitted. Application code and the existing roadmap remain unchanged. Genuine CKKS performance, private topology, encrypted training, and proof-system integration were not evaluated. The expanded search improves recent-paper coverage; systematic literature comparison and baseline reproduction remain prerequisites to a novelty claim. diff --git a/docs/research/2026-10-10/roadmap-proposed.md b/docs/research/2026-10-10/roadmap-proposed.md new file mode 100644 index 0000000..bffde52 --- /dev/null +++ b/docs/research/2026-10-10/roadmap-proposed.md @@ -0,0 +1,182 @@ +# PrivNet.AI — proposed roadmap + +Prepared 10 October 2026 for review. This draft revises the roadmap using current implementation evidence and verified 2025–2026 research. It has not been applied to the tracked repository roadmap. + +> A research framework for privacy-preserving graph inference and future collaborative learning under explicit cryptographic assumptions. + +## Goal and scope + +Build a reproducible graph-learning system whose privacy claims, numerical fidelity, and execution costs can be independently assessed. The first cryptographic milestone is real CKKS inference; encrypted/collaborative training and verifiable computation remain longer-term targets. + +Work advances through evidence gates. Calendar estimates should be assigned after each milestone has an owner, a concrete workload, and available resources. A phase is complete only when its outputs and exit criteria have been demonstrated. + +## Current state + +- [x] Repository, documentation, and a working Python/PyTorch Geometric CPU development workflow. +- [x] Plaintext two-layer GCN training on Cora. +- [x] Educational masked linear-head simulation, explicitly separated from cryptographic execution. +- [x] External three-seed diagnosis demonstrating correct fixed-point weight/feature scaling. +- [x] Targeted 2025–2026 literature review covering GitHub, Hugging Face, and primary papers. +- [ ] Repository numerical and CLI import defects repaired. Last full test result was 7 passed and 1 failed. +- [ ] Real homomorphic encryption, full encrypted GCN inference, authenticated PQ communication, private topology, encrypted training, and verifiable execution. + +Existing checked outreach items are historical project records; they do not substitute for technical acceptance criteria. The numerical correction was demonstrated in an external experiment and remains to be implemented in repository code. + +## Initial protocol + +The first inference benchmark uses a client and an honest-but-curious evaluator. The client keeps the secret decryption key. For the encrypted-head milestone, the client computes hidden features locally; for the full-GCN milestone, it encrypts original node features. + +| Component | Initial disclosure policy | +|---|---| +| Node features and encrypted intermediate values | Client plaintext; evaluator receives ciphertexts only. | +| Topology, graph size, dimensions, packing layout | Public. Graph-topology confidentiality is a separate mode. | +| Model weights and architecture | Plaintext at evaluator; no model-confidentiality guarantee against the client. | +| Labels and training data | Used in the declared offline baseline; protected training is a separate protocol. | +| Decryption key | Client only; never serialized into evaluator context or payload. | +| Predictions | Decrypted by the client; any further disclosure is explicitly specified. | +| Timing, sizes, query patterns | Recorded as disclosed metadata unless a later protocol protects them. | + +Document output recipients and allowed evaluations before exposing a service. A baseline that keeps outputs client-only does not establish security for one that returns plaintext decryptions to an adversary. Malicious-server correctness and arbitrary chosen-ciphertext security require additional protocol work. + +## M0 — Correctness, reproducibility, and specification + +**Status:** partial evidence exists; coding work pending. + +Deliverables: + +- [ ] Fix the legacy CLI encryption import and the shim's unscaled weight rounding; define feature, weight, output, and bias scales and accumulator bounds. +- [ ] Keep the shim labeled as educational arithmetic. It bundles a mask with its payload and is not a privacy mechanism. +- [ ] Report full GCN, float ridge head, and corresponding simulated outputs separately. Preserve graph semantics, weights, splits, and seeds in each arithmetic comparison. +- [ ] Record dependency versions, dataset provenance/hashes, seeds, commands, checkpoint selection, and results; make the numerical experiment reproducible from a prepared environment. +- [ ] Specify actors, protected data, model visibility, output policy, key ownership, adversary, and disclosed metadata. +- [ ] Retire SIDH/SIKE as planned security foundations. Specify CKKS computation, PQ key establishment, and authentication as separate components. + +**Exit gate:** existing intended tests execute and pass after substantive fixes; CLI runs without the import workaround; matched numerical outputs report error and agreement; reproduction evidence and a protocol specification are available. Tune on validation data, then freeze the evaluation protocol before final test runs. External simulation results do not mark real encryption complete. + +## M1 — Genuine CKKS encrypted-head inference + +**Dependency:** M0. + +Deliverables: + +- [ ] Select a maintained CKKS backend; OpenFHE is the initial candidate, with a compatible current SEAL-based backend as an alternative. +- [ ] Evaluate the identical hidden-feature ridge classifier in float and real CKKS, including bias. +- [ ] Use separate client/evaluator processes or equivalently auditable context boundaries. Client secret keys remain client-side; evaluator holds only required public/evaluation material. +- [ ] Perform actual encryption, ciphertext evaluation, ciphertext return, and client decryption. Preserve public model and topology assumptions. +- [ ] Publish library versions, ring dimension, modulus chain, scale, secret distribution, depth, selected security target, and estimator model. Distinguish classical and quantum estimates; never infer whole-system PQ security from a handshake. +- [ ] Measure key generation, evaluation-key size, encryption, setup, online evaluation, decryption, ciphertext bytes, communication, and peak memory separately. + +**Proposed fidelity target:** at least 99.5% same-model prediction agreement and at most 0.5 percentage-point absolute accuracy difference on the locked benchmark, evaluated separately for each of five fixed seeds. Publish maximum/mean logit error and class margins. These are planning targets to validate, not existing achievements; any revision must be recorded before final test evaluation. + +**Exit gate:** real cryptographic execution meets the recorded fidelity and security targets, and a fresh prepared-environment run reproduces the measured result. Disabled security checks, a plaintext simulation backend, or lower-security performance settings do not satisfy the gate. Label the result encrypted-head inference; training and earlier feature extraction remain plaintext. + +## M2 — Complete GCN inference with public topology + +**Dependency:** M1. + +Deliverables: + +- [ ] Encrypt original node features and implement every layer of the selected graph model: normalization, neighbor aggregation, projection, activation, and final output. +- [ ] Preserve the chosen graph operator, self-loop convention, bias, and train/validation/test masks. +- [ ] Calibrate and train/distill an HE-compatible model with declared activation ranges; compare polynomial degrees and suitable smooth-activation students. +- [ ] Keep three model evaluations separate: original float GCN, float HE-compatible GCN, and the identical CKKS circuit. +- [ ] Validate on Cora and at least one additional documented graph dataset. Report results per dataset and seed. +- [ ] Use maintained, security-checked parameters and account for client preprocessing and any disclosed metadata. + +**Proposed fidelity targets:** model-adaptation loss at most 2 percentage points and additional CKKS loss at most 0.5 point, with at least 99.5% prediction agreement against the identical HE-compatible float model. Apply the targets separately to every locked dataset and each of five fixed seeds; also report averages and variation. The two loss budgets are distinct. Record infeasibility and any model/target revision openly based on validation evidence before final test evaluation. + +**Exit gate:** original features remain encrypted throughout evaluator computation; corresponding float/CKKS operators are matched; all loss sources and resource costs are reported. A ridge head alone does not satisfy the full-GCN gate. + +## M3 — Graph-specific research and benchmark release + +**Dependency:** a validated M2 baseline. Range/layout investigations can begin earlier, but improvement claims require genuine encrypted execution. + +Research question: + +> Which graph-aware layouts and precision policies reduce encrypted-inference cost while meeting declared disclosure limits and prediction-error bounds? + +Deliverables: + +- [ ] Implement and document appropriate recent baseline methods: FicGCN-style sparse aggregation and scheduling; dense/reference CKKS; optional EinHops/Rotom-assisted layouts; TGHE-style batching only when its preprocessing/disclosures are allowed. +- [ ] Treat unavailable author code as an implementation/reproduction task, not a benchmark already executed. Match tasks, graph operators, security, hardware, and disclosure policies before numerical comparisons. +- [ ] Investigate graph-specific activation-range bounds, precision allocation, node reordering, and partitioned/ego-graph packing. +- [ ] For fixed public topology, derive range bounds for the actual sparse operator, bounded features, weights, and activations. Symmetric-normalization spectral bounds do not automatically imply a row-sum bound. Changing or hidden topology needs a separate analysis. +- [ ] Separate certified polynomial-approximation error from empirically measured CKKS error. Define the bounded input domain and how out-of-domain inputs are handled. +- [ ] Use the condition `float winning margin > 2 × maximum per-sample logit error` as a numerical fidelity criterion. Observed sample errors alone do not certify unseen inputs or cryptographic security. +- [ ] Count rotations, multiplications, key switches, ciphertexts, occupied slots, evaluation-key memory, layout conversion, and offline/online cost. Demonstrate work actually removed by pruning/compaction. +- [ ] Run Cora/CiteSeer/PubMed as resources permit, plus controlled graph-size, degree, feature-width, depth, and feature-shift experiments. Distinguish sampled-query inference from whole-graph processing. +- [ ] Publish ablations, seed variation, performance repetition/uncertainty, commands, versioned artifacts, and an honest comparison of security/disclosure modes. + +**Exit gate:** a measurable improvement over compatible baselines at matched fidelity, security, and permitted disclosure; evidence identifies which optimization caused it. A systematic literature comparison precedes any novelty claim. Unsuccessful hypotheses are recorded rather than hidden by easier tests or weaker parameters. + +**Release:** a technical benchmark report/whitepaper and reproducible research CLI. Website documentation can accompany the release. Expanded UI and domain forks follow demonstrated capability and workload demand. + +## M4 — Stronger privacy and authenticated communication + +**Dependencies:** M0 for communication design; M2/M3 evidence for privacy/performance extensions. This work can run in parallel rather than postponing all protocol security until optimization finishes. + +### Communication and output policy + +- [ ] Integrate standardized ML-KEM key establishment and an appropriate authenticated encryption/session protocol; choose standardized signatures where their authentication role is needed. +- [ ] Replace the reversible-string Kyber mock with a maintained implementation for the defined protocol. Test interoperability, context binding, and replay/error handling. +- [ ] Specify output recipients, queries per key, key-refresh rules, and whether decrypted values cross a trust boundary. Evaluate applicable CKKS output-leakage countermeasures with explicit assumptions and measured precision cost. +- [ ] Document the security of the composition. PQ transport does not make weak HE parameters, conventional proof assumptions, or unauthenticated evaluation automatically PQ-secure. + +**Exit gate:** the protocol's key establishment/authentication and output policy are demonstrated. This gate is required before any remote pilot making those security claims. Signatures authenticate data/messages; they do not prove the correct GNN was evaluated. + +### Private topology and model privacy + +- [ ] Choose a distinct private-topology and/or model-confidentiality protocol, with encrypted adjacency, appropriate MPC, or a justified hybrid. +- [ ] Specify collusion assumptions, graph-size/degree/template leakage, access patterns, and interaction requirements. +- [ ] Compare with CryptGNN/PrivGNN under compatible assumptions, including preprocessing, network latency, communication, and client work. +- [ ] Evaluate whether stronger privacy changes the range analysis, sparsity optimizations, or cost model. + +**Exit gate:** the promised graph/model components and relevant access patterns are protected under the specified protocol; the cost of stronger privacy is measured. Feature encryption alone does not meet a private-topology claim. + +## M5 — Protected training, verifiability, and domain pilots + +These are explicit research branches, not prerequisites that must all be solved before releasing M3. Each branch starts when its own inference, ownership, and protocol requirements are established. + +### Protected training + +- [ ] Start with a defined protected last-layer training experiment before full GNN backpropagation. +- [ ] Specify ownership/protection of features, labels, edges, gradients, updates, checkpoints, and final model. State what remains plaintext at each participant. +- [ ] Choose outsourced encrypted training or collaborative/federated training as distinct protocols; evaluate suitable HE/MPC/threshold mechanisms. +- [ ] Compare identical plaintext optimization with protected training, measuring convergence, utility, setup, compute, and communication. +- [ ] If using differential privacy, define node/edge/graph adjacency, a privacy budget, and accounting. Secure aggregation and federated learning alone do not establish those guarantees. + +**Exit gate:** actual protected training steps execute under the declared assumptions and are reproducible. Full encrypted GNN training is claimed only when all stated forward/backward/update operations are validated; encrypted inference or secure averaging alone is insufficient. + +### Verifiable computation + +- [ ] Define a concrete malicious-evaluator problem and first verify an inference circuit with input/model commitments and the stated preprocessing/arithmetic. +- [ ] Select a proof mechanism whose assumptions fit the required adversary and quantum-security claims. Separate inference proofs from training proofs. +- [ ] Measure prover/verifier time, memory, proof size, completeness/soundness assumptions, and the effect of approximate arithmetic. + +**Exit gate:** the proof attests to the specified computation and identities under documented assumptions. Ordinary signatures, numerical-error bounds, and transport encryption do not meet this gate. + +### Domain pilots + +- [ ] Choose one public or appropriately provisioned biomedical/financial workload based on validated protocol capability. +- [ ] Map its topology/features/output sensitivity to the implemented mode and document limits. +- [ ] Demonstrate correctness, utility, operation within a stated resource budget, and supported key/communication handling before making deployment claims. + +## Supporting research + +Retain algebraic geometry, isogeny mathematics, sheaf/topological models, and GNN-assisted cryptanalysis as optional research tracks with concrete questions and separate artifacts. They are not security prerequisites for the initial CKKS graph-inference system. SIDH/SIKE remain retired from the security design. + +Reuse published cryptographic assumptions and established libraries; formal work should address protocol composition, explicit leakage, graph-dependent numerical bounds, and the actual guarantees being claimed. A proof that a lattice hardness assumption is universally true is not a reasonable roadmap deliverable. + +## Research references and review provenance + +- [FicGCN, ICML 2025](https://proceedings.mlr.press/v267/kan25a.html): sparse HE aggregation and packing, public topology. +- [CryptGNN, CCS 2025](https://arxiv.org/abs/2509.09107) and [PrivGNN, 2025 preprint](https://arxiv.org/abs/2511.02185): interactive/private-topology baselines. +- [DESIGN, 2025 preprint](https://huggingface.co/papers/2507.05649), [author code](https://github.com/LabRAI/DESIGN): adaptive pruning/activations, subject to reproduction caveats. +- [TGHE, June 2026 preprint](https://arxiv.org/abs/2606.26664): template batching with disclosed structural metadata. +- [EinHops, 2025](https://huggingface.co/papers/2507.07972), [author code](https://github.com/baahl-nyu/einhops), and [Rotom, 2026](https://github.com/cmu-cryptosystems/Rotom): tensor packing/compiler methods. +- [Encrypted Neural Networks without Overflows, 2026](https://arxiv.org/abs/2605.23096): bounded-domain range and approximation work requiring graph-specific extension. +- [Approximate-FHE security, PKC 2025](https://link.springer.com/chapter/10.1007/978-3-031-91832-2_4): output-security considerations; full paper was unavailable in this review. +- [Microsoft SIDH/SIKE warning](https://github.com/microsoft/PQCrypto-SIDH#warning): retired protocols. +- [Expanded source review](research-2025-2026-addendum.md), [numerical evidence](numerical-ablation.json), and [roadmap assessment](roadmap-review.md). + +This roadmap does not mark third-party headline results, external arithmetic simulation, or unimplemented protocols as completed project capabilities. diff --git a/docs/research/2026-10-10/roadmap-review.md b/docs/research/2026-10-10/roadmap-review.md new file mode 100644 index 0000000..6e2f6b6 --- /dev/null +++ b/docs/research/2026-10-10/roadmap-review.md @@ -0,0 +1,63 @@ +# PrivNet.AI roadmap review + +Reviewed 10 October 2026 against the current checkout, controlled Cora arithmetic experiments, and the expanded 2025–2026 paper/code review. This is a roadmap review and proposed replacement; it does not implement repository fixes or cryptographic capabilities. + +## Assessment + +The vision is worth retaining, but the implementation sequence needs a substantive revision. The existing roadmap uses expired Q2–Q4 2025 phases, depends on SIDH/SIKE research for its cryptographic foundation, and moves toward encrypted training and deployment before specifying or validating a genuine encrypted-inference protocol. Its mathematical and outreach tasks do not establish readiness for those capabilities. + +The next concrete deliverable should be a **reproducible, same-model CKKS classifier**, followed by **complete public-topology GCN inference**. Private topology, collaborative/encrypted training, post-quantum communication, and verifiable computation remain explicit targets, with separate assumptions and completion criteria. + +## Priority findings + +| Priority | Current roadmap location | Finding | Recommended change | +|---|---|---|---| +| Critical | Opening description; lines 24, 49, 73 | “Post-quantum-secure” is not supported by the current simulator. SIDH/SIKE are broken and key exchange does not provide encrypted arithmetic. | Use conditional research language. Retire SIDH/SIKE as security prerequisites; choose maintained lattice HE for computation and standardized PQ primitives for communication/authentication. | +| High | Phases 1–3, lines 18, 43, 67 | Calendar labels are stale and do not reflect current implementation or dependencies. | Replace them with milestone gates, status evidence, and a clear next deliverable. Estimate dates after scope, ownership, and resources are assigned. | +| High | Lines 30, 50–51 | `EncryptedGraph` is specified before deciding which graph components are confidential and who holds keys. | Define actors, public/private data, topology disclosure, weights, outputs, adversary, and key ownership first; derive serialization and interfaces from that protocol. | +| High | Lines 55–56 | “Encrypted vs non-encrypted” comparisons conflate different architectures and numerical encodings. | Compare original float GCN, float HE-compatible GCN, identical real-CKKS GCN, and simulator separately. Keep weights, graph operator, splits, and evaluation targets matched in each arithmetic comparison. | +| High | Lines 61–63, 78–79 | Formal validation and encrypted training are broad promises without intermediate feasible targets. | State assumptions and prove the actual protocol/approximation properties being claimed. Demonstrate inference before protected last-layer training or a defined multiparty training protocol. | +| High | Prototype/advanced research goals | Packing and adaptive polynomial activations now overlap substantial recent work. | Make FicGCN, DESIGN, TGHE, CryptGNN, and the 2026 overflow work explicit comparison points. Establish a graph-specific contribution rather than claiming novelty from combining existing components. | +| Medium | Lines 32, 36–39, 83–85 | Framework selection is already settled in code; broad algebraic topics lack an implementation dependency or measurable result. | Record PyTorch Geometric as the current choice. Prioritize sparse graph operators, activation ranges, fixed-point error, CKKS depth, and protocol composition. Keep other mathematics as optional research tied to a concrete question. | +| Medium | Lines 89–101 | Whitepaper, UI, and domain forks lack technical release gates. A CLI already exists. | Release the reproducible baseline and benchmark report first. Domain pilots and expanded interfaces follow demonstrated protocol and fidelity requirements. | + +Line references refer to the inspected [tracked roadmap](../../../roadmap.md) at commit `be0400f8e8d22fcfff2d011bc1c1dd9b7a2f4767`; file content was preserved. + +## What can be marked complete + +| Capability | Evidence-backed status | +|---|---| +| Repository, docs, Python/PyG CPU workflow | Present; development execution was validated during onboarding. | +| Plaintext GCN training | Implemented; Cora training completed. | +| Masked linear-head demonstration | Implemented educational simulator. It provides no established cryptographic privacy. | +| Numerical diagnosis | Completed outside the checkout for three seeds; the repository encoding defect remains unfixed. | +| Targeted 2025–2026 literature review | Completed with GitHub, Hugging Face, and primary papers; cited systems were not benchmarked here. | +| All existing tests passing | Pending. Last verified run: 7 passed, 1 failed due to weight rounding. | +| Genuine HE, complete encrypted GCN, real PQ communication | Pending; no such implementation was validated. | +| Private topology, encrypted training, verifiable execution | Pending. Encrypted model/trainer files are currently empty. | +| Historical LinkedIn/community tasks | Checked in the existing roadmap; not independently verified in this review. | + +For seed 42, the full float GCN achieved 82.7%, its separately fitted float ridge head 77.7%, and the current shim 51.2%. Correctly scaled integer simulation recovered the ridge-head accuracy on all three seeds with 99.8–100% prediction agreement. This separates a fixable encoding defect from the loss caused by replacing the second graph convolution with a different classifier. It does not establish real CKKS performance or confidentiality. + +## How the latest research changes the plan + +- **[FicGCN, ICML 2025](https://proceedings.mlr.press/v267/kan25a.html):** include sparse aggregation, layout scheduling, and rotation counts in the baseline. Its server sees topology and weights; its citation benchmarks use graph autoencoders, so adapt the method carefully before comparing against our node classifier. The identified GitHub repository is a PDF mirror, not released implementation code. +- **[DESIGN, July 2025](https://huggingface.co/papers/2507.05649):** degree-guided pruning and adaptive polynomials are existing ideas. The inspected code has accuracy/evaluation and cost-accounting concerns. Require a reproduced reduction in operations, rather than treating masked zeros as skipped work. +- **[TGHE, June 2026](https://arxiv.org/abs/2606.26664):** template batching is relevant only when permitted graph metadata disclosures and trusted client preprocessing fit the protocol. Its reported speedup is against its own sequential baseline, and its small packing loss excludes earlier model-adaptation loss. +- **[CryptGNN, CCS 2025](https://arxiv.org/abs/2509.09107), and [PrivGNN, November 2025](https://arxiv.org/abs/2511.02185):** private edges/model parameters already have interactive MPC approaches. A stronger-privacy track must report collusion assumptions, offline work, communication, and network latency. +- **[Encrypted Neural Networks without Overflows, 2026](https://arxiv.org/abs/2605.23096):** graph-specific activation-range analysis and precision allocation are promising extensions. Its certificates concern declared bounded domains and approximation error; they do not automatically certify all CKKS noise or GNN operators. +- **[EinHops, July 2025](https://huggingface.co/papers/2507.07972), and [Rotom, 2026](https://github.com/cmu-cryptosystems/Rotom):** use transparent/automatic packing as comparison tools. Include evaluation-key memory and layout-conversion costs, and respect their workload limits. +- **[Approximate-FHE security, PKC 2025](https://link.springer.com/chapter/10.1007/978-3-031-91832-2_4):** output recipients, decryption exposure, and per-key query policies belong in the initial protocol specification. This abstract-level source does not provide a universal noise-flooding recipe or malicious-input security guarantee. + +## Recommended sequence + +1. **M0 — Correctness and protocol specification:** repair encoding/import defects, establish reproducibility, and define initial privacy and output guarantees. +2. **M1 — Genuine CKKS head:** perform real encryption, evaluation, and client decryption for the identical ridge classifier; report fidelity, security parameters, and all costs. +3. **M2 — Complete public-topology GCN:** encrypt original features and implement all chosen aggregation/projection/activation layers. Measure model-adaptation loss separately from CKKS error. +4. **M3 — Defensible graph research:** evaluate range bounds, precision, and layouts against adapted recent baselines with matched disclosure limits and security. +5. **M4 — Stronger protocols:** add PQ authenticated communication and pursue private topology/model privacy where justified; avoid implying that those components prove honest computation. +6. **M5 — Training and verifiability tracks:** start with narrow protected-training and inference-proof targets, then assess full encrypted training and training proofs independently. + +M4 communication work can proceed in parallel once M0 specifies the protocol; it is required before a remote pilot making communication-security claims. M5 branches need not wait for every optional M4 privacy mode, but must satisfy their own threat-model requirements. + +The full proposed replacement, with deliverables and gates, is in [roadmap-proposed.md](roadmap-proposed.md). Numeric acceptance thresholds there are proposed engineering targets, not achieved results. A systematic novelty check and benchmark reproduction remain outstanding. diff --git a/docs/research/2026-10-10/search-provenance.json b/docs/research/2026-10-10/search-provenance.json new file mode 100644 index 0000000..8e32ce5 --- /dev/null +++ b/docs/research/2026-10-10/search-provenance.json @@ -0,0 +1,82 @@ +{ + "reviewed_at": "2026-10-10", + "repository": "aliaslany/PrivnetAI", + "repository_commit": "be0400f8e8d22fcfff2d011bc1c1dd9b7a2f4767", + "scope": "Targeted discovery, not an exhaustive or ranked literature review. Result counts reflect API responses on the review date. Primary-source URLs and verification limits are recorded in the accompanying notes. No third-party benchmarks reproduced.", + "hugging_face_paper_queries": [ + { + "query": "homomorphic graph neural network", + "url": "https://huggingface.co/api/papers/search?q=homomorphic+graph+neural+network", + "total_results": 120 + }, + { + "query": "secure graph neural inference", + "url": "https://huggingface.co/api/papers/search?q=secure+graph+neural+inference", + "total_results": 120 + }, + { + "query": "privacy graph neural network", + "url": "https://huggingface.co/api/papers/search?q=privacy+graph+neural+network", + "total_results": 120 + }, + { + "query": "homomorphic encryption neural network", + "url": "https://huggingface.co/api/papers/search?q=homomorphic+encryption+neural+network", + "total_results": 120 + }, + { + "query": "CryptGNN", + "url": "https://huggingface.co/api/papers/search?q=CryptGNN", + "total_results": 0 + }, + { + "query": "encrypted graph training", + "url": "https://huggingface.co/api/papers/search?q=encrypted+graph+training", + "total_results": 120 + } + ], + "selected_hugging_face_metadata": [ + { + "id": "2507.05649", + "title": "DESIGN: Encrypted GNN Inference via Server-Side Input Graph Pruning", + "publishedAt": "2025-07-14T00:00:00.000Z" + }, + { + "id": "2507.07972", + "title": "EinHops: Einsum Notation for Expressive Homomorphic Operations on\n RNS-CKKS Tensors", + "publishedAt": "2025-07-10T17:50:10.000Z" + }, + { + "id": "2602.05838", + "title": "FHAIM: Fully Homomorphic AIM For Private Synthetic Data Generation", + "publishedAt": "2026-02-05T16:28:13.000Z" + } + ], + "hugging_face_hub_queries": [ + { + "kind": "models", + "query": "homomorphic", + "results": [] + }, + { + "kind": "models", + "query": "CryptGNN", + "results": [] + }, + { + "kind": "models", + "query": "LinGCN", + "results": [] + }, + { + "kind": "datasets", + "query": "homomorphic", + "results": [] + }, + { + "kind": "datasets", + "query": "federated_graph", + "results": [] + } + ] +}