Introduction
In social planning and public policy, the "facility location problem" involves determining the optimal placement of resources—such as parks, clinics, or transit stations—based on the preferences of a population. A critical challenge in this domain is strategyproofness: designing mechanisms where individual agents have no incentive to misreport their preferred locations to manipulate the outcome.
Traditionally, researchers have relied on two distinct approaches: handcrafting mathematical rules (e.g., the median rule) which are provably strategyproof but often suboptimal in complex settings, or training deep learning models (e.g., RegretNet) which achieve high performance but function as uninterpretable "black boxes." This paper introduces LLMMech, a novel framework that bridges this gap by using Large Language Models (LLMs) to automatically design interpretable, code-based mechanisms that are both strategyproof and highly efficient.
Methodology: Evolutionary Mechanism Design
LLMMech embeds an LLM (such as GPT-4o) within an evolutionary search loop. Unlike neural networks that output numerical coordinates, LLMMech generates mechanisms as executable Python code accompanied by natural language descriptions.
The Evolutionary Loop
The system maintains a population of candidate mechanisms. In each generation, the LLM performs variation operations:
- Crossover: Combining logic from two successful strategies.
- Mutation: Modifying an existing strategy to explore new algorithmic space.
Fitness and Strategyproofness
Mechanisms are evaluated based on their "fitness," defined by the social cost they achieve across a dataset of agent preferences. To enforce strategyproofness, the fitness function includes a significant penalty for "regret"—the potential utility gain an agent could achieve by lying.
Meta-Evolution (LLMMech-e)
A key innovation of this work is LLMMech-e, which adds a meta-evolutionary layer. If the search for better mechanisms plateaus, the system uses the LLM to evolve the prompts themselves, refining the search strategy to escape local optima and discover more sophisticated algorithms.
Experimental Results
The authors evaluated LLMMech against traditional rules (Percentile, Dictator, Constant) and deep learning baselines (MoulinNet, RegretNet) across various agent distributions, including Uniform, Normal, and Beta distributions.
Performance and Strategyproofness
As shown in the comparative analysis, LLMMech-e consistently achieves lower social costs than handcrafted rules and neural network baselines. In Figure 1, the performance of various rules is plotted relative to LLMMech-e (the dashed line at zero). Most traditional rules fall to the right of the baseline, indicating higher (worse) social costs. Only the "NonSP" baseline—which is not constrained by strategyproofness—consistently achieves lower costs, highlighting how close LLMMech-e comes to the theoretical optimum while maintaining strategyproofness.
Quantitative Superiority
Detailed quantitative results in Table 1 confirm that LLMMech-e frequently achieves the best (bolded) results across different numbers of agents ($n$) and facilities ($K$). Notably, the framework demonstrates remarkable zero-shot generalization; mechanisms designed for a small number of agents (e.g., $n=5$) often perform optimally when scaled to much larger groups without any additional training.
Discussion and Interpretability
Beyond performance, the primary advantage of LLMMech is its interpretability. Because the output is Python code, the logic is human-readable. For instance, the LLM discovered a "hybrid clustering and optimization" strategy that researchers could inspect and verify. This transparency is vital for public policy applications where "black box" decisions are often unacceptable.
While currently limited to 1D space and single-peaked preferences, LLMMech represents a significant step toward automated, interpretable, and strategyproof mechanism design. Future work will explore higher-dimensional spaces and more complex agent behaviors.
Summary updated