Images rendered from 3D models are cleaner than photographs. They lack sensor noise, natural clutter and messy lighting. One consequence is easy to state and rarely measured: inside a pretrained network, synthetic images occupy a thinner region than real ones. The renderer pins certain combinations of features to near-fixed values, and real photographs then vary along exactly those combinations. A classifier trained only on synthetic data has never seen variation in those directions. On real images it extrapolates arbitrarily. We propose to make this precise with a tool from algebraic subspace clustering. The tool is an approximate vanishing ideal: a set of polynomials that evaluate to roughly zero on every training point, so that the data is described as the solution set of a system of equations. We fit these equations to unlabeled synthetic features and evaluate them on unlabeled real features. The equations that real data breaks are a concrete, inspectable list of simulator shortcuts. At test time we then move each real feature back onto the synthetic solution set along the local normal directions given by the polynomials' gradients.
The two-sentence version for a colleague is as follows. Synthetic data satisfies extra nonlinear equations that real data does not, and those surplus equations are the sim-to-real gap in the feature space of a frozen network. Fit the equations on abundant synthetic data, test them on scarce real data, and correct real points along the broken equations' gradients. This takes no labels, no adversarial training and only two domains.
Core Claim
Classic algebraic subspace clustering describes a union of subspaces as the zero set of polynomials. It reads each point's local normal direction off the gradient of a vanishing polynomial, so that $\nabla f(x_0)$ is proportional to the normal of the flat through $x_0$, as in Generalized Principal Component Analysis (GPCA) and Filtrated Spectral Algebraic Subspace Clustering. We reuse that geometric fact, but for comparing two domains rather than segmenting one.
Let $G=\{g_1,\dots,g_k\}$ be coefficient-normalized polynomials of degree at most 3. They are fitted on synthetic features $X_S$, with $\frac{1}{|X_S|}\sum_{x\in X_S} g_j(x)^2 \le \epsilon$ for each $j$. We call $g_j$ a shortcut equation if its mean squared value on real features $X_T$ exceeds a threshold $\tau$. The threshold is calibrated so that held-out synthetic points exceed it at a fixed false-alarm rate. Let $J(y)$ be the matrix whose rows are the gradients of the shortcut equations at $y$, and $g(y)$ their values. The correction of a real feature $x$ is the nearest point on the synthetic solution set: $$y^\star=\arg\min_y \|y-x\|^2 \ \text{ s.t. } g_j(y)=0 \text{ for shortcut } j,\qquad y\leftarrow y-J(y)^\top\big(J(y)J(y)^\top\big)^{-1}g(y).$$ The update on the right is the standard Gauss–Newton step. We run it for a few iterations starting from $y=x$.
The claim that is new and testable has three parts. First, a real point's residual on the shortcut equations predicts whether a synthetic-trained classifier gets it wrong. Second, equations of degree two and three explain errors beyond what degree-one equations explain. Degree-one equations are just low-variance linear directions, which is what covariance alignment already sees. Third, projecting along the gradients of the nonlinear shortcut equations recovers accuracy that global linear alignment does not.
The data regime suits this approach. Fitting an ideal needs many points, and synthetic data is abundant. Showing that a single polynomial does not vanish needs only enough real points to estimate one mean, and real unlabeled data is scarce. The research file flags this asymmetry as an open problem (Gap 3). Here it works in our favour.
Relation to Prior Work
Three papers supply the method. Approximate Vanishing Ideal Computations at Scale gives the oracle-based vanishing-ideal algorithms (OAVI and its conditional-gradient variants). Their cost grows linearly in sample size, and they ran on up to 2,000,000 points, which makes fitting on the full VisDA synthetic split feasible. Spurious Vanishing Problem in Approximate Vanishing Ideal shows that unnormalized polynomials appear to vanish merely because their coefficients are tiny. Coefficient norms in plain vanishing component analysis ranged from 10^-15 to 10^10. For us this is a hard constraint: a shortcut test on unnormalized polynomials would flag coefficient scale, not geometry. We therefore normalize coefficients throughout. Approximating Latent Manifolds in Neural Networks via Vanishing Ideals fits class-wise vanishing ideals to truncated ResNet features after PCA and tanh rescaling, and uses them as a compact classification layer. We borrow its feature pipeline. It works only in-distribution on CIFAR and fits equations per class to discriminate. We instead fit equations to the whole unlabeled synthetic domain and compare domains.
The closest conceptual predecessor is Algebraic Geometric Comparison of Probability Distributions. It compares distributions by turning their covariances into quadratic polynomials and finding a shared invariant subspace through ideal computations. It differs from our proposal in three ways:
- It compares moments, whereas we compare the supports of the data.
- It needs many distributions to identify the subspace, whereas we need two domains.
- It is restricted to linear subspaces and synthetic 10-dimensional data, whereas we look for nonlinear equations in real network features.
Two linear and affine methods motivate and bound the proposal. Unsupervised Visual Domain Adaptation Using Subspace Alignment aligns one global PCA basis per domain in closed form. Affine Transport for Sim-to-Real Domain Adaptation maps Gaussian approximations of simulated and real states onto each other. Its authors note that it degrades in high-dimensional state spaces where a single affine map does not generalize. Both are, in our terms, corrections along degree-one equations shared by all points. Our method uses per-point normals from higher-degree equations, so it reduces to a linear correction exactly when the shortcuts are linear. That makes the comparison sharp rather than rhetorical.
Subspace Identification for Multi-Source Domain Adaptation motivates the goal of separating texture-like domain-specific factors from invariant ones. However, it needs at least $n+1$ source domains and VAE training, so it cannot apply to the single-source VisDA setting. VisDA: The Visual Domain Adaptation Challenge supplies the benchmark and the evidence of collapse: an AlexNet trained on renders falls from 99% to 28% accuracy on real COCO images.
Research Program
The pipeline has four stages:
- Features. We freeze an ImageNet-pretrained ResNet and extract features from an intermediate block and from the final block. Following VI-Nets, we reduce to 32–64 dimensions with a PCA fitted on the pooled synthetic and real features, so that neither domain's basis is privileged, and then apply tanh rescaling.
- Fitting. We fit a normalized approximate vanishing ideal of degree at most 3 to all synthetic features using the scalable OAVI variant.
- Shortcut detection. We run the calibrated test on unlabeled real features. Its outputs are the shortcut list and a per-point shortcut residual.
- Correction and classification. We train a linear classifier on uncorrected synthetic features and apply the projection to real features at test time.
A secondary variant trains the classifier on synthetic features perturbed along the shortcut gradients. The perturbation magnitudes are drawn from the real residual distribution. This variant tests whether the information is better used for robustness at training time than for correction at test time.
Interpretability is part of the program. For each shortcut equation we retrieve the real images with the largest residual and the synthetic images closest to its zero set. We then check whether the equations correspond to nameable rendering artifacts, such as uniform backgrounds, missing texture or canonical viewpoints. To validate the detector itself, we plant a constraint. We render or select a synthetic subset in which one nonlinear feature relation is fixed, then confirm that the test recovers that equation and not spurious ones.
Baselines
The naive reference point is the source-only linear classifier on the same frozen features with no correction. For context, VisDA reports that source-only AlexNet reaches 28% on real COCO images. We will re-measure source-only accuracy in our own feature space, because that number, not the AlexNet one, is the floor we must beat.
The strongest closed-form competitors are Subspace Alignment and covariance alignment (CORAL, which matches second-order feature statistics between domains). They see exactly the degree-one part of what we detect. Fernando et al. report 45.0% versus 34.3% for the Geodesic Flow Kernel on their cross-dataset benchmark. No reported result was found on Lacuna for Subspace Alignment on VisDA-C, so we run it ourselves. All of these use the same frozen features, the same PCA dimension sweep, the same linear classifier, and the same hyperparameter budget (an equal number of grid points selected on the VisDA validation split under the same protocol).
The strongest deep method reported in the file is the Deep Adaptation Network, which matches feature distributions under a kernel discrepancy while fine-tuning the network. It reaches 51.62% on VisDA-C according to the VisDA challenge report. The challenge winner reached 92.8% with pseudo-labeling and multi-stage fine-tuning. These numbers come from a different, fine-tuned regime. We treat them as context, not as head-to-head targets. Our fair deep comparison applies our correction on top of DAN-adapted features and asks whether it adds accuracy.
Five ablations isolate the key ingredient:
- Degree one only. The method restricted to degree-one equations, which is linear vanishing.
- Random equations. Projection along the same number of randomly chosen synthetic equations, ignoring the real test.
- Non-shortcut equations. Projection along synthetic equations that real data also satisfies.
- No normalization. The full method without coefficient normalization.
- Class-wise linear subspaces. A union-of-subspaces nearest-subspace classifier, with one PCA subspace per synthetic class.
Beating the baselines means two things. The full method must exceed both CORAL and Subspace Alignment, and the degree-one ablation, by a margin larger than the seed-to-seed spread over five feature-extraction and PCA seeds. Random-equation projection must not help.
Why not just…?
Why not just align covariances or PCA bases, which is closed form and cheaper? If the simulator's excess constraints are linear, this works just as well. Our own degree-one ablation will show it, and we will then report the cheaper method as the answer. The research file's evidence that this may not hold is indirect. VI-Nets found that intermediate features are not linearly separable and needed polynomial maps to recover accuracy. Affine Transport's authors report degradation in high-dimensional nonlinear state spaces. The decisive measurement is how much of the per-point error prediction, and of the accuracy recovered, comes from degree-two and degree-three equations over degree-one equations.
Why not just self-train with pseudo-labels, which won VisDA at 92.8%? This is a real threat on raw accuracy, and we do not claim to beat it from frozen features. Our claim is complementary. Pseudo-labeling's first-round labels come from a synthetic-trained classifier, so its early errors should concentrate on high-residual real points. We test this directly by running a matched pseudo-labeling loop with and without projection as a preprocessing step. If projection does not improve the first-round pseudo-label accuracy or the final accuracy, the practical case reduces to diagnosis alone.
Why not just fine-tune the backbone adversarially so that no shortcut directions exist? Adversarial alignment can remove the gap, but it also hides where the gap was. The VisDA report documents that the strongest such systems needed complex multi-stage pipelines. Our method requires no backbone gradients and yields a named list of broken equations. The DAN-plus-projection arm settles whether adversarially adapted features still carry detectable shortcut equations. If they carry none, that is itself a clean finding about what adversarial training removes.
Why not use one linear subspace per class instead of polynomials? A union of class-wise subspaces is the linear special case of algebraic subspace clustering. If the nearest-subspace ablation matches the full method, the nonlinear machinery adds nothing, and we would say so.
Proposed Experiments and Decisive Checks
The main benchmark is VisDA-C: 12 classes, about 152k synthetic renders, real images from COCO for validation and from YouTube frames for testing. We report per-class and mean accuracy. A secondary check uses the Office and cross-dataset protocol of Subspace Alignment, so that linear methods compete on their home ground.
The first decisive check is diagnostic. On real validation images we compute the area under the ROC curve for predicting classifier error from the shortcut residual. We compare it against the same quantity computed from degree-one residuals and from Mahalanobis distance to the synthetic features. The nonlinear residual must add predictive power beyond the linear baselines.
The second check is causal. Accuracy should rise when projecting along shortcut equations, and should not rise when projecting along random or non-shortcut equations.
The third check validates the detector. In the planted-constraint experiment, the detector must recover the planted equation at the calibrated false-alarm rate.
The fourth check asks about data cost. We subsample real data to 100, 1,000 and 10,000 images to test the claim that falsifying an equation needs few real points. The shortcut list should stabilize at small real sample sizes even though fitting the ideal on real data alone would not.
An exploratory extension applies the same test to low-dimensional dynamics, using the MuJoCo Hopper and Ant perturbation setting of Affine Transport, with AT as the baseline. That paper reports a qualitative improvement in those environments but no specific number (no reported result found on Lacuna for AT on Hopper/Ant). Its reported 0.73→0.08 hockey-puck error reduction is the real-robot reference if that data is obtainable.
The proposal fails cleanly if degree-one equations account for essentially all of the predictive and corrective effect. In that case the sim-to-real gap in frozen features is linear, and the algebraic machinery is unnecessary.
References
- Generalized Principal Component Analysis (GPCA)
- Filtrated Spectral Algebraic Subspace Clustering
- Approximate Vanishing Ideal Computations at Scale
- Spurious Vanishing Problem in Approximate Vanishing Ideal
- Approximating Latent Manifolds in Neural Networks via Vanishing Ideals
- Algebraic Geometric Comparison of Probability Distributions
- Unsupervised Visual Domain Adaptation Using Subspace Alignment
- Affine Transport for Sim-to-Real Domain Adaptation
- Subspace Identification for Multi-Source Domain Adaptation
- VisDA: The Visual Domain Adaptation Challenge