Contour Levy-Area Feature Branch
Implementation & benchmark of arXiv:2607.12245 — Rough Path Signature-Guided Geometry Augmentation for Few-Shot Industrial Surface Defect Detection
Source paper: Rough Path Signature-Guided Geometry Augmentation for Few-Shot Industrial Surface Defect Detection arXiv:2607.12245 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Add a geometric branch that converts ordered image contours into truncated signatures and feeds first-order displacement and second-order antisymmetric area features into the detector backbone. The area channel captures orientation and enclosed-region structure that ordinary edge magnitude or convolutional filters may miss, making the module suitable for thin cracks, scratches, bent boundaries, and small industrial defects.
Formulas
Mathematical statement
For a continuous bounded-variation path X:[0,T] -> R^d, the paper defines its signature as S(X)_J=(1,X_J^1,X_J^2,...) and the level-n iterated integral X_J^n=∫_{t_1<...<t_n; t_i∈J} dX_{t_1}⊗...⊗dX_{t_n}. The truncated signature S_n(X)_J=(1,X_J^1,...,X_J^n) is retained. For a planar contour X=(x,y), the level-one terms are X^1=(Δx,Δy), while the antisymmetric second-order term is A_xy=1/2(X^2_xy-X^2_yx); it is an oriented Levy-area contribution and changes sign when contour orientation is reversed. For a polygonal path with increments ΔX_i=X_{i+1}-X_i, the second-level approximation is X^2≈1/2∑_i ΔX_i⊗ΔX_i+∑_{i<j}ΔX_i⊗ΔX_j, giving A_xy≈1/2∑_{i<j}(Δx_iΔy_j-Δy_iΔx_j). The paper's uniqueness-up-to-tree-like-equivalence result motivates these aggregated path features as compact geometry descriptors, although implementation only requires signature levels one and two.
Implementation notes
Integrate this as an auxiliary geometry branch before the first backbone stage of a small CNN detector, or as extra patch channels for a ViT. (1) For each input image I, compute a Canny edge map or soft Sobel edge probability, trace each connected contour into an ordered planar sequence p_0,...,p_{K-1}=(x_i,y_i), and resample each contour by arc length to K=32 or 64 points. Normalize coordinates to [-1,1], retaining centroid and scale as optional extra features. (2) Pseudocode: edges=Canny(I); contours=trace_ordered_contours(edges); for c in contours: p=resample(c,K); d[i]=p[i+1]-p[i]; first=sum(d); second=0.5*sum_i outer(d[i],d[i])+sum_{i<j} outer(d[i],d[j]); area=0.5*(second[x,y]-second[y,x]); feature=[first_x,first_y,second_xx,second_xy,second_yx,second_yy,area]; rasterize or scatter these values over contour pixels. Aggregate overlapping contours using sum, mean, and max, then concatenate the geometry channels with RGB or project them through a 1x1 convolution. Use a learned gate z=RGB_features+sigmoid(Conv1x1(geometry))*Conv1x1(geometry). (3) The signature equations determine the accumulations; contour ordering, resampling length, edge thresholds, normalization, and gating are empirical choices. Begin with non-differentiable Canny features to isolate the mathematical contribution, then test a soft edge extractor. (4) First experiment: train YOLOv8n on NEU-DET with 5, 10, and 20 images per class, comparing RGB-only, RGB plus raw edge magnitude, and RGB plus signature channels across five seeds. Measure mAP@0.5, thin-defect recall, FLOPs, and latency. Success is a consistent few-shot mAP gain over raw-edge augmentation with less than 5% inference overhead.
Verification
This idea has not been verified yet.
Verification happens in two stages: Stage 1 — a mechanism check on a toy system confirms the claimed mathematical phenomenon reproduces; Stage 2 — a benchmark implements the idea on a real (small) neural network task and compares it against a tuned baseline over 8 paired seeds with a permutation test.
Artifacts
Artifacts unavailable.