3 # Asynchronous-Decentralized-Constrained-Optimization
5 This repository contains the Python code and Jupyter notebooks associated with the experiments presented in our paper. The code is organized into four main Python scripts (`exp1.py`, `exp2.py`, `exp3.py`, `exp4.py`) and one Jupyter notebook that includes the appendix experiments. Below, you will find a brief description of each experiment, how to run them, and the required dependencies.
9 ## Repository Structure
11 - `utilities/`: Contains all utility functions used across experiments.
12 - `Problems/`: Includes problem definitions, gradients, and projections.
13 - `data/`: Stores the MNIST dataset used in some of the experiments.
14 - `Optimizers/`: Contains implementations of centralized and decentralized algorithms.
15 - `graph/`: Holds scripts for generating gossip matrices. `graph_pg_extra.py` is a more general script that provides additional matrices necessary for the PG-EXTRA algorithm.
16 - `analysis/`: Contains functions for computing performance metrics such as the optimality gap and feasibility gap
24 Solves a constrained optimization problem and compares the performance to DAGP and its throttled variant.
28 Addresses an unconstrained logistic regression problem and makes comparisons to APPG and ASY-SPA.
32 Focuses on a constrained problem over undirected graphs, comparing the results to ASY-PG-EXTRA.
36 Investigates the robustness to message losses with a communication failure probability of \(p\).
39 Contains experiments found in the Appendix of the paper.
44 ## Note on the creation of asynchronous profiles
46 All experiments simulate asynchronous profiles based on a global iteration counter, which advances whenever at least one agent computes.
48 The asynchronous profiles are generated by creating computation times for nodes (`TV_nodes` parameter) and computing all unique times when at least one node is activated (`T_active` parameter). Algorithms update their variables at each iteration only for those nodes activated at that specific time, for a total of `max_iter` iterations.
54 To run the experiments in this repository, you will need to install several dependencies. You can install all required libraries using the following command:
57 pip install -r requirements.txt
60 The `requirements.txt` file should list all the necessary libraries, such as numpy, scipy, matplotlib, jupyter, etc. Ensure you create this file and list all dependencies your project needs.