Behind one-way glass looking out on a small apartment -- colorful and toy-filled, but essentially characterless -- video cameras have been whirring for more than a decade, recording several thousand hours of parent and child interactions: partings and reunions, affection and discipline, playtime, feeding time and naptime.

Psychologists and psychiatrists have spent hundreds of hours going over the films, sometimes minute by minute, teasing apart the things a mother says and does that influence the baby, analyzing the things a baby says and does that affect the parent.

In the process, they are beginning to understand how a child is affected when its mother is suffering from depression. And these findings are fueling the debate over the extent to which depression is inherited.

The childrearing project of the National Institute of Mental Health is designed to examine the development of the child in terms of his relationships to his parents, brothers and sisters, playmates and in the context of his family and his family's place in society. For children of the clinically depressed, says Dr. Marian Radke-Yarrow, that world may be "harsh and unpredictable."

Over the years, the project has found that there are differences in the way depressed mothers relate to their children. Studies of subsets of the families have shown that depressed mothers are more likely to be critical of their children and less likely to talk to them, except under mildly stressful conditions, when the depressed mothers tend to overreact. Depressed mothers are more likely to interact with their children because of something within themselves, rather than in response to something the child does or says, and as a result the child has little sense of what to expect. Some depressed mothers envelop their children in their own misery. The children of some, but not all, of the depressed mothers were harder to direct and harder to comfort.

Nevertheless, many children appear to do well, even under the most chaotic and harsh family conditions. Radke-Yarrow, director of the NIMH Laboratory of Developmental Psychology, and her associates are beginning to see how that is possible. ::

Part of the explanation lies in the fact that not all depressed mothers are alike. Radke-Yarrow emphasizes that the common stereotypes portraying depressed mothers as hostile, uninvolved with the children and lacking in affection are poor generalizations.

Dr. Tracy Sherman has participated with Radke-Yarrow and other members of the NIMH group in several studies involving subsets of the 123 families now under study, 70 of which have a depressed parent or parents. Sherman, a developmental psychologist, has been trying to identify factors that permit many of the children to survive even the hardest family circumstances, and to determine if these characteristics will lend themselves to future life adjustments.

In addition, she has been studying a subset of mothers whose extremes of behavior pose special difficulties for their children.

The psychologists found that from the 123 families, there were 16 children whose behavior suggested they were at unusually high risk for subsequent psychological problems because of the mother's own difficulties.

Half of these children had mothers who fell into a special classification of behavior deemed extreme by professional observers. They were called "outliers," accounting for only 10 percent of the mothers.

These mothers, Sherman said, were those "who expressed extreme amounts of either anger or sadness in the research apartment with their younger child, mothers who made excessive numbers of critical statements to the child, mothers who backed off from confronting the child {over some misbehavior}" and mothers who reacted to minor stresses "by dramatic changes" in their level of involvement with their child. To be classified as an outlier, a mother needed to show at least two areas of extreme behavior.

Three quarters of these mothers had a psychiatric diagnosis of a major depressive illness, and by the time of the first follow-up assessment, 71 percent of their children did, too. Of the entire sample, however, 40 percent of the children of depressed mothers had comparable psychiatric problems, compared to 10 percent of healthy mothers.

The findings suggest that it is not necessarily a mother's depression alone but those particular "outlier" behaviors within the depression that may cause a child to have psychological problems.

Some of these mothers -- even the most sad and anxious, who were expected to offer "the least in the way of a secure base for the child" -- still often achieved good, secure relationships. Their children were survivors. ::

What makes a survivor? Part of it, says Sherman, is better-than-average intelligence. One child knew how to change her mother's mood from sadness to a more controllable and understandable anger by kicking her mother's ankle or stomping on her purse.

Another characteristic in the child is having qualities that elicit positive responses for others. During her doctorate training in Israel, one of Sherman's mentors was a women with five adopted children and five natural ones. It was explained to Sherman that when the professor was a graduate student herself, she was contributing to a study on foundling children. She was asked to sit by one child's crib and stare at her impassively, blank-faced. "But," said Sherman, "she just couldn't do it. The baby would beam her a smile and she couldn't ignore her.

"So she adopted her." And then adopted a few more, all from foundling homes. "I met this child when she was a 16-year-old. And still, when she smiles at you, you smile back."

But in addition to intelligence and this type of innate charisma, the NIMH group found that a key feature of the relatively well child of an outlier mother was that the child seemed to match the needs of the mother or the family. Sometimes the mother expressed affection to feed her own emotional needs, making the child no more than a "a Teddy bear." But the child would docilely allow herself to be petted. Somehow, says Sherman, by dint of intelligence or charm or chance, "we see the children doing better than the odds" by making the most of whatever little emotional support is available from the family.

Even so, the researchers worry that the adjustments at an early age, although they provide the children with security now, may not provide future protection -- when the parents' and child's needs diverge. "The straightjackets they have been forced to adopt," Sherman and Radke-Yarrow have written, "will become increasingly difficult to wear as they continue to develop."