AMBER: A Columnar Architecture for High-Performance Agent-Based Modeling in Python
Anh-Duy Pham
TL;DR
AMBER tackles the bottleneck of Python-based agent-based modeling by replacing per-agent Python objects with a columnar state stored in a Polars DataFrame, enabling vectorized execution in Rust-backed code while preserving Pythonic abstractions. The framework demonstrates speedups from 1.2× to 93× and 38–45% peak memory reductions across three canonical benchmarks, with the largest gains for models dominated by population-wide attribute operations. AMBER supports rich ABM infrastructure—spatial environments, experiment management, and optimization—through a cohesive columnar abstraction that maintains accessibility via an object-like Agent interface. This work validates columnar state management as a viable architectural foundation for high-performance ABM in interpreted languages and outlines a design space guide for researchers and developers. The practical impact includes enabling larger-scale simulations, more extensive parameter sweeps, and memory-efficient experimentation in Python ABM ecosystems.
Abstract
Agent-based modeling (ABM) has emerged as an indispensable methodology for studying complex adaptive systems across the natural and social sciences. However, Python-based ABM frameworks face a fundamental tension between the accessibility that has made Python dominant in scientific computing and the performance requirements of large-scale simulations. This paper introduces AMBER, a framework that resolves this tension through a novel architectural approach: replacing the conventional object-per-agent representation with columnar state management using the Polars DataFrame library. We analyze the computational characteristics of both paradigms, present the architectural design of AMBER including its core abstractions, spatial environments, experiment management, and optimization capabilities. Empirical evaluation on three canonical benchmarks demonstrates that AMBER achieves speedups of 1.2x to 93x depending on workload characteristics, with the greatest advantages for models dominated by population-wide attribute operations. Memory profiling reveals 30-50% reduction in peak usage compared to object-oriented frameworks. Our results establish columnar state management as a viable architectural foundation for high-performance ABM in interpreted languages.
