This repository contains the reference implementation and experiment pipeline for the Lorentz-Invariant Auction (LIA) mechanism studied in the manuscript:
Latency-Aware Resource Allocation over Heterogeneous Networks: A Lorentz-Invariant Market Mechanism
LIA is a latency-aware auction framework for heterogeneous communication settings in which bidders face materially different propagation delays, including LEO satellite systems, terrestrial backbone networks, and deep-space relay networks. The codebase supports reproducible topology construction, instance generation, mechanism evaluation, summary statistics, and paper-ready figures and tables.
The canonical, maintained pipeline is:
run_pipeline.pyconfig/*.jsonscripts/*.pysrc/lia/
- LIA, FastVCG, SyncVCG, HoldBack, and BatchVCG implementations
- Topology builders and cached topologies for:
STARLINK-200INTERNET-100DSN-30
- Paper-scale experiment configurations
- Robustness configurations, including structured slack-estimation bias models
- Figure, tradeoff-plot, LaTeX-table, audit, and slack-spread utilities
- Run provenance via per-run hashes and metadata
- Python 3.10+
- A POSIX-like shell for the convenience scripts (
bash,zsh, Linux/macOS terminal, WSL, etc.)
Core dependencies are listed in requirements.txt.
Clone the repository and enter it:
git clone https://github.com/alqithami/LiA.git
cd LiACreate and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txtYou do not need to run pip install -e . for normal use because run_pipeline.py prepends ./src to the import path. If you prefer an editable install, that also works:
python -m pip install -e .Validate that the repository does not contain placeholder content:
python scripts/validate_no_placeholders.py --root .Build or refresh the cached topologies:
python scripts/build_topologies.py --data-dir dataThen run a quick smoke test:
python run_pipeline.py --config config/quick.jsonpython run_pipeline.py --config config/full.jsonpython run_pipeline.py --config config/full_strong.jsonGeneric bounded-error sweep:
python run_pipeline.py --config config/robustness.jsonDistance-biased slack-estimation error:
python run_pipeline.py --config config/robustness_distancebias.jsonSubnetwork-correlated slack-estimation error:
python run_pipeline.py --config config/robustness_subnetwork.jsonClock/common-mode error models:
python run_pipeline.py --config config/robustness_clockbias.json
python run_pipeline.py --config config/robustness_strong.jsonpython run_pipeline.py --config config/table3_replication.json
python run_pipeline.py --config config/mini_test.jsonEach run writes to a fresh directory under runs/. After a run completes, generate figures and tables directly from that run directory.
Example:
python scripts/generate_figures.py --run-dir runs/<run_id>
python scripts/generate_tradeoff_plots.py --run-dir runs/<run_id>
python scripts/generate_latex_tables.py --run-dir runs/<run_id>
python scripts/audit_run.py --run-dir runs/<run_id>To summarize empirical slack-spread statistics used in the revised welfare discussion:
python scripts/slack_spread_summary.py --data-dir data --bidder-count 50 --instances 1000A typical run directory contains:
per_instance_metrics.csv— one row per(instance, mechanism)summary_table.csv— bootstrap means and confidence intervals by topology / mechanism / error levelsummary_by_bidder_count.csv— summaries split by bidder countlai_estimates.csv— latency-arbitrage and fairness diagnosticspaired_differences.csv— paired bootstrap differences across mechanismsrun_meta.json— provenance metadata, hashes, and environment informationrun.log— detailed execution logfigures/— generated paper figurestables/— generated LaTeX/CSV tables
The pipeline exports both benchmark conventions used in the manuscript:
opt_all_value,welfare_ratio_all,revenue_ratio_allcompare outcomes against the best value anywhere in the instance.opt_feasible_value,welfare_ratio_feasible,revenue_ratio_feasiblecompare outcomes against the best causally feasible bid.feasible_opt_coverage = opt_feasible_value / opt_all_valueseparates reachability loss from conditional auction efficiency.
For backward compatibility, opt_value, welfare_ratio, and revenue_ratio remain aliases for the overall benchmark columns.
Other exported timing metrics follow the manuscript definitions:
decision_time_ms— mechanism commit time, including any waiting policy plus measured compute timeclearing_latency_ms—decision_time_ms - min_i tau_i
Topologies are built from public raw inputs and cached locally.
STARLINK-200: Starlink constellation snapshot from a CelesTrak Starlink TLE fileINTERNET-100: a 100-node backbone graph extracted from the Topology Zoo archiveDSN-30: a 30-node deep-space communication graph built from a JPL planetary ephemeris file
Raw inputs are stored under data/raw/, and cached topology JSONs are stored under data/topologies/.
All experiment settings live in config/*.json.
Common knobs include:
bidder_countsinstances_per_settingmeasurement_error.eps_grid_msmeasurement_error.modelmeasurement_error.common_fractionmechanisms.batch_vcg.batch_ms_gridmechanisms.lia.lambda_gridmechanisms.lia.lambda_unitdatasets.strictdatasets.rebuild_topologies
Supported measurement-error models include:
iid_uniformcommon_plus_iid_uniformdistance_biased_uniformsubnetwork_correlated_uniform
Every run writes a run_meta.json file containing:
- pipeline version
- import path for the
liapackage actually executed - topology hashes
- raw dataset hashes
- environment metadata
A quick provenance check:
python - <<'PY'
import glob, json, os
run = sorted(glob.glob('runs/*'), key=os.path.getmtime)[-1]
meta = json.load(open(os.path.join(run, 'run_meta.json')))
print('run:', run)
print('pipeline_version:', meta.get('pipeline_version'))
print('lia_import:', meta.get('lia_import'))
print('topologies:', list((meta.get('topology_hashes') or {}).keys()))
print('raw_files:', list((meta.get('raw_dataset_hashes') or {}).keys()))
PYLiA/
├── README.md
├── pyproject.toml
├── requirements.txt
├── run_pipeline.py
├── run_all.sh
├── config/
├── data/
│ ├── raw/
│ └── topologies/
├── scripts/
└── src/
└── lia/
├── datasets/
├── experiment/
├── mechanisms/
├── metrics/
├── network/
└── utils/
If you use this repository, please cite the accompanying manuscript. If final publication metadata is not yet available, a neutral placeholder is:
@misc{alqithami2026lia,
title = {Latency-Aware Resource Allocation over Heterogeneous Networks: A Lorentz-Invariant Market Mechanism},
author = {Alqithami, S.},
year = {2026},
note = {Manuscript and code repository}
}This repository is released under the MIT License. See LICENSE.