Neural Refraction Fields for Image Verification

Sage Simhon, Jingwei Ma, Prafull Sharma, Lucy Chai, Yen-Chen Lin, Phillip IsolaNeurIPS 2026

TL;DR

What if you could watermark the physical world before the camera shutter even clicks? By placing a complex glass object in front of a lens, light bends into a miniature, encrypted reflection of the scene. This paper introduces Neural Refraction Fields, a way to instantly "unwarp" that scrambled light to expose deepfakes and Photoshop edits—no slow 3D scene reconstructions or analytical physics equations required.

What Problem Does This Paper Address?

With generative AI tools like Photoshop’s Generative Fill and Stable Diffusion, faking or altering photos is effortless. Traditional digital watermarks are embedded after a photo is taken, and even state-of-the-art fragile watermarks (like Watermark-Anything, or WAM) can be wiped out by global edits like AI relighting.

Recently, a clever physics-based method called Totems tried to solve this by placing glass spheres directly into a physical scene to act as optical watermarks. Because an attacker doesn’t know the exact geometry and refractive index of the glass, they can't easily fake the warped reflections inside it. However, the original Totems method had major practical bottlenecks: it required four separate spheres in the scene, relied on closed-form analytical refraction equations (restricting it to simple, less-secure shapes like spheres), and demanded a slow, per-scene 3D Neural Radiance Field (NeRF) optimization just to check a single image.

This paper asks: Can we get the security of physical optical watermarks using just one object of arbitrary complexity, and verify images instantly without retraining for every new scene?

Methods

Instead of calculating light paths with rigid analytical physics equations, the authors learn the optical warping empirically. They call this a Neural Refraction Field.

Figure 2: Overview. (a) The transformation of an image I by a refractive object (which we call a totem, in line with past work) creates a transformed image I′. (b) Synthetic dataset generation. The setup for the simulated laser scan consists of a totem t, camera o, and the scene located at uniform depth d. The laser sweeps at a sparse granularity g for efficiency and practicality. For each sampled laser test point, a new frame is rendered. The refraction in the totem is detected in software, and the mapped pair is stored as part of the correspondences dataset (c), empirically modeling the totem’s non-invertible transformation of the image. In practice, the color correspondence is sparse, but we show a full output to illustrate our method. The lack of data in part of the totem is due to the totem’s occlusion of the scene, blocking the laser from scanning in this region. (d) The data is used to train an MLP ˜Ψ−1 to interpolate. (e) Given a potentially manipulated image, a reconstruction estimate Ir is generated by projecting the totem pixels via ˜Ψ−1I′. The images are compared pixel-wise Err(Ir, Im) to detect inconsistencies, and our method is evaluated against the true manipulation (f).

Here is how the three-stage pipeline works:

  1. Calibration via Laser Sweep: Using the Mitsuba photorealistic renderer (or a real-world laser), a single point of red light sweeps across a background plane at a fixed depth. For each laser point in the scene $(u_o, v_o)$, the system records where the refracted red dot lands inside the glass totem $(u_t, v_t)$.
  2. Learning the Refraction: An 8-layer Multi-Layer Perceptron (MLP)—augmented with positional encodings to handle sharp, high-frequency bends in complex glass—is trained on these coordinate pairs. Unlike NeRF, which learns a specific 3D scene, this lightweight MLP learns a 2D-to-2D coordinate mapping ($\Psi$) specific only to the totem and camera setup. Once trained, it is completely scene-agnostic (assuming a fixed background depth).
  3. Instant Unwarping and Verification: From the forward mapping, the defender builds an approximate inverse matrix ($\tilde{\Psi}^{-1}$) to project the pixels inside the totem back out into a full reconstruction of the scene. To verify an image, the system computes the patch-wise absolute difference (L1 loss) between the unverified photo and the totem’s reconstruction. Any edited region lights up as a discrepancy.

Datasets

  • Synthetic Calibration Data: Generated on-the-fly in simulation (via Mitsuba 3) or via a physical laser scan video to map scene-to-totem pixel correspondences for various shapes (sphere, glass teapot, 3D heart, and a toroid knot).
  • Evaluation Data: 30 diverse natural images up to 2K resolution from the MIT FiveK Dataset, evaluated with synthetic color-patch edits, regional edits (Photoshop Generative Fill), and full-image relighting (IC-Light).
  • Prior Benchmarks & Real-World Data: One multi-totem image adapted from the original Totems dataset for direct comparison, plus a new preliminary real-world dataset of 16 photos (1080$\times$1920) expanded into 48 color-blob manipulation instances.

Key Insights and Ideas

  • Sparse Calibration is Enough: You don't need to scan every single pixel with a laser. The MLP smoothly interpolates the refractive field even when trained on just 10% of the pixel grid ($g = 0.10$), yielding a 10x speedup in calibration (cutting runtime from hours to minutes) with virtually zero loss in reconstruction PSNR.
  • The Security–Precision Tradeoff: Moving from a simple glass sphere to a twisted toroid knot makes the optical signature vastly harder for an adversary to reverse-engineer. While the knot introduces more background reconstruction noise—making it less pixel-precise—it still reliably catches regional manipulations when aggregating errors over larger patch sizes.
Figure 4: Detection results on two totem shapes. Content removal for the least and most complex shape in our library, with optimal patch sizes configured per shape (32 for the sphere, 128 for the knot). The knot picks up more reconstruction error along non manipulated parts of the image, but higher accumulation of contiguous manipulated patches outweighs such disperse error for larger patch sizes, suggesting these highly complex shapes, while more secure, are currently best equipped for regional manipulations due to lowered precision.
  • Immunity to Global AI Relighting: Digital watermarks live in pixel values, so global transformations like AI relighting accidentally scrub them away. Because a totem physically captures the original lighting inside its refraction, full-image edits create glaring mismatches between the photo and the totem's reconstruction.

Key Results

  • Color-Patch & Totems Baseline: Achieved 0.99 mAP on random color-patch manipulations at 1K resolution, and produced sharper, artifact-free reconstructions compared to the original NeRF-based Totems method (1.0 AP on the head-to-head sample).
  • Beating WAM on Global Edits: While Watermark-Anything (WAM) excelled at pixel-exact regional edits (0.979 mAP vs. 0.799 mAP for Ours), WAM failed completely on 18 out of 20 full-image AI relighting cases. Neural Refraction Fields flagged inconsistencies every time, achieving a tightly bounded L1 error of 0.897 ± 0.025 (versus WAM's erratic 0.901 ± 0.296).
  • Real-World Proof of Concept: Using a physical glass sphere and a hand-scanned laser video, the system reconstructed a real room and achieved 0.877 mAP on larger manipulations (4.49% of the frame) within the calibrated reliable region.

Limitations and Future Work

  • The Fixed-Depth Assumption: The scene-agnostic magic relies on the scene being at a fixed distance (effectively treating the background as a flat plane, like a speaker standing at a podium). Changing scene depth by 5–10% or bumping the totem degrades accuracy. Conditioning future models on depth could lift this constraint.
  • Single-Refraction Simplification: Complex glass splits a single point of light into multiple internal reflections and refractions, and real glass exhibits chromatic dispersion (bending red and blue light differently). Currently, the model discards secondary light clusters and uses a monochromatic red calibration; incorporating all refractions and wavelengths could boost precision for intricate shapes like the toroid knot.
  • Smarter Adversaries: Naive attacks (painting over the totem) fail because they spike the reconstruction error (2.69x residual vs. 1.19x). However, testing against stronger adversaries—such as diffusion models trained to inpaint plausible totem refractions—is an open next step.

Summary updated

Abstract

Image verification is an increasingly critical need as the capabilities for visual media tampering improve. We present an approach to image verification that embeds a private authenticity signature into an image based on physical refractive objects, which transform the image. To verify a protected image, we compare the image and a pixel-aligned reconstruction from the embedding to identify inconsistencies. Our approach is inspired by prior work, which physically places refractive objects in a scene before taking a photo. However, prior work is limited to simple refractions with analytical formulas and requires a slow per-scene neural radiance field optimization to get a reconstruction. Instead, our method trains a compact, scene-agnostic neural refraction field capable of modeling complex and more secure refractive geometries. Once trained, it enables instant, high-fidelity reconstruction for manipulation detection and localization.
BibTeX
@inproceedings{simhon2026neural,
  author = {Sage Simhon and Jingwei Ma and Prafull Sharma and Lucy Chai and Yen-Chen Lin and Phillip Isola},
  title = {{Neural Refraction Fields for Image Verification}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=k9nUHL1sDu},
}
Figure