They are ONLY defined on the program level, and you can USE them in the modulation matrix in the different program layers.
When making a library that can be used in SE, one has to export the program as a whole, as a layer for SE, and from there convert them again to a program to be imported in your library. BUT the moment you export a Halion program, with defined NoteExpression names, as a layer for SE, the naming scheme don’t go with it and is replaced with some standard naming scheme (I think the first attributed modulator in the matrix for this NE)
Nothing so far has mentioned something like this in the official documents (Or I must have missed it?!) It’s a real P. I. T. A., if you want to create a commercial library with note expression names that clearly explain what they do!!