Skip to content

Repair/phase 0 audit - #4

Merged
aliakarma merged 11 commits into
mainfrom
repair/phase-0-audit
May 16, 2026
Merged

Repair/phase 0 audit#4
aliakarma merged 11 commits into
mainfrom
repair/phase-0-audit

Conversation

@aliakarma

@aliakarma aliakarma commented May 16, 2026

Copy link
Copy Markdown
Owner

Pull Request

Summary

Brief description of what this PR changes and why.

Type of Change

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Documentation update
  • Reproducibility fix
  • Dependency update
  • Refactoring (no functional change)

Related Issues

Closes #

Checklist

  • My code follows the project style guide (make lint passes)
  • I have added tests for new functionality
  • All existing tests pass (make test passes)
  • I have updated docstrings for changed public functions
  • I have updated CHANGELOG.md
  • If adding a new config parameter, I have added it to configs/default.yaml
  • If changing evaluation metrics, I have verified regression tests still pass

Testing

Describe how the changes were tested:

pytest tests/unit/test_<module>.py -v

Notes for Reviewers

Any additional context that reviewers should know.

aliakarma added 11 commits May 16, 2026 10:12
Add a large set of experiment output artifacts (plots, per-seed tables, aggregated statistics) under experiments/results and experiments/results/plots; add experiments/results/statistics CSVs. Introduce a new script (scripts/generate_ablation_table.py) and update multiple analysis scripts (aggregate_multi_seed_results.py, generate_figures.py, generate_lambda_tradeoff_plot.py, generate_tables.py, run_evaluation.py) plus visualization code (src/visualization/node_performance_plot.py) to support multi-seed aggregation, CI/error bars, and updated plotting/aggregation flows. Replace FedAgent_Chain_Remediation_Plan.md with a condensed, phase-based publication hardening plan and update README, Makefile and .gitignore (ignore the remediation plan). These changes bundle results, plotting, and documentation updates to support reproducible multi-seed analysis and the repo hardening workflow.
Instrument clients and server to record runtime and communication metrics (time_local_training, time_blockchain, model_size_bytes/kb, time_aggregation, bytes_transmitted, mean_time_local_training) and compute total_communication_volume_mb. Add scripts/generate_system_overhead_plots.py to generate runtime_breakdown.pdf, communication_costs.pdf and CSV outputs. Commit includes the generated experiment artifacts (system_overhead.csv, communication_costs.csv, plots) and updates run_federated_simulation.py to print comm. volume on completion. README updated with a Systems Overhead table, scalability discussion, and instructions to regenerate plots.
Add reproducibility and scientific-hardening documentation, an experiments manifest, generated results, and evaluation tooling.

Key changes:
- Add docs/reproducibility.md and docs/scientific_hardening.md to describe verification steps, threats to validity, and ethical considerations.
- Add experiments/manifest.yaml and multiple experiments/results artifacts (class_distribution.csv, demos, error_analysis.md, seed_42 tables and plots) and paper_figures PDFs to capture generated outputs.
- Add scripts/generate_agent_demonstrations.py and scripts/generate_dataset_diagnostics.py to create qualitative demos and dataset diagnostics.
- Update scripts/run_evaluation.py to import matplotlib/sklearn, generate confusion matrix PDFs, and invoke the new plotting function.
- Update README.md with expanded project description, badges, dataset transparency, example scenarios, and links to the new docs.
- Update CITATION.cff metadata and authorship/url/license information.
- Minor .gitignore cleanup.

These changes provide reproducibility guidance, dataset diagnostics, demo generation, and enhanced evaluation outputs (confusion matrices and regenerated seed_42 results) for Phase 4–5 of the project.
Add experimental artifacts and helper scripts for Phase 4/5. Includes new result markdowns (scenario_3_governance_risk_detection.md, error_analysis.md), confusion matrix PDFs under experiments/results/seeds, multiple paper figures (communication_costs, fairness_disparity, fl_convergence, lambda_tradeoff_ci, node_f1_scores, runtime_breakdown and confusion matrices), and two scripts: generate_agent_demonstrations.py (simulates three demo scenarios and writes markdown demonstrations) and generate_dataset_diagnostics.py (computes per-node class distribution and saves experiments/results/class_distribution.csv). These additions support qualitative demos and dataset transparency analyses.
Add docs/paper_results_inventory.md as a master catalog of all figures, tables, statistics, and qualitative demos for assembling the manuscript and appendix. Update README.md to include a new "Paper Writing Resources" section that links to the inventory, publication figures, and case study reports to help authors locate and prioritize assets for the paper.
Copilot AI review requested due to automatic review settings May 16, 2026 08:33
@aliakarma aliakarma self-assigned this May 16, 2026
@aliakarma
aliakarma merged commit 242730f into main May 16, 2026
4 of 8 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4a78d53248

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +148 to +149
fedavg_agg = load_aggregated_history("ablation_no_fairness")
fairness_agg = load_aggregated_history("fedagent_chain_full")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep Figure 5 fallback variables defined

When generate_figures.py is run against a fresh results directory that only has the new results/seeds/seed_* outputs produced by the updated make run-evaluation, results/table_3_fairness_results.csv is absent and the fallback path is used. This block still references fedavg_history/fairness_history, but this change now only creates fedavg_agg/fairness_agg, so Figure generation raises NameError instead of completing the reproduction pipeline.

Useful? React with 👍 / 👎.

Comment on lines +53 to +54
if seed is not None:
pattern = f"{experiment_name}_seed{seed}_*"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Match untimestamped baseline run directories

The seed-specific glob now requires an underscore after the seed, but scripts/run_baselines.py writes baseline outputs as experiments/runs/baseline_local_seed42 and baseline_centralized_seed42 with no trailing timestamp/underscore. In the normal make run-baselines + make generate-figures flow, find_run_dir(..., "baseline_local", 42) returns None, so Figure 4 silently drops the Local Baseline and Centralized bars.

Useful? React with 👍 / 👎.

@aliakarma
aliakarma removed the request for review from Copilot May 16, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant