Standard Convolutional Neural Networks (CNNs) are notoriously "texture-biased," making them brittle when encountering new domains, such as moving from photos to sketches. This research introduces a novel pipeline that bypasses pixels entirely by representing objects as shock graphs—a classical geometric "skeleton" of shape—and classifying them using Graph Neural Networks (GNNs). This approach achieves state-of-the-art domain generalization with a fraction of the parameters used by traditional models.
The Texture Problem in Deep Learning
Deep learning models often rely on local patterns like fur texture rather than global structure. This leads to poor Domain Generalization (DG): a model trained on colorful photos often fails when asked to identify a black-and-white sketch.
The lack of an intrinsic "shape bias" is the root cause of this fragility. While previous methods tried to force CNNs to learn shape via edge maps, they still operate on a pixel grid. This paper proposes a representation inherently invariant to color, lighting, and texture by abstracting the image into a topological structure.
Methodology: From Pixels to Graphs
The proposed framework moves from an image-to-CNN pipeline to an image-to-graph approach consisting of four main stages:
- Contour Extraction: Images are first converted into edge maps and grouped into clean contour fragments.
- Shock Graph Generation: These contours are transformed into a "shock graph," a sophisticated medial axis capturing how the boundary flows and where different parts of the object meet.
- Geometric Feature Engineering: Each node in the graph is assigned 58-dimensional features describing local geometry (position, radius, shock type). Edges are endowed with features like curvature and arc-length.
- GNN Classification: Instead of a CNN, a Topological Adaptive Network (TAG)—a type of Graph Neural Network—is used to classify the resulting graph.
By discarding the original pixels and only keeping the graph, the model is mathematically incapable of being distracted by texture or color.
Key Insights and Results
- Shape as a Universal Language: The "skeleton" of an object remains remarkably consistent across photos, cartoons, and sketches. Moving to the graph domain bridges the "domain gap" before the neural network even starts training.
- Texture as Internal Shape: Interestingly, the shock graph captures internal patterns (like the spots on a giraffe) as geometric sub-graphs, allowing the model to treat texture as shape.
- Extreme Efficiency: The proposed GNN model uses only 257k parameters. For comparison, a standard ResNet-18 has 11 million. Despite being ~40x smaller, the GNN outperforms these heavyweights in cross-domain tasks.
- Performance Benchmarks: On the PACS dataset, the shock graph approach achieved an average accuracy of 47.45%, notably crushing the "Sketch" domain with 54.15% accuracy (compared to ~37% for CNN baselines). In Colored MNIST tests, the method maintained a steady ~72% accuracy, while CNNs were easily fooled by shifting color correlations.
Limitations and Future Work
The primary bottleneck of this approach is segmentation. The shock graph relies on clean contours; if an image is too noisy or cluttered to extract a meaningful edge map, the resulting graph will be poor. Future work involves finding ways to combine the high-level structural information from shock graphs with the rich appearance features of CNNs to create a more robust, hybrid architecture.
Summary updated