For the A4LD, 4R44E, 4R55E, and 5R55E the top connection is the return line at the transmission end.
As seen here:
http://www.txchange.com/cooler.htm#cooler return line chart
If radiator has trans cooler at the bottom there is no direction of flow, but lower rad hose connection side may be used for Return line because of coolant flow
If at the side of the radiator the "out to transmission"(return line) is usually at the bottom, but it doesn't really matter as this is a heat exchanger so would have the same cooling effect in either direction.
Radiator coolant flow is top to bottom, so hot coolant from engine enters at the top and "Cooled" coolant exits at the bottom.
Newer rads are usually crossflow(side to side), and side mounted trans cooler would usually be at the opposite side as the upper hose, so on the "cooler" side.