Memristors & Resistive Computing
Analog & In-Memory Computing · Frontiers track
9 min read
In this module
The Memory Resistor
In the previous lesson, we saw how a crossbar array of resistive elements performs matrix-vector multiplication through Ohm's law and Kirchhoff's law. But what are these resistive elements? They need to be programmable (to store different weight values), non-volatile (to retain weights without power), and small enough to build dense arrays.
The device that ticks all three boxes is the memristor — a portmanteau of "memory" and "resistor." Predicted theoretically by Leon Chua in 1971, first physically demonstrated by HP Labs in 2008, and a source of persistent research excitement ever since. It's a two-terminal device whose resistance depends on the history of current that has flowed through it.
How Memristors Work
A memristor is typically a thin film of metal oxide (such as hafnium oxide, HfO₂, or titanium oxide, TiO₂) sandwiched between two metal electrodes. The key mechanism involves the movement of oxygen vacancies (missing oxygen atoms) within the oxide layer:
SET Operation (Low Resistance)
Applying a positive voltage above a threshold causes oxygen vacancies to migrate towards one electrode, forming a conductive filament through the oxide. The device switches from a high-resistance state (HRS) to a low-resistance state (LRS). This is the SET operation.
RESET Operation (High Resistance)
Applying a voltage of opposite polarity (or a different magnitude) causes the conductive filament to rupture, returning the device to a high-resistance state. This is the RESET operation.
Analogue Conductance States
Here's where it gets interesting: the memristor isn't limited to two states. By controlling the programming voltage and pulse duration carefully, the conductive filament can be partially formed to varying degrees, producing intermediate resistance states. That gives you a continuous (or at least many-level) range of conductance values — which is exactly what you need to represent analogue weights in a neural network.
The device itself is just a sandwich: top electrode, a few nanometres of oxide (HfO₂, say), bottom electrode. What changes is the filament inside the oxide, and the states it can be in look like this:
Follow the arrows rather than the boxes. Every weight update is a walk along one of these edges, and the analogue trick lives in the middle state: stopping a SET or RESET partway leaves a filament that's neither formed nor ruptured.
The key property that makes memristors ideal for in-memory computing is that they are simultaneously memory devices and computing devices. The conductance value (which represents a neural network weight) is stored as a physical state of the oxide layer and retained without power. When a voltage is applied, the device immediately produces a current proportional to its stored conductance - performing the weight multiplication as a side effect of reading the memory. There is no separate "read weight from memory" and "multiply" step.
Types of Resistive Memory
Memristors are the most well-known resistive memory, but several related technologies also support analogue in-memory computing:
ReRAM (Resistive Random Access Memory)
ReRAM is the commercial term for metal-oxide-based memristive devices. ReRAM has been developed by companies including Crossbar Inc., Weebit Nano, and TSMC. Key properties:
- Switching speed: ~10 nanoseconds
- Endurance: 10^6 to 10^12 write cycles
- Retention: >10 years
- Cell size: as small as 4F² (where F is the minimum feature size)
- Multi-level: 2-6 bits per cell achievable
PCM (Phase-Change Memory)
Phase-change memory uses chalcogenide materials (such as Ge₂Sb₂Te₅, or GST) that can be switched between amorphous (high resistance) and crystalline (low resistance) states using electrical heating:
- SET: A moderate current pulse anneals the material into the crystalline state (low R)
- RESET: A high current pulse melts the material, which then rapidly quenches into the amorphous state (high R)
- Intermediate states: Partial crystallisation produces intermediate resistance values
PCM is more mature than ReRAM (Intel/Micron shipped the Optane memory product based on PCM technology) and has been extensively studied by IBM for analogue AI computing. PCM offers:
- Switching speed: ~50-100 nanoseconds
- Endurance: 10^6 to 10^9 write cycles
- Retention: >10 years
- Good analogue controllability for intermediate states
MRAM (Magnetoresistive RAM)
MRAM uses magnetic tunnel junctions whose resistance depends on the relative orientation of two magnetic layers. While MRAM is primarily binary (parallel = low R, antiparallel = high R), domain wall MRAM variants can achieve multiple resistance states.
MRAM is very fast (nanosecond switching), has virtually unlimited endurance, and is already in production (Everspin, Samsung). However, its limited analogue resolution (fewer distinguishable states) makes it less suited for multi-bit weight storage than ReRAM or PCM.
Flash Memory
Standard flash memory (the technology in SSDs) can also be used for analogue in-memory computing. Flash cells store charge on a floating gate, producing a threshold voltage shift proportional to the stored charge. Multi-level flash cells (MLC, TLC, QLC) already store 2-4 bits per cell.
Flash-based analogue computing piggybacks on the enormous existing manufacturing infrastructure. The startup Mythic used flash memory crossbar arrays for their analogue AI accelerator chip. The main limitations are slow write speed and limited write endurance.
The Crossbar Array in Detail
Physical Structure
A memristive crossbar array is fabricated as alternating layers of metal wires and resistive switching material:
- Bottom metal electrodes (row lines) are patterned on a substrate
- A thin film of metal oxide (the resistive switching material) is deposited
- Top metal electrodes (column lines) are patterned perpendicular to the bottom electrodes
- At each intersection, a memristive device forms naturally
This simple structure can be fabricated in the back end of line (BEOL) of a standard CMOS process - meaning crossbar arrays can be built on top of conventional transistor circuits without requiring new fabrication lines.
Performing Matrix-Vector Multiplication
To compute y = Wx (where W is the weight matrix and x is the input vector):
- Program weights: Set each memristor's conductance G_ij to represent the weight W_ij
- Apply inputs: Convert the input vector x to voltages and apply to the row lines
- Read outputs: Measure the current on each column line. Each column current is the dot product of the input voltage vector with the column's conductance values
- Digitize: Convert the analogue output currents to digital values using ADCs
Steps 1 is done once (when loading the model). Steps 2-4 are repeated for each new input. The actual computation (step 2-3) takes nanoseconds.
A crossbar array is remarkably dense: each weight occupies just one crosspoint (one memristor) at the intersection of two wires. A 1024 × 1024 crossbar contains over one million weights in an area of roughly 100 × 100 micrometers. For comparison, a digital MAC unit (multiplier + accumulator) occupies thousands of transistors per weight, making the crossbar 100-1000x denser for weight storage. This density advantage means more of the neural network fits on a single chip, reducing the need for off-chip memory access.
Non-Idealities and Challenges
Real memristive crossbar arrays suffer from several non-ideal effects that limit their precision and reliability:
Device Variability
No two memristors are identical. The conductance achieved by programming a memristor to a target value varies from device to device (device-to-device variability) and from one programming cycle to the next on the same device (cycle-to-cycle variability). This is because the conductive filament formation is a stochastic process - the exact atomic arrangement differs each time.
Typical variability: the standard deviation of programmed conductance is 5-20% of the target value. This limits the effective precision to approximately 4-6 bits.
Conductance Drift
Some resistive memory technologies (particularly PCM) exhibit conductance drift - a gradual increase in resistance over time after programming. This means that weights slowly change after being programmed, degrading model accuracy. Periodic reprogramming or drift-aware training techniques can mitigate this effect.
Sneak Paths
In a crossbar array, current can flow not only through the intended path (from the active row to the active column) but also through unintended paths via other memristors. These sneak path currents add errors to the output.
The solution is to add a selector device (typically a diode or a transistor) in series with each memristor. The selector blocks current flow when the device is not being addressed, eliminating sneak paths. However, adding selectors increases the cell area and fabrication complexity.
IR Drop
Large crossbar arrays suffer from IR drop - voltage loss along the metal wire lines due to their finite resistance. Memristors far from the voltage source see a lower voltage than those near the source, producing systematically biased outputs.
IR drop limits the practical size of crossbar arrays. Most designs limit arrays to 256×256 or 512×512 elements and tile multiple arrays for larger matrices.
ADC Bottleneck
The analogue output currents must be converted to digital values by analogue-to-digital converters (ADCs). High-resolution ADCs are power-hungry and area-intensive. For a 256-column crossbar, 256 ADCs are needed (one per column), and each must have sufficient resolution (8-12 bits) to capture the analogue precision of the computation.
The ADC power consumption can dominate the total chip power, potentially negating the energy savings of analogue computation. Designing efficient, low-power ADCs is a critical research area for analogue AI chips.
Programming Strategies
Programming precise analogue conductance values into memristors requires careful techniques:
Write-and-Verify
The most common approach:
- Apply a programming pulse
- Read the resulting conductance
- If not at the target, apply another pulse (with adjusted parameters)
- Repeat until the conductance is within tolerance
This iterative process is slow (tens to hundreds of iterations per device) but achieves the best precision. For a 256×256 array with 65,536 devices, programming can take minutes.
Predictive Programming
Use a model of the memristor's programming behaviour to predict the pulse needed to reach the target conductance in fewer iterations. This can reduce programming time but requires accurate device models.
In-Situ Training
Instead of programming weights externally, train the network directly on the crossbar by updating memristor conductances based on gradient signals. This avoids the need for precise absolute programming but requires implementing weight update circuits on-chip.
The challenges are real. None are fatal. The next lesson looks at the commercial chips that have navigated them and delivered working analogue AI accelerators.