3D Gaussian splatting: learn the shape of a soft stamp
三维高斯泼溅
Project anisotropic Gaussians, differentiate visibility and train all 69 parameters of a small scene; test density-control counterexamples.
gaussian-splattingPaint with small ellipsoids, then move the camera
Suppose you photograph a desk from several known positions. A sparse reconstruction gives you a few three-dimensional points, but the empty space between those points still has to be explained when you render another view. 3D Gaussian splatting (3DGS) gives each point an adjustable spatial footprint, opacity and directional color. It projects these primitives onto the image and blends them in visibility order. Training changes their parameters, while adaptive density control can add and remove primitives. The original method combines this representation with a specialized GPU rasterizer. Paper, §§3–6
Imagine a soft stamp rather than a hard-edged dot. Stretching or rotating the stamp changes which pixels it covers. Moving it farther away changes its projected size. Placing a second stamp behind it changes the image only where the first one lets something through. Those consequences provide image gradients for position, shape, opacity and color.
A primitive’s three-dimensional covariance describes an ellipsoid, not an uncertainty estimate about where the object really is. Likewise, increasing the number of Gaussians is a change in representation capacity; it is not the same quantity as the extinction density used by NeRF. A good image fit still leaves ambiguities in unseen geometry.
Our complete NumPy exercise trains three Gaussians, totaling 69 parameters, from four synthetic camera views and evaluates two other views. Every parameter family has a backward pass. We also implement cloning, splitting and pruning as separate demonstrations. Training itself uses a fixed primitive count, given coarse initial centers and known cameras. This makes it possible to inspect the full optimization without claiming to reproduce the original adaptive CUDA pipeline or its real-time results.
Shape, projection, visibility and gradients
A Gaussian kernel does not need to integrate to one
For mean mu and positive definite covariance Sigma, write the spatial kernel as:
There is no probability-normalization factor here. Changing the scale changes the integral of the kernel as well as its footprint. The opacity parameter controls a peak blending coefficient. Treating this expression as a normalized probability density would change the model. Paper, §4
Optimizing nine unconstrained matrix entries could produce an invalid covariance. We instead optimize three log-scales and a nonzero quaternion:
The rotation R is constructed from the normalized quaternion in scalar-first order. Finite scales produce a positive definite mathematical covariance. Extremely different scales can still make floating-point calculations ill-conditioned, which our checks may reject. An isotropic covariance does not depend on rotation, so its rotation gradient should vanish. Quaternion sign and nonzero scalar rescaling describe the same rotation after normalization. Paper, Eq. 6 Fixed rotation helper
Projection turns world-space shape into pixel-space shape
Let W be the proper world-to-camera rotation, C the camera center, f the two focal lengths in pixels, and c the principal point. With positive camera depth Z:
Do not substitute the translation vector for the camera center: in the convention q_c=W mu+t, the center is −Wᵀt. Our camera axes are right, down and forward; pixel centers have integer coordinates. See image formation and structure from motion.
The local perspective Jacobian is:
The screen covariance in this teaching renderer is:
This is a local affine approximation to perspective projection. An exact perspective image of a large Gaussian need not itself be Gaussian. The blur term gives small projected primitives a nonzero footprint and improves numerical conditioning. The pinned CUDA code additionally clamps off-axis ratios and offers a determinant-based anti-aliasing adjustment; we do neither. We reject centers at or behind the near plane instead of implementing the original frustum and tile culling. Paper, Eq. 5 Projection kernel
Directional color and per-pixel opacity
The unit direction in this implementation points from the camera toward the primitive center. Our degree-one real spherical-harmonic basis uses:
A 4×3 coefficient matrix H provides RGB features. We apply a sigmoid to obtain bounded teaching colors:
The basis convention and direction agree with the inspected helpers. The output mapping differs: the pinned Python renderer adds 0.5 to the SH output and clamps it below at zero, rather than using our sigmoid. A SH expansion models directional appearance; it does not by itself recover physical material and lighting. SH basis Color preparation
For pixel p, let delta=p−u. The primitive’s unnormalized screen kernel, peak opacity and effective alpha are:
The raw optimization parameter o can be any finite real number. Even when two primitives have the same peak opacity, different covariances give different per-pixel alpha values. Our program evaluates every primitive at every pixel; the original uses footprint culling, tiny-alpha rejection and early termination. Forward blending kernel
Sort first, then blend
For one pixel, sort primitives by center depth, front to back. Accumulation is:
The weights and residual background sum to one. Their order matters. Center-depth order is an approximation to visibility for overlapping spatial primitives, and a sorting swap is a discrete change. Our backward pass treats the selected order as fixed. At equal depths the code uses stable input order, so reordering tied rows can change the image. It would be misleading to call that boundary smoothly differentiable.
The paper organizes work into 16×16 tiles, duplicates primitives across overlapping tiles, and sorts by tile and depth keys. Pixels traverse the resulting lists without an additional per-pixel sort. Our global depth sort and dense pixel loop are an inspectable reference, not an implementation of that acceleration scheme. Paper, §6
Backpropagation must also differentiate the footprint
Let B after a primitive be the unattenuated color of everything behind it, including the background. Starting from the background, update B backward as alpha·color+(1−alpha)·B. For upstream RGB gradient h:
Changing opacity trades a primitive’s color against what it hides. We cache the forward transmission for each primitive/pixel. The pinned CUDA backward instead recovers previous transmission by dividing by 1−alpha. This is the operation in the inspected kernel; the paper’s informal reverse-opacity wording should not be copied as a formula that divides by alpha. Backward kernel
Away from the cap boundary, let h_r be the derivative with respect to raw alpha a·g, and set v=S⁻¹delta. Define eta=h_r·a·g. Summing over pixels gives:
Our cap has zero raw-alpha derivative in the saturated region. The inspected CUDA backward propagates its opacity expression without this exact cap derivative; therefore the two backward conventions need not agree at saturation. Finite differences in our tests validate the function that our program actually renders.
There is a less obvious gradient path: moving a center changes J, hence its projected covariance, even if the three-dimensional covariance stays fixed. With M=W Sigma Wᵀ and A=∂L/∂S:
The center gradient includes both Jᵀ∂L/∂u and the derivatives of J with respect to X, Y and Z. The code computes both. Omitting the latter can still produce a falling loss, so training alone is a weak gradient test. Color adds another center-gradient path through the normalized viewing direction.
Finally, chain the covariance derivative into log-scales and normalized quaternions. For any normalized vector, its raw-input derivative is:
The implementation uses this Jacobian for quaternion normalization and the corresponding three-dimensional expression for view direction. All 69 model parameters are checked by central differences, including through a multi-view image loss. Repeating a check through another objective does not create 69 additional distinct parameters.
Adding primitives changes the representation
The paper interleaves parameter optimization with adaptive count control. High view-space position gradients suggest insufficient detail; primitive scale helps choose cloning or splitting, while near-transparent or excessively large primitives can be removed. The original objective combines L1 and D-SSIM. Paper, §5
Two implementation details need care. The pinned clone function copies the selected center and attributes immediately; it does not immediately displace the clone along a gradient. Later optimization can move it. The split function samples two child offsets from the parent shape, divides each axis by 1.6, copies appearance and opacity, and removes the parent. Density-control code
Neither operation is an exact image-preserving transformation. For two coincident copies with the same per-pixel alpha, the combined opacity is 1−(1−alpha)². For splitting, the sum of unnormalized three-dimensional kernel integrals has ratio:
The calculation concerns the integral proportional to the product of axis scales. It is not a statement about the geometric union of overlapping ellipsoids or a physical mass measurement. It also shows why the paper’s informal volume-conservation language cannot be used as an exact conservation law for this split. Following optimization is part of the method, not an optional detail that guarantees the operation itself preserved the image.
Optimize every parameter in a small scene
Save this complete program as gaussians.py and run it with Python 3.12 and NumPy 1.26.4. Three Gaussians each have 3 center coordinates, 3 log-scales, 4 quaternion entries, one opacity parameter and 12 SH coefficients: 23 parameters each, 69 total. Quaternion normalization introduces redundancy; stored parameter count is not the number of independent geometric degrees of freedom.
The target scene is explicitly synthetic. Four known camera angles, 0, 1.6, 3.3 and 4.9 radians, provide 8×8 training images. Angles 0.8 and 4.1 are held out. Initial centers are given coarse guesses, colors start gray, and cameras are not optimized. The target images use the same renderer as the learner. This tests a controlled reconstruction pipeline, not robustness to real cameras or independent rendering errors.
Training keeps three primitives and updates all parameter arrays for 160 Adam steps, with learning rate 0.03, beta values 0.9/0.999 and epsilon 1e-8. The loss is mean squared RGB error over all training views, unlike the original L1/D-SSIM objective. Clone/split/prune functions are callable demonstrations, not a hidden adaptive schedule in train.
For N primitives and P pixels, this dense teaching renderer costs O(N log N+NP) per view and stores O(NP) intermediate values. These costs describe the supplied program. The original tile-based implementation has costs that depend on projected footprint overlap, sorting and early termination; a frame rate cannot be inferred from our primitive count.
"""Original NumPy Gaussian-splatting teaching model; no upstream code copied.
Full gradients for centers, anisotropic scales, normalized quaternions, opacity
and degree-one directional colors. Fixed count during training; separate density
control demonstrations. No CUDA tiling, frustum culling, SSIM or benchmark claim.
"""
import json
import numpy as np
def finite(value, shape=None):
a=np.asarray(value,dtype=float)
if not np.isfinite(a).all() or (shape is not None and a.shape!=shape):
raise ValueError('Finite values with matching shapes required')
return a
def sigmoid(x):
x=np.asarray(x);z=np.exp(-np.abs(x));return np.where(x>=0,1/(1+z),z/(1+z))
def cross_matrix(v):
x,y,z=v;return np.array([[0.,-z,y],[z,0.,-x],[-y,x,0.]])
def rotation(raw):
raw=finite(raw,(4,));norm=np.linalg.norm(raw)
if not np.isfinite(norm) or norm<1e-12:raise ValueError('Nonzero finite quaternion required')
q=raw/norm;w=q[0];v=q[1:]
r=(w*w-v@v)*np.eye(3)+2*np.outer(v,v)+2*w*cross_matrix(v)
return r,(q,norm)
def rotation_vjp(g,cache):
q,norm=cache;w=q[0];v=q[1:];eye=np.eye(3)
derivatives=[2*w*eye+2*cross_matrix(v)]
for j,e in enumerate(eye):
derivatives.append(-2*v[j]*eye+2*(np.outer(e,v)+np.outer(v,e))+2*w*cross_matrix(e))
dq=np.array([np.sum(g*d) for d in derivatives])
return (dq-q*(q@dq))/norm
def covariance(log_scale,quaternion):
logs=finite(log_scale,(3,))
if np.any(np.abs(logs)>12):raise ValueError('Teaching scales outside stable range')
r,rc=rotation(quaternion);variance=np.exp(2*logs)
cov=(r*variance)@r.T
return cov,(r,variance,rc)
def covariance_vjp(g,cache):
r,variance,rc=cache;dlogs=2*variance*np.diag(r.T@g@r)
dr=((g+g.T)@r)*variance
return dlogs,rotation_vjp(dr,rc)
def camera(angle,size=8):
if isinstance(size,bool) or not isinstance(size,int) or not 2<=size<=64:raise ValueError('Image size must be an integer in [2,64]')
angle=float(finite(angle,()));center=np.array([2.5*np.cos(angle),.35,2.5*np.sin(angle)])
forward=-center/np.linalg.norm(center);right=np.cross(forward,[0.,1,0]);right/=np.linalg.norm(right);up=np.cross(right,forward)
return {'center':center,'rotation':np.stack([right,-up,forward]),'focal':np.array([size*1.2]*2),'principal':np.array([(size-1)/2]*2),'size':size}
def project(mean,cov,cam,blur=.3):
mean=finite(mean,(3,));cov=finite(cov,(3,3));r=finite(cam['rotation'],(3,3));center=finite(cam['center'],(3,));f=finite(cam['focal'],(2,));principal=finite(cam['principal'],(2,))
if np.any(f<=0) or not np.isfinite(blur) or blur<=0:raise ValueError('Positive focal lengths and blur variance required')
if not np.allclose(r@r.T,np.eye(3),atol=1e-10) or np.linalg.det(r)<0:raise ValueError('Proper world-to-camera rotation required')
if not np.allclose(cov,cov.T,atol=1e-12) or np.linalg.eigvalsh(cov).min()<=0:raise ValueError('Positive definite covariance required')
q=r@(mean-center);x,y,z=q
if z<=.05:raise ValueError('This teaching renderer requires centers in front of the near plane')
uv=f*q[:2]/z+principal;j=np.array([[f[0]/z,0,-f[0]*x/z**2],[0,f[1]/z,-f[1]*y/z**2]])
mc=r@cov@r.T;screen=j@mc@j.T+blur*np.eye(2)
return uv,screen,z,(r,q,f,j,mc)
def project_vjp(du,gs,cache):
r,q,f,j,mc=cache;x,y,z=q;dj=(gs+gs.T)@j@mc;dq=j.T@du
dq[0]+=-f[0]*dj[0,2]/z**2;dq[1]+=-f[1]*dj[1,2]/z**2
dq[2]+=-f[0]*dj[0,0]/z**2+2*f[0]*x*dj[0,2]/z**3-f[1]*dj[1,1]/z**2+2*f[1]*y*dj[1,2]/z**3
return r.T@dq,r.T@(j.T@gs@j)@r
def color(mean,coefficients,center):
mean=finite(mean,(3,));coefficients=finite(coefficients,(4,3));center=finite(center,(3,))
d=mean-center;norm=np.linalg.norm(d)
if norm<1e-12 or not np.isfinite(norm):raise ValueError('Camera and Gaussian center must differ')
unit=d/norm;x,y,z=unit;k=np.sqrt(3/(4*np.pi));basis=np.array([1/np.sqrt(4*np.pi),-k*y,k*z,-k*x])
rgb=sigmoid(basis@coefficients)
return rgb,(basis,unit,norm,k,coefficients,rgb)
def color_vjp(g,cache):
basis,unit,norm,k,coeff,rgb=cache;dz=g*rgb*(1-rgb);db=coeff@dz
du=k*np.array([-db[3],-db[1],db[2]])
return (du-unit*(unit@du))/norm,np.outer(basis,dz)
def validate(p):
if set(p)!={'mean','log_scale','quaternion','opacity','sh'}:raise ValueError('All Gaussian parameter arrays required')
if not all(isinstance(v,np.ndarray) and np.issubdtype(v.dtype,np.floating) for v in p.values()):raise ValueError('Floating NumPy parameter arrays required')
mean=finite(p['mean'])
if mean.ndim!=2 or mean.shape[1]!=3:raise ValueError('N by 3 centers required')
n=len(mean)
for key,shape in [('log_scale',(n,3)),('quaternion',(n,4)),('opacity',(n,)),('sh',(n,4,3))]:finite(p[key],shape)
return n
def render(p,cam,background=(1.,1.,1.),blur=.3):
n=validate(p);background=finite(background,(3,));size=cam['size']
if isinstance(size,bool) or not isinstance(size,int) or not 2<=size<=64:raise ValueError('Image size must be an integer in [2,64]')
yy,xx=np.mgrid[:size,:size];pixels=np.c_[xx.ravel(),yy.ravel()];count=len(pixels)
records=[]
for i in range(n):
cov,cc=covariance(p['log_scale'][i],p['quaternion'][i]);uv,screen,z,pc=project(p['mean'][i],cov,cam,blur)
rgb,cl=color(p['mean'][i],p['sh'][i],cam['center']);opacity=float(sigmoid(p['opacity'][i]))
delta=pixels-uv;v=np.linalg.solve(screen,delta.T).T;kernel=np.exp(-.5*np.sum(delta*v,axis=1));raw=opacity*kernel;alpha=np.minimum(raw,.99)
records.append((z,rgb,alpha,raw,kernel,v,opacity,cc,pc,cl))
order=np.argsort([r[0] for r in records],kind='stable');trans=np.ones(count);rgb_out=np.zeros((count,3));before=[]
for i in order:
_,rgb,alpha,*_=records[i];before.append(trans.copy());rgb_out+=trans[:,None]*alpha[:,None]*rgb;trans*=1-alpha
rgb_out+=trans[:,None]*background
return rgb_out,(p,records,order,before,trans,background)
def render_vjp(upstream,cache):
p,records,order,before,trans,background=cache;upstream=finite(upstream,(len(trans),3));grad={k:np.zeros_like(v) for k,v in p.items()};tail=np.broadcast_to(background,upstream.shape).copy()
for position in range(len(order)-1,-1,-1):
i=order[position];z,rgb,alpha,raw,kernel,v,opacity,cc,pc,cl=records[i];t=before[position]
da=t*np.sum(upstream*(rgb-tail),axis=1);dc=np.sum((t*alpha)[:,None]*upstream,axis=0)
# Exact derivative of this cap away from the kink, unlike the pinned CUDA backward approximation.
draw=da*(raw<.99);dpower=draw*raw;du=np.sum(dpower[:,None]*v,axis=0);gs=.5*np.einsum('p,pi,pj->ij',dpower,v,v)
dm,gcov=project_vjp(du,gs,pc);dlogs,dq=covariance_vjp(gcov,cc);dm_color,dsh=color_vjp(dc,cl)
grad['mean'][i]=dm+dm_color;grad['log_scale'][i]=dlogs;grad['quaternion'][i]=dq;grad['sh'][i]=dsh
grad['opacity'][i]=np.sum(draw*kernel)*opacity*(1-opacity)
tail=alpha[:,None]*rgb+(1-alpha[:,None])*tail
return grad,np.sum(trans[:,None]*upstream,axis=0)
def initialize(truth=False):
# Coarse initial centers are given, analogous to an imperfect sparse initialization.
means=np.array([[-.32,-.06,-.14],[.27,.09,.14],[.02,.31,-.03]]) if truth else np.array([[-.4,0,-.1],[.4,0,.2],[0,.4,0]])
scales=np.array([[.19,.3,.23],[.25,.17,.3],[.17,.19,.14]]) if truth else np.full((3,3),.25)
quat=np.array([[1.,.2,-.1,.3],[1.,-.1,.3,.1],[1.,.1,.2,-.2]]) if truth else np.tile([1.,.05,.03,-.02],(3,1))
sh=np.zeros((3,4,3));colors=np.array([[.8,.17,.12],[.13,.25,.8],[.22,.7,.25]]) if truth else np.full((3,3),.5)
sh[:,0]=np.log(colors/(1-colors))*np.sqrt(4*np.pi)
if truth:sh[:,1:]=np.random.default_rng(4).normal(0,.25,(3,3,3))
return {'mean':means,'log_scale':np.log(scales),'quaternion':quat,'opacity':np.full(3,1.2 if truth else .5),'sh':sh}
def scene_loss(p,cameras,targets):
if not len(cameras) or len(cameras)!=len(targets):raise ValueError('Matching nonempty camera and target collections required')
grad={k:np.zeros_like(v) for k,v in p.items()};loss=0.
for cam,target in zip(cameras,targets):
prediction,cache=render(p,cam);target=finite(target,prediction.shape);error=prediction-target;loss+=float(np.mean(error**2))/len(cameras)
local,_=render_vjp(2*error/error.size/len(cameras),cache)
for key in grad:grad[key]+=local[key]
return loss,grad
def train(steps=160,rate=.03):
if isinstance(steps,bool) or not isinstance(steps,int) or steps<1 or not np.isfinite(rate) or rate<=0:raise ValueError('Positive step count and rate required')
cameras=[camera(a) for a in [0.,1.6,3.3,4.9]];targets=[render(initialize(True),c)[0] for c in cameras]
p=initialize();first={k:np.zeros_like(v) for k,v in p.items()};second={k:np.zeros_like(v) for k,v in p.items()};history=[]
for step in range(1,steps+1):
loss,gradient=scene_loss(p,cameras,targets);history.append(loss)
for key in p:
first[key]=.9*first[key]+.1*gradient[key];second[key]=.999*second[key]+.001*gradient[key]**2
p[key]-=rate*(first[key]/(1-.9**step))/(np.sqrt(second[key]/(1-.999**step))+1e-8)
return p,cameras,targets,history
def prune(p,keep):
n=validate(p);keep=np.asarray(keep)
if keep.dtype!=bool or keep.shape!=(n,):raise ValueError('One boolean per Gaussian required')
return {k:v[keep].copy() for k,v in p.items()}
def clone(p,index):
n=validate(p)
if isinstance(index,bool) or not isinstance(index,int) or not 0<=index<n:raise ValueError('Valid Gaussian index required')
return {k:np.concatenate([v,v[index:index+1]],axis=0) for k,v in p.items()}
def split(p,index,seed=7):
n=validate(p)
if isinstance(index,bool) or not isinstance(index,int) or not 0<=index<n:raise ValueError('Valid Gaussian index required')
children={k:np.repeat(v[index:index+1],2,axis=0) for k,v in p.items()};r,_=rotation(p['quaternion'][index])
children['mean']+= (np.random.default_rng(seed).normal(size=(2,3))*np.exp(p['log_scale'][index]))@r.T
children['log_scale']-=np.log(1.6)
return {k:np.concatenate([np.delete(v,index,axis=0),children[k]],axis=0) for k,v in p.items()}
def demo():
p,cameras,targets,history=train();final,_=scene_loss(p,cameras,targets);tests=[camera(a) for a in [.8,4.1]]
expected=[render(initialize(True),c)[0] for c in tests];predictions=[render(p,c)[0] for c in tests];mean=np.concatenate(targets).mean(axis=0)
mse=float(np.mean((np.array(predictions)-expected)**2));baseline=float(np.mean((mean-np.array(expected))**2))
return {'gaussians':3,'parameters':sum(v.size for v in p.values()),'train_views':4,'test_views':2,'pixels_per_view':64,'initial_train_mse':history[0],'final_train_mse':final,'heldout_mse':mse,'training_mean_baseline_mse':baseline,'heldout_psnr':float(-10*np.log10(mse)),'two_child_volume_ratio':2/1.6**3}
if __name__=='__main__':print(json.dumps(demo(),indent=2))
Actual output from the program:
{
"gaussians": 3,
"parameters": 69,
"train_views": 4,
"test_views": 2,
"pixels_per_view": 64,
"initial_train_mse": 0.007551896383406252,
"final_train_mse": 9.028545218049577e-05,
"heldout_mse": 0.00014935266827163348,
"training_mean_baseline_mse": 0.028988484442987187,
"heldout_psnr": 38.25787014068925,
"two_child_volume_ratio": 0.4882812499999999
}
Training MSE decreases from about 0.00755 to 0.0000903. Held-out MSE is about 0.000149, compared with 0.02899 for a constant RGB baseline computed from training pixels only. With RGB peak one, PSNR is about 38.26 dB. These values belong to the stated synthetic setup. They cannot be compared directly with the NeRF chapter’s numbers, because the scenes, resolutions and target generators differ.
The checks cover normalized rotations, seven covariance parameters, all center and symmetric covariance projection derivatives, a small-cloud projection comparison, SH coefficients and direction, all 69 rendered-image parameter derivatives, multi-view loss, empty scenes, cap saturation, depth ties and density-control counterexamples. Numerical tolerances account for floating-point differences. Low loss does not certify an implementation unless the paths that produce it are checked.
What an image score leaves out
- Capture assumptions. Known poses, static scenes and sufficiently consistent appearance are inputs to this exercise. Occluded geometry, motion and exposure changes can remain ambiguous even if observed images fit well.
- Projection and sorting. Large or near-camera primitives challenge the local projection approximation. Tied or changing depth order is not a smooth optimization boundary. Culling and thresholding introduce additional discrete decisions in accelerated renderers.
- Geometry and editing. A fitted collection of overlapping primitives is not automatically a watertight mesh, collision model or physical material decomposition. Editing one region may reveal poorly constrained content behind it.
- Capacity and cost. Adaptive counts can increase memory and sorting work. Pruning may remove useful detail; cloning or splitting may initially worsen the image. The supplied fixed-count CPU training does not evaluate these production tradeoffs.
NeRF, textured meshes and Gaussian representations allocate computation and storage differently. Choose according to capture coverage, required geometry, editability and deployment constraints, then evaluate under matching conditions. A speed claim requires the actual resolution, primitive count, hardware, implementation and quality target.
Four ways to catch a plausible mistake
-
Visibility. A red primitive is in front of a blue one; each has per-pixel alpha 1/2, and the background is white. What happens when their depth order reverses?
Answer: Front-to-back weights are 1/2, 1/4 and 1/4 for the background. Red first gives (0.75, 0.25, 0.50); blue first gives (0.50, 0.25, 0.75). Sorting can therefore change the image even if every primitive’s own attributes stay fixed.
-
Covariance. All three axis scales equal s. Should changing the quaternion alter the covariance, and what should its gradient be?
Answer: R(s²I)Rᵀ=s²I for a proper rotation. Rotation cannot change the covariance, so a loss that depends only on it has zero quaternion gradient. An implementation that reports a substantial rotation gradient here should be inspected for normalization or chain-rule mistakes.
-
Density control. A primitive splits into two children, each axis divided by 1.6. Is the sum of unnormalized kernel integrals preserved? What if you clone instead?
Answer: Splitting gives ratio 2/1.6³≈0.4883, not one. A coincident clone keeps each opacity and changes effective alpha to 1−(1−alpha)²; at alpha=0.5 it becomes 0.75. Neither operation generally preserves the image. Kernel integrals and rendered opacity are different quantities, so neither result should be described as physical mass conservation.
-
Gradient diagnosis. A renderer updates position using only the derivative of the projected center u. Why might a finite-difference test fail even though training loss decreases?
Answer: Position also changes the projection Jacobian J and thus the screen covariance S; directional color adds a path through the normalized camera-to-center vector. A partial gradient may still be a descent direction while missing these terms. Test an off-axis, anisotropic primitive with view-dependent color, and avoid sorting ties and cap boundaries when comparing smooth derivatives.
Keep the paper, the version and the experiment distinct
Kerbl, Kopanas, Leimkühler and Drettakis describe the representation, adaptive count control and fast rasterizer together. This article’s paper reading covers physical PDF pages 3–6, with the method pages 4–6 rechecked while writing. It does not reproduce the full appendix, benchmark tables or later extensions. Paper
The official arXiv record gives a first submission on 8 August 2023 at 06:37:06 UTC. That archive date is not necessarily the earliest public presentation. Its journal-reference field says July 2023, while the inspected PDF footer says August; we do not invent a publisher day to reconcile them. Official history
The inspected code is pinned to a later repository snapshot, with its exact rasterizer submodule commit recorded. Some options therefore go beyond the original paper. The project’s license has research/evaluation restrictions and must not be casually described as MIT or Apache. Our mathematical explanation and NumPy teaching code are original; no upstream code was copied or executed. Full license and source-reading scopes are retained in the research record. License
Make a prediction, then check
A center moves while its world covariance stays fixed. Is the derivative through its projected pixel center the entire position gradient?
Learning objectives
- Distinguish primitive covariance, peak opacity and per-pixel alpha.
- Differentiate projected covariance as well as the projected center and directional color.
- Explain sorting, cap boundaries and why density-control operations need further optimization.
- Train all parameters of a small scene and assess held-out views against a training-only baseline.
Prerequisites & connections
Explore related knowledge →References
- 3D Gaussian Splatting for Real-Time Radiance Field Rendering (v1)
Bernhard Kerbl; Georgios Kopanas; Thomas Leimkühler; George Drettakis · 2023 - graphdeco-inria/gaussian-splatting — scene/gaussian_model.py
graphdeco-inria/gaussian-splatting contributors - graphdeco-inria/gaussian-splatting — utils/general_utils.py
graphdeco-inria/gaussian-splatting contributors - graphdeco-inria/gaussian-splatting — utils/sh_utils.py
graphdeco-inria/gaussian-splatting contributors - graphdeco-inria/gaussian-splatting — gaussian_renderer/__init__.py
graphdeco-inria/gaussian-splatting contributors - graphdeco-inria/diff-gaussian-rasterization — cuda_rasterizer/forward.cu
graphdeco-inria/diff-gaussian-rasterization contributors - graphdeco-inria/diff-gaussian-rasterization — cuda_rasterizer/backward.cu
graphdeco-inria/diff-gaussian-rasterization contributors - 3D Gaussian Splatting official arXiv history
Bernhard Kerbl and colleagues · 2023 - Gaussian-Splatting License (pinned version)
Inria; Max Planck Institut for Informatik
Version1 · Editorial status: Recorded technical checks completed
View technical check record (AI)
Codex · 2026-09-08 · Codex single-AI-author technical check: scoped paper and pinned source, 14 matching display equations, complete original 200-line NumPy program with 69 trained parameters, actual synthetic held-out results, four explained bilingual exercises. Formal tests execute production MDX; final static/browser validation recorded separately. Not human peer review or a CUDA/real-data benchmark reproduction.
- Compared both manuscripts section by section: unnormalized kernel and density terminology; covariance and quaternion redundancy; camera frame, local projection and blur; SH sign and output mapping; ordered compositing and boundaries; footprint and color position derivatives; count control, synthetic setup and four explained answers. Fourteen display equations and complete code correspond. AI author review, not independent expert review.
- Formal suite has 18 numerical and nine publication tests. Written-stage 26 passed with final freeze explicitly skipped; rerun all 27 after binding. Checks include all 69 parameters through rendering and multi-view loss, seven covariance parameters, input derivatives, small-cloud projection, empty scenes, exact cap derivative, depth ties and row/world-scale invariants. Repeated parameter tests are not additional independent parameters.
- Clone copies centers immediately and changes effective opacity; split removes parent and divides child axes by 1.6, giving 2/1.6^3 kernel-integral ratio. Distinguish kernel integrals, overlapping geometric volume, rendered opacity and physical mass. MSE/PSNR concern three fixed primitives, four training/two held-out synthetic views and a training-only mean baseline; not adaptive CUDA or real-data reconstruction.
- Four original SVGs derive from actual training and projected covariance; ellipse points have Mahalanobis radius one, not object-boundary or uncertainty claims. Isolated picture checks pass two languages, three widths and four fonts. Formal tests bind pixel values, loss history, ellipses and count-control ratios; final article-page checks are separate.
- Nine scoped sources include one paper, pinned implementation files, archive history and license, not nine independent teams. First arXiv date 2023-08-08 is distinct from first public release; publisher-month mismatch remains explicit. No original benchmark scores, upstream execution or code copying.
Source locations checked:
- 3D Gaussian Splatting for Real-Time Radiance Field Rendering (v1) · Physical PDF pages 3–6 extracted text read; pages 4–6 rechecked for this draft. No complete appendix, benchmark reproduction or visual PDF check. SHA-256 f4c0c9f27e2d02b0265017f66049d471eb66cb50203bc918f51ba07d20cbbe11.
- graphdeco-inria/gaussian-splatting — scene/gaussian_model.py · Pinned 54c035f7834b564019656c3e3fcc3646292f727d; inspected line ranges [[20, 55], [146, 180], [409, 462]], not the entire file. No upstream execution or copied teaching code. SHA-256 546ba41528a879af4d83bd280a3ef3cbcca9a5e9132204185aaa8f8ee9ffa310.
- graphdeco-inria/gaussian-splatting — utils/general_utils.py · Pinned 54c035f7834b564019656c3e3fcc3646292f727d; inspected line ranges [[78, 118]], not the entire file. No upstream execution or copied teaching code. SHA-256 97553507caa4f3e6849919d9658b0b0da064e6c8f19142045da79072171ffa51.
- graphdeco-inria/gaussian-splatting — utils/sh_utils.py · Pinned 54c035f7834b564019656c3e3fcc3646292f727d; inspected line ranges [[26, 27], [57, 86]], not the entire file. No upstream execution or copied teaching code. SHA-256 7d1ff267546390635e6d1f68c4f88c4a8b052482d5c9be1d32f06bc69e9a96e7.
- graphdeco-inria/gaussian-splatting — gaussian_renderer/__init__.py · Pinned 54c035f7834b564019656c3e3fcc3646292f727d; inspected line ranges [[64, 98]], not the entire file. No upstream execution or copied teaching code. SHA-256 a25cf5fdb22cd8757fb2a1e37b75352042d65b16138a9fa6243f8616ca1369b8.
- graphdeco-inria/diff-gaussian-rasterization — cuda_rasterizer/forward.cu · Pinned 9c5c2028f6fbee2be239bc4c9421ff894fe4fbe0; inspected line ranges [[74, 111], [213, 230], [350, 395]], not the entire file. No upstream execution or copied teaching code. SHA-256 4bfb6830a138bd016f39fa4558f998825d4182b12cfbda2f62bed0ab75042b54.
- graphdeco-inria/diff-gaussian-rasterization — cuda_rasterizer/backward.cu · Pinned 9c5c2028f6fbee2be239bc4c9421ff894fe4fbe0; inspected line ranges [[465, 510], [559, 637]], not the entire file. No upstream execution or copied teaching code. SHA-256 31074cea35919f108eb84770e170be844b95746f7fb1dd64024c3f9b1de57606.
- 3D Gaussian Splatting official arXiv history · Official web lines 8–29 re-read: first submission 2023-08-08 06:37:06 UTC. Journal reference says July 2023; PDF footer says August. No inferred publisher day or first-public-release date.
- Gaussian-Splatting License (pinned version) · Entire license text read. Contains research/evaluation restrictions, commercial-use consent and redistribution conditions; separately identifies a permissively licensed file. Upstream code not copied or executed.
Related topics