Dual-Weighted Federated Learning for Battery Fault Diagnosis in Electric Vehicles
Authors/Creators
Description
Dual-Weighted Federated Learning for Battery Fault Diagnosis in Electric Vehicles (FedWGT) : Source Code and Experimental Artifacts
Overview
This repository provides the source code and experimental artifacts for FedWGT, a coordinated federated dual-weighting framework for electric-vehicle battery fault diagnosis. FedWGT combines an effective-number-based class-balanced objective at vehicle clients with reliability-, data-volume-, and label-coverage-aware aggregation at the server.
The implementation supports heterogeneous client partitions, auxiliary-inclusive and cell-signal-only input settings, matched federated baselines, demanding client conditions, component analysis, and client-side cell/block inspection-priority attribution.
Contents
The archive includes:
• FedWGT client training and server aggregation implementations
• MLSTM-FCN and comparison backbone implementations
• FedAvg, FedProx, FedDyn, Trimmed-Mean, Multi-KRUM, pFedMe, and SCAFFOLD implementations
• Fixed training, validation, and test definitions for the 96-cell and 98-cell cohorts
• Configuration files for the reported experiment protocols
• Drivers for the main benchmark and paired statistical analysis
• Drivers for the 2×2 client-loss/server-aggregation component analysis
• Long-horizon ratio-partition experiments
• Demanding-client evaluations under stronger label skew, partial participation, and an increased client population
• Client-side Integrated Gradients attribution analysis
• Heterogeneity, adaptive server-optimizer, attribution, and statistical result files
• Manuscript figures in PNG and PDF formats
• Package-validation and unit-test scripts
• SHA-256 checksums for distributed files
Reproduction
Create a Python environment and install the package:
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .
Validate the package and run the unit tests:
python scripts/validate_package.py
python -m pytest -q
Run the main benchmark and paired statistical analysis:
python scripts/run_table9.py --data-root raw_data --device auto
python scripts/summarize_tables9_10.py
Run the client-loss/server-aggregation component analysis:
python scripts/run_table11.py --data-root raw_data --device auto
python scripts/summarize_table11.py
The experiment drivers write newly generated outputs under the results/ directory. Detailed data placement, execution options, and output locations are provided in README.md.
Data
Raw battery measurements are distributed separately by the original data provider and are not redistributed in this archive. They can be obtained from the AI-Hub electric-vehicle battery dataset page:
https://aihub.or.kr/aihubdata/data/view.do?dataSetSn=71347
After downloading the dataset, place the files under raw_data/ while preserving the relative layout referenced by data_splits/Dev_96 and data_splits/Dev_98. The included split definitions contain labels and relative paths but do not contain the raw battery measurement arrays.
Software and Output Structure
• fedwgt/: models, aggregation rules, data handling, and baseline implementations
• scripts/: experiment, attribution, statistical-analysis, and validation programs
• configs/: experiment configurations
• data_splits/: fixed 96-cell and 98-cell cohort definitions
• figures/: manuscript figures
• results/: supplied experimental and statistical result files
• tests/: unit tests for aggregation, attribution, and baseline regularization
License
The software is released under the MIT License. Please cite the associated article and this Zenodo record when using the implementation or supplied artifacts.