Everything inside an attribute must be known to the compiler at compile-time. Variables are inherently variable (!) so can’t be used in attributes.
If you can use a code generation tool, you’d be able to dynamically inject different (constant) values into each derived class.