Traffic-Guided Crossover for Scheduling Neural Networks on In-Memory Computing Chips

In-memory computing chips store a neural network's weights inside memory arrays called crossbars and do the multiplications in place, so weights never travel to a separate processor. What still travels are the intermediate results, called activations, that one layer hands to the next. On a chip built from many crossbar tiles, those activations cross an on-chip network, and the energy and delay of that movement now dominate. A schedule for such a chip has two parts. The first is a placement: which layer, or which piece of a layer, sits on which physical tile. The second is an order: in what sequence the tile-level tasks fire, which must respect the data dependencies of the network. Searching jointly over both is a hard combinatorial problem, and genetic algorithms are a natural tool for it. A genetic algorithm evolves a population of candidate schedules by mutating them and by "crossing" two parents into a child.

This proposal argues that existing crossover operators recombine the wrong building blocks. Operators that preserve permutations or precedence keep together genes that are close on the chromosome, meaning adjacent in a list. On an in-memory chip, what should stay together is a cluster of producer and consumer tasks that exchange heavy traffic, along with their relative positions on the tile grid. We propose a crossover that, at every mating, cuts the dataflow graph along its low-traffic edges. The child inherits whole high-traffic clusters, with both their placement and their order, from one parent. The rest is filled in from the other parent using rules that keep the child a valid permutation and a valid execution order, so no repair step is needed. The claim is testable. At equal evaluation budgets, this operator should beat genetic algorithms that use standard precedence-preserving crossover, should beat the analytical heuristics now used for in-memory computing mapping, and should widen its lead as networks grow and traffic becomes more uneven (skip connections, attention).

Core Claim

The defining-length bias that motivated shuffle crossover is about which genes a cut tends to separate. It has a physical analogue on spatial hardware. Every crossover implicitly decides which groups of tasks survive intact into the child. In a data-movement-bound schedule, the fitness contribution of a group depends mostly on whether producer and consumer stay adjacent on the mesh and close in time. If crossover cut points follow the communication graph instead of chromosome positions, then the "building blocks" a genetic algorithm passes on line up with the actual structure of the cost function.

Concretely, let the network be a directed acyclic graph of tile-level tasks with edges $e=(u,v)$ carrying $b_e$ bytes of activations. Let $\pi$ map tasks to mesh slots and $\sigma$ be a topological order. The cost we minimize is energy–delay product, built from a movement energy term

$$E(\pi,\sigma)=\sum_{e=(u,v)} b_e\, h\big(\pi(u),\pi(v)\big)\,\epsilon_{\text{hop}} \;+\; \sum_{e} b_e\, \tau_e(\sigma)\,\epsilon_{\text{buf}},$$

where $h$ is the hop distance on the mesh, $\epsilon_{\text{hop}}$ is the energy per byte per hop, $\tau_e(\sigma)$ is how long the activation must sit in a buffer before its consumer runs, and $\epsilon_{\text{buf}}$ is the per-byte buffer residency cost. Latency comes from an overlap-aware pipeline model. Both terms are sums over edges, and each edge's term depends only on the relative placement and timing of its two endpoints. That is the formal reason clusters joined by heavy edges are the right units to inherit.

Prior Work and Its Role

The method draws on two families of genetic scheduling work. In both, validity is preserved, but data movement on memory-centric hardware is never modeled. A Genetic Algorithm for Scheduling of Data-parallel Tasks on Multicore Architectures keeps chromosomes inside the space of valid topological sorts, but ignores communication cost entirely. Task Matching and Scheduling in Heterogenous Computing Environments Using a Genetic-Algorithm-Based Approach splits the chromosome into a machine-matching string and a topological scheduling string, and does model network contention, but at the scale of distributed machines and with hours of runtime on 100-node graphs. A Tailored NSGA-III for Multi-objective Flexible Job Shop Scheduling shows that a precedence-preserving two-point crossover, combined with tuned parameters, cuts evaluations from 150,000 to 10,000 on factory scheduling. Its cut points are still positional. Solving flexible job shop scheduling problem by a multi-swarm collaborative genetic algorithm similarly co-evolves machine choice and operation order with precedence operation crossover. We reuse these validity mechanisms and change only what the cuts follow.

Two papers constrain the design. CASPER: An Integrated Energy-Driven Approach for Task Graph Scheduling on Distributed Embedded Systems shows that encoding placement and order in one chromosome, evaluated against the true energy objective, beats decoupled pipelines by 23.3% in energy savings. That result rules out a "place first, order later" design, but CASPER's energy is processor voltage scaling, not movement. Fast-OverlaPIM: A Fast Overlap-driven Mapping Framework for Processing In-Memory Neural Network Acceleration supplies the overlap-aware latency model we build on and shows that layer-by-layer greedy mapping is a trap. Its own search, however, is a set of deterministic forward, backward, and middle-out heuristics.

The closest competitor is Domain-specific Genetic Algorithm for Multi-tenant DNNAccelerator Scheduling. Its MAGMA operators recombine core assignments, time windows, or whole per-accelerator queues for multi-tenant jobs on chiplet accelerators. Those blocks are defined by hardware units or time, not by the traffic graph. It also treats each job as a whole and does not model weight-stationary crossbars, where the layer's location is fixed by where its weights are programmed. Mind Mappings: Enabling Efficient Algorithm-Accelerator Mapping Space Search appears to contradict us: it reports that a gradient search through a learned surrogate beats a genetic algorithm. The genetic algorithm it compared against had no structure-aware operators, and it targets single-layer loop nests rather than multi-tile dependency graphs. We test that tension head on rather than assume it away. Finally, Data movement aware computation partitioning places computation near its data with a Kruskal minimum-spanning-tree heuristic, cutting on-chip data movement by 35.3%. That is a strong static alternative, and we use the same spanning-tree idea inside our crossover to pick clusters.

Research Program

We first build the evaluation substrate. This is an analytical model of a tiled crossbar chip on a 2D mesh. Each layer is split into tile-level tasks according to crossbar size. Edge traffic is computed from activation tensor sizes. Latency follows the ready-time and overlap formulation of Fast-OverlaPIM, and energy follows the equation above plus a fixed per-task compute term (analog-to-digital converters included), which is identical across schedules. To keep the model honest, we check single-layer energy and latency against Timeloop, and check that our ranking of schedules agrees with a slower cycle-level run on a sample of a few hundred schedules.

The chromosome is the pair $(\pi,\sigma)$. Crossover works as follows. First, draw a random spanning forest of the traffic graph, where heavy edges are more likely to be kept (a randomized Kruskal over traffic weights). Then delete edges until $k$ clusters remain, with $k$ itself sampled. Each cluster is assigned to parent A or parent B at random. Clusters inherit their slots from their parent, translated as a rigid block when slots collide, and any remaining slots are resolved with a partially-matched-crossover mapping so that $\pi$ stays a permutation. The order $\sigma$ is produced by precedence-preserving crossover. At each step, the child takes the earliest ready task from the list of whichever parent owns that task's cluster. This guarantees a valid topological sort.

Mutation moves a cluster as a block, or swaps two clusters' positions in time. We also run the search on general dependency graphs, namely Standard Task Graph and TGFF instances with communication volumes attached. This tests whether the effect is about traffic structure rather than neural networks specifically.

Baselines

The naive reference point is the schedule a compiler would produce by default. Layers are placed in topological order along a snake path through the mesh, and tasks are executed layer by layer. Every method must improve on this, and it fixes the scale of all reported gains.

The strongest existing mapping method for this hardware is Fast-OverlaPIM's search, which we reimplement in our cost model using its forward, backward, and middle-out heuristics with its best-transform option. The paper reports an 18.1× speedup on ResNet-50 with that strategy, relative to its sequential baseline. We have no reported number on Lacuna for any genetic algorithm on inter-tile movement energy for in-memory computing chips, so our absolute energy comparisons will be new. It runs on the same workloads and cost model, and we let it use as much wall-clock time as our search. Beating it means a lower energy–delay product on every large workload at matched time, not merely on average.

The strongest genetic competitor is MAGMA's operator set. We adapt it by treating tile groups as the "sub-accelerators" that its whole-queue crossover transfers. Its reported 1.4× to 2.3× throughput gains over manual heuristics show these operators are strong on related hardware. We also run a genetic algorithm with the precedence-preserving two-point crossover from the tailored NSGA-III, paired with partially-matched crossover on placement. All genetic variants share population size, selection, mutation, and evaluation budgets (10,000 and 100,000 evaluations). Each gets the same Bayesian hyperparameter tuning budget, mirroring the MIP-EGO tuning used in the NSGA-III work.

The spanning-tree placement of Tang et al. serves as a static data-movement baseline. A Mind Mappings–style surrogate search serves as the learned baseline. That paper reports 1.76× (fixed steps) and 4.19× (fixed time) better energy–delay product than a plain genetic algorithm. We train it on the same number of cost-model queries that the genetic search is allowed.

The key ablation keeps everything else fixed and replaces our cluster selection with clusters of the same size distribution drawn uniformly at random, ignoring traffic. If traffic guidance is the active ingredient, this ablation should lose most of the gain. A second ablation keeps traffic-guided mutation but turns crossover off.

Why not just…?

Why not just use simulated annealing with the same cluster moves? This is the most serious threat. If traffic-guided block moves are what matter, a single-trajectory local search could capture all of it without crossover. The no-crossover ablation and a tuned simulated annealing run with identical moves answer this directly. If either matches the full method within noise at equal evaluations, we will report that the contribution is the move set, not recombination, and reframe accordingly.

Why not just run Fast-OverlaPIM's heuristics, which already model this hardware? They are fast and well matched to feedforward chains. But they make sweeps in a fixed direction and do not search placement globally. The CASPER and Fast-OverlaPIM evidence on local-versus-global traps suggests they will leave gains on the table where traffic is non-local. Our prediction is specific: the gap should be near zero on plain chain networks like VGG-16 and grow on ResNet-50, MobileNetV2, and BERT, where skip connections and attention create long edges. If the gap does not grow, the heuristics are sufficient.

Why not just place by minimum spanning tree and order greedily? The Tang et al. result shows that static near-data placement already cuts movement substantially. But it optimizes placement alone and cannot trade buffer residency against makespan. CASPER's decoupling penalty argues this will cost energy. We run it as a baseline and also use it as a seed population for every genetic method. Any gain we claim is then gain beyond it.

Why not just use a learned surrogate with gradient descent? Mind Mappings shows this beats an untuned genetic algorithm on single loop nests. Joint placement-and-order spaces are permutation-structured, however, and a continuous relaxation must be projected back onto valid permutations and topological sorts at every step. We test this at equal query budgets. If the surrogate wins, the natural follow-up is to use it as a cheap pre-screen for crossover offspring rather than as a replacement.

Proposed Experiments

The workloads come from those used in the file: ResNet-18, ResNet-50, ResNet-152, VGG-16, MobileNetV2, BERT, and YOLOv3. We also use two- and four-network multi-tenant mixes in the style of MAGMA, on meshes of 64 to 1,024 tiles. For generality we add the 50-task Standard Task Graph set and TGFF graphs of 8 to 100 nodes, with communication volumes added. The metrics are movement energy, end-to-end latency, energy–delay product, the Pareto front between energy and latency, and evaluations or wall-clock time needed to reach a target quality. Each result is reported over 20 seeds with confidence intervals.

Three checks decide the claim. First, the full operator must beat the random-cluster ablation, and the margin should grow with a measured traffic skew statistic: the share of total bytes on the top 10% of edges. That correlation is the mechanism's signature. Second, at matched wall-clock time it must beat Fast-OverlaPIM's search and the adapted MAGMA on the large residual and attention workloads. Third, it must beat simulated annealing with identical moves, which isolates crossover itself. We also include a negative control on traffic-uniform random graphs. Here the operator should show no advantage over positional crossover. If it does show one, the explanation would be something other than traffic structure, and the claim as stated would be wrong.