All entries

    Grad-CAM for Deepfake Detection: What the Heatmap Shows

    Grad-CAM highlights spatial regions that influence a class score at a selected layer.

    An analyst compares a dog photograph with a colored heatmap
    Conceptual pixel-art illustration.

    Grad-CAM highlights spatial regions that influence a class score at a selected layer. Use it to generate a hypothesis you can test.

    Build the example

    Pick an image you have permission to publish and render the predicted class and the heatmap together. Use gradients for that class to weight a layer with spatial activations, upsample the map and keep preprocessing aligned with the displayed image. A border watermark or compression artifact can attract the heatmap instead of the face.

    Compare the target-class score after masking the highlighted area, an equally sized random area and a second manually chosen region. Keep the mask shape and replacement value constant. If masking any area changes the score substantially, the initial image may be unusually fragile. Check additional examples before generalizing the explanation.

    Watch the failure boundary

    Choose one target layer and record why its activations still carry spatial structure. Repeat the visualization for a different class to check how much the map changes. Keep the unmodified image beside the overlay and use a consistent color scale when comparing multiple examples.

    Verify the behavior

    Mask the highlighted border and compare class scores with a control mask of similar size elsewhere. Repeat across several examples. The visualization suggests sensitivity under this setup and can miss interactions. It is not ground truth about manipulated pixels.

    FURTHER READING

    Sources

    Technical references checked .

    END OF ENTRY / 63
    Eeshan Singh with Big Ben in London
    BEHIND THE JOURNAL

    Eeshan Singh

    I’m Eeshan Singh Pokharia, an AI Full Stack Developer and CoFounder of UltraFit360. I work across AI features, full-stack product development, and web and mobile experiences—from Figma and frontend interactions to the systems behind them.

    Choose one target layer and record why its activations still carry spatial structure. Repeat the visualization for a different class to check how much the map changes. Keep the unmodified image beside the overlay and use a consistent color scale when comparing multiple examples.

    Meet the author
    THE CONVERSATION

    Your side of the story.