Event Transformer

Zhihao Li, M. Salman Asif, Zhan Ma · DOI

Abstract

Event cameras capture brightness changes asynchronously with microsecond resolution, but processing this high-frequency data efficiently remains a challenge. This paper introduces a novel token-based representation for event camera data, treating individual events as discrete "tokens" rather than collapsing them into frames or voxel grids. By using a specialized Event Transformer Block with a "Three-way Attention" mechanism, the model achieves state-of-the-art performance in object classification and optical flow while remaining efficient enough to run on standard hardware.

Introduction

Event cameras, or neuromorphic sensors, are bio-inspired devices that capture brightness changes asynchronously at microsecond resolution. Unlike standard cameras that take "pictures" at fixed intervals, event cameras produce a continuous stream of $(x, y, t, p)$ tuples.

The primary challenge lies in how to feed this data into Deep Neural Networks (DNNs). Most researchers convert events into frames (losing temporal precision), voxel grids (high memory/compute cost), or spikes (requiring specialized neuromorphic hardware). This paper seeks a "middle ground": a representation that preserves fine-grained temporal details without sacrificing the ability to run on mainstream GPUs and CPUs.

Methods

The authors propose the Event Transformer, which processes the event stream through a five-stage backbone. The core innovation lies in two areas:

  1. Spatiotemporal Embedding: Instead of a simple projection, they use a dual-path approach. A Sparse Convolutional layer extracts spatial features from the event distribution, while a separate temporal layer embeds the microsecond-level timestamps. These are fused into a single "event-token."
  2. Three-way Attention: To capture the complex relationships between events, the Event Transformer Block (ETB) employs three distinct attention mechanisms:
  3. Local Attention (LXAttn): Uses K-Nearest Neighbors (KNN) to find events close in time, capturing short-term motion continuity.
  4. Sparse Convolution Attention (SCAttn): Enhances local spatial relationships using 2D spatial encoding.
  5. Global Attention (GXAttn): Aggregates information from a downsampled version of the entire sequence to provide holistic context.
Overview of the Event Transformer architecture, including the five-stage backbone and the Three-way Attention mechanism.

Crucially, the model uses standard operators like Multi-Layer Perceptrons (MLP) and Sparse Convolutions, making it highly compatible with existing deep learning frameworks.

Datasets and Evaluation

The model was evaluated across several standard event-based benchmarks:

  • Object Classification: N-MNIST, N-Caltech101, CIFAR10-DVS, N-Cars, and ASL-DVS.
  • Optical Flow Estimation: The Multi-Vehicle Stereo Event Camera (MVSEC) dataset.

Key Insights and Ideas

  • Events as Tokens: By treating each event as a token (similar to words in NLP or patches in Vision Transformers), the model avoids the "blurring" effect of frame-based representations.
  • Temporal Granularity is King: Ablation studies showed that as you aggregate timestamps (reducing temporal resolution), accuracy consistently drops. This proves that the microsecond-level precision of event cameras is a feature, not a bug, and should be preserved.
  • Efficiency through Sparsity: By using Sparse Convolutions, the model only performs computations where events actually occurred. This allows the model to achieve high accuracy with only 0.51G FLOPs—significantly lower than many frame-based competitors.

Key Results

The Event Transformer demonstrates superior performance and efficiency across multiple tasks:

  • State-of-the-Art (SOTA) Accuracy: The model achieved top-tier results on N-MNIST (99.9%), N-Caltech101 (81.6%), and ASL-DVS (99.9%).
  • Computational Efficiency: Compared to the DVS-ViT (a frame-based transformer), this model uses roughly 60x fewer FLOPs (0.51G vs 30.74G) while maintaining better or comparable accuracy.
  • Optical Flow: On the MVSEC dataset, the model outperformed established baselines like FireNet and EvFlowNet, reducing the Average End-point Error (AEE) while consuming only 39% of the typical computation cost.
Comparison of the Event Transformer against state-of-the-art methods across multiple event-based classification benchmarks.

Limitations and Future Work

Despite its strengths, the approach has areas for improvement:

  • Data Augmentation: The authors noted that they haven't yet found an ideal data augmentation strategy for event-by-event processing. This led to slightly lower performance on the CIFAR10-DVS dataset compared to some specialized Spiking Neural Network (SNN) methods.
  • Scaling: While the model is efficient, processing millions of events per second in real-time on edge devices remains a challenge. Future work may involve further optimizing the KNN search and event-merging layers.
  • Generalization: The authors suggest that this token-based approach could eventually be extended to bridge the gap between frame-based and voxel-based representations entirely.

Summary updated

BibTeX
@inproceedings{li2024event,
  author = {Zhihao Li and M. Salman Asif and Zhan Ma},
  title = {{Event Transformer}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2024},
  doi = {10.1109/icassp48485.2024.10447951},
}
Figure