I've been thinking about something like this for quite a while, and I think this would add a great deal to the game.
One way that civilization has advanced is having more and more advanced farming techniques, such that every person does not need to provide their own food. From there, cities have gathered, and other professions have emerged, such as mason or carpenter. Eventually, however, those techniques improved, and there was room for a higher-class, artist, and scientists. Scientist used not exactly in the same term as we use it today, but the same idea. People who were payed to do nothing but think, essentially.
There should be a new job available, in the same way that Fortress Guard is an available job position: Scientist. These people perform no labor, but require a specific workshop, based on what they are studying. However, I propose that these scientists do not just work for a while in game, then poof out gunpowder miraculously. Instead, they make small goals depending on what they are working on. For instance, if you have a small supply of saltpeter, they may find that it is explosive, which may lead to saltpeter traps and the like. they shouldn't stare at saltpeter for 5 years and pull guns out of thin air. Small steps.
Maybe have a few different kinds of science workshops. the first one available is aptly named "Scientists Workshop," and from there they could branch out into different fields of study, for instance, a Metallurgy Science Workshop, a Chemical Science Workshop, a Physics Workshop, etc. The physics one could find out magnetism and stuff, making some interesting inventions (and traps ). Heck, there could even me a Magical Sciences Workshop, for working on discovering new spells and other magical feats.
EDIT: Once books are implemented, trading books full of inventions and scientific discoveries to spread your ideas around, and buying books full of other's technology would be interesting. Maybe you could send off young dwarfs with caravans to study in the capital city, and come back with all sorts of useful information.
[ January 14, 2008: Message edited by: mutant mell ]