I guess it is handled like this:
if the vertex buffer datatype is smaller than the one in the vertex shader, the values are initialized with 0 except the last component, which defaults to 1.
So e.g. you have a float2 UV in the vertex buffer and you setup a vertex shader expecting a float4 UV, the UV variable in the vertex shader will have the values from the vertex buffer in the first two components, the third component is 0 and the fourth 1.
UV = float4(UV_VB, 0, 1)