---
title: 'MACRO: Higher-Level Abstractions in Research'
url: https://www.emergentmind.com/topics/macro
type: topic
---

# MACRO: Higher-Level Abstractions in Research

“MACRO” is a polysemous technical term that denotes several distinct but structurally related ideas in current research. In reinforcement learning and planning, a macro action is an open-loop sequence of primitive actions executed as a single decision; in statistics, macro-coverage is the unweighted average of class-conditional coverages; in electronic design automation, macro placement concerns the positioning of large blocks; and in several recent systems papers “MACRO” or “Macro” is the name of a concrete framework or method rather than a generic abstraction [1908.01478] [2606.28598] [2511.08054]. Across these usages, the term typically signals a level of organization above the primitive token, action, class instance, or component.

## 1. Temporal abstraction in reinforcement learning and planning

In reinforcement learning, a macro action is formally an open-loop sequence of $k$ primitive actions,
$$
m = (a_{1}, a_{2}, \dots, a_{k}),\quad a_i \in \mathcal{A},
$$
and the resulting decision process is naturally modeled as a semi-Markov decision process with tuple $(S,M,p^m_{ss'},r^m_s)$, where $M=\mathcal{A}\cup\{m\}$, $p^m_{ss'}=\Pr(s_{t+|m|}=s' \mid s_t=s, m_t=m)$, and $r^m_s=E[\sum_{\tau=0}^{|m|-1} r_{t+\tau} \mid s_t=s, m_t=m]$ [1908.01478]. Chang et al. used this formulation to analyze two properties of learned macros: **reusability**, where a macro generated along with one RL method can be reused by another RL method, and **transferability**, where a macro derived in one reward layout improves learning in related environments with different reward settings. In Atari 2600, adding the derived macro sped up learning in all eight evaluated games, and in ViZDoom My_Way_Home the reported reduction in mean frames to goal widened from 21.5% in Dense to 44.8% in SuperSparse, a result presented as evidence that transferability strengthens as rewards become sparser [1908.01478].

A different line of work treats macro actions as elements of a learned latent space. FaMARL learns a disentangled, low-dimensional embedding of variable-length action sequences from expert demonstrations by first segmenting demonstrations into macro-action chunks, then training a sequence VAE, FAVAE, with a $\beta$-VAE-style objective and per-ladder capacity terms, and finally replacing the primitive-action policy with a latent-action policy inside PPO [1903.09366]. During execution, the agent samples $z_t \sim \pi_\psi(z_t\mid s_t)$, decodes a sequence of primitive actions, trims the sequence using the learned `action_off` flag, applies the sequence open-loop, and treats the accumulated reward over the trimmed sequence as a single macro-step [1903.09366]. On ContinuousWorld, with $\beta=50$ and 3-ladder FAVAE, FaMARL in Maze converged rapidly within $\approx 200\,k$ steps, whereas PPO with primitive actions and FiGAR failed to solve the task. On RobotHand, FaMARL with $\beta=0.1$ was reported as the only method to succeed on both sparse-reward Reaching and dense-reward BallPlacing, and it shortened its chosen macro-action length when time penalties were present [1903.09366].

Macro learning has also been integrated into online planning under partial observability. MAGIC learns a macro-action generator and critic offline, then uses the learned generator online to produce situation-aware macro-actions conditioned on a particle belief and an environment context vector while planning with DESPOT [2011.03813]. Macro-actions are parameterized by low-dimensional variables such as cubic Bézier control points or turn-and-go parameters, and the planner backs up over a small generated macro set $M_\Phi$ rather than over primitive actions. Reported cumulative rewards were 54.1 on Light-Dark, 58.6 on Crowd-Driving, and 87.9 on Puck-Push, outperforming primitive-action DESPOT, handcrafted macros, and POMCPOW on all three tasks [2011.03813].

In classical STRIPS-style AI planning, Macro-FF treats a macro-operator as a compiled sequence of operators with induced preconditions and effects, and learns such operators either from static domain structure or from solution plans [1109.2154]. The system combines analysis, generation, filtering and ranking, and planning-time use of selected macros. On IPC-style benchmarks, the combined system increased coverage in several domains, for example from 24 to 36 solved instances in Promela Optical Telegraph and from 25 to 36 in Satellite [1109.2154]. These results support the longstanding planning view that macros reduce effective search depth and can alter heuristic behavior, but the literature also records standard limitations: open-loop execution prevents mid-macro feedback in FaMARL, and Macro-FF’s static compilation route is limited in domains where suitable structural information cannot be extracted [1903.09366] [1109.2154].

## 2. Hierarchical macro reasoning in LLM agents

Recent work on LLM agents uses “macro” to denote structured planning above token-level action generation. HiMAC defines a macro-policy
$$
\pi_{\rm macro}(b \mid s)=\prod_{k=1}^K \pi_{\rm macro}(g_k \mid s, g_{<k}),
$$
where the blueprint $b=(g_1,\dots,g_K)$ is a sequence of free-form sub-goal tokens, and a micro-policy that emits atomic actions conditioned on the active sub-goal and can output a special `<sub_done>` token to advance to the next sub-goal [2603.00977]. The same instruction-tuned LLM parameters are shared between macro and micro levels, but optimization alternates between a planner phase and an executor phase. Credit assignment is critic-free: at each level the method computes a group-relative advantage $(R-\mu)/(\sigma+\epsilon)$ over sampled blueprints or trajectories, and the two phases are trained with clipped surrogate objectives while gradients are restricted to disjoint token spans [2603.00977]. On ALFWorld, WebShop, and Sokoban, HiMAC was reported to outperform GiGPO and GRPO baselines. For example, ALFWorld overall success reached 89.9% for the 1.5B backbone and 92.1% for the 7B backbone, while WebShop success reached 83.4% and 84.1%, and Sokoban success on the 7B VLM reached 87.5% [2603.00977].

MACRO-LLM addresses a different but related problem: spatiotemporal partial observability in distributed LLM-powered agents [2601.09295]. Its architecture has three modules. **CoProposer** generates candidate actions and verifies them through predictive rollouts over a short horizon; **Negotiator** exchanges mean-field statistical features rather than full observations and resolves conflicts through confidence weighting; and **Introspector** analyzes reward drops and updates strategy by generating a textual “semantic gradient” [2601.09295]. The system is evaluated on cooperative adaptive cruise control and pandemic control. In the catch-up scenario of CACC, MACRO-LLM achieved RMSE-Headway of 1.212 m and SD-Headway of 0.455 m; in the New York pandemic-control topology it reported normalized infection 0.005, peak infection 0.003, death 0.000, and pandemic duration 33 days [2601.09295]. Here, “MACRO” is an acronym, but the architecture still embodies a macro-level coordination layer above local reactive behavior.

## 3. Macros as program and source-level abstractions

In program synthesis and procedural modeling, a macro is a function added to a domain-specific language whose body unrolls into a fixed sequence of existing commands. ShapeMOD operates on imperative, statement-based 3D shape programs and searches for macros that reduce both the number of function calls and the number of free parameters exposed across a dataset [2104.06392]. Its objective penalizes library size and rewards compact refactorings, and its discovery algorithm alternates a proposal phase, which mines abstracted programs from clusters of similar instances, with an integration phase, which retains only macros that improve the objective after refactoring. On chairs, the reported objective $f$ fell from 411 with no macros to 260 with ShapeMOD, while the total library size was 17 functions rather than the 36 of a baseline macro set [2104.06392]. Downstream gains were also reported: for the chair program VAE, `%fool` increased from 21.2 to 25.6 and Fréchet Distance fell from 17.8 to 16.7; for point-cloud-to-program induction, Chamfer Distance improved from 44.2 to 41.7 and rootedness from 93.7% to 96.9% [2104.06392]. A user study with 38 programmers found faster convergence in interactive editing and ease ratings of approximately 4.1 versus approximately 3.2 [2104.06392].

At the source-language level, C macros constitute a different abstraction class. The Maki framework analyzes macro portability by decomposing macro behavior into 26 boolean properties spanning interface-equivalent, scope-adapting, callsite-context-altering, and metaprogramming behaviors [2401.10422]. The implementation combines preprocessor callbacks, AST extraction, and property aggregation over invocations. Evaluated on 21 real-world C programs with 86,199 macro definitions, Maki reported that 37% of macros were interface-equivalent on average, compared with 19% for prior work, and achieved precision 0.95, recall 0.93, and $F_1=0.94$ on a hand-labeled sample of 383 macros [2401.10422]. In the Linux kernel, 41% of 57,896 analyzed macros were classified as interface-equivalent, and patches transforming eleven macros were submitted, with nine accepted by maintainers [2401.10422]. The contrast with ShapeMOD is instructive: ShapeMOD invents new high-level operators inside a DSL, whereas Maki classifies existing preprocessor abstractions to determine whether they can be preserved during translation.

## 4. Macro placement and spatial optimization

In VLSI floorplanning, “macro” denotes a large physical block whose placement strongly affects wirelength, congestion, timing, and routability. Re$^{2}$MaP addresses this setting through a recursive pipeline that combines multi-level macro grouping, PPA-aware cell clustering, mixed-size placement prototyping with DREAMPlace, angle-based analytical optimization on an ellipse, and packing-tree-based relocating [2511.08054]. The unified connection matrix is defined as
$$
M_{ij}=w^W_{ij}+w^D_{ij},
$$
combining wirelength and RTL-dataflow affinity, and ABPlace optimizes macro angles on an ellipse while balancing connection cost and overlap penalty [2511.08054]. The relocating stage then packs one macro group at a time into chip corners using B*-trees and an expertise-inspired cost function containing displacement, connection, periphery, bounding-box, I/O, and notch penalties. Across seven Nangate45 designs, Re$^{2}$MaP reported up to 22.22% and average 10.26% improvement in WNS, up to 97.91% and average 33.97% improvement in TNS, power reductions of up to 3%, DRC-violation reductions of up to 20%, and runtime gains of 10–40% relative to Hier-RTLMP [2511.08054].

DAS-MP also targets macro placement, but emphasizes enhanced dataflow awareness derived not only from macro–macro links but also from standard-cell clusters [2505.16445]. Its loss includes direct macro–cell terms, one-hop indirect macro–macro terms induced by shared cell clusters, and two-hop macro–cell–cell terms, all expressed through weighted HPWL. Two fine-tuning stages follow the initial simulated-annealing placement: a congestion optimization that normalizes two-hop penalties by a macro-area factor, and a flipping decision that computes vector forces from macro–macro, macro–cell, and macro–cell–cell relations to choose orientations [2505.16445]. On seven OpenROAD benchmarks, DAS-MP reported an average 7.9% HPWL improvement relative to RTL-MP, an 82.5% reduction in congestion overflow, 36.97% improvement in WNS, 59.44% improvement in TNS, and runtime overhead below 1.5% of total placement time [2505.16445].

A different spatial use appears in close-up novel view synthesis. MACRO, “Training-free Multi-plane Attention for Closeup Render Optimization,” addresses the scale gap between close-up target views and training-set references in 3D Gaussian splatting pipelines [2607.03875]. The method clusters the close-up depth map into $P$ planes by K-means on reciprocal depth, computes a scale factor $s_{k,p}=d_p^{\rm ref}/d_p^{\rm cu}$ for each reference view and plane, crops and resizes reference regions in image space before VAE encoding, and applies a depth-aware attention mask so each close-up token attends only to scale-matched reference tokens [2607.03875]. On DL3DV-Closeup, MACRO achieved PSNR 16.37, SSIM 0.519, LPIPS 0.321, DreamSim 0.099, and DINO 0.145; on MobileClose-10 it achieved PSNR 15.67, SSIM 0.450, LPIPS 0.480, DreamSim 0.116, and DINO 0.124, outperforming the listed 3DGS and diffusion-based baselines on perceptual metrics [2607.03875]. Here the acronym again names a concrete system, but the operational idea remains macro-level: depth-partitioned alignment above raw token attention.

## 5. Macro as aggregate scale and coverage objective

In conformal prediction, macro-coverage is defined as
$$
\mathrm{MacroCov}(C;\alpha)=\frac{1}{K}\sum_{y=1}^K P\{Y\in C(X)\mid Y=y\}\ge 1-\alpha,
$$
an intermediate criterion between marginal coverage and class-conditional coverage [2606.28598]. The generalized form aggregates coverage over arbitrary class groupings through a grouping function $g$ and weights $w$, and label-weighted conformal calibration constructs a weighted empirical mixture of groupwise score distributions to obtain a finite-sample guarantee of at least $1-\alpha-\Delta$ conditional on group counts [2606.28598]. Empirically, on Pl@ntNet-300K and iNaturalist 2018, standard conformal was reported to miss the target macro-coverage in long-tail settings, while classwise conformal overshot the target with very large prediction sets. Label-weighted conformal achieved approximately the target macro-coverage, for example approximately 0.90 at $\alpha=0.1$, with average set sizes of approximately 2–4 labels rather than greater than 50 [2606.28598].

In controlled leader–follower dynamics, “macro” denotes a continuum description obtained from particle systems through mean-field limits. The paper on micro-macro and macro-macro limits derives first a hybrid particle–fluid model and then a fully continuum two-fluid PDE system for leaders and followers, with convergence measured in bounded-Lipschitz duals and $d_1$-Wasserstein distance and controlled by modulated-energy estimates [2508.04020]. The limiting leader momentum equation contains drift toward a target $\xi$, attraction to the followers’ center of mass, and linear damping, and one-dimensional tests showed empirical error decay of order $\mathcal O(1/M)$ and $\mathcal O(1/N)$ as follower and leader populations increase [2508.04020].

Macroeconomic and energy-system uses are similarly aggregate in scale. MoMaT organizes monetary systems into micro, meso, and macro levels, with the macro level covering GDP sharing and money issuance, and focuses on “debt vortices” rather than circulation of money [2506.21651]. The Bill of Exchange is modeled as the unifying contractual instrument linking micro obligations, meso liquidity, and macro money, and the software specification proposes modules such as `Agent`, `BillOfExchange`, `Bank`, `CentralBank`, and `Ledger` together with invariant checks `account.assets + account.equity == account.liabilities` and `globalAssets == globalLiabilities` [2506.21651]. MacroEnergy.jl, by contrast, is an open-source multi-sector capacity-expansion framework whose four sector-agnostic primitives are edges, nodes, storage elements, and transformations [2510.21943]. It uses JuMP, supports decomposition through companion packages, and the accompanying examples include a seven-node, 8760-hour U.S. electricity and hydrogen network solved in under 10 minutes on a single node with CPLEX, as well as a sector-coupled test with 50 locations, 5 sectors, 10 years, and 8760 operational hours solved in parallel with a 4× speed-up versus a monolithic solve [2510.21943].

In quantum information, “micro-macro” labels entanglement between a qubit and macroscopically distinct states of a mesoscopic system. Mirkamali and Cory define distinctness by
$$
\Lambda(\phi)=|\langle J_z\rangle_{\psi_0}-\langle J_z\rangle_{\psi_1}|,
$$
show that symmetric micro-macro entangled states are the most robust to single-particle noise, and derive that the loss of bipartite entanglement under single-spin measurement or loss is second order in normalized distinctness, with average entropy or negativity behaving as $1-\mathcal O((\Delta M/N)^2)$ or $\tfrac12-\mathcal O((\Delta M/N)^2)$ [2410.22913]. The GHZ-limit $\Lambda=N$ loses all entanglement after one spin measurement or loss, but the paper identifies a regime in which the state remains both robust and macroscopic [2410.22913].

## 6. Macro schemes in compression and repetitive text processing

In text compression, a macro scheme is a partition of a string into phrases represented by textual substitutions. A bidirectional macro scheme for $T[1..n]$ partitions the string into phrases $P_i=(p_i,\ell_i,c_i)$, where $p_i=0$ denotes an explicit literal and $p_i>0$ denotes copying from another position followed by the last character $c_i$ [2003.02336]. Unlike Lempel–Ziv schemes, which require $p_i<s_i$, bidirectional schemes allow both forward and backward pointers. This increased flexibility can be exponentially better on highly repetitive texts, but the decision problem of finding a valid scheme with at most $K$ phrases is NP-complete [2003.02336].

Russo et al. propose a simulated-annealing heuristic whose state is a valid scheme $S$, energy is the phrase count $E(S)=k(S)$, and local moves attempt phrase merges followed by random source selection, with cycle-breaking splits when needed [2003.02336]. Efficient implementation uses a suffix array for occurrence enumeration and a Link-Cut Tree over the decoding forest for dynamic cycle detection. The paper also proves that when no two consecutive phrases can be merged because every concatenation is unique, the resulting local minimum is a 2-approximation of the optimum [2003.02336]. Experimentally, simulated annealing matched the optimum on Fibonacci strings, drastically outperformed Lempel–Ziv on Thue–Morse strings, and achieved near-optimal behavior on random protected strings, with representative phrase counts such as $k_{LZ}=9$ and $k_{SA}=3$ on Fibonacci $F_{10}$ and $k_{LZ}=250$ and $k_{SA}=21$ on a random protected string of length approximately 5000 [2003.02336].

Taken together, these literatures suggest that “macro” functions as a marker of higher-level structure: a temporally extended action in sequential decision-making, a grouped evaluation criterion in statistical validity, a continuum or sectoral aggregation in dynamical and economic models, a large block in physical design, or a compressed phrase in textual substitution. The term is therefore not a single concept but a family of abstractions that reduce primitive complexity by introducing structure at a larger scale.

Source: https://www.emergentmind.com/topics/macro