Sakana AI's Smart Bricks Recognize Their Own Shape Without Any Central Brain

Sakana AI publishes in Nature Communications: physical bricks running identical tiny neural nets collectively recognize their own 3D shape and guide self-repair, with no central controller and no brick knowing its position.

·
·
Sakana AI's Smart Bricks Recognize Their Own Shape Without Any Central Brain
  • First physical 3D self-recognizing modular system: hundreds of identical cubic bricks with tiny neural nets collectively classify their own shape with no central controller and no brick knowing its position.
  • 100% hardware success rate: four shapes (26 to 197 bricks) correctly identified in under 60 update cycles (~3 minutes); 98.97% accuracy in simulation across 7 shape classes.
  • Fault tolerant by design: most shapes maintain accuracy at 5% brick failure; planes and boats degrade minimally even at 15% failure; narrow shapes like guitars are vulnerable at bottlenecks.
  • Damage detection + self-repair: same framework extended to predict missing neighbors (94.8% accuracy) and guide regrowth from a seed cluster, without ever training on that scenario.
  • Emergent morphogen-like gradients: hidden channels spontaneously develop left-right and anterior-posterior activation patterns resembling embryonic developmental axes — not programmed, but learned.
  • Open source: full code and hardware designs at github.com/rmorenoga/cube3D; paper in Nature Communications.

What if a pile of LEGO-like bricks could figure out what shape they form, detect which pieces are missing, and guide their own repair , all without any brick ever being told where it sits? That is precisely what Sakana AI's latest research, published in Nature Communications, demonstrates. The work, a collaboration between IT University of Copenhagen, Sakana AI, and Autodesk, is the first physical realization of large-scale, bio-inspired 3D self-recognition in modular hardware.

The problem with smart modular systems

Modular robotics has been a research goal for nearly three decades. The dream: snap-together units that can autonomously reconfigure into different structures. The reality has been messier. Most existing systems fall short in generalizing to new shapes or detecting damage in a robust, distributed manner , they often rely on centralized computation, manually designed behaviors, or extensive communication protocols that do not scale well. The missing ingredient, the paper argues, is shape inference: a structure that cannot tell what shape it is cannot meaningfully repair or reconfigure itself.

Previous bio-inspired attempts at solving this stayed either in simulation or in small 2D hardware setups. Existing efforts inspired by biological principles have so far remained either in simulation or in small 2D hardware implementations, limiting their applicability to real-world systems with hundreds or even thousands of components.

Biology as a blueprint

The core inspiration is how living tissue self-organizes. Through local communication and self-organization, groups of cells can assess whether they have correctly formed a target shape, such as an organ, and can actively remodel body parts following injury. A salamander can regenerate a damaged tail that transforms into a functional leg, and simple organisms like Hydra and Planaria can fully restore their morphology regardless of which part is lost. The key insight: none of those cells has a global map. They only talk to their neighbors.

The algorithm the team built on is called a Neural Cellular Automaton (NCA) , think of it as a cellular automaton (a grid of cells that update based on neighbor states) where the update rules are not hand-coded but learned by a neural network. Unlike traditional cellular automata that operate with discrete cell states and hand-crafted rules, NCAs use continuous-valued cell states, enabling end-to-end differentiability and compatibility with gradient descent-based learning algorithms. The team extended this framework from 2D simulations to 3D physical hardware for the first time.

What a brick actually is

Each cellular brick is a printed circuit board (PCB) cube with electrical connectors on all six faces, a microcontroller module, an LED to display color information (the class label outputted by the cell), and the electronic components necessary to power these components. Multiple bricks can be stacked together to create different objects. Each brick costs roughly 20 EUR to produce at small scale, dropping to 15 EUR at volume.

Architecture diagram showing cellular brick hardware, assembled shapes, local cell interactions, and the 3D NCA neural network update mechanism

Every brick runs the exact same small neural network. No brick is assigned a role, a position, or a unique ID. Communication happens only face-to-face with physically touching neighbors, using a custom pulse-width-modulation serial protocol over six buses (one per face). Each module transmits its current full 28-dimensional NCA cell state to its connected neighbors. If there is no neighbor connected to a particular face or a valid message does not arrive in time, the input values corresponding to that face default to 0.

How the collective thinks

Each brick's 28-dimensional state vector has three parts: an alpha channel (is this cell active?), 20 hidden channels acting as internal memory, and 7 channels corresponding to class logits for the seven shape categories. The network runs iteratively:

  1. Each brick gathers state vectors from all physically connected neighbors via a 3x3x3 3D convolution with a cross-shaped kernel.
  2. A two-layer 1x1x1 convolutional update module computes a delta and adds it to the cell's state.
  3. Stochastic firing (50% probability in simulation, 100% on hardware for determinism) introduces robustness and encourages emergent coordination.
  4. After 60 cycles, each brick reads its top class logit and lights its LED the corresponding color.

The collective is tasked to distinguish between objects resembling planes, chairs, cars, tables, houses, guitars, and boats, trained with a cross-entropy loss to predict the class label through gradient-based optimization. Training used 487 voxelized shapes from the ShapeNet dataset, downsampled to 15x15x15 voxels for hardware transfer.

The numbers

In simulation, the approach reaches an overall accuracy of 98.97%. To test how the approach works in the real world, the team transferred the NCA trained in simulation onto the physical bricks and built four distinct shapes with numbers of bricks ranging from 26 for a guitar to 197 for a round table. The result: the bricks reached correct consensus on a plane, a guitar, a boat, and a table, with 100% success rate across all four. In hardware, the collective converges in fewer than 60 update cycles , about three minutes of real time.

Shape classification results showing convergence curves in simulation across 7 object categories, and hardware classification sequences for plane, guitar, boat, and table

Fault tolerance and the guitar problem

The system was stress-tested by randomly silencing subsets of bricks , preventing them from sending or receiving messages. Most shapes maintain high recognition performance at 5% failure rates. Some shapes, such as the plane and boat, showed only minimal degradation in classification accuracy even at 15% failure rates. But not all shapes are equal. Shapes with narrow structural bottlenecks, like the guitar, were more sensitive to localized faults. In these cases, failure of a single module in the neck region could sever connectivity between subparts of the shape, leading to misclassification or delayed convergence. This is a fundamental geometry problem, not an algorithm problem , a narrow bridge between two halves is a single point of failure regardless of how smart the bricks are.

The system also generalizes beyond its training data. A table modified to have five shortened legs at random positions was still correctly classified as a table, and a boat with its central bridge shifted off-center did not significantly impair recognition. These behaviors suggest that the distributed representations learned by the NCA capture abstract structural features rather than overfitting to specific examples. The exception: a scaled-down table was misclassified as a chair, likely because fewer bricks compressed the structural cues the network relies on.

Morphogens: how the bricks figure out left from right

One of the most striking findings is how the collective solves the task. The team inspected the hidden channel activations over time and found that the bricks spontaneously develop gradient patterns strikingly similar to morphogens , the diffusible signaling molecules that give cells positional information during embryonic development. Early in the process, the system often establishes left-right and radial patternings that are broadly reminiscent of how structured spatial organization can emerge from local interactions.

This also explains the table-vs-chair disambiguation. Similar to tables, many cells in the chair are initially classified as a plane. However, unlike in the table case, an anterior-posterior patterning is established, akin to the biological head-to-tail axis. Over time, the signal propagates from posterior to anterior, guiding the cells to reach consensus that they form a chair. Nobody programmed this. It emerged from training.

Damage detection and self-repair

The same framework was extended to damage detection by adding a second output head: each brick also predicts whether any of its six neighbors is missing, and in which direction. Each cell was classified as belonging to one of seven categories: no damaged neighbors, or damage in one of the six Cartesian directions. The model was trained on synthetically altered shapes with both spherical and cubic damage types.

Despite the added task, the system retained 98.9% shape-classification accuracy while detecting damage with an average accuracy of 94.8%. The repair loop is then simple: start from a seed cluster, repeatedly add new bricks in the direction the existing ones flag as missing, and stop when no damage is detected. Without ever being trained starting from only a few cells, the model recovered almost all shapes across all object classes with high accuracy.

Scaling behavior charts showing classification and recovery accuracy versus voxel resolution and hidden channel count, with examples at 32x32x32 and 64x64x64 grids

In simulation, the approach scales well beyond the hardware experiments. With 128 hidden cell channels, classification accuracy remains high across all three resolutions, reaching 0.98, 0.96, and 0.96 for the 15³, 32³, and 64³ settings, respectively. The largest experiments involved assemblies of more than 18,000 cubes with internal cavities and hollow geometries.

What it cannot do yet

The paper is candid about the gaps. The bricks are externally powered , there is no energy autonomy. They cannot move or physically place new modules; the repair loop is currently a simulation-only capability that would require actuated hardware (think magnetically docking milli-scale blocks) to work in the real world. The system does not yet reproduce the richer repertoire of stable specialization seen in biology, where cells can take on distinct structural, sensing, signaling, or metabolic roles over extended timescales. And scale invariance is imperfect , shrink a shape enough and the bricks lose the structural cues they need.

Where this goes

The near-term applications are concrete. The paper specifically calls out smart modular surfaces , think facade tiles or wall panels where local communication enables distributed fault detection without a central monitoring system. Further out: adaptive smart materials, damage-tolerant modular robotic structures, autonomous construction, and space systems where sending a repair crew is not an option.

The full code and electronic designs are open-source on GitHub, and the training data is available via the ShapeNet dataset. This is a rare paper where the hardware is simple enough (a PCB cube with an ESP32 and six connectors) that a well-resourced lab could replicate it. The real contribution is not the bricks themselves , it is the proof that decentralized collective intelligence, long studied in software, holds up when the physics gets messy.

Comments

avatar