To describe two things that are seemingly same but are actually different

Solution 1:

"On the surface" is a reasonable phrase to use here, other options would be "superficially", or "at first glance".

I'd say that your example sentence is good but could be improved a little, as there's a connotation that both methods actually do not use a small number of labelled samples for training and validation, and that they only appear to "on the surface". The fact that they both do this isn't superficial, as they both actually do that - it's the similarity between the algorithms that's superficial. I would rephrase it as:

On the surface/superficially/at first glance, both methods appear similar in that they use a small number of labeled samples during training and validation. But they have contrasting statistical implications as...

In conversation or with broader context the sentence doesn't sound particularly odd, and you'd likely be reasonably well understood, but it would be best to say that the similarity overall is superficial, rather than than implying superficiality of specific things that actually are the same.

Solution 2:

This is not quire a correct use of on the surface.

As you have seen in the Merriam-Webster definition, the phrase has a meaning very similar to apparently, or seemingly. And like those words, this phrase is typically used like an adverb, to modify another word or clause.

With the inclusion of on the surface in your example, you appear to be saying something like this: It seems like both methods use a small number of labeled samples, but that's not correct. The truth is that they have contrasting statistical implications.

That doesn't seem to be what you mean, and it's logically inconsistent.

You probably want to say something more like this: On the surface, the methods appear similar, because they both use a small number of labeled samples during training and validation. But though the methods appear similar, they have contrasting statistical implications.