Why does lactulose turn dark? Why does the standard 10gm/15ml lactulose solution turn dark when exposed to heat above 30 degrees Celsius?

This is probably a simple question. It is funny that the warnings/important information on the drug label of lactulose state that this effect is harmless, but then go on to warn not to use if it becomes too dark. How do I know if it is "too dark"? This is obviously very subjective and simply want to know why it becomes dark or "too dark" so it is scientifically understood why it is safe (or unsafe) to use when it is dark.
When milk is heat-processed, some of the lactose will isomerize to lactulose, a disaccharide.  Lactulose 



can decompose by the same routes that most sugars decompose.  These are complicated processes with many products and pathways, so sugar decomposition is rarely, if ever, fully understood.


It can hydrolyze to its constituent monosaccharides fructose and galactose.
Lactulose or its released monosaccharides equilibrate with their ring-opened isomers and the alpha-hydroxyl can air oxidize to produce an alpha-dicarbonyl.  These alpha-dicarbonyls are prone to further oxidation to generate formic acid.  Over time, as the solution becomes more acidic from the formic acid build-up, further oxidations and eliminations (dehydration) can take place to produce a mixture of colored products.
In addition to degrading to smaller molecules, sugars (and the dehydration and oxidation products mentioned above) can also oligomerize to produce a variety of viscous, colored products.  Caramelization (see the "Chemistry" section in the link) is a term applied to this chemical polymerization and coloration process.


If you would like to read more about lactulose and its decomposition, take a look at this reference, especially section 7.2.1 starting on page 236.